Yocto imx6 UUU starting problems

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Yocto imx6 UUU starting problems

7,951 Views
bcyranka
Contributor II

Hey everybody,

I work currently with this Config:

MACHINE=imx6qdlsabresd DISTRO=fslc-framebuffer source setup-environment build

on this repo:

GitHub - Freescale/fsl-community-bsp-platform at zeus 

When i build the core-image-minimal, everthing compiles.

But my main problem is how to flash this "image" ( u-boot,zImage and rootFS) on the device?

And is there a simple trick to create the same stuff for the mfg (uuu) ?

Because I tried to build "fsl-image-mfgtool-initramfs" but I got this error message:

ERROR: Nothing PROVIDES 'u-boot-mfgtool' (but /fsl-community-bsp/sources/meta-freescale/recipes-fsl/images/fsl-image-mfgtool-initramfs.bb DEPENDS on or otherwise requires it)
u-boot-imx-mfgtool PROVIDES u-boot-mfgtool but was skipped: You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.
ERROR: Required build target 'fsl-image-mfgtool-initramfs' has no buildable providers.
Missing or unbuildable dependency chain was: ['fsl-image-mfgtool-initramfs', 'u-boot-mfgtool']

Thanks.

Benedikt

Labels (3)
18 Replies

6,708 Views
yibhan
Contributor III

Hi benedikt,

Thank you for answering. It would be helpful for me ^^, by the way, I have one more question about DEVICE TREE.

In my understanding, uboot have included device tree blob in uboot image, but kernel have independent dtb.

I am consusing about that, I should match same dtb name both in uboot and kernel? For example, imx6qsabresd.dtb in uboot and imx6qsabreauto.dtb, is that unavailable? I am sorry for you, but I just am curious.

Thank you in advance

0 Kudos

6,708 Views
yibhan
Contributor III

Hi guys,

I have same problem, dtb file exists in emmc actually, but loadfdt doesn't work, doesn't read dtb file from emmc so that

bootz starts wrong at ram address.

Could you please guide me to check some points?

0 Kudos

6,708 Views
bcyranka
Contributor II

Hey Yibeom Han,

please check if the dtb file exist on the emmc. 

You can do that with this "ls mmc 3" command in uboot. In this case 3 is the device number. Maybe it is another number on your board.


This should be the output: 

=> ls mmc 3:1
40437 YOURDTBFILE.dtb
8519672 zImage

2 file(s), 0 dir(s)

Then check this in the uboot env: 

=> print fdt_file
fdt_file=undefined

now use setenv to write "YOURDTBFILE.dtb" to the fdt_file variable:

=> setenv fdt_file YOURDTBFILE.dtb
=> printenv fdt_file
fdt_file=YOURDTBFILE.dtb

Save the Environment to MMC!
=> saveenv
Saving Environment to MMC... Writing to MMC(3)... OK

Greetings
Benedikt

6,708 Views
karangajjar
Senior Contributor II

Hi Benedikt Cyranka,

## Booting kernel from Legacy Image at 12000000 ...
Load Address: 10008000
Entry Point: 10008000

The different address should not be the issue. 12000000 is the load address for kernel and 10008000 is the entry point from where the u-boot starts at the reset.

Regards,

Karan Gajjar

0 Kudos

6,708 Views
bcyranka
Contributor II

Hey everyboy,

I resolved my question with your help. 

Thanks!


To resolve the problem I used the Repo that is discribed in the new Version of the documentation that you send in this thread. 

It is not longer required to build the mfg-initramfs image.

I just build "bitbake pseudo-native" and after this it is possible to build "bitbake imx-image-core".

After this process all needed files are in the depoly directory. 

But I have still an issue... 

I can write with the uuu the u-boot, kernel and rootfs to the mmc. But the kernel freeze with "Startin Kernel ...".

My uuu command: "uuu -b emmc_all u-boot.imx imx-image-core-imx6dlsabresd.wic.bz2"

Serial Output

U-Boot 2019.04-lf-5.4.y_v2019.04+g228843c (Apr 16 2020 - 13:10:12 +0000)

CPU: Freescale i.MX6SOLO rev1.3 996 MHz (running at 792 MHz)
CPU: Extended Commercial temperature grade (-20C to 105C) at 51C
Reset cause: POR
Model: Freescale i.MX6 DualLite SABRE Smart Device Board
Board: MX6-SabreSD
DRAM: 1 GiB
PMIC: PFUZE100! DEV_ID=0x10 REV_ID=0x21
MMC: FSL_SDHC: 1, FSL_SDHC: 2, FSL_SDHC: 3
Loading Environment from MMC... OK
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In: serial
Out: serial
Err: serial
switch to partitions #0, OK
mmc3(part 0) is current device
flash target is MMC:3
Net: Could not get PHY for FEC0: addr 1
Could not get PHY for FEC0: addr 1
eth-1: ethernet@02188000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc3(part 0) is current device
8519672 bytes read in 240 ms (33.9 MiB/s)
Booting from mmc ...
53257 bytes read in 8 ms (6.3 MiB/s)
Kernel image @ 0x12000000 [ 0x000000 - 0x81fff8 ]
## Flattened Device Tree blob at 18000000
Booting using the fdt blob at 0x18000000
Using Device Tree in place at 18000000, end 18010008

