path: root/board
diff options
authorGravatar Georges Savoundararadj <savoundg@gmail.com>2016-09-07 15:29:09 -0700
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-09-11 23:27:37 +0200
commit9e768aa1dc6457752ab5e41c612feb8d62d0e11b (patch)
tree03bee4c46d93020442ed6285318e294f247754d1 /board
parentf645f914ac026504bfe4f966bfe620cc3f91e04c (diff)
board/freescale: use the common genimage template
The boards imx6dlsabreauto, imx6dlsabresd, imx6qsabreauto, imx6qsabresd, imx6sxsabresd were referring to board/freescale/create-boot-sd.sh for the sdcard image generation. This commit: * Removes board/freescale/create-boot-sd.sh * Uses the common Freescale genimage template instead. The offset of the first partition was 1MB in the script and is modified to 8MB in the template. * Fixes the readme.txt file accordingly Signed-off-by: Georges Savoundararadj <savoundg@gmail.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'board')
2 files changed, 7 insertions, 96 deletions
diff --git a/board/freescale/create-boot-sd.sh b/board/freescale/create-boot-sd.sh
deleted file mode 100755
index af45115c72..0000000000
--- a/board/freescale/create-boot-sd.sh
+++ /dev/null
@@ -1,93 +0,0 @@
-set -u
-set -e
-PROGNAME=$(basename $0)
- echo "Create an SD card that boots on an i.MX53/6 board."
- echo
- echo "Note: all data on the the card will be completely deleted!"
- echo "Use with care!"
- echo "Superuser permissions may be required to write to the device."
- echo
- echo "Usage: ${PROGNAME} <sd_block_device>"
- echo "Arguments:"
- echo " <sd_block_device> The device to be written to"
- echo
- echo "Example: ${PROGNAME} /dev/mmcblk0"
- echo
-if [ $# -ne 1 ]; then
- usage
- exit 1
-if [ $(id -u) -ne 0 ]; then
- echo "${PROGNAME} must be run as root"
- exit 1
-# The partition name prefix depends on the device name:
-# - /dev/sde -> /dev/sde1
-# - /dev/mmcblk0 -> /dev/mmcblk0p1
-if echo ${DEV}|grep -q mmcblk ; then
- PART="p"
- PART=""
-# Unmount the partitions if mounted
-umount ${PART1} || true
-umount ${PART2} || true
-# First, clear the card
-dd if=/dev/zero of=${DEV} bs=1M count=20
-# Partition the card.
-# SD layout for i.MX6 boot:
-# - Bootloader at offset 1024
-# - FAT partition starting at 1MB offset, containing uImage and *.dtb
-# - ext2/3 partition formatted as ext2 or ext3, containing the root filesystem.
-sfdisk ${DEV} <<EOF
-# Copy the bootloader at offset 1024
-dd if=output/images/u-boot.imx of=${DEV} obs=512 seek=2
-# Prepare a temp dir for mounting partitions
-TMPDIR=$(mktemp -d)
-# FAT partition: kernel and DTBs
-mkfs.vfat ${PART1}
-mount ${PART1} ${TMPDIR}
-cp output/images/*Image ${TMPDIR}/
-cp output/images/*.dtb ${TMPDIR}/ || true
-umount ${TMPDIR}
-# ext2 partition: root filesystem
-mkfs.ext2 ${PART2}
-mount ${PART2} ${TMPDIR}
-tar -C ${TMPDIR}/ -xf output/images/rootfs.tar
-umount ${TMPDIR}
-# Cleanup
-rmdir ${TMPDIR}
-echo Done
diff --git a/board/freescale/imx6sabre/readme.txt b/board/freescale/imx6sabre/readme.txt
index 6c44e22c36..e409d8f190 100644
--- a/board/freescale/imx6sabre/readme.txt
+++ b/board/freescale/imx6sabre/readme.txt
@@ -62,12 +62,16 @@ To determine the device associated to the SD card have a look in the
cat /proc/partitions
-Run the following script as root on your SD card. This will partition the card
-and copy the bootloader, kernel, DTBs and root filesystem as needed.
+Buildroot prepares a bootable "sdcard.img" image in the output/images/
+directory, ready to be dumped on a microSD card. Launch the following
+command as root:
+ dd if=./output/images/sdcard.img of=/dev/<your-microsd-device>
*** WARNING! The script will destroy all the card content. Use with care! ***
- ./board/freescale/create-boot-sd.sh <your-sd-device>
+For details about the medium image layout, see the definition in
Boot the SABRE board