LS1012ARDB u-boot does not see eMMC

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

LS1012ARDB u-boot does not see eMMC

Jump to solution
6,509 Views
christophe_schm
Contributor IV

Hi,

I try to free up both USB and SD card slots for other purpose.

For the moment I use QSPI for firmware (default way) and an external USB stick for boot partition and rfs.

I'd like to put now all firmware, boot partition and rfs on the embedded eMMC, it looks like big enough (4G).

My problem now is that when in u-boot stage, i cannot see any eMMC memory.

Of course correct set switches as this:

Also tried and did several mmc rescan and such commands in u-boot but device does not show up.

Started looking into u-boot configuration files since I simply did standard build using "flex-builder -m ls1012ardb" command and got all binaries done (here firmware for instance).

What am I missing? Do I need to rebuild my firmware or pass some special arguments in u-boot to see eMMC?

And: is my goal of putting firmware, bootloader and rfs all onto same eMMC memory device correct approach?

Thx Christophe

Labels (1)
1 Solution
5,950 Views
christophe_schm
Contributor IV

Hello Yiping,

In u-boot loading dtb into fdt_addr_r (located at 0x90000000) instead of fdt_addr (located at 0x00f00000) allows me now to boot the Linux. It breaks when attempting to mount the root fs but this certainly is due to fact boot partition tarball originates from a ubuntu:main and rfs from a ubuntu:lite.

So I am about to make a full clean build from scratch and reprog my eMMC partitions again with correct and matching images. Then this shall startup like a charm. Agree?

Thx Christophe

View solution in original post

0 Kudos
16 Replies
5,950 Views
christophe_schm
Contributor IV

Hi yipingwang,

Here my full boot trace on eMMC: firmware .img from QSPI bank2, ubuntu:lite boot+rfs from eMMC now.

Let me know if you see someting strange or not correct but it looks good.

Thx Christophe

U-Boot 2019.04 (Feb 14 2020 - 10:25:05 +0100)

