LS1046ARDB KIT

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

LS1046ARDB KIT

3,030 Views
IB2020
Contributor II

How to store file/folder in EMMC flash of LS1046ARDB Kit and how to access it on next power on?

0 Kudos
17 Replies

3,022 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following procedure to write file to MMC card in Linux.

Partition the mmc card with fdisk

$ fdisk /dev/mmcblk0

$ fdisk -l /dev/mmcblk0

$ mkfs.ext2 /dev/mmcblk0p1

$ mount /dev/mmcblk0p1 /mnt/

$ cp -r test_file /mnt/

Please note you could use scp command to copy your file to the target board.

 

Please refer to the following to access file in MMC under u-boot.

=> ext2load <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]]

For example:

=> ext2load mmc 0:1 0xa0000000 test_file

0 Kudos

3,017 Views
IB2020
Contributor II

Thank you for the reply. But I couldn't access mmcblk0. No such file or directory was coming when i gave fdisk /dev/mmcblk0 command.

0 Kudos

3,002 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please run "fdisk -l" on your target board.

0 Kudos

2,984 Views
IB2020
Contributor II

I have run that command and it is coming as in the attached text file.

0 Kudos

2,973 Views
yipingwang
NXP TechSupport
NXP TechSupport

You need to use RCW with emmc enabled.

Please specify rcw_qspi as the following to enable emmc in RCW file in configs/board/ls1043ardb/manifest in flex-builder.

rcw_qspi=$FBOUTDIR/firmware/rcw/ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1600_qspiboot_emmc.bin.swapped

Then run the following command "flex-builder -c atf -m ls1046ardb", you will regenerate flexbuild_lsdk2004/build/firmware/atf/ls1046ardb/bl2_qspi.pbl and fip_uboot.bin.

Please deploy them to bl2_qspi.pbl  at 0x00000000, bl2_qspi.pbl at 0x100000 on QSPI flash.

Then go to u-boot prompt to check whether it is is possible to get MMC information as the following.

> mmcinfo
Device: FSL_SDHC
Manufacturer ID: fe
OEM: 14e
Name: P1XXX
Bus Speed: 52000000
Mode : MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 4.5
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 3.6 GiB
Boot Capacity: 2 MiB ENH
RPMB Capacity: 128 KiB ENH

Please check whether you could get the following message in Linux Kernel booting up log.

mmcblk0: mmc0:0001 P1XXXX 3.60 GiB
[ 3.685716] NET: Registered protocol family 10
[ 3.690555] mmcblk0boot0: mmc0:0001 P1XXXX partition 1 2.00 MiB
[ 3.695092] Segment Routing with IPv6
[ 3.700942] mmcblk0boot1: mmc0:0001 P1XXXX partition 2 2.00 MiB
[ 3.704255] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 3.710211] mmcblk0rpmb: mmc0:0001 P1XXXX partition 3 128 KiB, chardev (235:0)
[ 3.716269] NET: Registered protocol family 17

Thanks,

Yiping

0 Kudos

2,963 Views
IB2020
Contributor II

I deployed those files still mmcinfo is coming as device not found. Bootlog attached.

0 Kudos

2,919 Views
yipingwang
NXP TechSupport
NXP TechSupport

In file flexbuild_lsdk2004/configs/board/ls1046ardb/manifest, please modify rcw_qspi as the following.

rcw_qspi=$FBOUTDIR/firmware/rcw/ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1600_qspiboot_emmc.bin

Then rebuild atf with the following command

$ flex-builder -c atf -m ls1046ardb

You will get bl2_qspi.pbl and fip_uboot.bin in build/firmware/atf/ls1046ardb/ .

Please refer to the following command to deploy these two files to QSPI flash bank4.

Please go to QSPI vBank 0 and execute the following commands.

=> sf probe 0:1
=> tftp 0xa0000000 bl2_qspi.pbl
=> sf erase 0x0 +$filesize && sf write 0xa0000000 0x0 $filesize

=> tftp 0xa0000000 fip_uboot.bin
=> sf erase 0x100000 +$filesize && sf write 0xa0000000 0x100000 $filesize

Then execute the following command to go to bank4.

=> cpld reset altbank

 

 

 

0 Kudos

2,911 Views
IB2020
Contributor II

I tried this but still issue remains the same. No mmc card present is coming

0 Kudos

2,903 Views
yipingwang
NXP TechSupport
NXP TechSupport

I have verified my previously procedure, it works.

I attached my images for you.

Please refer to the following u-boot log.

=> cpld reset altbank

NOTICE: UDIMM 18ASF1G72AZ-2G3B1

NOTICE: 8 GB DDR4, 64-bit, CL=15, ECC on, CS0+CS1
NOTICE: BL2: v1.5(release):LSDK-20.04
NOTICE: BL2: Built : 14:07:13, Nov 19 2020
NOTICE: BL31: v1.5(release):LSDK-20.04
NOTICE: BL31: Built : 14:07:40, Nov 19 2020
NOTICE: Welcome to LS1046 BL31 Phase

 

