embedded linux buidling/booting issue

0

I am trying to cross compile the Linux for a dual-core ARM Cortex A9 device. While booting I got the following prints on the UART which is showing some sync issue when Core-1 is starting. I remember I have enabled multi programming while compiling the kernel. What part of the building process must have gone wrong here?

  1. zImage building or
  2. Generating the root file system?

Uart Prints:

    U-Boot SPL 2013.01.01 (Sep 13 2019 - 01:35:54)
BOARD : Altera SOCFPGA Cyclone V Board
CLOCK: EOSC1 clock 25000 KHz
CLOCK: EOSC2 clock 25000 KHz
CLOCK: F2S_SDR_REF clock 0 KHz
CLOCK: F2S_PER_REF clock 0 KHz
CLOCK: MPU clock 800 MHz
CLOCK: DDR clock 400 MHz
CLOCK: UART clock 100000 KHz
CLOCK: MMC clock 50000 KHz
CLOCK: QSPI clock 3125 KHz
RESET: COLD
INFO : Watchdog enabled
SDRAM: Initializing MMR registers
SDRAM: Calibrating PHY
SEQ.C: Preparing to start memory calibration
SEQ.C: CALIBRATION PASSED
SDRAM: 1024 MiB
ALTERA DWMMC: 0
reading u-boot.img
reading u-boot.img


U-Boot 2013.01.01-00140-g0c9a3bdf3c (Sep 13 2019 - 01:28:34)

CPU   : Altera SOCFPGA Platform
BOARD : Altera SOCFPGA Cyclone V Board
I2C:   ready
DRAM:  1 GiB
MMC:   ALTERA DWMMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Skipped ethaddr assignment due to invalid EMAC address in EEPROM
Net:   mii0
Warning: failed to set MAC address

