Boot real-rime-edge preocmpiled binaries on LS1046ARDB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Boot real-rime-edge preocmpiled binaries on LS1046ARDB

1,007 次查看
jafar30100
Contributor II

hello
I have downloaded the the edge and baremetal version from:
https://www.nxp.com/webapp/sps/download/license.jsp?colCode=RTESW-V2.8-LS1046ARDB&appType=file1&DOWN...
Extracted the content of archive.

Then extracted the image and flashed to the sd card

zstd -d nxp-image-real-time-edge-ls1046ardb-emmc.wic.zst
sudo dd if=nxp-image-real-time-edge-ls1046ardb-emmc.wic of=/dev/sda1 bs=1M conv=fsyn

 If I try to boot via u-boot with the ocmmand

cpld reset sd

It does not start.

The same procedure with an image obtained with flexbuild successfully loads Ubuntu 20.04. The image was made with:

bld -i mkfw -m ls1046ardb
sudo mkfs.vfat /dev/sda1
flex-installer -i auto -m ls1046ardb -d /dev/sda1

Any idea on what is missing?

Regards

标记 (3)
0 项奖励
回复
8 回复数

971 次查看
jafar30100
Contributor II

That release did not work but the emmc one did.

$ dd if=./nxp-image-real-time-edge-ls1046ardb-emmc.wic of=/dev/sda bs=1M conv=fsync

Is this possible?

0 项奖励
回复

984 次查看
jafar30100
Contributor II

Thank you Patrick.

The SD card is ok, I flashed the image but  with the following command (taken from REALTIMEEDGEUG - REALTIMEEDGEUG 1.4.2 - Flashing pre-built images - page 7/404)

sudo dd if=./nxp-image-real-time-edge-ls1046ardb.wic of=/dev/sda bs=1M conv=fsync
$ lsblk
sda           8:0    1  29,5G  0 disk 
├─sda1        8:1    1 166,4M  0 part 
└─sda2        8:2    1   1,5G  0 part

This command gives two partitions, boot and rootfs.

When rebooting the uboot successfully start but can't get the kernel image error occurs:

=> cpld reset sd
NOTICE:  UDIMM 18ADF2G72AZ-3G2R1 

NOTICE:  16 GB DDR4, 64-bit, CL=15, ECC on, CS0+CS1
NOTICE:  BL2: v2.8(release):lf-6.1.55-2.2.0-0-g08e9d4eef-dirty
NOTICE:  BL2: Built : 06:43:30, Nov 21 2023
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.8(release):lf-6.1.55-2.2.0-0-g08e9d4eef-dirty
NOTICE:  BL31: Built : 06:43:30, Nov 21 2023
NOTICE:  Welcome to ls1046ardb BL31 Phase


U-Boot 2023.04+fsl+g252d6b86c3 (Mar 22 2024 - 21:53:40 +0000)

SoC:  LS1046AE Rev1.0 (0x87070010)
Clock Configuration:
       CPU0(A72):1800 MHz  CPU1(A72):1800 MHz  CPU2(A72):1800 MHz  
       CPU3(A72):1800 MHz  
       Bus:      600  MHz  DDR:      2100 MT/s  FMAN:     700  MHz
Reset Configuration Word (RCW):
       00000000: 0c150012 0e000000 00000000 00000000
       00000010: 11335559 40005012 60040000 c1000000
       00000020: 00000000 00000000 00000000 00238800
       00000030: 20124000 00003101 00000096 00000001
Model: LS1046A RDB Board
Board: LS1046ARDB, boot from SD
CPLD:  V2.3
PCBA:  V3.0
SERDES Reference Clocks:
SD1_CLK1 = 156.25MHZ, SD1_CLK2 = 100.00MHZ
DRAM:  15.9 GiB (DDR4, 64-bit, CL=15, ECC on)
       DDR Chip-Select Interleaving Mode: CS0+CS1
Using SERDES1 Protocol: 4403 (0x1133)
Using SERDES2 Protocol: 21849 (0x5559)
PCIe1: pcie@3400000 Root Complex: no link
PCIe2: pcie@3500000 Root Complex: no link
PCIe3: pcie@3600000 Root Complex: no link
Core:  58 devices, 19 uclasses, devicetree: separate
NAND:  512 MiB
MMC:   FSL_SDHC: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

