diff options
| author | Otavio Salvador <otavio@ossystems.com.br> | 2012-03-20 21:11:40 +0000 |
|---|---|---|
| committer | Otavio Salvador <otavio@ossystems.com.br> | 2012-04-30 11:28:36 -0300 |
| commit | f5d37896e0fbcfd7ea78d548852cd87929519b24 (patch) | |
| tree | 015c1fbc43bcd4a633ccac29ed2b8dff855a03a2 | |
| parent | 827c44f42d73b108730372b688ea970b8e51971a (diff) | |
| download | meta-freescale-f5d37896e0fbcfd7ea78d548852cd87929519b24.tar.gz | |
image_types_fsl.bbclass: generates mxs' u-boot bootstream binaries
The mxs SoC family requires use of a bootstream in bootloader but at
this moment only SDCard format is supported. The image for use is
'u-boot.mxsboot-sdcard' and this is also the file extension of the
generated file beside of regular u-boot binary.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| -rw-r--r-- | meta-fsl-arm/classes/image_types_fsl.bbclass | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/meta-fsl-arm/classes/image_types_fsl.bbclass b/meta-fsl-arm/classes/image_types_fsl.bbclass index a43e4c6b8..d9e292c69 100644 --- a/meta-fsl-arm/classes/image_types_fsl.bbclass +++ b/meta-fsl-arm/classes/image_types_fsl.bbclass | |||
| @@ -5,6 +5,18 @@ IMAGE_BOOTLOADER ?= "u-boot" | |||
| 5 | # Handle u-boot suffixes | 5 | # Handle u-boot suffixes |
| 6 | UBOOT_SUFFIX ?= "bin" | 6 | UBOOT_SUFFIX ?= "bin" |
| 7 | UBOOT_PADDING ?= "0" | 7 | UBOOT_PADDING ?= "0" |
| 8 | UBOOT_SUFFIX_SDCARD ?= "${UBOOT_SUFFIX}" | ||
| 9 | |||
| 10 | # | ||
| 11 | # Handles i.MX mxs bootstream generation | ||
| 12 | # | ||
| 13 | |||
| 14 | IMAGE_FSTYPES_mxs =+ "uboot.mxsboot-sdcard" | ||
| 15 | |||
| 16 | UBOOT_SUFFIX_SDCARD_mxs ?= "mxsboot-sdcard" | ||
| 17 | IMAGE_DEPENDS_uboot.mxsboot-sdcard = "u-boot-mxsboot-native u-boot" | ||
| 18 | IMAGE_CMD_uboot.mxsboot-sdcard = "mxsboot sd ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} \ | ||
| 19 | ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_SDCARD}" | ||
| 8 | 20 | ||
| 9 | # | 21 | # |
| 10 | # Create an image that can by written onto a SD card using dd. | 22 | # Create an image that can by written onto a SD card using dd. |
| @@ -50,9 +62,15 @@ IMAGE_CMD_sdcard () { | |||
| 50 | parted -s ${SDCARD} mkpart primary ${BOOT_SPACE} 100% | 62 | parted -s ${SDCARD} mkpart primary ${BOOT_SPACE} 100% |
| 51 | parted ${SDCARD} print | 63 | parted ${SDCARD} print |
| 52 | 64 | ||
| 65 | # Change partition type for mxs processor family | ||
| 66 | if [ "${SOC_FAMILY}" = "mxs" ]; then | ||
| 67 | bbnote "Setting partition type to 0x53 as required for mxs' SoC family." | ||
| 68 | sed -i 's,.,\x53,450' ${SDCARD} | ||
| 69 | fi | ||
| 70 | |||
| 53 | case "${IMAGE_BOOTLOADER}" in | 71 | case "${IMAGE_BOOTLOADER}" in |
| 54 | u-boot) | 72 | u-boot) |
| 55 | dd if=${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} of=${SDCARD} conv=notrunc seek=2 skip=${UBOOT_PADDING} bs=512 | 73 | dd if=${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_SDCARD} of=${SDCARD} conv=notrunc seek=2 skip=${UBOOT_PADDING} bs=512 |
| 56 | ;; | 74 | ;; |
| 57 | barebox) | 75 | barebox) |
| 58 | dd if=${DEPLOY_DIR_IMAGE}/barebox-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=1 skip=1 bs=512 | 76 | dd if=${DEPLOY_DIR_IMAGE}/barebox-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=1 skip=1 bs=512 |
