Creating an SD for 'dunfell' build.

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

Creating an SD for 'dunfell' build.

687 Views
gfine1
Contributor III

After running into a problem with a 'zeus' build we decided to move forward to dunfell. 

The build completed, and then we modified our script to copy this new build to an SD

The script copies the 'Image' to P1 and the setenv is printed as a reminder. 

The error I get is when it looks like its trying to load the kernel. 

U-Boot 2019.10+fsl+g1e55b2f9e7 (May 26 2020 - 06:54:57 +0000)

SoC: LS1043AE Rev1.1 (0x87920011)
Clock Configuration:
CPU0(A53):1600 MHz CPU1(A53):1600 MHz CPU2(A53):1600 MHz
CPU3(A53):1600 MHz
Bus: 400 MHz DDR: 1600 MT/s FMAN: 500 MHz
Reset Configuration Word (RCW):
00000000: 08100010 0a000000 00000000 00000000
00000010: 14550002 80004012 60040000 c1002000
00000020: 00000000 00000000 00000000 00038800
00000030: 00000000 00001100 00000096 00000001
Model: LS1043A RDB Board
Board: LS1043ARDB, boot from SD
CPLD: V2.0
PCBA: V6.0
SERDES Reference Clocks:
SD1_CLK1 = 156.25MHZ, SD1_CLK2 = 100.00MHZ
DRAM: 1.9 GiB (DDR4, 32-bit, CL=11, ECC off)
Using SERDES1 Protocol: 5205 (0x1455)
SEC0: RNG instantiated
FSL_SDHC: 0

MMC read: dev # 0, block # 18944, count 128 ...
Not a microcode
Flash: 128 MiB
NAND: 512 MiB
MMC: Loading Environment from MMC... *** Warning - bad CRC, using default envt

EEPROM: NXID v1
In: serial
Out: serial
Err: serial
Net:
MMC read: dev # 0, block # 18432, count 128 ...
Fman1: Uploading microcode version 106.4.18
PCIe0: pcie@3400000 disabled
PCIe1: pcie@3500000 Root Complex: x1 gen1
PCIe2: pcie@3600000 Root Complex: x1 gen2
FM1@DTSEC1, FM1@DTSEC2, FM1@DTSEC3 [PRIME], FM1@DTSEC4, FM1@DTSEC5, FM1@DTSEC6,1
Hit any key to stop autoboot: 0
[ I do the setenv here ]
=> setenv bootcmd 'setenv bootargs root=/dev/mmcblk0p1 rw rootdelay=3 console=ttyS0,115200;mmcinfo;ext2load mmc 0:1 0xa0000000 /boot/Image;ext2load mmc 0:1 0xb0000000 /boot/fsl-ls1043a-rdb-sdk.dtb;booti 0xa0000000 - 0xb0000000'
=> boot
Device: FSL_SDHC
Manufacturer ID: 3
OEM: 5344
Name: SL16G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
** Unrecognized filesystem type **
** Unrecognized filesystem type **
Bad Linux ARM64 Image magic!

Here is the script we use to create the SD

[ removed bin/bash because it foul up posting ]

PROJECT="yocto_sdk"
HOME_DIR="/home/gfine/$PROJECT"
BUILD_DIR="build_ls1043ardb"
IMAGE_DIR="$HOME_DIR/$BUILD_DIR/tmp/deploy/images/ls1043ardb/"
TEMP_DIR="$HOME_DIR/temp"
SD_0="/dev/mmcblk0"
SD_1="/dev/mmcblk0p1"
SD_2="/dev/mmcblk0p2"
KERNEL_IMAGE="Image"
DEVICE_TREE="fsl-ls1043a-rdb-sdk.dtb"
RFS_IMAGE="fsl-image-networking-ls1043ardb.tar.gz"
echo " Before using this script format the target SD with"
echo " -- Primary partition #1 = Fat32 and 1GB ($SD_1)"
echo " -- Primary partition #2 = Ext2 and rest of SD ($SD_2)"
# unmount just in case
sudo umount $SD_1
sudo umount $SD_2
echo Formatting P1 as a VFAT partition
sudo mkfs.vfat $SD_1
echo Formatting P2 as an EXT2 partition
sudo mkfs.ext2 -F $SD_2
echo Copying images to SD partition 1
cd $IMAGE_DIR"/atf/"
sudo dd if=bl2_sd.pbl of=$SD_0 bs=512 seek=8
sudo dd if=fip_uboot.bin of=$SD_0 bs=512 seek=2048
cd $IMAGE_DIR
sudo dd if=fsl_fman_ucode_ls1043_r1.1_106_4_18.bin of=$SD_0 bs=512 seek=18432
sudo umount $TEMP_DIR
sudo rm -rf $TEMP_DIR
sudo mkdir $TEMP_DIR
sudo mount $SD_2 $TEMP_DIR
cd $TEMP_DIR

sudo tar -xzvf $IMAGE_DIR$RFS_IMAGE
cd $HOME_DIR"/temp/boot"
sudo cp $IMAGE_DIR$KERNEL_IMAGE .
sudo cp -r $IMAGE_DIR$DEVICE_TREE .
cd ~
echo Please wait while the copy is finishing.
sudo umount $TEMP_DIR
sync
echo "Remember -- break into u-boot and... "
echo "setenv bootcmd 'setenv bootargs root=/dev/mmcblk0p1 rw rootdelay=3 console=ttyS0,115200;mmcinfo;ext2load mmc 0:1 0xa0000000 /boot/Image;ext2load mmc 0:1 0xb0000000 /boot/fsl-ls1043a-rdb-sdk.dtb;booti 0xa0000000 - 0xb0000000'"
read -p "Hit Enter to Continue"

This script worked for 'zeus' with some small mods. 

What needs to be modified to work for  'dunfell'? 

 

Tags (2)
0 Kudos
Reply
1 Reply

676 Views
yipingwang
NXP TechSupport
NXP TechSupport

You put rootfs, Linux Kernel and dtb file in /dev/mmcblk0p2, however you used /dev/mmcblk0p1 in bootargs.

Please modify bootargs as the following.

=> setenv bootcmd 'setenv bootargs root=/dev/mmcblk0p2 rw rootdelay=3 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'

0 Kudos
Reply