Skip to contentSkip to conversation

u-boot-fslc-mxsboot: Add dtc as build dependency

PATCH Superseded Otavio Salvador 3 participants 7 messages Apr 24, 2018 – Apr 26, 2018 Arm i.MX and Layerscape

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 u-boot-fslc-mxsboot: Add dtc as build dependency

The dtc must be available during build time. It fixes a build error when host does not have it installed and we are building a native variant.

---

 recipes-bsp/u-boot/u-boot-fslc-mxsboot_2017.11.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-bsp/u-boot/u-boot-fslc-mxsboot_2017.11.bb +1 -1
index 533bfbf6..ed32a274 100644
@@ -3,7 +3,7 @@ require u-boot-fslc-common_${PV}.inc
 DESCRIPTION = "U-boot bootloader mxsboot tool"
 SECTION = "bootloader"
 
-DEPENDS = "openssl"
+DEPENDS = "dtc openssl"
 
 PROVIDES = "u-boot-mxsboot"
 
Signature · 1 line
2.17.0
#1 lore raw

PATCH 2/2 wic: Fix image generation for i.MX MXS SoC family

The image needs to use the U-Boot, bootstream, generated for the uSD card and a dependency on that must be added so we get it deployed before using the file. Besides that, the fstype needs to be changed so it sets the partition mark allowing the bootrom to find it.

---

 classes/image_types_fsl.bbclass                              | 5 +++++
 conf/machine/include/imx-base.inc                            | 2 +-
 ...-uboot-mxs-bootpart.wks => imx-uboot-mxs-bootpart.wks.in} | 2 +-
 wic/{imx-uboot-mxs.wks => imx-uboot-mxs.wks.in}              | 2 +-
 4 files changed, 8 insertions(+), 3 deletions(-)
 rename wic/{imx-uboot-mxs-bootpart.wks => imx-uboot-mxs-bootpart.wks.in} (83%)
 rename wic/{imx-uboot-mxs.wks => imx-uboot-mxs.wks.in} (79%)
classes/image_types_fsl.bbclass +5 -0
index 4709af95..65b2a9a8 100644
@@ -312,3 +312,8 @@ IMAGE_TYPEDEP_sdcard_append = " \
     ${@bb.utils.contains('IMAGE_FSTYPES', 'uboot-mxsboot-sdcard', 'uboot-mxsboot-sdcard', '', d)} \
     ${@bb.utils.contains('IMAGE_FSTYPES', 'barebox-mxsboot-sdcard', 'barebox-mxsboot-sdcard', '', d)} \
 "
+
+do_image_wic[depends] += " \
+    ${@bb.utils.contains('IMAGE_FSTYPES', 'uboot-mxsboot-sdcard', \
+                                          '${IMAGE_BASENAME}:do_image_uboot_mxsboot_sdcard', '', d)} \
+"
conf/machine/include/imx-base.inc +1 -1
index ab9fcf30..50de9a70 100644
@@ -257,7 +257,7 @@ WKS_FILE_DEPENDS ?= " \
 "
 
 SOC_DEFAULT_WKS_FILE ?= "imx-uboot-bootpart.wks"
-SOC_DEFAULT_WKS_FILE_mxs ?= "imx-uboot-mxs-bootpart.wks"
+SOC_DEFAULT_WKS_FILE_mxs ?= "imx-uboot-mxs-bootpart.wks.in"
 
 WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}"
 
wic/imx-uboot-mxs-bootpart.wks.in renamed from wic/imx-uboot-mxs-bootpart.wks +1 -1
similarity index 83%
rename from wic/imx-uboot-mxs-bootpart.wks
rename to wic/imx-uboot-mxs-bootpart.wks.in
index 0e96ab3a..29fe1a50 100644
@@ -12,7 +12,7 @@
 # | |         |              |
 # 0 1kiB    4MiB          16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)
 #