Starting kernel ...

0 Kudos

6,708 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

You need to set the right boot command when u-boot boot up, in boot command line.

0 Kudos

6,708 Views
bcyranka
Contributor II

Hey Rita,

what is the right boot command?

This is my current u-boot env:

=> printenv
baudrate=115200
board_name=SABRESD
board_rev=MX6DL
boot_fdt=try
bootcmd=run findfdt;run findtee;mmc dev ${mmcdev};if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi
bootcmd_mfg=run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else bootz ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
bootdelay=3
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0
dfu_alt_info=spl raw 0x400
dfu_alt_info_img=u-boot raw 0x10000
dfu_alt_info_spl=spl raw 0x400
dfuspi=dfu 0 sf 0:0:10000000:0
emmc_dev=3
emmcdev=2
epdc_waveform=epdc_splash.bin
ethprime=eth0
fastboot_dev=mmc3
fdt_addr=0x18000000
fdt_file=pxc_bwp2102w.dtb
fdt_high=0xffffffff
fdtcontroladdr=4ef30d48
findfdt=if test $fdt_file = undefined; then if test $board_name = SABREAUTO && test $board_rev = MX6QP; then setenv fdt_file imx6qp-sabreauto.dtb; fi; if test $board_name = SABREAUTO && test $board_rev = MX6Q; then setenv fdt_file imx6q-sabreauto.dtb; fi; if test $board_name = SABREAUTO && test $board_rev = MX6DL; then setenv fdt_file imx6dl-sabreauto.dtb; fi; if test $board_name = SABRESD && test $board_rev = MX6QP; then setenv fdt_file imx6qp-sabresd.dtb; fi; if test $board_name = SABRESD && test $board_rev = MX6Q; then setenv fdt_file imx6q-sabresd.dtb; fi; if test $board_name = SABRESD && test $board_rev = MX6DL; then setenv fdt_file imx6dl-sabresd.dtb; fi; if test $fdt_file = undefined; then echo WARNING: Could not determine dtb to use; fi; fi;
findtee=if test $tee_file = undefined; then if test $board_name = SABREAUTO && test $board_rev = MX6QP; then setenv tee_file uTee-6qpauto; fi; if test $board_name = SABREAUTO && test $board_rev = MX6Q; then setenv tee_file uTee-6qauto; fi; if test $board_name = SABREAUTO && test $board_rev = MX6DL; then setenv tee_file uTee-6dlauto; fi; if test $board_name = SABRESD && test $board_rev = MX6QP; then setenv tee_file uTee-6qpsdb; fi; if test $board_name = SABRESD && test $board_rev = MX6Q; then setenv tee_file uTee-6qsdb; fi; if test $board_name = SABRESD && test $board_rev = MX6DL; then setenv tee_file uTee-6dlsdb; fi; if test $tee_file = undefined; then echo WARNING: Could not determine tee to use; fi; fi;
finduuid=part uuid mmc ${mmcdev}:2 uuid
image=zImage
initrd_addr=0x12C00000
initrd_high=0xffffffff
ip_dyn=yes
kboot=bootz
loadaddr=0x12000000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
loadtee=fatload mmc ${mmcdev}:${mmcpart} ${tee_addr} ${tee_file}
mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc clk_ignore_unused
mmcargs=setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot}
mmcautodetect=yes
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${tee} = yes; then run loadfdt; run loadtee; bootm ${tee_addr} - ${fdt_addr}; else if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;fi;
mmcdev=3
mmcpart=1
mmcroot=/dev/mmcblk3p2 rootwait rw
netargs=setenv bootargs console=${console},${baudrate} ${smp} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${image}; if test ${tee} = yes; then ${get_cmd} ${tee_addr} ${tee_file}; ${get_cmd} ${fdt_addr} ${fdt_file}; bootm ${tee_addr} - ${fdt_addr}; else if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi; fi;
script=boot.scr
sd_dev=2
serial#=021821d4ee6ac7ad
soc_type=imx6dl
spi_bus=1
spi_uboot=0x400
tee=no
tee_addr=0x20000000
tee_file=undefined
update_emmc_firmware=if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if ${get_cmd} ${update_sd_firmware_filename}; then if mmc dev ${emmcdev} 1; then setexpr fw_sz ${filesize} / 0x200; setexpr fw_sz ${fw_sz} + 1; mmc write ${loadaddr} 0x2 ${fw_sz}; fi; fi
update_sd_firmware=if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if mmc dev ${mmcdev}; then if ${get_cmd} ${update_sd_firmware_filename}; then setexpr fw_sz ${filesize} / 0x200; setexpr fw_sz ${fw_sz} + 1; mmc write ${loadaddr} 0x2 ${fw_sz}; fi; fi
weim_base=0x08000000
weim_uboot=0x08001000