SoC: LS1012AE Rev2.0 (0x87040020)
Clock Configuration:
CPU0(A53):1000 MHz
Bus: 250 MHz DDR: 1000 MT/s
Reset Configuration Word (RCW):
00000000: 0800000a 00000000 00000000 00000000
00000010: 35080000 c000000c 40000000 00001800
00000020: 00000000 00000000 00000000 00014571
00000030: 00000000 18c2a120 00000096 00000000
I2C: ready
DRAM: 958 MiB
Using SERDES1 Protocol: 13576 (0x3508)
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from SPI Flash... SF: Detected s25fl512s with page size 256 Bytes, erase size 256 KiB, total 64 MiB
OK
In: serial
Out: serial
Err: serial
Model: LS1012A RDB Board
Board: LS1012ARDB Version: RevE, boot from QSPI: bank2
Net: PFE class pe firmware
PFE tmu pe firmware
eth0: pfe_eth0, eth1: pfe_eth1
Hit any key to stop autoboot: 0
24852992 bytes read in 1925 ms (12.3 MiB/s)
14290 bytes read in 17 ms (820.3 KiB/s)
## Flattened Device Tree blob at 90000000
Booting using the fdt blob at 0x90000000
Using Device Tree in place at 0000000090000000, end 00000000900067d1
WARNING: fdt_fixup_stdout: could not read serial0 alias: FDT_ERR_NOTFOUND
NOTICE: RNG: INSTANTIATED
PCIe0: pcie@3400000 Root Complex: no link

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 4.19.68 (chris@MOB13263) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed Feb 19 17:22:26 CET 2020
[ 0.000000] Machine model: LS1012A RDB Board
[ 0.000000] earlycon: uart8250 at MMIO 0x00000000021c0500 (options '')
[ 0.000000] bootconsole [uart8250] enabled
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 32 MiB at 0x00000000b9c00000
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x00000000bbdfffff]
[ 0.000000] NUMA: NODE_DATA [mem 0xbbde0400-0xbbde1bbf]
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000080000000-0x00000000bbdfffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080000000-0x00000000bbdfffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000bbdfffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.1
[ 0.000000] random: get_random_bytes called from start_kernel+0xa8/0x418 with crng_init=0
[ 0.000000] percpu: Embedded 25 pages/cpu s63448 r8192 d30760 u102400
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] Speculative Store Bypass Disable mitigation not required
[ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 241416
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk1p2 rw rootwait earlycon=uart8250,mmio,0x21c0500
[ 0.000000] Memory: 894052K/980992K available (14844K kernel code, 1678K rwdata, 6168K rodata, 1536K init, 940K bss, 54172K reserved, 32768K cma-reserved)
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=1.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] arch_timer: cp15 timer(s) running at 25.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x5c40939b5, max_idle_ns: 440795202646 ns
[ 0.000004] sched_clock: 56 bits at 25MHz, resolution 40ns, wraps every 4398046511100ns
[ 0.008527] Console: colour dummy device 80x25
[ 0.013079] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=100000)
[ 0.023525] pid_max: default: 32768 minimum: 301
[ 0.028259] Security Framework initialized
[ 0.033068] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.040594] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.047558] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.054329] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.085633] ASID allocator initialised with 32768 entries
[ 0.099109] rcu: Hierarchical SRCU implementation.
[ 0.113003] EFI services will not be available.
[ 0.125603] smp: Bringing up secondary CPUs ...
[ 0.130180] smp: Brought up 1 node, 1 CPU
[ 0.134223] SMP: Total of 1 processors activated.
[ 0.138973] CPU features: detected: 32-bit EL0 Support
[ 0.147548] CPU: All CPU(s) started at EL2
[ 0.151687] alternatives: patching kernel code
[ 0.157330] devtmpfs: initialized
[ 0.165253] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.175146] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.182519] xor: measuring software checksum speed
[ 0.227592] 8regs : 1919.000 MB/sec
[ 0.271874] 8regs_prefetch: 1710.000 MB/sec
[ 0.316497] 32regs : 2359.000 MB/sec
[ 0.360758] 32regs_prefetch: 1982.000 MB/sec
[ 0.365413] xor: using function: 32regs (2359.000 MB/sec)
[ 0.370865] pinctrl core: initialized pinctrl subsystem
[ 0.378652] DMI not present or invalid.
[ 0.384639] NET: Registered protocol family 16
[ 0.389811] audit: initializing netlink subsys (disabled)
[ 0.397874] cpuidle: using governor menu
[ 0.402164] audit: type=2000 audit(0.336:1): state=initialized audit_enabled=0 res=1
[ 0.412371] vdso: 2 pages (1 code @ (____ptrval____), 1 data @ (____ptrval____))
[ 0.420180] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.428325] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.436458] Serial: AMBA PL011 UART driver
[ 0.446942] Machine: LS1012A RDB Board
[ 0.451215] SoC family: QorIQ LS1012A
[ 0.455076] SoC ID: svr:0x87040020, Revision: 2.0
[ 0.525026] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.535957] cryptd: max_cpu_qlen set to 1000
[ 0.616588] raid6: int64x1 gen() 398 MB/s
[ 0.689087] raid6: int64x1 xor() 373 MB/s
[ 0.761584] raid6: int64x2 gen() 598 MB/s
[ 0.833993] raid6: int64x2 xor() 511 MB/s
[ 0.906436] raid6: int64x4 gen() 907 MB/s
[ 0.978868] raid6: int64x4 xor() 646 MB/s
[ 1.051316] raid6: int64x8 gen() 837 MB/s
[ 1.123720] raid6: int64x8 xor() 632 MB/s
[ 1.196202] raid6: neonx1 gen() 627 MB/s
[ 1.268606] raid6: neonx1 xor() 721 MB/s
[ 1.341051] raid6: neonx2 gen() 1026 MB/s
[ 1.413445] raid6: neonx2 xor() 1029 MB/s
[ 1.485874] raid6: neonx4 gen() 1323 MB/s
[ 1.558275] raid6: neonx4 xor() 1235 MB/s
[ 1.630671] raid6: neonx8 gen() 1439 MB/s
[ 1.703070] raid6: neonx8 xor() 1310 MB/s
[ 1.707375] raid6: using algorithm neonx8 gen() 1439 MB/s
[ 1.712817] raid6: .... xor() 1310 MB/s, rmw enabled
[ 1.717823] raid6: using neon recovery algorithm
[ 1.723244] ACPI: Interpreter disabled.
[ 1.734953] vgaarb: loaded
[ 1.739353] SCSI subsystem initialized
[ 1.747886] usbcore: registered new interface driver usbfs
[ 1.754662] usbcore: registered new interface driver hub
[ 1.760242] usbcore: registered new device driver usb
[ 1.766820] i2c i2c-0: IMX I2C adapter registered
[ 1.772923] pps_core: LinuxPPS API ver. 1 registered
[ 1.778346] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 1.787701] PTP clock support registered
[ 1.792223] EDAC MC: Ver: 3.0.0
[ 1.800201] No BMan portals available!
[ 1.804792] QMan: Allocated lookup table at (____ptrval____), entry count 65537
[ 1.812386] No QMan portals available!
[ 1.816420] No USDPAA memory, no 'fsl,usdpaa-mem' in device-tree
[ 1.827140] Advanced Linux Sound Architecture Driver Initialized.
[ 1.834789] clocksource: Switched to clocksource arch_sys_counter
[ 1.841556] VFS: Disk quotas dquot_6.6.0
[ 1.845698] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 1.852931] pnp: PnP ACPI: disabled
[ 1.873223] NET: Registered protocol family 2
[ 1.878439] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes)
[ 1.886653] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 1.893929] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[ 1.900669] TCP: Hash tables configured (established 8192 bind 8192)
[ 1.907305] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 1.913311] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 1.919888] NET: Registered protocol family 1
[ 1.936824] RPC: Registered named UNIX socket transport module.
[ 1.942836] RPC: Registered udp transport module.
[ 1.947581] RPC: Registered tcp transport module.
[ 1.952325] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.959497] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[ 1.967689] kvm [1]: 8-bit VMID
[ 1.971744] kvm [1]: vgic interrupt IRQ1
[ 1.975795] kvm [1]: Hyp mode initialized successfully
[ 1.984523] Initialise system trusted keyrings
[ 1.990557] workingset: timestamp_bits=44 max_order=18 bucket_order=0
[ 1.997888] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 2.008223] NFS: Registering the id_resolver key type
[ 2.013383] Key type id_resolver registered
[ 2.017605] Key type id_legacy registered
[ 2.021656] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 2.028703] fuse init (API version 7.27)
[ 2.033035] 9p: Installing v9fs 9p2000 file system support
[ 2.042151] Key type asymmetric registered
[ 2.046394] Asymmetric key parser 'x509' registered
[ 2.051475] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[ 2.063296] io scheduler noop registered
[ 2.067311] io scheduler deadline registered
[ 2.071705] io scheduler cfq registered (default)
[ 2.076467] io scheduler mq-deadline registered
[ 2.081050] io scheduler kyber registered
[ 2.100585] layerscape-pcie 3400000.pcie: host bridge /soc/pcie@3400000 ranges:
[ 2.108878] layerscape-pcie 3400000.pcie: IO 0x4000010000..0x400001ffff -> 0x00000000
[ 2.117185] layerscape-pcie 3400000.pcie: MEM 0x4040000000..0x407fffffff -> 0x40000000
[ 2.125755] layerscape-pcie 3400000.pcie: PCI host bridge to bus 0000:00
[ 2.132633] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 2.138192] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 2.144455] pci_bus 0000:00: root bus resource [mem 0x4040000000-0x407fffffff] (bus address [0x40000000-0x7fffffff])
[ 2.157456] pci 0000:00:00.0: BAR 6: assigned [mem 0x4040000000-0x40400007ff pref]
[ 2.165300] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 2.171082] pcieport 0000:00:00.0: Signaling PME with IRQ 26
[ 2.177199] pcieport 0000:00:00.0: AER enabled with IRQ 25
[ 2.186200] EINJ: ACPI disabled.
[ 2.197867] Freescale LS2 console driver
[ 2.203351] fsl-ls2-console: device fsl_mc_console registered
[ 2.209595] fsl-ls2-console: device fsl_aiop_console registered
[ 2.225828] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 2.237678] console [ttyS0] disabled
[ 2.243063] 21c0500.serial: ttyS0 at MMIO 0x21c0500 (irq = 15, base_baud = 7812500) is a 16550A
[ 2.252098] console [ttyS0] enabled
[ 2.252098] console [ttyS0] enabled
[ 2.259167] bootconsole [uart8250] disabled
[ 2.259167] bootconsole [uart8250] disabled
[ 2.268717] SuperH (H)SCI(F) driver initialized
[ 2.274307] msm_serial: driver initialized
[ 2.282603] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 2.307493] brd: module loaded
[ 2.321531] loop: module loaded
[ 2.328303] ahci-qoriq 3200000.sata: AHCI 0001.0301 32 slots 1 ports 6 Gbps 0x1 impl platform mode
[ 2.338951] ahci-qoriq 3200000.sata: flags: 64bit ncq sntf pm clo only pmp fbs pio slum part ccc sds apst
[ 2.354197] scsi host0: ahci-qoriq
[ 2.358200] ata1: SATA max UDMA/133 mmio [mem 0x03200000-0x0320ffff] port 0x100 irq 22
[ 2.368723] fsl-quadspi 1550000.spi: spi-tx-bus-width 2 not supported
[ 2.376199] fsl-quadspi 1550000.spi: non-uniform erase sector maps are not supported yet.
[ 2.384501] fsl-quadspi 1550000.spi: s25fl512s (65536 Kbytes)
[ 2.397629] libphy: Fixed MDIO Bus: probed
[ 2.405295] tun: Universal TUN/TAP device driver, 1.6
[ 2.414308] thunder_xcv, ver 1.0
[ 2.418334] thunder_bgx, ver 1.0
[ 2.422171] nicpf, ver 1.0
[ 2.425598] Freescale FM module, FMD API version 21.1.0
[ 2.431378] Freescale FM Ports module
[ 2.435189] fsl_mac: fsl_mac: FSL FMan MAC API based driver
[ 2.441042] fsl_dpa: FSL DPAA Ethernet driver
[ 2.445678] fsl_advanced: FSL DPAA Advanced drivers:
[ 2.450736] fsl_proxy: FSL DPAA Proxy initialization driver
[ 2.456528] fsl_oh: FSL FMan Offline Parsing port driver
[ 2.463410] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
[ 2.471228] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 2.477201] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 2.483219] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 2.489294] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[ 2.496381] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 2.502096] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[ 2.510019] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 2.516598] sky2: driver version 1.30
[ 2.522875] VFIO - User Level meta-driver version: 0.3
[ 2.533894] dwc3 2f00000.usb3: Failed to get clk 'ref': -2
[ 2.542470] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 2.549770] ehci-pci: EHCI PCI platform driver
[ 2.554520] ehci-platform: EHCI generic platform driver
[ 2.560219] ehci-orion: EHCI orion driver
[ 2.564563] ehci-exynos: EHCI EXYNOS driver
[ 2.569072] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 2.575414] ohci-pci: OHCI PCI platform driver
[ 2.580039] ohci-platform: OHCI generic platform driver
[ 2.585606] ohci-exynos: OHCI EXYNOS driver
[ 2.590529] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 2.596265] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 2.604525] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220f66d hci version 0x100 quirks 0x0000000002010010
[ 2.614053] xhci-hcd xhci-hcd.0.auto: irq 21, io mem 0x02f00000
[ 2.620952] hub 1-0:1.0: USB hub found
[ 2.624926] hub 1-0:1.0: 1 port detected
[ 2.629345] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 2.635038] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 2.642812] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[ 2.649458] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 2.658263] hub 2-0:1.0: USB hub found
[ 2.662232] hub 2-0:1.0: 1 port detected
[ 2.667416] usbcore: registered new interface driver usb-storage
[ 2.680403] ftm-alarm 29d0000.timer: registered as rtc1
[ 2.685743] ata1: SATA link down (SStatus 0 SControl 300)
[ 2.693207] i2c /dev entries driver
[ 2.706162] imx2-wdt 2ad0000.wdog: timeout 60 sec (nowayout=0)
[ 2.715359] qoriq_cpufreq: Freescale QorIQ CPU frequency scaling driver
[ 2.723719] sdhci: Secure Digital Host Controller Interface driver
[ 2.730392] sdhci: Copyright(c) Pierre Ossman
[ 2.735621] Synopsys Designware Multimedia Card Interface Driver
[ 2.743510] sdhci-pltfm: SDHCI platform and OF driver helper
[ 2.775376] mmc0: SDHCI controller on 1560000.esdhc [1560000.esdhc] using ADMA 64-bit
[ 2.810258] mmc1: SDHCI controller on 1580000.esdhc [1580000.esdhc] using ADMA 64-bit
[ 2.820109] ledtrig-cpu: registered to indicate activity on CPUs
[ 2.837374] caam 1700000.crypto: Instantiated RNG4 SH1
[ 2.842743] caam 1700000.crypto: device ID = 0x0a14040000000000 (Era 8)
[ 2.849450] caam 1700000.crypto: job rings = 3, qi = 0
[ 2.861721] caam algorithms registered in /proc/crypto
[ 2.868260] caam 1700000.crypto: caam pkc algorithms registered in /proc/crypto
[ 2.876917] caam_jr 1710000.jr: registering rng-caam
[ 2.892115] caam 1700000.crypto: algorithms registered in /proc/crypto
[ 2.906768] usbcore: registered new interface driver usbhid
[ 2.915607] usbhid: USB HID core driver
[ 2.923687] No fsl,qman node
[ 2.928256] Freescale USDPAA process driver
[ 2.934163] mmc1: new HS200 MMC card at address 0001
[ 2.939198] fsl-usdpaa: no region found
[ 2.943408] Freescale USDPAA process IRQ driver
[ 2.951477] optee: probing for conduit method from DT.
[ 2.957594] mmcblk1: mmc1:0001 P1XXXX 3.60 GiB
[ 2.964106] mmcblk1boot0: mmc1:0001 P1XXXX partition 1 2.00 MiB
[ 2.970126] optee: api uid mismatch
[ 2.974638] mmcblk1boot1: mmc1:0001 P1XXXX partition 2 2.00 MiB
[ 2.982934] u32 classifier
[ 2.985649] Actions configured
[ 2.989765] mmcblk1rpmb: mmc1:0001 P1XXXX partition 3 128 KiB, chardev (236:0)
[ 2.997700] Initializing XFRM netlink socket
[ 3.002291] NET: Registered protocol family 10
[ 3.012558] mmcblk1: p1 p2
[ 3.015610] Segment Routing with IPv6
[ 3.022408] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 3.029271] NET: Registered protocol family 17
[ 3.034118] NET: Registered protocol family 15
[ 3.038722] Bridge firewalling registered
[ 3.042910] 8021q: 802.1Q VLAN Support v1.8
[ 3.047180] 9pnet: Installing 9P2000 support
[ 3.051618] tsn generic netlink module v1 init...
[ 3.056510] Key type dns_resolver registered
[ 3.061943] registered taskstats version 1
[ 3.066376] Loading compiled-in X.509 certificates
[ 3.071953] Btrfs loaded, crc32c=crc32c-generic
[ 3.078476] hctosys: unable to open rtc device (rtc0)
[ 3.083979] ALSA device list:
[ 3.087003] No soundcards found.
[ 3.100974] EXT4-fs (mmcblk1p2): warning: mounting unchecked fs, running e2fsck is recommended
[ 3.110618] EXT4-fs (mmcblk1p2): mounted filesystem without journal. Opts: (null)
[ 3.118207] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 3.128774] devtmpfs: mounted
[ 3.132911] Freeing unused kernel memory: 1536K
[ 3.137537] Run /sbin/init as init process
[ 3.145903] EXT4-fs error (device mmcblk1p2): ext4_lookup:1594: inode #31937: comm swapper/0: deleted inode referenced: 31977
[ 3.158771] Starting init: /sbin/init exists but couldn't execute it (error -117)
[ 3.166319] Run /etc/init as init process
[ 3.175233] Run /bin/init as init process
[ 3.184074] Run /bin/sh as init process
/bin/sh: 0: can't access tty; job control turned off
#

