graugans / meta-udoo

:heartpulse: openembedded meta layer for the UDOO boards
MIT License
31 stars 19 forks source link

Use u-boot-fslc instead of the UDOO u-boot #24

Closed graugans closed 7 years ago

graugans commented 7 years ago

The UDOO u-boot changes rapidly which breaks builds. This patch uses the default u-boot-fslc recipe from meta-fsl-arm plus a small patch which enables uEnv.txt.

@modjo756 and @cyrilfr could you please so kind check this PR?

Signed-off-by: Christian Ege k4230r6@gmail.com

modjo756 commented 7 years ago

Build running ...

modjo756 commented 7 years ago

@graugans i have this error during the build : _ERROR: u-boot-fslc-v2016.07+gitAUTOINC+e6b42411ab-r0 do_install: Function failed: do_install (log file is located at /media/modjo/data1TO/yocto/meta-modjo/udooqdl/tmp/work/udooqdl-poky-linux-gnueabi/u-boot-fslc/v2016.07+gitAUTOINC+e6b42411ab-r0/temp/log.do_install.15637) ERROR: Logfile of failure stored in: /media/modjo/data1TO/yocto/meta-modjo/udooqdl/tmp/work/udooqdl-poky-linux-gnueabi/u-boot-fslc/v2016.07+gitAUTOINC+e6b42411ab-r0/temp/log.do_install.15637 Log data follows: | DEBUG: Executing shell function do_install | install: cannot stat '/media/modjo/data1TO/yocto/meta-modjo/udooqdl/tmp/work/udooqdl-poky-linux-gnueabi/u-boot-fslc/v2016.07+gitAUTOINC+e6b42411ab-r0/uEnv.txt': No such file or directory | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_install (log file is located at /media/modjo/data1TO/yocto/meta-modjo/udooqdl/tmp/work/udooqdl-poky-linux-gnueabi/u-boot-fslc/v2016.07+gitAUTOINC+e6b42411ab-r0/temp/log.do_install.15637) ERROR: Task 194 (/media/modjo/data1TO/yocto/meta-modjo/sources/meta-fsl-arm/recipes-bsp/u-boot/u-boot-fslc_2016.07.bb, doinstall) failed with exit code '1' edit : just copied uEnv.txt on tmp/work/udooqdl-poky-linux-gnueabi/u-boot-fslc/v2016.07+gitAUTOINC+e6b42411ab-r0/ resolve the problem. perhaps it needs to create a file u-boot-fsl_git.bb on folder uboot ?

modjo756 commented 7 years ago

@graugans , new error during the build :

