SolidRun / lx2160a_build

Scripts to build basic images for LX2160A COM express type 7 modules
58 stars 47 forks source link

u-boot builds for QSFP expect '/boot/fsl-layerscape-lx2160a.dtb', fails to boot due to missing FDT #71

Open dcsouthwick opened 2 years ago

dcsouthwick commented 2 years ago

Trying the last few commits of this repo to build images that support the clearfog variant of your board, but none are bootable. So far, I've tested SD1= 13/14/17/21 and all fail with the same error:

(boot logs from 14_5_2 build, which you seem to mention is tested in other tickets)

NOTICE:  BL2: v2.4(release):LSDK-21.08-4-gcfbfd41d2
NOTICE:  BL2: Built : 14:32:11, Apr 26 2022
NOTICE:  UDIMM 18ASF4G72HZ-3G2B2
NOTICE:  DDR PMU Hardware version-0x1210
NOTICE:  DDR PMU Firmware vision-0x1001 (vA-2019.04)
NOTICE:  DDR4 UDIMM with 2-rank 64-bit bus (x8)

NOTICE:  64 GB DDR4, 64-bit, CL=22, ECC on, 256B, CS0+CS1
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.4(release):LSDK-21.08-4-gcfbfd41d2
NOTICE:  BL31: Built : 14:32:11, Apr 26 2022
NOTICE:  Welcome to lx2160acex7 BL31 Phase

U-Boot 2021.04-00029-g066e4ef6cc (Apr 26 2022 - 14:32:08 +0000)

SoC:  LX2160ACE Rev2.0 (0x87360020)
Clock Configuration:
       CPU0(A72):2000 MHz  CPU1(A72):2000 MHz  CPU2(A72):2000 MHz
       CPU3(A72):2000 MHz  CPU4(A72):2000 MHz  CPU5(A72):2000 MHz
       CPU6(A72):2000 MHz  CPU7(A72):2000 MHz  CPU8(A72):2000 MHz
       CPU9(A72):2000 MHz  CPU10(A72):2000 MHz  CPU11(A72):2000 MHz
       CPU12(A72):2000 MHz  CPU13(A72):2000 MHz  CPU14(A72):2000 MHz
       CPU15(A72):2000 MHz
       Bus:      700  MHz  DDR:      3200 MT/s
Reset Configuration Word (RCW):
       00000000: 50838338 24500050 00000000 00000000
       00000010: 00000000 0e010000 00000000 00000000
       00000020: 13c001a0 00002580 00000000 08000086
       00000030: 09240000 00000001 00000000 00000000
       00000040: 00000000 00000000 00000000 00000000
       00000050: 00000000 00000000 00000000 00000000
       00000060: 00000000 00000000 00027000 00000000
       00000070: 08ae0000 00150000
Model: SolidRun LX2160ACEX7 COM express type 7 based board
Board: LX2160ACE Rev2.0-CEX7, SD
SERDES1 Reference: Clock1 = 161.13MHz Clock2 = 100MHz
SERDES2 Reference: Clock1 = 100MHz Clock2 = 100MHz
SERDES3 Reference: Clock1 = 100MHz Clock2 = 100Hz
DRAM:  63.9 GiB
DDR    63.9 GiB (DDR4, 64-bit, CL=22, ECC on)
       DDR Controller Interleaving Mode: 256B
       DDR Chip-Select Interleaving Mode: CS0+CS1
dev_get_priv: null device
dev_get_priv: null device
Using SERDES1 Protocol: 14 (0xe)
Using SERDES2 Protocol: 5 (0x5)
Using SERDES3 Protocol: 2 (0x2)
PCIe1: pcie@3400000 disabled
PCIe2: pcie@3500000 Root Complex: no link
PCIe3: pcie@3600000 Root Complex: x4 gen3
PCIe4: pcie@3700000 disabled
PCIe5: pcie@3800000 Root Complex: no link
PCIe6: pcie@3900000 disabled
WDT:   Started with servicing (30s timeout)
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
EEPROM: TlvInfo v1 len=88
In:    serial_pl01x
Out:   serial_pl01x
Err:   serial_pl01x
SEC0:  RNG instantiated
fsl_board_late_init
Net:   eth0: DPMAC17@rgmii-id [PRIME]

MMC read: dev # 0, block # 20480, count 4608 ... 4608 blocks read: OK

MMC read: dev # 0, block # 28672, count 2048 ... 2048 blocks read: OK
crc32+
fsl-mc: Booting Management Complex ... SUCCESS
fsl-mc: Management Complex booted (version: 10.28.1, boot status: 0x1)
Hit any key to stop autoboot:  0
=> nvme scan
=> load mmc 0:1 0xa4000000 ubuntu-core.img
440401920 bytes read in 19003 ms (22.1 MiB/s)
=> nvme info
Device 0: Vendor: 0x144d Rev: 2B2QEXE7 Prod: S5H9NC0N307503F
            Type: Hard Disk
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
=> nvme write 0xa4000000 0 0xd2000

nvme write: device 0 block # 0, count 860160 ... 860160 blocks written: OK
=> 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

