Hi,
I follow Layerscape Software Development Kit User Guide for Yocto document implement sdk, after I generate image successfully, next I would like to burn image(bootloader, kernel and filesystem) into emmc, it seems not mentions in this document, is it can flash by flex-installer? any SOP we can follow?
I read LSDK 20.04 user manual, it mentions can use flex-builder to build yocto, not using bitbike, it makes me a little confused, which way is correct method we can follow?
Thank you.
Jack
Solved! Go to Solution.
LSDK only can be used to generate Yocto based rootfs filesystem, please refer to the following.
According to your requirement, probably Yocto released SDK is a good choice.
Please refer to the following procedure.
Please connect SD card to your host PC
1. Please create two partitions with Linux command "fdisk", one 1G FAT16 and 2G one ext2/ext3 or with remainder of the available disk size.
# mkfs.vfat /dev/sdb1
# mkfs.ext2 /dev/sdb2
2. Please deployed RCW + PBI + BL2(bl2_<boot_mode>.pbl)image to SD card as the following.
dd if=bl2_sd.pbl of=/dev/sdb bs=512 seek=8
note:/dev/sdb is SD device name.
Please deploy TF-A FIP image at 0x00800 in SD card.
dd if=fip_uboot.bin of=/dev/sdb bs=512 seek=2048
Please deploy DPAA2-MC at 0x05000 in SD card.
dd if=<MC image> of=/dev/sdb bs=512 seek=20480
Please deploy DPAA2 DPL at 0x06800 in SD card.
dd if=<DPL image> of=/dev/sdb bs=512 seek=26624
Please deploy DPAA2 DPC at 0x07000 in SD card.
dd if=<DPC image> of=/dev/sdb bs=512 seek=28672
3. Please deploy rootfs filesystem to SD card in the host PC as the following.
# mkdir /temp
# mount /dev/sdb2 /temp
# cd /temp
# cp fsl-image-networking-lx2160ardb.tar.gz .
# tar -xzvf fsl-image-networking-lx2160ardb.tar.gz
# rm fsl-image-networking-lx2160ardb.tar.gz
Please deploy Kernel Image and the dtb to the /boot folder.
# cp Image boot
# cp fsl-lx2160-rdb-sdk.dtb boot
Configure the switch setting boot from SD card
Plug in the SD card to the target board and power on.
Set the environment in uboot for SD boot.
=>
=> setenv bootcmd 'setenv bootargs root=/dev/mmcblk0p2 rw rootdelay=5 console=ttyAMA0,115200 earlycon=pl011,mmio32,0x21c0000;mmcinfo;mmc read 0x80d00000 0x6800 0x800; fsl_mc lazyapply dpl 0x80d00000;ext2load mmc 0:2 0xa0000000 /boot/Image;ext2load mmc 0:2 0xb0000000 /boot/fsl-lx2160a-rdb-sdk.dtb;booti 0xa0000000 - 0xb0000000'
=> saveenv
Boot up Linux
=> boot
HI @yipingwang
below command need to confirm with you:
1.Please deploy DPAA2-MC at 0x05000 in SD card.
sudo dd if=./mc_app/mc_10.20.4_lx2160a.itb of=/dev/sdc bs=512 seek=20480
2.Please deploy DPAA2 DPL at 0x06800 in SD card.
=>It seems DPL image has 2 image: dpl-2dpni.dtb and dpl-eth.19.dtb, which one I should use to flash?
sudo dd if=mc-utils/dpl-2dpni.dtb of=/dev/sdc bs=512 seek=26624
3.Please deploy DPAA2 DPC at 0x07000 in SD card.
=>It seems DPC image has 2 image: dpc-usxgmii.dtb and dpc-warn.dtb, which one I should use to flash?
sudo dd if=./mc-utils/dpc-usxgmii.dtb of=/dev/sdc bs=512 seek=28672
Jack
You could use DPC dpc-usxgmii.dtb and DPL dpl-eth.19.dtb.
Hi @yipingwang
1. I follow your command to flash image to sd card, plug in sd card to EVB board, but cannot boot successful as below:
NOTICE: BL2: v1.5(release):nsc1.1_nsa.004_2021071201_NSC-NSA-9-gaa4e338ee-dirty
NOTICE: BL2: Built : 04:26:56, Sep 8 2021
NOTICE: INITIALIZING SEC
NOTICE: UDIMM 18ADF2G72AZ-3G2E1
NOTICE: Verifying RSA
NOTICE: Verifying hash
NOTICE: Verifying RSA
NOTICE: Verifying hash
NOTICE: Verifying RSA
NOTICE: Verifying hash
NOTICE: Verifying RSA
NOTICE: Verifying hash
NOTICE: DDR4 UDIMM with 2-rank 64-bit bus (x8)
NOTICE: 32 GB DDR4, 64-bit, CL=22, ECC on, 256B, CS0+CS1
NOTICE: Verifying RSA
NOTICE: Verifying hash
NOTICE: Verifying RSA
NOTICE: Verifying hash
NOTICE: Verifying RSA
NOTICE: Verifying hash
ERROR: BL2: Failed to load image (-80)
Authentication failure
2. The SD card partition I use fdisk format as below:
Disk /dev/sdc: 29.1 GiB, 31293702144 bytes, 61120512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xbf896a7d
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 2099199 2097152 1G 6 FAT16
/dev/sdc2 2099200 6293503 4194304 2G 83 Linux
3.And I run below command:
$ sudo mkfs.vfat /dev/sdc1
$ sudo mkfs.ext2 /dev/sdc2
$ sudo dd if=./atf/bl2_sd.pbl of=/dev/sdc bs=512 seek=8
209+1 records in
209+1 records out
107265 bytes (107 kB, 105 KiB) copied, 0.0712491 s, 1.5 MB/s
$ sudo dd if=./atf/fip_uboot.bin of=/dev/sdc bs=512 seek=2048
1598+1 records in
1598+1 records out
818391 bytes (818 kB, 799 KiB) copied, 0.19099 s, 4.3 MB/s
$ sudo dd if=./mc_app/mc_10.20.4_lx2160a.itb of=/dev/sdc bs=512 seek=20480
2133+1 records in
2133+1 records out
1092272 bytes (1.1 MB, 1.0 MiB) copied, 0.350616 s, 3.1 MB/s
$ sudo dd if=mc-utils/dpl-eth.19.dtb of=/dev/sdc bs=512 seek=26624
8+1 records in
8+1 records out
4583 bytes (4.6 kB, 4.5 KiB) copied, 0.00849373 s, 540 kB/s
$ sudo dd if=./mc-utils/dpc-usxgmii.dtb of=/dev/sdc bs=512 seek=28672
1+1 records in
1+1 records out
736 bytes copied, 0.00504512 s, 146 kB/s
# mkdir /temp
# mount /dev/sdc2 /temp
# cd /temp
# cp fsl-image-networking-lx2160ardb.tar.gz .
# tar -xzvf fsl-image-networking-lx2160ardb.tar.gz
# rm fsl-image-networking-lx2160ardb.tar.gz
# cp Image boot
# cp fsl-lx2160a-rdb-lx2160ardb-rev2.dtb boot
Any step I miss to run?
Thanks.
Jack
Did you build secure boot images with Yocto?
Or did you blow ITS bit to enable secure boot on your target board?
Hi @yipingwang
Thanks for your reply,
Sorry, it seems EVB board jumper switch to emmc boot, I switch it to SD card, it can boot successful.
Thanks.
Jack
Hi @yipingwang
Thanks for your reply, it seems your reply is for SD card upgrade, I will try it.
How about yocto emmc upgrade procedure, normally in OTA upgrade, it will upgrade kernel and rootfs in running system, not in uboot commad line, can we use flex-installer do this?
Jack
flex-installer is only used in flex-builder released LSDK. For Yocto released SDK, please use the method which I provided previously.
HI @yipingwang
It seems Yocto image can be build by LSDK and Yocto release SDK,
In LSDK I saw a command as below can build yocto as below:
flex-builder -i mkrfs -r yocto:tiny
I am just confused about this, what is the different for Yocto build between LSDK and Yocto release SDK?
I know Yocto official build is using bitbike, how about LSDK with yocto build, is that just build a yocto rootfs?
This is because our product's emmc storage is not large, we need smaller size image and rootfs, now we use LSDK with ubuntu mate and customize rootfs size, but it still too large, so we think yocto build maybe has chance to do that, could you give us some advice, which one is suitable for our request? LSDK with yocto tiny build or Yocto SDK?
BR,
Jack
LSDK only can be used to generate Yocto based rootfs filesystem, please refer to the following.
According to your requirement, probably Yocto released SDK is a good choice.