Environment size: 4775/8188 bytes

I tried my own fdt_file=pxc_bwp2102w.dtb but it doesn't work. 

But the file exist on the mmc:

ls mmc 3:1
40437 pxc_bwp2102w.dtb
8519672 zImage

2 file(s), 0 dir(s)

Greetings
Benedikt

0 Kudos

6,708 Views
bcyranka
Contributor II

Maybe I found my problem:

## Booting kernel from Legacy Image at 12000000 ...
Image Name: Linux-5.4.3-lts-lf-5.4.y+gf81185
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 8519672 Bytes = 8.1 MiB
Load Address: 10008000
Entry Point: 10008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
No gpc device node -9, force to ldo-enable.

Starting kernel ...

There is a mismatch between the address in the ram. 

Can you tell me where exactly is this defined in the yocto project?

Greetings 

Benedikt 

0 Kudos

6,708 Views
karangajjar
Senior Contributor II

Hi Benedikt Cyranka,

Along with the information provided by Rita, You can directly load the .wic image into the SD card and load the SD card on the board. Please find the steps to flash an SD card image in Section 6.1 from the attached 'i.MX_Yocto_Project_User's_Guide.pdf'. If you want to load the individual components (u-boot, kernel, roots, etc...) separately, you can check the steps for the same in section 4.3 of attached 'i.MX_Linux_User's_Guide.pdf'.

Regards,

Karan Gajjar

0 Kudos

6,708 Views
bcyranka
Contributor II

Hey Karan,

I have no sd card slot on my device. Only Serial, USB, Ethernet and a USB for the MFG Tool.

Because of this I want to use the MFG Tool to flash the device. 

Regards,

Benedikt 

0 Kudos

6,708 Views
karangajjar
Senior Contributor II

Hi Benedikt Cyranka,

You can use the i.MX Linux user guide for Zeus release and look into flashing images to eMMC.

Regards,

Karan Gajjar

0 Kudos

6,708 Views
bcyranka
Contributor II

Hey Karen,

in the i.MX Yocto Project pdf I found under 5.2 Choosing an i.MX Yocto project image nothing  about the "fsl-image-mfgtool-initramfs" that you describe in the older version of this dcoument. 

Unfortunately I also found nothing about how to build the u-boot and kernel for the mfg-tool (uuu). 

I found in the i.MX_Linux_users_guide.pdf under 4.2.2 Using UUU, a short describstion how to flash the bootloader and rootfs to the emmc. In the MFG Tool 2 there was a mfg tool u-boot and kernel needed. The MFG Tool 2 loads these two into the ram and starts it. After this the MFG Tool 2 partition the emmc and flash the "normal" u-boot, kernel and rootfs to the emmc. 

Is this no longer neederd with UUU (MFG Tool 3)?

Regards,

Benedikt 

0 Kudos

6,708 Views
karangajjar
Senior Contributor II

Hi Benedikt Cyranka,

 

If you use UUU to load '.wic' file along with bootloader as described, you no longer required anything to load further. Still, you can refer UUU user guide https://github.com/NXPmicro/mfgtools/releases/download/uuu_1.3.154/UUU.pdf and check for 'write' command to load the individual module at a specific address if you required in any case.

 

Regards,

Karan Gajjar

0 Kudos

6,708 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Could you tell us which version of BSP are you using?

0 Kudos

6,708 Views
bcyranka
Contributor II

I use zeus. 

0 Kudos

6,708 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

For the mfgtool (uuu) , Using Yocto Project and bibake mfgtool-linux-imx for kernel firmware and bitbake u-boot-mfgtool for uboot firmware.

0 Kudos

6,708 Views
bcyranka
Contributor II

Hey Rita,

I got this messages if I try to build this two recepies:

bitbake mfgtool-linux-imx
ERROR: Nothing PROVIDES 'mfgtool-linux-imx'

bitbake u-boot-mfgtool
ERROR: Nothing PROVIDES 'u-boot-mfgtool'
u-boot-imx-mfgtool PROVIDES u-boot-mfgtool but was skipped: You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.

0 Kudos

4,477 Views
tbuckley
Contributor I

So what is the correct way to build the uuu files in yocto.

Thanks,

Terry

 

0 Kudos