0 Kudos
5,951 Views
christophe_schm
Contributor IV

Hello Yiping,

In u-boot loading dtb into fdt_addr_r (located at 0x90000000) instead of fdt_addr (located at 0x00f00000) allows me now to boot the Linux. It breaks when attempting to mount the root fs but this certainly is due to fact boot partition tarball originates from a ubuntu:main and rfs from a ubuntu:lite.

So I am about to make a full clean build from scratch and reprog my eMMC partitions again with correct and matching images. Then this shall startup like a charm. Agree?

Thx Christophe

0 Kudos
5,950 Views
christophe_schm
Contributor IV

Hello Yiping,

I am still stucked with the ubuntu:lite - since I need do this OFFLINE.

In parallel I do it ONLINE too with my other setup but OFFLINE is the final target for me!

So I start with a fresh build: "flex-builder -i clean" then "flex-builder -i clean-rfs", all cleaned.

That said I thought I can simply pick the tarball like this

chris@MOB13263:~/temp$ curl -R -O -k -f http://www.nxp.com/lgfiles/sdk/lsdk1909/rootfs_lsdk1909_LS_arm64_lite.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 186M 100 186M 0 0 8440k 0 0:00:22 0:00:22 --:--:-- 8229k
chris@MOB13263:~/temp$ ll
total 190912
drwxrwxrwx 1 chris chris 512 Feb 19 14:51 ./
drwxr-xr-x 1 chris chris 512 Feb 12 17:16 ../
-rw-rw-rw- 1 chris chris 195403698 Oct 18 13:07 rootfs_lsdk1909_LS_arm64_lite.tgz