Hit any key to stop autoboot:  0
reading u-boot.scr
589 bytes read in 5 ms (114.3 KiB/s)
## Executing script at 02000000
-- Programming FPGA --
reading soc_system.rbf
7007204 bytes read in 361 ms (18.5 MiB/s)
## Starting application at 0x3FF785A4 ...
## Application terminated, rc = 0x0
-- Setting Env Variables --
reading zImage
4389688 bytes read in 246 ms (17 MiB/s)
reading soc_system.dtb
24091 bytes read in 9 ms (2.6 MiB/s)
## Flattened Device Tree blob at 00000100
   Booting using the fdt blob at 0x00000100
   Loading Device Tree to 03ff7000, end 03fffe1a ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.0-ge4c2b71c147d (gurmeet@gurmeet-VirtualBox) (gcc version 7.1.1 20170510 (Linaro GCC 7.1-2017.05) ) #1 SMP Sat Sep 14 10:50:07 IST 2019
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: Terasic DE10 NANO
[    0.000000] cma: Reserved 16 MiB at 0x3f000000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 14 pages/cpu @ef7ca000 s26892 r8192 d22260 u57344
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260608
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 1012076K/1048576K available (7168K kernel code, 464K rwdata, 1436K rodata, 1024K init, 173K bss, 20116K reserved, 16384K cma-reserved, 245760K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0800000   (8160 kB)
[    0.000000]       .init : 0xc0a00000 - 0xc0b00000   (1024 kB)
[    0.000000]       .data : 0xc0b00000 - 0xc0b742b4   ( 465 kB)
[    0.000000]        .bss : 0xc0b742b4 - 0xc0b9f80c   ( 174 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] L2C-310 erratum 769419 enabled
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410030c9, AUX_CTRL 0x46060001
[    0.000000] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
[    0.000007] sched_clock: 32 bits at 100MHz, resolution 10ns, wraps every 21474836475ns
[    0.000019] Switching to timer-based delay loop, resolution 10ns
[    0.000248] GIC: PPI13 is secure or misconfigured
[    0.000285] GIC: PPI13 is secure or misconfigured
[    0.000481] Console: colour dummy device 80x30
[    0.000506] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=1000000)
[    0.000521] pid_max: default: 32768 minimum: 301
[    0.000625] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000637] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001356] CPU: Testing write buffer coherency: ok
[    0.001386] ftrace: allocating 23073 entries in 68 pages
[    0.042460] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.042709] Setting up static identity map for 0x100000 - 0x100058
[    0.044448] GIC: PPI13 is secure or misconfigured
[    0.044460] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.044549] Brought up 2 CPUs
[    0.044568] SMP: Total of 2 processors activated (400.00 BogoMIPS).
[    0.044575] CPU: All CPU(s) started in SVC mode.
[    0.045480] devtmpfs: initialized
[    0.051307] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.051529] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.053213] NET: Registered protocol family 16
[    0.055578] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.056834] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.056846] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.115503] vgaarb: loaded
[    0.115792] SCSI subsystem initialized
[    0.116038] usbcore: registered new interface driver usbfs
[    0.116099] usbcore: registered new interface driver hub
[    0.116166] usbcore: registered new device driver usb
[    0.116328] sopc@0:usbphy@0 supply vcc not found, using dummy regulator
[    0.117339] pps_core: LinuxPPS API ver. 1 registered
[    0.117351] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.117377] PTP clock support registered
[    0.117557] FPGA manager framework
[    0.118986] clocksource: Switched to clocksource timer
[    0.151378] NET: Registered protocol family 2
[    0.151919] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.151999] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.152126] TCP: Hash tables configured (established 8192 bind 8192)
[    0.152208] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.152255] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.152425] NET: Registered protocol family 1
[    0.152936] RPC: Registered named UNIX socket transport module.
[    0.152947] RPC: Registered udp transport module.
[    0.152954] RPC: Registered tcp transport module.
[    0.152961] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.153628] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.154456] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.155247] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.164377] NFS: Registering the id_resolver key type
[    0.164411] Key type id_resolver registered
[    0.164419] Key type id_legacy registered
[    0.164435] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.165053] ntfs: driver 2.1.32 [Flags: R/W].
[    0.165373] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.166615] bounce: pool size: 64 pages
[    0.166628] io scheduler noop registered (default)
[    0.174406] dma-pl330 ffe01000.dma: Loaded driver for PL330 DMAC-341330
[    0.174424] dma-pl330 ffe01000.dma:  DBUFF-512x8bytes Num_Chans-8 Num_Peri-32 Num_Events-8
[    0.178453] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.179707] console [ttyS0] disabled
[    0.179744] ffc02000.serial: ttyS0 at MMIO 0xffc02000 (irq = 24, base_baud = 6250000) is a 16550A
[    0.766263] console [ttyS0] enabled
[    0.771581] brd: module loaded
[    0.774834] altera_ilc ff230000.ilc: Failed to register interrupt handler
[    0.781634] altera_ilc ff230000.ilc: Failed to register interrupt handler
[    0.788418] altera_ilc ff230000.ilc: Driver successfully loaded
[    0.796364] libphy: Fixed MDIO Bus: probed
[    0.801310] CAN device driver interface
[    0.805522] socfpga-dwmac ff702000.ethernet: snps,phy-addr property is deprecated
[    0.813151] stmmac - user ID: 0x10, Synopsys ID: 0x37
[    0.818182]  Ring mode enabled
[    0.821237]  DMA HW capability register supported[    0.825749]  Enhanced/Alternate descriptors
[    0.829922]  Enabled extended descriptors
[    0.833913]  RX Checksum Offload Engine supported
[    0.838596]  COE Type 2
[    0.841040]  TX Checksum insertion supported
[    0.845290]  Enable RX Mitigation via HW Watchdog Timer
[    0.856614] libphy: stmmac: probed
[    0.860049] eth0: PHY ID 00221622 at 1 IRQ POLL (stmmac-0:01) active
[    0.866923] ffb40000.usb supply vusb_d not found, using dummy regulator
[    0.873577] ffb40000.usb supply vusb_a not found, using dummy regulator
[    0.880327] dwc2 ffb40000.usb: EPs: 16, dedicated fifos, 8064 entries in SPRAM
[    0.887867] dwc2 ffb40000.usb: DWC OTG Controller
[    0.892600] dwc2 ffb40000.usb: new USB bus registered, assigned bus number 1
[    0.899660] dwc2 ffb40000.usb: irq
                                     [    0.989000] mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 400000Hz, actual 396825HZ div = 63)
