Access QSPI & eMMC uboot env variables in linux userspace LS1046ARDB

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

Access QSPI & eMMC uboot env variables in linux userspace LS1046ARDB

490 Views
sheikfaaruk
Contributor III

I am working with Custom-LS1046ARDB Evaluation Board to develop a network based application. I have started my project with Flex-builder(flexbuild_lsdk2108), Flex-installer(version: 1.13.2108) and Codewarrior IDE.

I have download the images from https://lsdk.github.io/components.html

boot_LS -> wget https://www.nxp.com/lgfiles/sdk/lsdk2108/boot_LS_arm64_lts_5.10.tgz

firmware image -> wget https://www.nxp.com/lgfiles/sdk/lsdk2108/firmware_ls1046ardb_sdboot.img

Rootfs -> wget https://www.nxp.com/lgfiles/sdk/lsdk2108/rootfs_lsdk2108_ubuntu_main_arm64.tgz

I have depolyed the image's in SD card through flex-installer:

$ flex-installer -i pf -d /dev/sdx (partition and format the target storage device)

$ sudo flex-installer -b boot_LS_arm64_lts_5.10.tgz -r rootfs_lsdk2108_ubuntu_main_arm64.tgz -f firmware_ls1046ardb_sdboot.img -d /dev/sdx

Uboot log from Custom-LS1046ARDB Board :

NOTICE: 4 GB DDR4, 64-bit, CL=15, ECC on
NOTICE: BL2: v2.4(release):LSDK-21.08-0-g340b20bcb-dirty
NOTICE: BL2: Built : 14:29:23, Oct 6 2022
NOTICE: BL2: Booting BL31
NOTICE: BL31: v2.4(release):LSDK-21.08-0-g340b20bcb-dirty
NOTICE: BL31: Built : 14:29:23, Oct 6 2022
NOTICE: Welcome to ls1046ardb BL31 Phase


U-Boot 2021.04-dirty (Oct 06 2022 - 14:29:11 +0530)

SoC: LS1046AE Rev1.0 (0x87070010)
Clock Configuration:
CPU0(A72):1600 MHz CPU1(A72):1600 MHz CPU2(A72):1600 MHz
CPU3(A72):1600 MHz
Bus: 600 MHz DDR: 2100 MT/s FMAN: 700 MHz
Reset Configuration Word (RCW):
00000000: 0c150010 0e000000 00000000 00000000
00000010: 11330000 40300012 40025000 c1000000
00000020: 00000000 00000000 00000000 00028800
00000030: 20024500 00063100 00000096 00000001
Model: LS1046A RDB Board
Board: Network-Encryptor, Rev: Unknown, boot from QSPI
SD1_CLK1 = 100.00MHZ, SD1_CLK2 = 156.25MHZ
DRAM: 3.9 GiB (DDR4, 64-bit, CL=15, ECC on)
Using SERDES1 Protocol: 4403 (0x1133)
Using SERDES2 Protocol: 0 (0x0)
SERDES2[PRTCL] = 0x0 is not valid
NAND: 0 MiB
MMC: FSL_SDHC: 0
Loading Environment from SPIFlash... SF: Detected mt25qu512a with page size 256 Bytes, erase size 64 KiB, total 64 MiB
OK
EEPROM: NXID v1
In: serial
Out: serial
Err: serial
SEC0: RNG instantiated
Net:
RGMII1 addr: 1 , 0 SF: Detected mt25qu512a with page size 256 Bytes, erase size 64 KiB, total 64 MiB
Fman1: Uploading microcode version 106.4.18
Could not get PHY for FM_TGEC_MDIO: addr 1
Failed to connect
Could not get PHY for FM_TGEC_MDIO: addr 0
Failed to connect
FM1@DTSEC3, FM1@DTSEC4, FM1@DTSEC5, FM1@DTSEC6, FM1@TGEC1 [PRIME], FM1@TGEC2
Hit any key to stop autoboot: 0
=> boot

user@localhost:~$ ll /dev/mtd*
ls: cannot access '/dev/mtd*': No such file or directory
user@localhost:~$ ll /dev/mmcblk*
brw-rw---- 1 root disk 179, 0 Jul 22 00:30 /dev/mmcblk0
brw-rw---- 1 root disk 179, 32 Jul 22 00:30 /dev/mmcblk0boot0
brw-rw---- 1 root disk 179, 64 Jul 22 00:30 /dev/mmcblk0boot1
brw-rw---- 1 root disk 179, 1 Jul 22 00:30 /dev/mmcblk0p1
brw-rw---- 1 root disk 179, 2 Jul 22 00:30 /dev/mmcblk0p2
brw-rw---- 1 root disk 179, 3 Jul 22 00:30 /dev/mmcblk0p3
brw-rw---- 1 root disk 179, 4 Jul 22 00:30 /dev/mmcblk0p4
crw------- 1 root root 506, 0 Jul 22 00:30 /dev/mmcblk0rpmb
user@localhost:~$ cat /proc/mtd
dev: size erasesize name
user@localhost:~$

I already posted question about "Access U-boot env variables in LS1046ARDB Linux user space " for SD card in NXP Community and also get a solution from NXP TechSupport

I have questions about fw_env in LS1046ARDB :

1. Previously i booted uboot through SD card so ENV_ CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0x500000 used for reading/writing uboot envirnoment variables in the linux userspace. Can you guide us to know about the CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET values for uboot environment in QSPI and eMMC blocks.


And Also I have question :

In LS1046ARDB Evaluation Board have 16GB-RAM

setenv othbootargs default_hugepagesz=1024m hugepagesz=1024m hugepages=4 isolcpus=1-3 bportals=s0 qportals=s0 iommu.passthrough=1

In Custom-LS1046ARDB Board have 4GB-RAM

setenv othbootargs default_hugepagesz=1024m hugepagesz=1024m hugepages=2 isolcpus=1-3 bportals=s0 qportals=s0 iommu.passthrough=1

I'm using hugepage for running DPDK application, is hugepages=2 is enough because lsdkug_2108 doc mentioned hugepages=4 by default.

0 Kudos
1 Reply

466 Views
yipingwang
NXP TechSupport
NXP TechSupport

According to configs/ls1046ardb_tfa_defconfig, the parameters are still as the following.

CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0x500000

DPDK can work normally with hugepages=2 .

0 Kudos