Then copy out "rootfs_lsdk1909_LS_arm64_lite.tgz" into my OFFLINE system and put it into /build/images, just as I can do for the regular ubuntu:main RFS, right?

Then I try do a "flex-builder -m ls1012ardb -r ubuntu:lite - a arm64". Is that supposed to work?

My understanding is firmware, boot image and RFS must be built together so correct merge occurs between all this.

Finally I still have my problem with loading my DTB into $fdt_addr location and was looking into sources of u-boot components. I need to understand why this occurs in my case - did not find anything useful in this Community space unfortunately.

*** Reading file would overwrite reserved  memory **

Your help is much appreciated, thanks.

Christophe

0 Kudos
5,950 Views
christophe_schm
Contributor IV

Ok tried to use "flex-installer -i pf" from TinyLinux to attempt to partition eMMC I can see now.

Thing is eMMC simply is too small for flex-installer - 4 Gbytes.

Looking at flex-installer script's function "check_disk_capacity" I understand at least 16 Gbytes are expected.

Changing partition sizes with -p option so I hopefully can squeeze into my 4G eMMC the tarballs won't change anything. For obvious reasons I'd say seeing tarballs size.

Therefore my question: what is eMMC supposed being used for on my LS1012ARDB board? As a bigger boot device instead of QSPI flash where my firmware will reside? Or also for a very small distro user land? Any hint welcome since I cannot see this in documentations ...

