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 | 90f427011710797e6b602f4d319db936f7e6ee71 (patch) | |
tree | c08318ac74ba2891fc10734bc1c423957fa51297 /classes | |
parent | b25e799ffbecd62492b269e3f269996d6b2feb14 (diff) | |
download | meta-fsl-arm-90f427011710797e6b602f4d319db936f7e6ee71.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>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image_types_fsl.bbclass | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass index a43e4c6..d9e292c 100644 --- a/classes/image_types_fsl.bbclass +++ b/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 |