U-Boot 2019.10-dirty (Nov 06 2020 - 10:15:29 +0800)

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: 11335559 40005012 40025000 c1000000
00000020: 00000000 00000000 00000000 00238800
00000030: 20124000 00003000 00000096 00000001
Model: LS1046A RDB Board
Board: LS1046ARDB, boot from QSPI vBank 4
CPLD: V2.3
PCBA: V2.0
SERDES Reference Clocks:
SD1_CLK1 = 156.25MHZ, SD1_CLK2 = 100.00MHZ
DRAM: 7.9 GiB (DDR4, 64-bit, CL=15, ECC on)
DDR Chip-Select Interleaving Mode: CS0+CS1
SEC0: RNG instantiated
Using SERDES1 Protocol: 4403 (0x1133)
Using SERDES2 Protocol: 21849 (0x5559)
NAND: 512 MiB
MMC: FSL_SDHC: 0
Loading Environment from SPI Flash... SF: Detected s25fl512s with page size 256 Bytes, erase size 256 KiB, total 64 MiB
OK
EEPROM: NXID v1
In: serial
Out: serial
Err: serial
Net: SF: Detected s25fl512s with page size 256 Bytes, erase size 256 KiB, total 64 MiB
Fman1: Uploading microcode version 106.4.18
PCIe0: pcie@3400000 Root Complex: no link
PCIe1: pcie@3500000 Root Complex: no link
PCIe2: pcie@3600000 Root Complex: x1 gen1
e1000: 68:05:ca:0f:31:83
FM1@DTSEC3, FM1@DTSEC4, FM1@DTSEC5, FM1@DTSEC6, FM1@TGEC1, FM1@TGEC2, e1000#0 [PRIME]
Warning: e1000#0 MAC addresses don't match:
Address in SROM is 68:05:ca:0f:31:83
Address in environment is 00:e0:0c:00:69:06

 

If your problem remains, please provide u-boot log on your target board.

 

0 Kudos

2,898 Views
IB2020
Contributor II

I am attaching the steps i did for loading pbl and bin as well as the  uboot log.

0 Kudos

2,892 Views
yipingwang
NXP TechSupport
NXP TechSupport

Have you noticed that the images which you are using is built on Apr  9 2020?

You could use images which I sent to you.

 

OTICE:  16 GB DDR4, 64-bit, CL=15, ECC on, CS0+CS1

NOTICE:  BL2: v1.5(release):LSDK-20.04

NOTICE:  BL2: Built : 05:19:45, Apr  9 2020

NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v1.5(release):LSDK-20.04

NOTICE:  BL31: Built : 05:26:59, Apr  9 2020

NOTICE:  Welcome to LS1046 BL31 Phase

 

U-Boot 2019.10-g3cd9bc3993 (Apr 09 2020 - 05:25:58 +0800)

 

0 Kudos

2,884 Views
IB2020
Contributor II

I have used the files sent by you .But it is not getting updated.Even for the files which i have created also same issue.Is there anything wrong with the way i am flashing it to the qspi?

0 Kudos

2,879 Views
yipingwang
NXP TechSupport
NXP TechSupport

First please go to QSPI vBank0

Then execute the following commands.

=> sf probe 0:1
=> tftp 0xa0000000 bl2_qspi.pbl
=> sf erase 0x0 +$filesize && sf write 0xa0000000 0x0 $filesize

=> tftp 0xa0000000 fip_uboot.bin
=> sf erase 0x100000 +$filesize && sf write 0xa0000000 0x100000 $filesize

Then execute the following command to go to bank4.

=> cpld reset altbank

 

Note: you could get vbank information from u-boot console log.

If your problem remains, please capture your console log to me to do more investigation.

2,873 Views
IB2020
Contributor II

Thank you so much for the reply. It worked. I was doing from bank4 .So it was not getting updated. I could write files to emmc flash also. "sync" command i gave after cp -r  to write to emmc flash. How to erase files in emmc and how to format emmc flash ?

0 Kudos

2,858 Views
yipingwang
NXP TechSupport
NXP TechSupport

You could format emmc in Linux as the following.

$ fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 7.5 GiB, 8001683456 bytes, 15628288 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: 0x5a5f34b3
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 15628287 15626240 7.5G 83 Linux

$ mkfs.ext2 /dev/mmcblk0p1

0 Kudos

2,758 Views
IB2020
Contributor II

Thank you for the reply. But if i want to delete a single folder without formatting emmc what is the command i should use?

0 Kudos

2,632 Views
yipingwang
NXP TechSupport
NXP TechSupport

Under Linux, execute the following command 

$ mount -t ext2 /dev/mmcblk0p1 /mnt

go to /mnt folder to remove the specified folder.

$ umount /mnt