REMIND: I need my USB and SD card ports being freed up for other purpose. SATA is none of an option ...

Thx Christophe

0 Kudos
5,950 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Christophe,

You could use ubuntu:lite filesystem, please generate rootfs_lsdk1909_LS_arm64_lite.tgz with the following commands.

flex-builder -i mkrfs -r ubuntu:lite

flex-builder -i packrfs -r ubuntu:lite

Please boot the target board to enter into Linux OS with SD/USB, please use the following commands to generate two MMC partitions, one for boot partition, another for rootfs.

$ fdisk /dev/mmcblk1

$ mkfs.ext2 /dev/mmcblk0p1

$ mkfs.ext2 /dev/mmcblk0p2

Please decompress bootpartition_LS_arm64_lts_4.19.tgz to mmcblk0p1 and decompress rootfs_lsdk1909_LS_arm64_lite.tgz to mmcblk0p2.

load mmc 0:1 $load_addr Image

load mmc 0:1 $fdt_addr <dtb file>

setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait earlycon=uart8250,mmio,0x21c0500"

booti $load_addr - $fdt_addr

Thanks,

Yiping

5,950 Views
christophe_schm
Contributor IV

Hi Yiping,

Ok I managed to do all this and ended up on my eMMC with two partitions

  • 200M for boot partition
  • 3.4G (what remains of eMMC) for RFS

