diff options
| author | Ezequiel GarcĂa <ezequiel@vanguardiasur.com.ar> | 2016-04-16 12:23:20 -0300 |
|---|---|---|
| committer | Peter Korsgaard <peter@korsgaard.com> | 2016-04-18 23:19:25 +0200 |
| commit | 54ec0e2a74a0e3b0f5e5780bca142dfa937f9a99 (patch) | |
| tree | d0a9682d907461f15a4aee5539cd5b50bdb9207c /board/minnowboard | |
| parent | e645a3b0eda08422664abf798c640719c70549b0 (diff) | |
| download | buildroot-54ec0e2a74a0e3b0f5e5780bca142dfa937f9a99.tar.gz buildroot-54ec0e2a74a0e3b0f5e5780bca142dfa937f9a99.zip | |
board/minnowboard: Rework to generate SD card image
Let's rework the board and config files to use genimage
to generate the SD card image directly.
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'board/minnowboard')
| -rw-r--r-- | board/minnowboard/genimage.cfg | 34 | ||||
| -rwxr-xr-x | board/minnowboard/post-image.sh | 13 | ||||
| -rw-r--r-- | board/minnowboard/readme.txt | 39 |
3 files changed, 59 insertions, 27 deletions
diff --git a/board/minnowboard/genimage.cfg b/board/minnowboard/genimage.cfg new file mode 100644 index 0000000000..6cf7874307 --- /dev/null +++ b/board/minnowboard/genimage.cfg @@ -0,0 +1,34 @@ +# Create an image of the efi partition +image efi-part.vfat { + vfat { + file startup.nsh { + image = "efi-part/startup.nsh" + } + file EFI { + image = "efi-part/EFI" + } + file bzImage { + image = "bzImage" + } + } + size=10M +} + +# Create the sdcard image, pulling in +# * the image created by buildroot +# * the efi-partition created above +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xEF + image = "efi-part.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/board/minnowboard/post-image.sh b/board/minnowboard/post-image.sh new file mode 100755 index 0000000000..428baa5e55 --- /dev/null +++ b/board/minnowboard/post-image.sh @@ -0,0 +1,13 @@ +#!/bin/sh -e + +GENIMAGE_CFG="board/minnowboard/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" diff --git a/board/minnowboard/readme.txt b/board/minnowboard/readme.txt index 62ffa92e0b..3a24fdc162 100644 --- a/board/minnowboard/readme.txt +++ b/board/minnowboard/readme.txt @@ -1,40 +1,25 @@ -Prepare the SD card for the Minnow Board +How to get started with the MinnowBoard ======================================== - 1. Partition the SD card with a GPT partition table +1. Build - sudo cgdisk /dev/mmcblk0 + Apply the defconfig: - Create two partitions: + $ make minnowboard_defconfig - a) First partition of a few dozens of megabytes, which will be - used to store the bootloader and the kernel image. Type must - be EF00 (EFI partition). + Add any additional packages required and build: - b) Second partition of any size, which will be used to store the - root filesystem. Type must be 8300 (Linux filesystem) + $ make - 2. Prepare the boot partition +2. Write the SD card - We will format it, mount it, copy the EFI data generated by - Buildroot, and the kernel image. + The build process will create a SD card image in output/images. + Write the image to an mSD card, insert into the MinnowBoard + and power the board on. - sudo mkfs.vfat -F 32 -n boot /dev/mmcblk0p1 - sudo mount /dev/mmcblk0p1 /mnt - sudo cp -a output/images/efi-part/* /mnt/ - sudo cp output/images/bzImage /mnt/ - sudo umount /mnt + $ dd if=output/images/sdcard.img of=/dev/mmcblk0; sync - 3. Prepare the root partition - - We will format it, mount it, and extract the root filesystem. - - sudo mkfs.ext3 -L root /dev/mmcblk0p2 - sudo mount /dev/mmcblk0p2 /mnt - sudo tar -C /mnt -xf output/images/rootfs.tar - sudo umount /mnt - - 4. Enjoy +3. Enjoy Additional information about this board can be found at http://www.minnowboard.org/. |

