summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2018-04-26 13:52:55 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2018-07-03 18:41:08 -0300
commitecdd93874f434fc200c811392cc83f255f26a4c9 (patch)
tree492db8c050c6a1dacf6ff68decf2589027c65553
parente9820a5de4a32b80649946cdacfec9ffa9e9fe33 (diff)
downloadmeta-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.bbclass14
-rw-r--r--conf/machine/include/imx-base.inc2
-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
318do_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
324IMAGE_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
293SOC_DEFAULT_WKS_FILE ?= "imx-uboot-bootpart.wks" 293SOC_DEFAULT_WKS_FILE ?= "imx-uboot-bootpart.wks"
294SOC_DEFAULT_WKS_FILE_mxs ?= "imx-uboot-mxs-bootpart.wks" 294SOC_DEFAULT_WKS_FILE_mxs ?= "imx-uboot-mxs-bootpart.wks.in"
295 295
296WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}" 296WKS_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#
15part u-boot --source rawcopy --sourceparams="file=u-boot.sb" --ondisk mmcblk --no-table --align 1 15part u-boot --source rawcopy --sourceparams="file=${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard" --ondisk mmcblk --align 1024
16part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16 16part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16
17part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 17part / --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#
15part u-boot --source rawcopy --sourceparams="file=u-boot.sb" --ondisk mmcblk --no-table --align 1 15part u-boot --source rawcopy --sourceparams="file=${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard" --ondisk mmcblk --align 1024
16part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 16part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096
17 17
18bootloader --ptable msdos 18bootloader --ptable msdos