readme.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. RaspberryPi
  2. Intro
  3. =====
  4. To be able to use your RaspberryPi board with the images generated by
  5. Buildroot, you have to choose whether you will use:
  6. * Volatile rootfs in RAM (the rootfs is an initramfs) or
  7. * Persistent rootfs on the SDCard
  8. Also, a good source of information is http://elinux.org/R-Pi_Hub
  9. How to build it
  10. ===============
  11. Configure Buildroot
  12. -------------------
  13. The raspberrypi_defconfig configuration is a minimal configuration with
  14. all that is required to bring the Raspberry Pi. You should base your
  15. work on this defconfig:
  16. $ make raspberrypi_defconfig
  17. If you want to use a persistent rootfs, skip to "Build the rootfs", below.
  18. For a volatile rootfs, you have to slightly adjust the configuration:
  19. $ make menuconfig
  20. * Select "Filesystem images"
  21. * Select "initial RAM filesystem linked into linux kernel"
  22. You may also deselect "tar the root filesystem".
  23. Build the rootfs
  24. ----------------
  25. Note: you will need to have access to the network, since Buildroot will
  26. download the packages' sources.
  27. You may now build your rootfs with:
  28. $ make
  29. (This may take a while; consider getting yourself a coffee ;-) )
  30. Result of the build
  31. -------------------
  32. After building, you should obtain this tree:
  33. output/images/
  34. +-- rootfs.tar
  35. +-- rpi-firmware
  36. | +-- bootcode.bin
  37. | +-- config.txt
  38. | +-- fixup_cd.dat
  39. | +-- fixup.dat
  40. | +-- start_cd.elf
  41. | `-- start.elf
  42. `-- zImage
  43. Note for Volatile: rootfs.tar will only be there if you kept
  44. "tar the root filesystem" option selected in "Filesystem images".
  45. Prepare you SDCard
  46. ==================
  47. For more information, visit
  48. http://elinux.org/RPi_Advanced_Setup#Advanced_SD_card_setup
  49. In summary, your SDCard must have first partition in fat32 and marked bootable.
  50. Create the required partitions:
  51. - for a persistent rootfs, 10MiB is enough memory for the boot fat32
  52. partition, and a second partition is required for the root filesystem
  53. - for a volatile rootfs, 50MiB is required for the boot fat32 partition
  54. Note: You can create any number of partitions you desire, the only requirement
  55. is that the first partition must be using fat32 and be bootable.
  56. Mount the partitions (adjust 'sdX' to match your SDcard device):
  57. $ sudo mount /dev/sdX1 /mnt/mountpointboot
  58. $ sudo mount /dev/sdX2 /mnt/mountpointroot (only for persistent rootfs)
  59. Install the binaries to the SDCard
  60. ----------------------------------
  61. At the root of the boot partition, the RaspberryPi must find the following
  62. files:
  63. * bootcode.bin
  64. * config.txt
  65. * fixup.dat
  66. * start.elf
  67. * zImage
  68. For example:
  69. $ cp output/images/rpi-firmware/* /mnt/mountpointboot
  70. $ cp output/images/zImage /mnt/mountpointboot
  71. Note: The kernel image file name is defined in config.txt like this:
  72. kernel=zImage
  73. If you use a volatile rootfs, Skip to "Finish", below. For a persistent
  74. rootfs, there are further steps to do.
  75. Extract (as root!) the contents of the rootfs.tar archive into the second
  76. partition you created above:
  77. $ sudo tar xf rootfs.tar -C /mnt/mountpointroot
  78. Finish
  79. ======
  80. Unmount all the partitions:
  81. $ sudo umount /mnt/mountpointboot
  82. $ sudo umount /mnt/mountpointroot (only for persistent rootfs)
  83. And eject your SDcard from your computer SDcard reader.
  84. Insert the SDcard into your Raspberry Pi, and power it up. Your new system
  85. should come up, now.