EEPROM: NXID v1
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
Net:   
MMC read: dev # 0, block # 18432, count 128 ...
Fman1: Uploading microcode version 106.4.18
eth0: fm1-mac3, eth1: fm1-mac4, eth2: fm1-mac5, eth3: fm1-mac6, eth4: fm1-mac9, eth5: fm1-mac10
Hit any key to stop autoboot:  0 
scanning bus for devices...
SATA link 0 timeout.
AHCI 0001.0301 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: 64bit ncq pm clo only pmp fbss pio slum part ccc apst 

Device 0: unknown device
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /ls1046ardb_boot.scr
609 bytes read in 1 ms (594.7 KiB/s)
## Executing script at 80000000
 ** fs_devread read error - block
Failed to load 'Image'
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
Can't set block device
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
No EFI system partition
No EFI system partition
Failed to persist EFI variables
ERROR: invalid device tree
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
** No partition table - mmc 0 **
Couldn't find partition mmc 0:2
starting USB...
Bus usb@2f00000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb@3000000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb@3100000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@2f00000 for devices... 1 USB Device(s) found
scanning bus usb@3000000 for devices... 1 USB Device(s) found
scanning bus usb@3100000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
BOOTP broadcast 1
DHCP client bound to address 192.168.0.182 (3 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET
BOOTP broadcast 1
DHCP client bound to address 192.168.0.182 (2 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET
Trying load from SD ..
Device: FSL_SDHC
Manufacturer ID: ad
OEM: 4c53
Name: LX32G 
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

MMC read: dev # 0, block # 32768, count 81920 ... 0 blocks read: ERROR
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> 

Flex installer makes 4 partitions for the ubuntu installation in the sdcard and it successfully boots.

0 项奖励
回复

979 次查看
yipingwang
NXP TechSupport
NXP TechSupport

I have verified image nxp-image-real-time-edge-ls1046ardb.wic.zst with the following command, there is no problem. Please refer to my attached log.

$ zstd -d nxp-image-real-time-edge-ls1046ardb.wic.zst

$ sudo dd if=./nxp-image-real-time-edge-ls1046ardb.wic of=/dev/sda bs=1M conv=fsync

0 项奖励
回复

977 次查看
patrick521f
Contributor I

Hello, @jafar30100aarpmahjongg

 

It seems you’re facing an issue with booting the NXP image on your LS1046ARDB board. The cpld reset sd command should initiate the boot process from the SD card, but if it’s not starting, there could be several reasons for this. Here are a few troubleshooting steps you might consider:

Check the SD Card: Ensure that the SD card is not corrupted and is properly formatted. You can use tools like fsck to check and repair the SD card filesystem.
Verify the Boot Partition: Make sure that the first partition on the SD card is marked as active and bootable. This is typically done using a partition editor like fdisk.
Review U-Boot Environment Variables: Sometimes, the environment variables in U-Boot need to be configured to point to the correct boot device and partition. Use the printenv command in U-Boot to check the environment settings.
Update U-Boot: If you’re using an older version of U-Boot, it might not support certain commands or features required by the newer NXP image. Consider updating U-Boot to the latest version compatible with your board.

 

I hope this suggestion is helpful for you.

 

 

Best Regard,
patrick521f

0 项奖励
回复

851 次查看
jafar30100
Contributor II

@patrick521f you are correct.

At the moment the OS image is boot but by the bootloader on the board, hence no core 1 is loaded with the baremetal image.

@yipingwang how can I force the board to boot from the SD card bootloader with the image specified in the first post of this thread?

Regards

0 项奖励
回复

842 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the command in my first post to deploy image to SD card.

Then in u-boot, enter the following command to jump to SD boot.

cpld reset sd

0 项奖励
回复

837 次查看
jafar30100
Contributor II

I can't see any prompt on uart2 so how may i communicate with core1 and baremetal installation?

After completion of the above mentioned steps, the Linux system boots up on the master core (core 0), and the
Baremetal system boots up on slave core (core 1) automatically.

...

• If the Real-time Edge software is used to compile the Baremetal image, the Baremetal image is included in
the nxp-image-real-time-edge-xxxx.wic.zst. In this case, the master core starts the Baremetal
image on slave cores automatically.

From page 28-29/404 of REALTIMEEDGEUG.pdf

How can I run an application on the slave core?

0 项奖励
回复

831 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please use pre-built image in real-time-edge folder in Real-time_Edge_v2.8_LS1046ARDB.zip.

Then refer to section "2.4.2.4 Booting up the Linux with Baremetal" in https://www.nxp.com.cn/docs/en/user-guide/REALTIMEEDGEUG.pdf to deploy image to SD card.

0 项奖励
回复