diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2018-04-26 13:52:55 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2018-07-03 18:41:08 -0300 |
commit | ecdd93874f434fc200c811392cc83f255f26a4c9 (patch) | |
tree | 492db8c050c6a1dacf6ff68decf2589027c65553 | |
parent | e9820a5de4a32b80649946cdacfec9ffa9e9fe33 (diff) | |
download | meta-freescale-ecdd93874f434fc200c811392cc83f255f26a4c9.tar.gz |
wic: Fix image generation for i.MX MXS SoC family
The image needs to use the U-Boot generated, for the uSD card, so a
dependency on that must be added to ensure the file is available prior
'wic' uses it.
Besides that, the fstype needs to be changed so it sets the partition
mark allowing the bootrom to find it.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r-- | classes/image_types_fsl.bbclass | 14 | ||||
-rw-r--r-- | conf/machine/include/imx-base.inc | 2 | ||||
-rw-r--r-- | wic/imx-uboot-mxs-bootpart.wks.in (renamed from wic/imx-uboot-mxs-bootpart.wks) | 2 | ||||
-rw-r--r-- | wic/imx-uboot-mxs.wks.in (renamed from wic/imx-uboot-mxs.wks) | 2 |
4 files changed, 17 insertions, 3 deletions
diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass index 4709af95..e7627200 100644 --- a/classes/image_types_fsl.bbclass +++ b/classes/image_types_fsl.bbclass | |||
@@ -312,3 +312,17 @@ IMAGE_TYPEDEP_sdcard_append = " \ | |||
312 | ${@bb.utils.contains('IMAGE_FSTYPES', 'uboot-mxsboot-sdcard', 'uboot-mxsboot-sdcard', '', d)} \ | 312 | ${@bb.utils.contains('IMAGE_FSTYPES', 'uboot-mxsboot-sdcard', 'uboot-mxsboot-sdcard', '', d)} \ |
313 | ${@bb.utils.contains('IMAGE_FSTYPES', 'barebox-mxsboot-sdcard', 'barebox-mxsboot-sdcard', '', d)} \ | 313 | ${@bb.utils.contains('IMAGE_FSTYPES', 'barebox-mxsboot-sdcard', 'barebox-mxsboot-sdcard', '', d)} \ |
314 | " | 314 | " |
315 | |||
316 | # In case we are building for i.MX23 or i.MX28 we need to have the | ||
317 | # image stream built before the wic generation | ||
318 | do_image_wic[depends] += " \ | ||
319 | ${@bb.utils.contains('IMAGE_FSTYPES', 'uboot-mxsboot-sdcard', \ | ||
320 | '${IMAGE_BASENAME}:do_image_uboot_mxsboot_sdcard', '', d)} \ | ||
321 | " | ||
322 | |||
323 | # We need to apply a fixup inside of the partition table | ||
324 | IMAGE_CMD_wic_append_mxs() { | ||
325 | # Change partition type for mxs processor family | ||
326 | bbnote "Setting partition type to 0x53 as required for mxs' SoC family." | ||
327 | echo -n S | dd of=$out${IMAGE_NAME_SUFFIX}.wic bs=1 count=1 seek=450 conv=notrunc | ||
328 | } | ||
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index d14cd53f..facbe145 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc | |||
@@ -291,7 +291,7 @@ WKS_FILE_DEPENDS ?= " \ | |||
291 | " | 291 | " |
292 | 292 | ||
293 | SOC_DEFAULT_WKS_FILE ?= "imx-uboot-bootpart.wks" | 293 | SOC_DEFAULT_WKS_FILE ?= "imx-uboot-bootpart.wks" |
294 | SOC_DEFAULT_WKS_FILE_mxs ?= "imx-uboot-mxs-bootpart.wks" | 294 | SOC_DEFAULT_WKS_FILE_mxs ?= "imx-uboot-mxs-bootpart.wks.in" |
295 | 295 | ||
296 | WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}" | 296 | WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}" |
297 | 297 | ||
diff --git a/wic/imx-uboot-mxs-bootpart.wks b/wic/imx-uboot-mxs-bootpart.wks.in index 0e96ab3a..8b5bdd48 100644 --- a/wic/imx-uboot-mxs-bootpart.wks +++ b/wic/imx-uboot-mxs-bootpart.wks.in | |||
@@ -12,7 +12,7 @@ | |||
12 | # | | | | | 12 | # | | | | |
13 | # 0 1kiB 4MiB 16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) | 13 | # 0 1kiB 4MiB 16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) |
14 | # | 14 | # |
15 | part u-boot --source rawcopy --sourceparams="file=u-boot.sb" --ondisk mmcblk --no-table --align 1 | 15 | part u-boot --source rawcopy --sourceparams="file=${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard" --ondisk mmcblk --align 1024 |
16 | part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16 | 16 | part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16 |
17 | part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 | 17 | part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 |
18 | 18 | ||
diff --git a/wic/imx-uboot-mxs.wks b/wic/imx-uboot-mxs.wks.in index 0f5c51d4..44b6f931 100644 --- a/wic/imx-uboot-mxs.wks +++ b/wic/imx-uboot-mxs.wks.in | |||
@@ -12,7 +12,7 @@ | |||
12 | # | | | | | 12 | # | | | | |
13 | # 0 1kiB 4MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) | 13 | # 0 1kiB 4MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) |
14 | # | 14 | # |
15 | part u-boot --source rawcopy --sourceparams="file=u-boot.sb" --ondisk mmcblk --no-table --align 1 | 15 | part u-boot --source rawcopy --sourceparams="file=${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard" --ondisk mmcblk --align 1024 |
16 | part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 | 16 | part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 |
17 | 17 | ||
18 | bootloader --ptable msdos | 18 | bootloader --ptable msdos |