MMC read: dev # 0, block # 26624, count 2048 ... 2048 blocks read: OK
starting USB...
Bus usb3@3100000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb3@3110000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb3@3100000 for devices... 1 USB Device(s) found
scanning bus usb3@3110000 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk esdhc@2140000.blk...
Scanning disk esdhc@2150000.blk...
Scanning disk nvme#0.blk#0...
Found 5 disks
No EFI system partition
ERROR: invalid device tree
switch to partitions #0, OK
mmc1(part 0) is current device
** No partition table - mmc 1 **
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
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
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
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

Device 0: Vendor: 0x144d Rev: 2B2QEXE7 Prod: S5H9NC0N307503F
            Type: Hard Disk
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
... is now current device
Scanning nvme 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
331 bytes read in 1 ms (323.2 KiB/s)
1:      primary kernel
Retrieving file: /boot/Image
41409024 bytes read in 26 ms (1.5 GiB/s)
append: console=ttyAMA0,115200 earlycon=pl011,mmio32,0x21c0000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf root=PARTUUID=30303030-01 rw rootwait
Retrieving file: /boot/fsl-layerscape-lx2160a.dtb
Failed to load '/boot/fsl-layerscape-lx2160a.dtb'
Moving Image from 0x81100000 to 0x81200000, end=83a90000
ERROR: Did not find a cmdline Flattened Device Tree

could you publish a known working image that demonstrates QSFP support? If the above issue is related to my build env, it would be helpful to have a working starting point...

dcsouthwick commented 2 years ago

Still digging in hopes of some functionality with anything other than 8_5_2. I find another user's report of the same issue, so following his hack, I can get one step further, but it doesn't seem clear where this requirement is coming from yet...

editing runme.sh I add a dirty hack to force the missing file to exist & add it to the image:

cp $ROOTDIR/images/tmp/boot/fsl-lx2160a-clearfog-cx.dtb $ROOTDIR/images/tmp/fsl-layerscape-lx2160a.dtb
... add to e2cp line

Cool. That gets one step closer... but...

Scanning nvme 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
331 bytes read in 0 ms
1:      primary kernel
Retrieving file: /boot/Image
41951744 bytes read in 27 ms (1.4 GiB/s)
append: console=ttyAMA0,115200 earlycon=pl011,mmio32,0x21c0000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf root=PARTUUID=30303030-01 rw rootwait
Retrieving file: /boot/fsl-layerscape-lx2160a.dtb
42467 bytes read in 1 ms (40.5 MiB/s)
Moving Image from 0x81100000 to 0x81200000, end=83b10000
## Flattened Device Tree blob at 81000000
   Booting using the fdt blob at 0x81000000
   Loading Device Tree to 000000009fff2000, end 000000009ffff5e2 ... OK
Releasing fan controller full speed gpio
fsl-mc: Deploying data path layout ... WARNING: Firmware returned an error (GSR: 0x3f)
Starting kernel ...

early signs that several parts of the build script do not support serdes other than 8_5_2

[    4.853491] ptp_qoriq: device tree node missing required elements, try automatic configuration
....
[    5.129897] libphy: SFP I2C Bus: probed
[    5.133781] sfp sfp-0: Host maximum power 2.0W
[    5.138349] sfp sfp-0: No tx_disable pin: SFP modules will always be emitting.
[    5.146109] libphy: SFP I2C Bus: probed
[    5.149990] sfp sfp-1: Host maximum power 2.0W
[    5.154541] sfp sfp-1: No tx_disable pin: SFP modules will always be emitting.
[    5.162283] libphy: SFP I2C Bus: probed
[    5.166156] sfp sfp-2: Host maximum power 2.0W
[    5.170708] sfp sfp-2: No tx_disable pin: SFP modules will always be emitting.
[    5.178441] libphy: SFP I2C Bus: probed
[    5.182312] sfp sfp-3: Host maximum power 2.0W
[    5.186872] sfp sfp-3: No tx_disable pin: SFP modules will always be emitting.
[    5.429078] fsl_dpaa2_eth dpni.0 (unnamed net_device) (uninitialized): PHY [0x0000000008b96000:01] driver [Qualcomm Atheros AR8035] (irq=POLL)
[    5.442941] fsl_dpaa2_eth dpni.0: Probed interface eth0
[    5.450015] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    5.457876] ALSA device list:
[    5.460874]   No soundcards found.
[    5.482146] EXT4-fs (nvme0n1p1): mounted filesystem with ordered data mode. Opts: (null)
[    5.490275] VFS: Mounted root (ext4 filesystem) on device 259:1.
[    5.496744] devtmpfs: mounted
[    5.501244] Freeing unused kernel memory: 6720K
[    5.505848] Run /sbin/init as init process
[    5.510281] Run /etc/init as init process
[    5.514428] Run /bin/init as init process
[    5.518597] Run /bin/sh as init process
/bin/sh: 0: can't access tty; job control turned off
#

so, 14_5_2 build still thinks there are 4x sfp ports to bring up (despite SD1 config for a single QSFP)... as well as apparently missing initial device nodes.

Does anyone else have this issue? Thoughts?