-part u-boot --source rawcopy --sourceparams="file=u-boot.sb" --ondisk mmcblk --no-table --align 1
+part u-boot --source rawcopy --sourceparams="file=${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard" --ondisk mmcblk --fstype=ontrackdm6aux3 --align 1
 part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16
 part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096
 
wic/imx-uboot-mxs.wks.in renamed from wic/imx-uboot-mxs.wks +1 -1
similarity index 79%
rename from wic/imx-uboot-mxs.wks
rename to wic/imx-uboot-mxs.wks.in
index 0f5c51d4..ae30c903 100644
@@ -12,7 +12,7 @@
 # | |         |              |
 # 0 1kiB    4MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)
 #
-part u-boot --source rawcopy --sourceparams="file=u-boot.sb" --ondisk mmcblk --no-table --align 1
+part u-boot --source rawcopy --sourceparams="file=${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard" --ondisk mmcblk --fstype=ontrackdm6aux3 --align 1
 part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096
 
 bootloader --ptable msdos
Signature · 1 line
2.17.0
#2 lore raw

Re: [PATCH 2/2] wic: Fix image generation for i.MX MXS SoC family

Quoted 4 lines · Otavio Salvador

The image needs to use the U-Boot, bootstream, generated for the uSD card and a dependency on that must be added so we get it deployed before using the file. Besides that, the fstype needs to be changed so it sets the partition mark allowing the bootrom to find it.

I have tested the patch set and it worked very fine to me.

I found nothing to comment in the patches, however, Otavio, when you apply those, would you, please, clarity what you meant by:

"The image needs to use the U-Boot, bootstream, generated for the uSD"

I think the comma might be replaced by an "and"

Daiane

Quoted 78 lines

---

 classes/image_types_fsl.bbclass                              | 5 +++++
 conf/machine/include/imx-base.inc                            | 2 +-
 ...-uboot-mxs-bootpart.wks => imx-uboot-mxs-bootpart.wks.in} | 2 +-
 wic/{imx-uboot-mxs.wks => imx-uboot-mxs.wks.in}              | 2 +-
 4 files changed, 8 insertions(+), 3 deletions(-)
 rename wic/{imx-uboot-mxs-bootpart.wks => imx-uboot-mxs-bootpart.wks.in} (83%)
 rename wic/{imx-uboot-mxs.wks => imx-uboot-mxs.wks.in} (79%)
classes/image_types_fsl.bbclass +5 -0
index 4709af95..65b2a9a8 100644
@@ -312,3 +312,8 @@ IMAGE_TYPEDEP_sdcard_append = " \
     ${@bb.utils.contains('IMAGE_FSTYPES', 'uboot-mxsboot-sdcard', 'uboot-mxsboot-sdcard', '', d)} \
     ${@bb.utils.contains('IMAGE_FSTYPES', 'barebox-mxsboot-sdcard', 'barebox-mxsboot-sdcard', '', d)} \
 "
+
+do_image_wic[depends] += " \
+    ${@bb.utils.contains('IMAGE_FSTYPES', 'uboot-mxsboot-sdcard', \
+                                          '${IMAGE_BASENAME}:do_image_uboot_mxsboot_sdcard', '', d)} \
+"
conf/machine/include/imx-base.inc +1 -1
index ab9fcf30..50de9a70 100644
@@ -257,7 +257,7 @@ WKS_FILE_DEPENDS ?= " \
 "
 
 SOC_DEFAULT_WKS_FILE ?= "imx-uboot-bootpart.wks"
-SOC_DEFAULT_WKS_FILE_mxs ?= "imx-uboot-mxs-bootpart.wks"
+SOC_DEFAULT_WKS_FILE_mxs ?= "imx-uboot-mxs-bootpart.wks.in"
 
 WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}"
 
wic/imx-uboot-mxs-bootpart.wks.in renamed from wic/imx-uboot-mxs-bootpart.wks +1 -1
similarity index 83%
rename from wic/imx-uboot-mxs-bootpart.wks
rename to wic/imx-uboot-mxs-bootpart.wks.in
index 0e96ab3a..29fe1a50 100644
@@ -12,7 +12,7 @@
 # | |         |              |
 # 0 1kiB    4MiB          16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)
 #
