how to format sd card from images which generated yocto?

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

how to format sd card from images which generated yocto?

1,887 Views
fenghua_jiang
Contributor IV

Images can be found  under /tmp/deploys/images

how to format sd card from the images ?

0 Kudos
Reply
5 Replies

1,754 Views
fenghua_jiang
Contributor IV

follow https://community.nxp.com/t5/Layerscape/How-to-create-a-bootable-SD-for-the-LS1043ARDB/m-p/1297151#M...

# mkfs.vfat /dev/sdb1
# mkfs.ext2 /dev/sdb2

sdb 8:16 1 14.9G 0 disk
├─sdb1 8:17 1 1G 0 part
└─sdb2 8:18 1 13.8G 0 part

after

sudo dd if=bl2_sd.pbl of=/dev/sdb bs=512 seek=8

sudo dd if=bl2_sd.pbl of=/dev/sdb bs=512 seek=8

sudo dd if=fsl_fman_ucode_ls1043_r1.1_106_4_18.bin of=/dev/sdb bs=512 seek=18432

the options of sdb was destroyed.

Command (m for help): p
Disk /dev/sdb: 14.9 GiB, 15931539456 bytes, 31116288 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: 0x6b81d535

 

0 Kudos
Reply

1,848 Views
yipingwang
NXP TechSupport
NXP TechSupport
0 Kudos
Reply

1,730 Views
fenghua_jiang
Contributor IV

Set the environment in uboot for SD boot.:

 

setenv bootcmd 'setenv bootargs root=/dev/mmcblk0p2 rw rootdelay=5 console=ttyS0,115200;mmcinfo;ext2load mmc 0:2 0xa0000000 /boot/Image;ext2load mmc 0:2 0xb0000000 /boot/fsl-ls1043a-rdb-sdk.dtb;booti 0xa0000000- 0xb0000000'

saveenv

boot

Moving Image from 0xa0000000 to 0xa0080000, end=a15d6000
## Loading ramdisk from FIT Image at b0000000 ...
Bad FIT ramdisk image format! (err=-42)
Ramdisk image is corrupt or invalid

0 Kudos
Reply

1,725 Views
yipingwang
NXP TechSupport
NXP TechSupport

Would you please post your whole procedure here?

0 Kudos
Reply

1,733 Views
fenghua_jiang
Contributor IV

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=0x800

Please deploy FMAN ucode at 0x04800 in SD card.

dd if=fsl_fman_ucode_ls1043_r1.1_106_4_18.bin of=/dev/sdb bs=512 seek=0x4800

 

you can't find /dev/sdb2

0 Kudos
Reply