This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMDSIDK574: SPI boot failure

Part Number: TMDSIDK574
Other Parts Discussed in Thread: AM5746, AM5748

Tool/software: TI C/C++ Compiler

Hello.

I want to perform SPIBoot with TMDSIDK574, but a kernel panic message is displayed during booting and booting does not complete.

Reference materials
downloads.ti.com/.../Foundational_Components_Kernel_Drivers.html
downloads.ti.com/.../Foundational_Components_U-Boot.html

procedure
1. SD boot execution
2. Write zImage file to mtd5
flash_erase /dev/mtd5 0 0
dd if=/boot/zImage of=/dev/mtd5

3.Write am574x-idk.dtb file to mtd2
flash_erase /dev/mtd2 0 0
dd if=/boot/am574x-idk.dtb of=/dev/mtd2

4.HW reset execution

5.Suspend during SD boot and start command line
U-Boot # mmc rescan
U-Boot # fatload mmc 0 $ {loadaddr} MLO
U-Boot # sf probe 0
U-Boot # sf erase 0x00000 0x100000
U-Boot # sf write $ {loadaddr} 0x00000 $ {filesize}
U-Boot # fatload mmc 0 $ {loadaddr} u-boot.img
U-Boot # sf write $ {loadaddr} 0x40000 $ {filesize}