I was able to copy and untar completely

  • bootpartition_LS_arm64_lts_4.19.tgz into eMMC partition
  • rootfs_lsdk1909_LS_arm64_main.tgz into eMMC RFS partition

Once untared with "tar xf" I removed original tarballs (*.tgz) to gain some space.

I've two small difference however vs. your sample code above

  • Your partition names are /dev/mmcblk0p1 and /dev/mmcblk0p2
    • My partition names are /dev/mmcblk1p1 and /dev/mmcblk1p2
  • In u-boot when doing a "mmc dev 1" my device appears as "mmc1" and not "mmc"

So with the eMMC correctly programed I now go into u-boot and stop there then do as instructed

  • mmc dev 1
  • setenv hwconfig esdhc 1
  • load mmc1 0:1 $load_addr Image (the image, indeed on boot partitio, see it)
  • load mmc1 0:1 $fdt_addr fsl-ls1012a-rdb.dtb (device tree blob, indeed on boot partition, see it)
  • setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait earlycon=uart8250,mmio,0x21c0500"

  • booti $load_addr - $fdt_addr

After the last command above (booti) I get an error back: Bad Linux ARM64 Image magic!

I notice doing a "ls mmc1 0:1" for instance return empty data, no error neither.

I also noticed my eMMC no longer is visible in e.g. TinyLinux or on Linux I previously programmed on external USB stick (both Linux are still booting and working). eMMC simply disappeared from a Linux POV but not from a u-boot POV.

