From: Fabio Estevam Date: Mon, 31 Oct 2016 14:11:58 +0000 (-0200) Subject: configs/imx28evk: Generate the standard sdcard.img X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=898538efef6b67791a1bad7eacc47e67bdb48e31;p=buildroot.git configs/imx28evk: Generate the standard sdcard.img Generate the standard sdcard.img format that can be directly copied to the SD card. Remove the custom create-boot-sd.sh script and update the readme.txt file accordingly. Signed-off-by: Fabio Estevam [Thomas: further tweaks to readme.txt.] Signed-off-by: Thomas Petazzoni --- diff --git a/board/freescale/imx28evk/create-boot-sd.sh b/board/freescale/imx28evk/create-boot-sd.sh deleted file mode 100755 index bce221237c..0000000000 --- a/board/freescale/imx28evk/create-boot-sd.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh - -set -u -set -e - -PROGNAME=$(basename $0) - -usage() -{ - echo "Create an SD card that boots on an i.MX28 EVK 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} " - echo "Arguments:" - echo " The device to be written to" - echo - echo "Example: ${PROGNAME} /dev/mmcblk0" - echo -} - -if [ $# -ne 1 ]; then - usage - exit 1 -fi - -if [ $(id -u) -ne 0 ]; then - echo "${PROGNAME} must be run as root" - exit 1 -fi - -DEV=${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" -else - PART="" -fi - -PART1=${DEV}${PART}1 -PART2=${DEV}${PART}2 -PART3=${DEV}${PART}3 - -# Unmount the partitions if mounted -umount ${PART1} || true -umount ${PART2} || true -umount ${PART3} || true - -# First, clear the card -dd if=/dev/zero of=${DEV} bs=1M count=20 - -sync - -# Partition the card. -# SD layout for i.MX28 boot: -# - Special partition type 53 at sector 2048, containing an SD-SB-encapsulated u-boot -# - FAT partition containing zImage -# - ext2/3 partition formatted as ext2 or ext3, containing the root filesystem. -sfdisk --force -u S ${DEV} < + sudo dd if=output/images/sdcard.img of=/dev/ Boot the i.MX28 EVK board ========================= diff --git a/configs/freescale_imx28evk_defconfig b/configs/freescale_imx28evk_defconfig index a6384626d7..790c338251 100644 --- a/configs/freescale_imx28evk_defconfig +++ b/configs/freescale_imx28evk_defconfig @@ -22,3 +22,13 @@ BR2_TARGET_UBOOT_BOARDNAME="mx28evk" BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.09.01" BR2_TARGET_UBOOT_FORMAT_SD=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT4=y + +# To generate SD Image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/imx28evk/post-image.sh"