-part u-boot --source rawcopy --sourceparams="file=u-boot.sb" --ondisk mmcblk --no-table --align 1
+part u-boot --source rawcopy --sourceparams="file=${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard" --ondisk mmcblk --fstype=ontrackdm6aux3 --align 1
 part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16
 part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096
 
wic/imx-uboot-mxs.wks.in renamed from wic/imx-uboot-mxs.wks +1 -2
similarity index 79%
rename from wic/imx-uboot-mxs.wks
rename to wic/imx-uboot-mxs.wks.in
index 0f5c51d4..ae30c903 100644
@@ -12,7 +12,7 @@
 # | |         |              |
 # 0 1kiB    4MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)
 #
-part u-boot --source rawcopy --sourceparams="file=u-boot.sb" --ondisk mmcblk --no-table --align 1
+part u-boot --source rawcopy --sourceparams="file=${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard" --ondisk mmcblk --fstype=ontrackdm6aux3 --align 1
 part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096
 
 bootloader --ptable msdos
--

2.17.0

--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale

#3 lore raw

Re: [PATCH 2/2] wic: Fix image generation for i.MX MXS SoC family

Quoted 7 lines · Daiane Angolini
Quoted 4 lines · Otavio Salvador

The image needs to use the U-Boot, bootstream, generated for the uSD card and a dependency on that must be added so we get it deployed before using the file. Besides that, the fstype needs to be changed so it sets the partition mark allowing the bootrom to find it.

Quoted 8 lines

I have tested the patch set and it worked very fine to me.

I found nothing to comment in the patches, however, Otavio, when you apply those, would you, please, clarity what you meant by:

"The image needs to use the U-Boot, bootstream, generated for the uSD"

I think the comma might be replaced by an "and"

Probably the commit log can be improved.

What I meant is that the image needs to use the u-boot binary that goes over the mxsboot specifically tailored for use with the SD cards. The binary needs to be ready for use by the wic before the wic image generation is done, hence the new dependency.

How do you think we can improve it?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#4 lore raw

Re: [PATCH 2/2] wic: Fix image generation for i.MX MXS SoC family

Quoted 17 lines · Otavio Salvador
Quoted 7 lines · Daiane Angolini
Quoted 4 lines · Otavio Salvador

The image needs to use the U-Boot, bootstream, generated for the uSD card and a dependency on that must be added so we get it deployed before using the file. Besides that, the fstype needs to be changed so it sets the partition mark allowing the bootrom to find it.

Quoted 8 lines

I have tested the patch set and it worked very fine to me.

I found nothing to comment in the patches, however, Otavio, when you apply those, would you, please, clarity what you meant by:

"The image needs to use the U-Boot, bootstream, generated for the uSD"

I think the comma might be replaced by an "and"

Quoted 8 lines

Probably the commit log can be improved.

What I meant is that the image needs to use the u-boot binary that goes over the mxsboot specifically tailored for use with the SD cards. The binary needs to be ready for use by the wic before the wic image generation is done, hence the new dependency.

How do you think we can improve it?

I think to remove the word "bootstream" is enough.

Daiane

Quoted 5 lines

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750

#5 lore raw

Re: [PATCH 2/2] wic: Fix image generation for i.MX MXS SoC family

On Thu, Apr 26, 2018 at 1:19 PM Daiane Angolini <[email protected]> wrote:
...

Quoted 1 line

I think to remove the word "bootstream" is enough.

I sent a v2. Please take a look.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#6 lore raw

Re: [PATCH 2/2] wic: Fix image generation for i.MX MXS SoC family

Quoted 6 lines · Otavio Salvador

On Thu, Apr 26, 2018 at 1:19 PM Daiane Angolini <[email protected]> wrote:
...

Quoted 1 line

I think to remove the word "bootstream" is enough.

I sent a v2. Please take a look.

v2 is good to me. Thanks a lot

Daiane

Quoted 5 lines

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750