What am I missing, did I brick something here?

Thx Christophe

0 Kudos
5,950 Views
christophe_schm
Contributor IV

Maybe I broke my firmware on my QSPI - about tor reflash since no way to see the eMMC anymore, neither in TinyLinux nor on regular Ubuntu Linux distro ...

Another thing I was thinking about: maybe during SCP operation where I bring in my tarballs on eMMC partitions I forgot to ensure transfer is done in BINARY mode and not TEXT ...

Pleas in the meantime if you've and idea here share with me, thank you!

Regs, Christophe

0 Kudos
5,950 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Christophe,

Please load Image and dtb with the following command.

=>load mmc  1:1 $load_addr Image

=>load mmc   1:1 $fdt_addr fsl-ls1012a-rdb.dtb 

Thanks,

Yiping

5,950 Views
christophe_schm
Contributor IV

Hello Yiping,

Thank you, now I feel stupid, ok it's mmc and not mmc1 and first digit is device number and second partition.

Ok, I did this and the first line, when loading "Image" it goes well.

Second command however, where we load dtb, u-boot reports back:

*** Reading file would overwrite reserved  memory **

Keepi going and still entering new bootargs as you suggested then do the booti command and it tells (of course):

ERROR: Did not find a cmdline Flattened Device Tree

My u-boot variables are:

