diff options
Diffstat (limited to 'classes/image_types_fsl.bbclass')
-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 |