[    1.019146] dw_mmc ff704000.flash: 1 slots initialized
[    1.024610] OF: /sopc@0/leds/fpga0: could not get #gpio-cells for /sopc@0/bridge@0xc0000000/leds@0x100000000
[    1.034522] leds-gpio: probe of sopc@0:leds failed with error -22
[    1.040771] ledtrig-cpu: registered to indicate activity on CPUs
[    1.046944] usbcore: registered new interface driver usbhid
[    1.052514] usbhid: USB HID core driver
[    1.056592] fpga_manager fpga0: Altera SOCFPGA FPGA Manager registered
[    1.063805] altera_hps2fpga_bridge sopc@0:fpgabridge@0: fpga bridge [hps2fpga] registered
[    1.072200] altera_hps2fpga_bridge sopc@0:fpgabridge@1: fpga bridge [lwhps2fpga] registered
[    1.080687] altera_hps2fpga_bridge sopc@0:fpgabridge@2: fpga bridge [fpga2hps] registered
[    1.089235] altera_fpga2sdram_bridge sopc@0:fpgabridge@3: fpga bridge [fpga2sdram] registered
[    1.097728] altera_fpga2sdram_bridge sopc@0:fpgabridge@3: driver initialized with handoff 000001ff
[    1.107005] oprofile: using arm/armv7-ca9
[    1.111851] NET: Registered protocol family 10
[    1.117061] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.123642] NET: Registered protocol family 17
[    1.128087] NET: Registered protocol family 15
[    1.132545] can: controller area network core (rev 20120528 abi 9)
[    1.138755] NET: Registered protocol family 29
[    1.143200] can: raw protocol (rev 20120528)
[    1.147454] can: broadcast manager protocol (rev 20161123 t)
[    1.153104] can: netlink gateway (rev 20130117) max_hops=1
[    1.158791] 8021q: 802.1Q VLAN Support v1.8
[    1.163021] Key type dns_resolver registered
[    1.167350] ThumbEE CPU extension supported.
[    1.171622] Registering SWP/SWPB emulation handler
[    1.179767] hctosys: unable to open rtc device (rtc0)
[    1.184823] of_cfs_init
[    1.187332] of_cfs_init: OK
[    1.190841] ttyS0 - failed to request DMA
[    1.194993] Waiting for root device /dev/mmcblk0p2...
[    1.238212] mmc0: Problem switching card into high-speed mode!
[    1.244050] mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 25000000Hz, actual 25000000HZ div = 1)
[    1.253817] mmc0: new SDHC card at address 0001
[    1.258775] mmcblk0: mmc0:0001 ASTC 7.45 GiB
[    1.265186]  mmcblk0: p1 p2 p3
[    1.320560] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    1.350985] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.359101] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.366797] devtmpfs: error mounting -2
[    1.373057] Freeing unused kernel memory: 1024K (c0a00000 - c0b00000)
[    1.379834] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[    1.392908] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-ge4c2b71c147d #1
[    1.399924] Hardware name: Altera SOCFPGA
[    1.403946] [<c0112004>] (unwind_backtrace) from [<c010cc88>] (show_stack+0x20/0x24)
[    1.411671] [<c010cc88>] (show_stack) from [<c04255b8>] (dump_stack+0x90/0xa4)
[    1.418874] [<c04255b8>] (dump_stack) from [<c01e9978>] (panic+0xec/0x258)
[    1.425738] [<c01e9978>] (panic) from [<c0739004>] (kernel_init+0x10c/0x11c)
[    1.432769] [<c0739004>] (kernel_init) from [<c0108478>] (ret_from_fork+0x14/0x3c)
[    1.440309] CPU1: stopping
[    1.443013] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.9.0-ge4c2b71c147d #1
[    1.450029] Hardware name: Altera SOCFPGA
[    1.454033] [<c0112004>] (unwind_backtrace) from [<c010cc88>] (show_stack+0x20/0x24)
[    1.461749] [<c010cc88>] (show_stack) from [<c04255b8>] (dump_stack+0x90/0xa4)
[    1.468947] [<c04255b8>] (dump_stack) from [<c0110604>] (handle_IPI+0x2e0/0x2fc)
[    1.476316] [<c0110604>] (handle_IPI) from [<c0101544>] (gic_handle_irq+0x98/0x9c)
[    1.483857] [<c0101544>] (gic_handle_irq) from [<c010d84c>] (__irq_svc+0x6c/0x90)
[    1.491305] Exception stack(0xef11bf58 to 0xef11bfa0)
[    1.496335] bf40:                                                       00000000 000004c6
[    1.504479] bf60: ef7da370 c011bca0 ffffe000 00000002 c0b0302c c0b0307c c0b13c83 00000001
[    1.512622] bf80: c08c86ec ef11bfb4 ef11bfb8 ef11bfa8 c0108f44 c0108f48 60000013 ffffffff
[    1.520771] [<c010d84c>] (__irq_svc) from [<c0108f48>] (arch_cpu_idle+0x48/0x4c)
[    1.528142] [<c0108f48>] (arch_cpu_idle) from [<c073dd44>] (default_idle_call+0x30/0x3c)
[    1.536205] [<c073dd44>] (default_idle_call) from [<c0164760>] (cpu_startup_entry+0xe8/0x148)
[    1.544699] [<c0164760>] (cpu_startup_entry) from [<c01100a8>] (secondary_start_kernel+0x15c/0x164)
[    1.553708] [<c01100a8>] (secondary_start_kernel) from [<0010194c>] (0x10194c)
[    1.560906] ---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
linux-kernel
embedded-linux
buildroot
busybox
intel-fpga
asked on Stack Overflow Sep 15, 2019 by Gurmeet Singh

1 Answer

0

There was an error in mounting the ext4 partition of SD card. Rebuilding the Kernel and build root with right configuration solved the issue. (Enabled Support for large (2TB+) block devices and files).

answered on Stack Overflow Sep 15, 2019 by Gurmeet Singh

User contributions licensed under CC BY-SA 3.0