6. Load kernel and DTB file and execute SPIBoot
U-Boot # sf read $ {loadaddr} 0x1e0000 0x800000
U-Boot # sf read $ {fdtaddr} 0x140000 0x80000
U-Boot # setenv bootargs console = $ {console} root = / dev / mtdblock5 rootfstype = jffs2
U-Boot # bootz $ {loadaddr}-$ {fdtaddr}

  • Execution result below
    => bootz ${loadaddr} - ${fdtaddr}
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8ffe7000, end 8fffff53 ... OK
    Starting kernel ...
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.19.38-g4dae378bbe (am5746@J035) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #1 SMP PREEMPT Tue Nov 12 10:11:53 JST 2019
    [    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
    [    0.000000] CPU: div instructions available: patching division code
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] OF: fdt: Machine model: TI AM5748 IDK
    [    0.000000] Memory policy: Data cache writealloc
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB
    [    0.000000] OF: reserved mem: initialized node ipu2-memory@95800000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 64 MiB
    [    0.000000] OF: reserved mem: initialized node dsp1-memory@99000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x000000009d000000, size 32 MiB
    [    0.000000] OF: reserved mem: initialized node ipu1-memory@9d000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x000000009f000000, size 8 MiB
    [    0.000000] OF: reserved mem: initialized node dsp2-memory@9f000000, compatible id shared-dma-pool
    [    0.000000] cma: Reserved 24 MiB at 0x00000000fe400000
    [    0.000000] OMAP4: Map 0x00000000ffd00000 to (ptrval) for dram barrier
    [    0.000000] DRA762 ES1.0
    [    0.000000] random: get_random_bytes called from start_kernel+0xb4/0x470 with crng_init=0
    [    0.000000] percpu: Embedded 15 pages/cpu s32396 r8192 d20852 u61440
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 424064
    [    0.000000] Kernel command line: console=ttyO2,115200n8 root=/dev/mtdblock5 rootfstype=jffs2
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 1481296K/1700864K available (8192K kernel code, 321K rwdata, 2672K rodata, 2048K init, 267K bss, 31152K reserved, 188416K cma-reserved, 1152000K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (10208 kB)
    [    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
    [    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 322 kB)
    [    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 268 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000]  Tasks RCU enabled.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] GIC: Using split EOI/Deactivate mode
    [    0.000000] OMAP clockevent source: timer1 at 32786 Hz
    [    0.000000] arch_timer: cp15 timer(s) running at 6.14MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x16af5adb9, max_idle_ns: 440795202250 ns
    [    0.000005] sched_clock: 56 bits at 6MHz, resolution 162ns, wraps every 4398046511023ns
    [    0.000018] Switching to timer-based delay loop, resolution 162ns
    [    0.000288] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000298] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000747] Console: colour dummy device 80x30
    [    0.000767] WARNING: Your 'console=ttyO2' has been replaced by 'ttyS2'
    [    0.000776] This ensures that you still see kernel messages. Please
    [    0.000784] update your kernel commandline.
    [    0.000818] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
    [    0.000835] pid_max: default: 32768 minimum: 301
    [    0.000955] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.000968] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.001529] CPU: Testing write buffer coherency: ok
    [    0.001569] CPU0: Spectre v2: using ICIALLU workaround
    [    0.001784] /cpus/cpu@0 missing clock-frequency property
    [    0.001804] /cpus/cpu@1 missing clock-frequency property
    [    0.001817] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.059913] Setting up static identity map for 0x80200000 - 0x80200060
    [    0.079922] rcu: Hierarchical SRCU implementation.
    [    0.100110] EFI services will not be available.
    [    0.119978] smp: Bringing up secondary CPUs ...
    [    0.200302] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    [    0.200308] CPU1: Spectre v2: using ICIALLU workaround
    [    0.200430] smp: Brought up 1 node, 2 CPUs
    [    0.200443] SMP: Total of 2 processors activated (24.59 BogoMIPS).
    [    0.200452] CPU: All CPU(s) started in HYP mode.
    [    0.200460] CPU: Virtualization extensions available.
    [    0.200920] devtmpfs: initialized
    [    0.217608] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [    0.217863] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.217882] futex hash table entries: 512 (order: 3, 32768 bytes)
    [    0.221133] pinctrl core: initialized pinctrl subsystem
    [    0.221649] DMI not present or invalid.
    [    0.221934] NET: Registered protocol family 16
    [    0.223031] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.223926] omap_hwmod: l3_main_2 using broken dt data from ocp
    [    0.416923] cpuidle: using governor ladder
    [    0.416956] cpuidle: using governor menu
    [    0.427311] OMAP GPIO hardware version 0.1
    [    0.452246] No ATAGs?
    [    0.452323] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.452337] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.452852] omap4_sram_init:Unable to allocate sram needed to handle errata I688
    [    0.452864] omap4_sram_init:Unable to get sram pool needed to handle errata I688
    [    0.453504] OMAP DMA hardware revision 0.0
    [    0.464247] edma 43300000.edma: memcpy is disabled
    [    0.467607] edma 43300000.edma: TI EDMA DMA engine driver
    [    0.474693] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
    [    0.478186] omap-iommu 40d01000.mmu: 40d01000.mmu registered
    [    0.478363] omap-iommu 40d02000.mmu: 40d02000.mmu registered
    [    0.478618] omap-iommu 58882000.mmu: 58882000.mmu registered
    [    0.478856] omap-iommu 55082000.mmu: 55082000.mmu registered
    [    0.479223] omap-iommu 41501000.mmu: 41501000.mmu registered
    [    0.479407] omap-iommu 41502000.mmu: 41502000.mmu registered
    [    0.479688] iommu: Adding device 58820000.ipu to group 1
    [    0.479768] iommu: Adding device 55020000.ipu to group 2
    [    0.479897] iommu: Adding device 40800000.dsp to group 0
    [    0.480126] iommu: Adding device 41000000.dsp to group 3
    [    0.482212] palmas 0-0058: Irq flag is 0x00000004
    [    0.512751] palmas 0-0058: Muxing GPIO 2f, PWM 0, LED 0
    [    0.514466] SMPS12: supplied by regulator-dummy
    [    0.516198] SMPS3: supplied by VMAIN
    [    0.517779] SMPS45: supplied by regulator-dummy
    [    0.519654] SMPS6: supplied by VMAIN
    [    0.521366] SMPS7: supplied by VMAIN
    [    0.523228] SMPS8: supplied by VMAIN
    [    0.524507] SMPS9: supplied by VMAIN
    [    0.525462] LDO1: supplied by VMAIN
    [    0.531311] random: fast init done
    [    0.531738] LDO2: supplied by VMAIN
    [    0.541598] LDO3: supplied by VMAIN
    [    0.551597] LDO4: supplied by VMAIN
    [    0.561626] LDO5: supplied by regulator-dummy
    [    0.562321] LDO6: supplied by regulator-dummy
    [    0.563008] LDO7: supplied by regulator-dummy
    [    0.563703] LDO8: supplied by regulator-dummy
    [    0.564402] LDO9: supplied by VMAIN
    [    0.571957] LDOLN: supplied by VMAIN
    [    0.581662] LDOUSB: supplied by VMAIN
    [    0.594202] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
    [    0.594413] media: Linux media interface: v0.10
    [    0.594452] videodev: Linux video capture interface: v2.00
    [    0.594529] pps_core: LinuxPPS API ver. 1 registered
    [    0.594539] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.594560] PTP clock support registered
    [    0.594591] EDAC MC: Ver: 3.0.0
    [    0.601572] omap-mailbox 48840000.mailbox: omap mailbox rev 0x400
    [    0.601822] omap-mailbox 48842000.mailbox: omap mailbox rev 0x400
    [    0.602184] Advanced Linux Sound Architecture Driver Initialized.
    [    0.602945] clocksource: Switched to clocksource arch_sys_counter
    [    0.610813] NET: Registered protocol family 2
    [    0.611416] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
    [    0.611445] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.611487] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
    [    0.611555] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.611626] UDP hash table entries: 256 (order: 1, 8192 bytes)
    [    0.611650] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
    [    0.611778] NET: Registered protocol family 1
    [    0.612194] RPC: Registered named UNIX socket transport module.
    [    0.612205] RPC: Registered udp transport module.
    [    0.612214] RPC: Registered tcp transport module.
    [    0.612222] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.613235] hw perfevents: no interrupt-affinity property for /pmu, guessing.
    [    0.613413] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
    [    0.614362] Initialise system trusted keyrings
    [    0.614495] workingset: timestamp_bits=14 max_order=19 bucket_order=5
    [    0.619275] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.619730] NFS: Registering the id_resolver key type
    [    0.619753] Key type id_resolver registered
    [    0.619762] Key type id_legacy registered
    [    0.619801] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.620124] pstore: using deflate compression
    [    0.621475] Key type asymmetric registered
    [    0.621486] Asymmetric key parser 'x509' registered
    [    0.621535] bounce: pool size: 64 pages
    [    0.621573] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [    0.621585] io scheduler noop registered
    [    0.621595] io scheduler deadline registered
    [    0.621689] io scheduler cfq registered (default)
    [    0.621700] io scheduler mq-deadline registered
    [    0.621711] io scheduler kyber registered
    [    0.626989] pinctrl-single 4a003400.pinmux: 282 pins, size 1128
    [    0.629848] dra7-pcie 51000000.pcie: Linked as a consumer to phy-4a094000.pciephy.1
    [    0.630112] dra7-pcie 51000000.pcie: WA for Errata i870 not applied
    [    0.630208] dra7-pcie 51000000.pcie: host bridge /ocp/axi@0/pcie@51000000 ranges:
    [    0.630250] dra7-pcie 51000000.pcie:    IO 0x20003000..0x20012fff -> 0x00000000
    [    0.630279] dra7-pcie 51000000.pcie:   MEM 0x20013000..0x2fffffff -> 0x20013000
    [    1.630560] dra7-pcie 51000000.pcie: Phy link never came up
    [    1.630697] dra7-pcie 51000000.pcie: PCI host bridge to bus 0000:00
    [    1.630711] pci_bus 0000:00: root bus resource [bus 00-ff]
    [    1.630723] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
    [    1.630735] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
    [    1.636628] PCI: bus0: Fast back to back transfers disabled
    [    1.642050] PCI: bus1: Fast back to back transfers enabled
    [    1.642094] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff 64bit]
    [    1.642115] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
    [    1.642436] pcieport 0000:00:00.0: Signaling PME with IRQ 173
    [    1.642570] pcieport 0000:00:00.0: AER enabled with IRQ 173
    [    1.646219] V3_3D: supplied by smps9
    [    1.646486] vtt_fixed: supplied by V3_3D
    [    1.690474] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    1.694051] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 45, base_baud = 3000000) is a 8250
    [    2.779044] console [ttyS2] enabled
    [    2.784770] omap_rng 48090000.rng: Random Number Generator ver. 20
    [    2.791782] omapdss_dss 58000000.dss: Linked as a consumer to regulator.20
    [    2.798858] DSS: OMAP DSS rev 6.1
    [    2.805132] omapdss_hdmi5 58040000.encoder: Linked as a consumer to regulator.13
    [    2.812641] omapdss_hdmi5 58040000.encoder: Dropping the link to regulator.13
    [    2.832678] brd: module loaded
    [    2.841921] loop: module loaded
    [    2.849635] m25p80 spi0.0: s25fl256s1 (32768 Kbytes)
    [    2.854743] 7 fixed-partitions partitions found on MTD device spi0.0
    [    2.861125] Creating 7 MTD partitions on "spi0.0":
    [    2.865980] 0x000000000000-0x000000040000 : "QSPI.SPL"
    [    2.871844] 0x000000040000-0x000000140000 : "QSPI.u-boot"
    [    2.877960] 0x000000140000-0x0000001c0000 : "QSPI.u-boot-spl-os"
    [    2.884664] 0x0000001c0000-0x0000001d0000 : "QSPI.u-boot-env"
    [    2.891076] 0x0000001d0000-0x0000001e0000 : "QSPI.u-boot-env.backup1"
    [    2.898223] 0x0000001e0000-0x0000009e0000 : "QSPI.kernel"
    [    2.904325] 0x0000009e0000-0x000002000000 : "QSPI.file-system"
    [    2.911416] libphy: Fixed MDIO Bus: probed
    [    2.972984] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    2.980679] davinci_mdio 48485000.mdio: detected phy mask fffffffc
    [    2.991716] libphy: 48485000.mdio: probed
    [    2.995782] davinci_mdio 48485000.mdio: phy[0]: device 48485000.mdio:00, driver Micrel KSZ9031 Gigabit PHY
    [    3.005522] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver Micrel KSZ9031 Gigabit PHY
    [    3.015935] cpsw 48484000.ethernet: Detected MACID = b0:7e:11:39:44:3a
    [    3.022532] cpsw 48484000.ethernet: initialized cpsw ale version 1.4
    [    3.028953] cpsw 48484000.ethernet: ALE Table size 1024
    [    3.034270] cpsw 48484000.ethernet: cpts: overflow check period 500 (jiffies)
    [    3.042251] cpsw 48484000.ethernet: cpsw: Detected MACID = b0:7e:11:39:44:3b
    [    3.050571] i2c /dev entries driver
    [    3.059060] cpu cpu0: Linked as a consumer to regulator.4
    [    3.064595] cpu cpu0: Linked as a consumer to regulator.27
    [    3.071704] sdhci: Secure Digital Host Controller Interface driver
    [    3.077965] sdhci: Copyright(c) Pierre Ossman
    [    3.083486] sdhci-pltfm: SDHCI platform and OF driver helper
    [    3.089940] omap_gpio 4805d000.gpio: Could not set line 27 debounce to 200000 microseconds (-22)
    [    3.098932] sdhci-omap 4809c000.mmc: Got CD GPIO
    [    3.103746] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.26
    [    3.110779] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.11
    [    3.117687] sdhci-omap 4809c000.mmc: Dropping the link to regulator.11
    [    3.124322] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.2
    [    3.131239] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.11
    [    3.138134] sdhci-omap 4809c000.mmc: no pinctrl state for ddr_3_3v mode
    [    3.171464] mmc0: SDHCI controller on 4809c000.mmc [4809c000.mmc] using ADMA
    [    3.179637] sdhci-omap 480b4000.mmc: Linked as a consumer to regulator.2
    [    3.186469] sdhci-omap 480b4000.mmc: Dropping the link to regulator.2
    [    3.193100] sdhci-omap 480b4000.mmc: Linked as a consumer to regulator.2
    [    3.225386] mmc1: SDHCI controller on 480b4000.mmc [480b4000.mmc] using ADMA
    [    3.233987] ledtrig-cpu: registered to indicate activity on CPUs
    [    3.244106] NET: Registered protocol family 10
    [    3.249469] Segment Routing with IPv6
    [    3.252027] mmc0: host does not support reading read-only switch, assuming write-enable
    [    3.253247] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    3.266299] mmc0: new high speed SDHC card at address e624
    [    3.267523] NET: Registered protocol family 17
    [    3.277302] Key type dns_resolver registered
    [    3.281696] Registering SWP/SWPB emulation handler
    [    3.283342] mmcblk0: mmc0:e624 SL32G 29.7 GiB
    [    3.286559] omap_voltage_late_init: Voltage driver support not added
    [    3.297367] Power Management for TI OMAP4+ devices.
    [    3.302827] Loading compiled-in X.509 certificates
    [    3.304942]  mmcblk0: p1 p2
    [    3.325440] dmm 4e000000.dmm: workaround for errata i878 in use
    [    3.332660] dmm 4e000000.dmm: initialized all PAT entries
    [    3.339028] omapdss_hdmi5 58040000.encoder: Linked as a consumer to regulator.13
    [    3.346563] omapdss_hdmi5 58040000.encoder: Dropping the link to regulator.13
    [    3.354874] omapdss_hdmi5 58040000.encoder: Linked as a consumer to regulator.13
    [    3.362625] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops)
    [    3.370655] omapdss_dss 58000000.dss: bound 58040000.encoder (ops hdmi5_component_ops)
    [    3.379422] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    3.386098] [drm] No driver support for vblank timestamp query.
    [    3.392079] [drm] Cannot find any crtc or sizes
    [    3.397430] [drm] Initialized omapdrm 1.0.0 20110917 for omapdrm.0 on minor 0
    [    3.405044] hctosys: unable to open rtc device (rtc0)
    [    3.410854] ALSA device list:
    [    3.413871]   No soundcards found.
    [    3.418112] VFS: Cannot open root device "mtdblock5" or unknown-block(31,5): error -19
    [    3.426098] Please append a correct "root=" boot option; here are the available partitions:
    [    3.434536] 0100           65536 ram0
    [    3.434540]  (driver?)
    [    3.440685] 0101           65536 ram1
    [    3.440688]  (driver?)
    [    3.446868] mmc1: new DDR MMC card at address 0001
    [    3.451812] 0102           65536 ram2
    [    3.451816]  (driver?)
    [    3.457960] 0103           65536 ram3
    [    3.457964]  (driver?)
    [    3.464114] 0104           65536 ram4
    [    3.464118]  (driver?)
    [    3.470304] 0105           65536 ram5
    [    3.470309]  (driver?)
    [    3.470661] mmcblk1: mmc1:0001 R1J56L 13.8 GiB
    [    3.474096] 0106           65536 ram6
    [    3.474101]  (driver?)
    [    3.476852] mmcblk1boot0: mmc1:0001 R1J56L partition 1 16.0 MiB
    [    3.481010] 0107           65536 ram7
    [    3.485190] mmcblk1boot1: mmc1:0001 R1J56L partition 2 16.0 MiB
    [    3.487167]  (driver?)
    [    3.503047] mmcblk1rpmb: mmc1:0001 R1J56L partition 3 128 KiB, chardev (244:0)
    [    3.505202] 0108           65536 ram8
    [    3.512427]  (driver?)
    [    3.518568] 0109           65536 ram9
    [    3.518572]  (driver?)
    [    3.524723] 010a           65536 ram10
    [    3.524726]  (driver?)
    [    3.530976] 010b           65536 ram11
    [    3.530980]  (driver?)
    [    3.537244] 010c           65536 ram12
    [    3.537248]  (driver?)
    [    3.543521] 010d           65536 ram13
    [    3.543525]  (driver?)
    [    3.549770] 010e           65536 ram14
    [    3.549773]  (driver?)
    [    3.556033] 010f           65536 ram15
    [    3.556036]  (driver?)
    [    3.562284] 1f00             256 mtdblock0
    [    3.562288]  (driver?)
    [    3.569654] 1f01            1024 mtdblock1
    [    3.569658]  (driver?)
    [    3.576478] 1f02             512 mtdblock2
    [    3.576482]  (driver?)
    [    3.583088] 1f03              64 mtdblock3
    [    3.583092]  (driver?)
    [    3.589697] 1f04              64 mtdblock4
    [    3.589702]  (driver?)
    [    3.589752]  mmcblk1: p1 p2
    [    3.593913] 1f05            8192 mtdblock5
    [    3.599076]  (driver?)
    [    3.605652] 1f06           22656 mtdblock6
    [    3.605655]  (driver?)
    [    3.612217] b300        31166976 mmcblk0
    [    3.612220]  driver: mmcblk
    [    3.619062]   b301           71680 mmcblk0p1 1bc6993a-01
    [    3.619065]
    [    3.625902]   b302        31078400 mmcblk0p2 1bc6993a-02
    [    3.625905]
    [    3.632729] b310        14417920 mmcblk1
    [    3.632732]  driver: mmcblk
    [    3.639568]   b311            1792 mmcblk1p1 21200400-0804-0146-9dcc-a8c51255994f
    [    3.639571]
    [    3.648587]   b312        14415215 mmcblk1p2 d300d825-2b0d-42b7-b1d1-d5b0def33340
    [    3.648590]
    [    3.657607] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,5)
    [    3.666000] CPU1: stopping
    [    3.668721] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.19.38-g4dae378bbe #1
    [    3.675797] Hardware name: Generic DRA74X (Flattened Device Tree)
    [    3.681914] Backtrace:
    [    3.684380] [<c020ca34>] (dump_backtrace) from [<c020cd6c>] (show_stack+0x18/0x1c)
    [    3.691982]  r7:df8b1f08 r6:60000193 r5:00000000 r4:c104cdec
    [    3.697670] [<c020cd54>] (show_stack) from [<c09b0180>] (dump_stack+0x90/0xa4)
    [    3.704924] [<c09b00f0>] (dump_stack) from [<c020f6b8>] (handle_IPI+0x1b0/0x1dc)
    [    3.712350]  r7:df8b1f08 r6:00000001 r5:00000000 r4:c0e65cfc
    [    3.718035] [<c020f508>] (handle_IPI) from [<c054fb50>] (gic_handle_irq+0x7c/0x80)
    [    3.725635]  r6:fa212000 r5:fa21200c r4:c1005100
    [    3.730272] [<c054fad4>] (gic_handle_irq) from [<c02019f8>] (__irq_svc+0x58/0x8c)
    [    3.737786] Exception stack(0xdf8b1f08 to 0xdf8b1f50)
    [    3.742858] 1f00:                   00000000 00000854 fe600000 00000000 ffffe000 c1004c7c
    [    3.751069] 1f20: c1004cc4 00000002 00000000 00000000 c0e654f0 df8b1f64 df8b1f44 df8b1f58
    [    3.759277] 1f40: c0221cfc c0208e94 60000013 ffffffff
    [    3.764349]  r9:df8b0000 r8:00000000 r7:df8b1f3c r6:ffffffff r5:60000013 r4:c0208e94
    [    3.772129] [<c0208e6c>] (arch_cpu_idle) from [<c09ca10c>] (default_idle_call+0x30/0x34)
    [    3.780257] [<c09ca0dc>] (default_idle_call) from [<c025a1b8>] (do_idle+0x20c/0x2b4)
    [    3.788033] [<c0259fac>] (do_idle) from [<c025a54c>] (cpu_startup_entry+0x20/0x24)
    [    3.795635]  r10:00000000 r9:412fc0f2 r8:80007000 r7:c10507d0 r6:00000001 r5:df8b0000
    [    3.803493]  r4:00000086
    [    3.806039] [<c025a52c>] (cpu_startup_entry) from [<c020f25c>] (secondary_start_kernel+0x174/0x180)
    [    3.815125] [<c020f0e8>] (secondary_start_kernel) from [<8020236c>] (0x8020236c)
    [    3.822549]  r7:c10507d0 r6:30c0387d r5:00000000 r4:9f875140
    [    3.828238] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,5) ]---
  • user6229465 said:
    2. Write zImage file to mtd5
    flash_erase /dev/mtd5 0 0
    dd if=/boot/zImage of=/dev/mtd5

    user6229465 said:
    U-Boot # setenv bootargs console = $ {console} root = / dev / mtdblock5 rootfstype = jffs2

    You are programming the Kernel image into mtdblock5, and tell the Kernel to use this as a root file system? This won't work. The Kernel is already loaded as per your earlier commands. You would need to generate a compatible filesystem image like JFFS2 and program it into mtdblock5. However JFFS2 is a bit old and the use of other Flash filesystems like UBIFS is generally recommended now.

    If you download the AM57xx Linux SDK there is a script included to generate a UBIFS rootfs image at bin/create-ubifs.sh that you can use for that purpose. You just need to feed it a suitable (small!) rootfs filesystem and it will create an UBI image for you. Please see below example steps...

    a0797059@jiji:/opt/procsdk-linux-am57xx-evm-06.01.00.08
    $ sudo mkdir filesystem/arago-tiny-image-am57xx-evm
    a0797059@jiji:/opt/procsdk-linux-am57xx-evm-06.01.00.08
    $ sudo tar -C filesystem/arago-tiny-image-am57xx-evm/ -xvf filesystem/arago-tiny-image-am57xx-evm.tar.xz
    <snip>
    a0797059@jiji:/opt/procsdk-linux-am57xx-evm-06.01.00.08
    $ sudo bin/create-ubifs.sh filesystem/arago-tiny-image-am57xx-evm/
    
    Parameters:
        image_rootfs_dir ..... "filesystem/arago-tiny-image-am57xx-evm/"
        image_name_prefix .... "/opt/procsdk-linux-am57xx-evm-06.01.00.08/filesystem/custom-am57xx-evm-rootfs"
        vol_name ............. "am57xx-evm-rootfs"
    
    mkfs.ubifs
    	root:         filesystem/arago-tiny-image-am57xx-evm/
    	min_io_size:  2048
    	leb_size:     126976
    	max_leb_cnt:  15000
    	output:       /opt/procsdk-linux-am57xx-evm-06.01.00.08/filesystem/custom-am57xx-evm-rootfs.ubifs
    	jrn_size:     8388608
    	reserved:     0
    	compr:        lzo
    	keyhash:      r5
    	fanout:       8
    	orph_lebs:    1
    	space_fixup:  1
    	super lebs:   1
    	master lebs:  2
    	log_lebs:     5
    	lpt_lebs:     3
    	orph_lebs:    1
    	main_lebs:    256
    	gc lebs:      1
    	index lebs:   4
    	leb_cnt:      268
    	UUID:         3B1E1C0B-1778-4445-837E-03B5E2852364
    Success!
    ubinize: LEB size:                  126976
    ubinize: PEB size:                  131072
    ubinize: min. I/O size:             2048
    ubinize: sub-page size:             512
    ubinize: VID offset:                2048
    ubinize: data offset:               4096
    ubinize: UBI image sequence number: 1909193487
    ubinize: loaded the ini-file "/opt/procsdk-linux-am57xx-evm-06.01.00.08/filesystem/custom-am57xx-evm-rootfs.ubinize.cfg"
    ubinize: count of sections: 1
    
    ubinize: parsing section "ubifs"
    ubinize: mode=ubi, keep parsing
    ubinize: volume type: dynamic
    ubinize: volume ID: 0
    ubinize: volume size was not specified in section "ubifs", assume minimum to fit image "/opt/procsdk-linux-am57xx-evm-06.01.00.08/filesystem/custom-am57xx-evm-rootfs.ubifs"34029568 bytes (32.4 MiB)
    ubinize: volume name: am57xx-evm-rootfs
    ubinize: volume alignment: 1
    ubinize: autoresize flags found
    ubinize: adding volume 0
    ubinize: writing volume 0
    ubinize: image file: /opt/procsdk-linux-am57xx-evm-06.01.00.08/filesystem/custom-am57xx-evm-rootfs.ubifs
    
    ubinize: writing layout volume
    ubinize: done
    
    Success! The UBI image is available at "/opt/procsdk-linux-am57xx-evm-06.01.00.08/filesystem/custom-am57xx-evm-rootfs.ubi"
    a0797059@jiji:/opt/procsdk-linux-am57xx-evm-06.01.00.08
    $ ll -h filesystem/custom-am57xx-evm-rootfs.ubi
    -rw-r--r-- 1 root root 34M Nov 21 13:58 filesystem/custom-am57xx-evm-rootfs.ubi
    

    Unfortunately even with the "tiny" image the resulting UBI image is 34MB. And the SPI Flash on the EVM (S25FL256S) is only 32MB in size, and only a partion of this is allocated for rootfs usage the way the partitions are setup using the default device tree files in the AM574x board. So you would need to find a way to generate an even smaller image so you can fit it into <<32MB, possibly by stripping out pieces from the existing rootfs I used in my example steps, or by using Yocto/OE to build your own image similarly to how the TI Processor SDK Linux is built while tweaking settings to reduce size, or by using a completely different approach to generate your embedded rootfs. For example Buildroot (https://buildroot.org/) is known to be capably to easily generate small rootfs images although I've not used this on an AM57xx platform. It all depends really what you are trying to accomplish in your final application, especially from a Linux userspace point of view.

    Regards, Andreas