_ERROR: u-boot-fslc-v2016.07+gitAUTOINC+e6b42411ab-r0 do_populate_sysroot: The recipe u-boot-fslc is trying to install files into a shared area when those files already exist. Those files and their manifest location are: /media/modjo/data1TO/yocto/meta-modjo/udooqdl/tmp/sysroots/udooqdl/sysroot-providers/u-boot Matched in manifest-udooqdl-u-boot-udooboard.populate_sysroot Please verify which recipe should provide the above files. The build has stopped as continuing in this scenario WILL break things, if not now, possibly in the future (we've seen builds fail several months later). If the system knew how to recover from this automatically it would however there are several different scenarios which can result in this and we don't know which one this is. It may be you have switched providers of something like virtual/kernel (e.g. from linux-yocto to linux-yocto-dev), in that case you need to execute the clean task for both recipes and it will resolve this error. It may be you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning those recipes should again resolve this error however switching DISTRO_FEATURES on an existing build directory is not supported, you should really clean out tmp and rebuild (reusing sstate should be safe). It could be the overlapping files detected are harmless in which case adding them to SSTATE_DUPWHITELIST may be the correct solution. It could also be your build is including two different conflicting versions of things (e.g. bluez 4 and bluez 5 and the correct solution for that would be to resolve the conflict. If in doubt, please ask on the mailing list, sharing the error and filelist above. ERROR: u-boot-fslc-v2016.07+gitAUTOINC+e6b42411ab-r0 do_populate_sysroot: If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases. ERROR: u-boot-fslc-v2016.07+gitAUTOINC+e6b42411ab-r0 do_populate_sysroot: Function failed: sstate_task_postfunc ERROR: Logfile of failure stored in: /media/modjo/data1TO/yocto/meta-modjo/udooqdl/tmp/work/udooqdl-poky-linux-gnueabi/u-boot-fslc/v2016.07+gitAUTOINC+e6b42411ab-r0/temp/log.do_populate_sysroot.20032 ERROR: Task 195 (/media/modjo/data1TO/yocto/meta-modjo/sources/meta-fsl-arm/recipes-bsp/u-boot/u-boot-fslc_2016.07.bb, do_populatesysroot) failed with exit code '1'

graugans commented 7 years ago

Due to multiple providers of u-boot you have to do rm tmp/ -rfin your build folder this should fix the issue.

modjo756 commented 7 years ago

afetr build, try to boot and have this error in debug (serial) :

_U-Boot SPL 2016.07+fslc+ge6b4241 (Oct 16 2016 - 14:11:29) Trying to boot from MMC1

U-Boot 2016.07+fslc+ge6b4241 (Oct 16 2016 - 14:11:29 +0200)

CPU: Freescale i.MX6Q rev1.2 at 792 MHz Reset cause: POR Board: Udoo Quad DRAM: 1 GiB MMC: FSL_SDHC: 0 *\ Warning - bad CRC, using default environment

In: serial Out: serial Err: serial Net: using phy at 6 FEC [PRIME] Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device reading boot.scr \ Unable to read file boot.scr reading zImage 4379128 bytes read in 216 ms (19.3 MiB/s) Booting from mmc ... reading imx6q-udoo.dtb \ Unable to read file imx6q-udoo.dtb Kernel image @ 0x12000000 [ 0x000000 - 0x42d1f8 ]

Starting kernel ..._

cyrilfr commented 7 years ago

This is because the DTB files are int the root of boot partition instead of in a dts/ subdirectory.

graugans commented 7 years ago

Looks like the patch was not applied. Because u-boot tries to load boot.scr instead of uEnv.txt

modjo756 commented 7 years ago

perhaps it needs to create a file u-boot-fsl_git.bb on folder uboot to aplly the patch and copy uEnv.txt ?

modjo756 commented 7 years ago

@graugans @cyrilfr , i have rename imx6q-udoo-hdmi.dtb to imx6q-udoo.dtb and the now the card boot on yocto !

cyrilfr commented 7 years ago

Without a .bb file, I don't get how it could apply the patch. @modjo756 This is not a valid solution. Solutions are patching U-Boot or moving all the DTB files in a subdirectory after Kernel compilation.

modjo756 commented 7 years ago

@cyrilfr yes, but it just for the test ...

cyrilfr commented 7 years ago

Does the basic hardware (touchscreen, wifi, bluetooth, ...) work?

modjo756 commented 7 years ago

yes all seems to be working, tested ok :

graugans commented 7 years ago

Sorry it was a bit late yesterday and I did too much in parallel :) there was the bbappend file missing

modjo756 commented 7 years ago

No problem, i seen this and launch a build with your bbappend ... i let you know

modjo756 commented 7 years ago

Now the build work without warning or error and the card boot fine with uEnv.txt. I didn't try lvds but boot on hdmi ok !

cyrilfr commented 7 years ago

I tried and it doesn't work (lvds7).

modjo756 commented 7 years ago

I will try this evening with lvds7.

modjo756 commented 7 years ago

Ok, if i change (in uEnv) the video output to lvds7, it didn't work. The card boot but try to open hdmi dtb instead of lvds7, see the log under :

U-Boot SPL 2016.07+fslc+ge6b4241 (Oct 16 2016 - 21:46:49)
Trying to boot from MMC1

U-Boot 2016.07+fslc+ge6b4241 (Oct 16 2016 - 21:46:49 +0200)

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: POR
Board: Udoo Quad
DRAM:  1 GiB
MMC:   FSL_SDHC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   using phy at 6
FEC [PRIME]
Hit any key to stop autoboot:  3  2  1  0 
switch to partitions #0, OK
mmc0 is current device
reading uEnv.txt
930 bytes read in 12 ms (75.2 KiB/s)
Running bootscript from mmc ...
reading zImage
4379128 bytes read in 215 ms (19.4 MiB/s)
Booting from mmc ...
**reading imx6q-udoo-hdmi.dtb**
41714 bytes read in 20 ms (2 MiB/s)
Kernel image @ 0x12000000 [ 0x000000 - 0x42d1f8 ]
## Flattened Device Tree blob at 18000000
   Booting using the fdt blob at 0x18000000
   Using Device Tree in place at 18000000, end 1800d2f1

Starting kernel ...
cyrilfr commented 7 years ago

I updated my repo to make the UDOO U-Boot with Quad branch work.

modjo756 commented 7 years ago

Did the lvds work now ? if yes, what's the mistake ?

graugans commented 7 years ago

@modjo756 @cyrilfr uses the UDOO UBoot, but switched back to an older rev (other) where quad did worked.

fmntf commented 7 years ago

Hi guys, I know there is a lot of mess in the uboot repo. Just to add some more noise, I have started to port everything on 2016.09 (it's on my personal account). Linux support is complete for QD/Neo, Android support is still missing btw.

graugans commented 7 years ago

@fmntf For me this are good news, based on your work I can backport stuff to the u-boot-fslc_2016.07 used in meta-fsl-arm layer and add Seco A62. This will remove a lot overhead. It maybe worth to try to integrate your work in the upstream U-Boot repositories. I guess Wolfgang will may complain about environment handling in C...

modjo756 commented 7 years ago

@fmntf thanks for this !

fmntf commented 7 years ago

Christian, you should be able just to copy and paste board/udoo configs/udoo include/configs/udoo.h into 2016.07 (and fix the Kconfig). I have started to work on the mailine uboot so my patches can be integrated upstream. I have the same doubts as you regarding the env variables btw. In any case I want to add Android support before creating the pull request. Also A62 and B08 must be integrated too.

cyrilfr commented 7 years ago

@graugans Today I work with the last revision of the 2015.10.fslc-qdl branch with an other .bb file (like you did with your .bbappend) : https://gitlab.com/cyrilfr/meta-udoo/tree/krogoth/recipes-bsp/u-boot

@modjo756 Yes lvds7 works. I had to uncomment this line in the uEnv.txt file with lvds7: #video_output=hdmi (Not used at the moment!!)

graugans commented 7 years ago

@fmntf When porting to A62 the DDR settings for the Solo Variant would be nice.

@cyrilfr One U-Boot to rule them all would be nice. I was a bit scared about the NEO because of the M4 Core handling.

cyrilfr commented 7 years ago

@graugans Sure... that's why I keep the UDOO repo in my recipes instead of using half u-boot-fsl half udoo u-boot (also for a full support in the future).

modjo756 commented 7 years ago

Great @graugans ! I suppose that you first commit is for secoA62 emmc FS resize ? Otherwise, do you plan to add support for secoA62 ?

graugans commented 7 years ago

Yes, this should fit Seco A62 eMMC Boot as-well. It was also neesed cause WIC sets a different label on the root filesystem what needs changes anyway. A62 is on the pipeline.

modjo756 commented 7 years ago

@graugans , nice wok i will make a build for the seco A62 to test and let you know

graugans commented 7 years ago

This would be nice, the A62 is not this well tested at the Moment. Especially LVDS panels.