fdt_addr=0x00f00000

fdt_addr_r=0x90000000

load_addr=0xa0000000

Doing a "ls mmc 1:1", first and boot partition, and I can see files like "Image" and also "fsl-ls1012a-rdb.dtb".

Doing a "ls mmc 1:2", second and rfs partition, and I can see the complete RFS indeed.

I still have both tarballs (*.tgz) in both partitions, can I delete them to get some space back?

And, can I automate above said into a variable or u-boot script so I don't need to type this into u-boot shell?

Thx Christophe

0 Kudos
5,950 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Christophe,

You could delete rootfs_lsdk1909_LS_arm64_main.tgz after untar the tarball.

You also could build ubuntu:lite rootfs with the following command, which is about 180M.
$ flex-builder -i mkrfs -r ubuntu:lite -a arm64 

In addition, you could configure bootcmd with the following command

=>setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait earlycon=uart8250,mmio,0x21c0500"

=>setenv bootcmd "load mmc 1:1 $load_addr Image; load mmc 1:1 $fdt_addr fsl-ls1012a-rdb.dtb ; booti $load_addr - $fdt_addr"

=>boot

Thanks,

Yiping

5,950 Views
christophe_schm
Contributor IV

Hi Yiping,

Thanks for the automation hints, will get inspired from that very good!

Ok I understand that I shall go with a smaller RFS but if I want to keep the actual one (think it's the Ubuntu-based main userland) being about 700M of size, am I supposed to be able to start it up on my LS1012ARDB? The board has 1 Gbyte of RAM so that shall not be the issue. Or bootloader not reserving all the RAM so I can load by DTB?

Regarding eht Ubuntu:lite I understand I cannot build it under WIN10 OS + WSL, for that I need a native and real Linux running on a real host machine, ideally of Ubuntu 18.04.xx LTS version, right?

Thx Christophe

0 Kudos
5,950 Views
christophe_schm
Contributor IV

Hello Yiping,

This is very good information, much thanks, let me test this now.

Will report back ASAP it's up and alive. Suppose for building RFS I need a real Linux machine? Will try w/ WSL on Windows or worst case within a Docker container.

Thx Christophe

0 Kudos
5,950 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Christophe SCHMID ,

Please refer to the switch setting for EMMC.

pastedImage_2.png

Thanks,

Yiping

0 Kudos
5,950 Views
christophe_schm
Contributor IV

Hello yipingwang

Maybe my question was not clear enough, sorry. Of course I already correctly set the switches as said in documents.

Here a pic of my board.

Thx Christophe

pastedImage_1.png

0 Kudos
5,949 Views
yipingwang
NXP TechSupport
NXP TechSupport

EMMC

Need to switch sw2[1,2]=01

And run the command of "mmc dev 1" to switch emmc mode in uboot

 

After Rev D board, the HW for board had some upgrtaded, so need to set the hwconfig in uboot to support the emmc and then run "mmc dev 1", and linux will to support the EMMC

 

setenv hwconfig esdhc1

5,950 Views
christophe_schm
Contributor IV

Hello yipingwang‌,

Ok that worked, thanks! I now can see this (both QSPI booted TinyLinux and regular Linux still being on my USB stick)

mtdblock0       31:0   0      64M   0   disk

mmcblk1        179:0   0     3.6G   0   disk

mmcblk1boot0   179:32  0       2M   1   disk

mmcblk1boot1   179:64  0       2M   1   disk

My question now: how shall I program my eMMC from that point now? From TinyLinux I'd say just as I did for my sda USB device before?

Thx Christophe

0 Kudos