I have taken rpi as a reference and trying to boot kernel to our custom board, modified the "dts" file by removing all peripherals except UART and Interrupt controller by changing the base address of the rpi board to our board specific address.
Seeting the env variables as follows,
$ setenv initrd 0xc3000000;setenv initrd_high 0xc4000000;setenv fdt_high 0xc1001000;setenv fdt_addr_r 0xc1000000
$ setenv bootargs earlyprintk console=ttyAMA0 mem=128M noinitrd root=/dev/mtdblock3 rw rootfstype=jffs2 rw init=/sbin/init
This is the error log we got....
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] Unable to handle kernel paging request at virtual address 48000fe0
[ 0.000000] pgd = c0004000
[ 0.000000] [48000fe0] *pgd=00000000
[ 0.000000] Internal error: Oops: 5 [#1] ARM
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.9.22+ #81
[ 0.000000] Hardware name: BCM2835
[ 0.000000] task: c0497f58 task.stack: c0494000
[ 0.000000] PC is at __vic_init+0x3c/0x178
[ 0.000000] LR is at 0x48000fe0
[ 0.000000] pc : [<c0473b74>] lr : [<48000fe0>] psr: a00000d3
[ 0.000000] sp : c0495f50 ip : 00000000 fp : c0495f7c
[ 0.000000] r10: 00000001 r9 : 410fb767 r8 : 48000000
[ 0.000000] r7 : 00000000 r6 : 00000000 r5 : ffffffff r4 : 00000000
[ 0.000000] r3 : 48000fe0 r2 : 00000000 r1 : 00000000 r0 : 00000000
[ 0.000000] Flags: NzCv IRQs off FIQs off Mode SVC_32 ISA ARM
Segment user
[ 0.000000] Control: 00c5387d Table: c0004008 DAC: 00000055
[ 0.000000] Process swapper (pid: 0, stack limit = 0xc0494188)
[ 0.000000] Stack: (0xc0495f50 to 0xc0496000)
Please help me,Thanks in advance.
Seems like the problem occured in interrupt context in procedure __vic_init. This procedure tried to access virtual address 48000fe0.
By the way - are you sure that this is complete calltrace taken from dmesg?
If this is only a snippet taken from dmesg - put the whole calltrace here.
If you have sources for this procedure __vic_init you can debug it - I mean find the number of the line in source file and do the further debug.
Related
I am not able to mount nfs, my Parameters are like following, it is from bootlin;
setenv bootargs 'console=ttyS0,115200 root=/dev/nfs rw
nfsroot=192.168.0.1:/nfs,nfsvers=3,tcp
ip=192.168.0.100:::::usb0 g_ether.dev_addr=f8:dc:7a:00:00:02
g_ether.host_addr=f8:dc:7a:00:00:01'
setenv bootcmd 'mmc dev 0; devnum=${mmcdev}; setenv devtype mmc;
mmc rescan; run loadimage; run findfdt; run mmcloados'
When I am on uboot console, I called ifconfig command on host, but I couldn't see the network interface. Is it normal?
How can I determine if the mac address is correct?
when I tried to ping, I get "host is not alive" feedback.
Bootlog looks like following;
U-Boot 2021.01-ga6e7892957 (May 14 2021 - 05:06:14 +0000)
CPU : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM: 512 MiB
WDT: Started with servicing (60s timeout)
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... OK
Net: eth2: ethernet#4a100000, eth3: usb_ether
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
4944384 bytes read in 325 ms (14.5 MiB/s)
65774 bytes read in 13 ms (4.8 MiB/s)
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8ffec000, end 8ffff0ed ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.10.30-gd85aee3e19 (oe-user#oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 PREEMPT Fri May 7 18:33:44 UTC 2021
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Black
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 48 MiB at 0x9c800000
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000080000000-0x000000009fefffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080000000-0x000000009fefffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fefffff]
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (sgx neon)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129666
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/nfs rw nfsroot=192.168.0.1:/nfs,nfsvers=3,tcp ip=192.168.0.100:::::usb0 g_ether.dev_addr=f8:dc:7a:00:00:02 g_ether.host_addr=f8:dc:7a:00:00:01
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 452372K/523264K available (10240K kernel code, 692K rwdata, 3336K rodata, 1024K init, 282K bss, 21740K reserved, 49152K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
[ 0.000000] random: get_random_bytes called from start_kernel+0x324/0x4e0 with crng_init=0
[ 0.000000] TI gptimer clocksource: always-on /ocp/interconnect#44c00000/segment#200000/target-module#31000
[ 0.000009] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000027] clocksource: dmtimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000336] TI gptimer clockevent: 24000000 Hz at /ocp/interconnect#48000000/segment#0/target-module#40000
[ 0.001256] Console: colour dummy device 80x30
[ 0.001333] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[ 0.090406] pid_max: default: 32768 minimum: 301
[ 0.090566] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.090581] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.091421] CPU: Testing write buffer coherency: ok
[ 0.091494] CPU0: Spectre v2: using BPIALL workaround
[ 0.092291] Setting up static identity map for 0x80100000 - 0x80100060
[ 0.092430] rcu: Hierarchical SRCU implementation.
[ 0.092519] EFI services will not be available.
[ 0.092875] devtmpfs: initialized
[ 0.102888] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.103133] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.103157] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.106522] pinctrl core: initialized pinctrl subsystem
[ 0.107450] DMI not present or invalid.
[ 0.107895] NET: Registered protocol family 16
[ 0.110073] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.127754] l3-aon-clkctrl:0000:0: failed to disable
[ 0.128925] thermal_sys: Registered thermal governor 'fair_share'
[ 0.128937] thermal_sys: Registered thermal governor 'bang_bang'
[ 0.128952] thermal_sys: Registered thermal governor 'step_wise'
[ 0.128959] thermal_sys: Registered thermal governor 'user_space'
[ 0.129305] cpuidle: using governor ladder
[ 0.129341] cpuidle: using governor menu
[ 1.148982] No ATAGs?
[ 1.149010] hw-breakpoint: debug architecture 0x4 unsupported.
[ 1.172697] iommu: Default domain type: Translated
[ 1.174699] SCSI subsystem initialized
[ 1.175150] mc: Linux media interface: v0.10
[ 1.175194] videodev: Linux video capture interface: v2.00
[ 1.175300] pps_core: LinuxPPS API ver. 1 registered
[ 1.175309] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti#linux.it>
[ 1.175332] PTP clock support registered
[ 1.175391] EDAC MC: Ver: 3.0.0
[ 1.176597] Advanced Linux Sound Architecture Driver Initialized.
[ 1.177941] clocksource: Switched to clocksource dmtimer
[ 1.185160] NET: Registered protocol family 2
[ 1.186139] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 1.186177] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 1.186218] TCP bind hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 1.186258] TCP: Hash tables configured (established 4096 bind 4096)
[ 1.186373] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 1.186394] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 1.186536] NET: Registered protocol family 1
[ 1.187084] RPC: Registered named UNIX socket transport module.
[ 1.187101] RPC: Registered udp transport module.
[ 1.187108] RPC: Registered tcp transport module.
[ 1.187114] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.187132] PCI: CLS 0 bytes, default 64
[ 1.188552] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[ 1.189793] Initialise system trusted keyrings
[ 1.190087] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[ 1.193778] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 1.194528] NFS: Registering the id_resolver key type
[ 1.194578] Key type id_resolver registered
[ 1.194588] Key type id_legacy registered
[ 1.194676] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 1.194689] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 1.194734] ntfs: driver 2.1.32 [Flags: R/O].
[ 1.195340] Key type asymmetric registered
[ 1.195357] Asymmetric key parser 'x509' registered
[ 1.195405] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[ 1.195417] io scheduler mq-deadline registered
[ 1.195426] io scheduler kyber registered
[ 1.555186] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[ 1.652454] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
[ 1.652500] edma 49000000.dma: TI EDMA DMA engine driver
[ 1.672358] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[ 1.722033] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
[ 1.726383] printk: console [ttyS0] disabled
[ 1.726571] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 20, base_baud = 3000000) is a 8250
[ 2.375855] printk: console [ttyS0] enabled
[ 2.382982] omap_rng 48310000.rng: Random Number Generator ver. 20
[ 2.389283] random: fast init done
[ 2.392908] random: crng init done
[ 2.414615] brd: module loaded
[ 2.424526] loop: module loaded
[ 2.432117] libphy: Fixed MDIO Bus: probed
[ 2.497968] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[ 2.505680] libphy: 4a101000.mdio: probed
[ 2.512049] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[ 2.521681] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[ 2.528155] cpsw 4a100000.ethernet: ALE Table size 1024
[ 2.533505] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 2.540829] cpsw 4a100000.ethernet: Detected MACID = 6c:ec:eb:ab:52:64
[ 2.549619] i2c /dev entries driver
[ 2.555585] cpuidle: enable-method property 'ti,am3352' found operations
[ 2.563165] sdhci: Secure Digital Host Controller Interface driver
[ 2.569503] sdhci: Copyright(c) Pierre Ossman
[ 2.574856] sdhci-pltfm: SDHCI platform and OF driver helper
[ 2.582911] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
[ 2.591548] ledtrig-cpu: registered to indicate activity on CPUs
[ 2.611739] davinci-mcasp 48038000.mcasp: IRQ common not found
[ 2.629606] NET: Registered protocol family 10
[ 2.635179] Segment Routing with IPv6
[ 2.644917] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 2.652099] NET: Registered protocol family 17
[ 2.656950] Key type dns_resolver registered
[ 2.661989] omap_voltage_late_init: Voltage driver support not added
[ 2.669321] Loading compiled-in X.509 certificates
[ 2.681322] mmc1: SDHCI controller on 481d8000.mmc [481d8000.mmc] using External DMA
[ 2.695224] OMAP GPIO hardware version 0.1
[ 2.728464] tps65217-pmic: Failed to locate of_node [id: -1]
[ 2.740405] tps65217-bl: Failed to locate of_node [id: -1]
[ 2.748809] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[ 2.755267] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[ 2.764284] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[ 2.778397] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[ 2.789190] sdhci-omap 48060000.mmc: Got CD GPIO
[ 2.794188] sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
[ 2.879941] mmc0: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
[ 2.921947] mmc0: new high speed SDHC card at address 1234
[ 2.931057] tda998x 0-0070: found TDA19988
[ 2.935744] mmcblk0: mmc0:1234 SA04G 3.68 GiB
[ 2.947658] mmcblk0: p1 p2
[ 2.951020] tilcdc 4830e000.lcdc: bound 0-0070 (ops tda998x_ops)
[ 2.962961] [drm] Initialized tilcdc 1.0.0 20121205 for 4830e000.lcdc on minor 0
[ 2.970854] tilcdc 4830e000.lcdc: [drm] Cannot find any crtc or sizes
[ 2.979434] tilcdc 4830e000.lcdc: [drm] Cannot find any crtc or sizes
[ 3.173535] mmc1: new high speed MMC card at address 0001
[ 3.180862] mmcblk1: mmc1:0001 MMC04G 3.66 GiB
[ 3.186126] mmcblk1boot0: mmc1:0001 MMC04G partition 1 1.00 MiB
[ 3.192926] mmcblk1boot1: mmc1:0001 MMC04G partition 2 1.00 MiB
[ 3.199477] mmcblk1rpmb: mmc1:0001 MMC04G partition 3 128 KiB, chardev (243:0)
[ 3.211617] mmcblk1: p1
[ 15.448539] ALSA device list:
[ 15.451579] No soundcards found.
[ 111.209007] VFS: Unable to mount root fs via NFS.
[ 111.213900] devtmpfs: mounted
[ 111.221944] Freeing unused kernel memory: 1024K
[ 111.240361] Run /sbin/init as init process
[ 111.246257] Run /etc/init as init process
[ 111.250600] Run /bin/init as init process
[ 111.254784] Run /bin/sh as init process
[ 111.259326] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
[ 111.273591] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]---
environment variables are like above;
=> printenv
addr_fit=0x90000000
arch=arm
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
baudrate=115200
board=am335x
board_name=A335BNLT
board_rev=00C0
board_serial=5014BBBK1826
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_fdt=try
boot_fit=0
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc0 legacy_mmc0 mmc1 legacy_mmc1 nand0 usb0 pxe dhcp
bootargs=console=ttyS0,115200 root=/dev/nfs rw nfsroot=192.168.0.1:/nfs,nfsvers=3,tcp ip=192.168.0.100:::::usb0 g_ether.dev_addr=f8:dc:7a:00:00:02 g_ether.host_addr=f8:dc:7a:00:00:01
bootcmd=mmc dev 0; devnum=${mmcdev}; setenv devtype mmc; mmc rescan; run loadimage; run findfdt; run mmcloados
bootcmd_dhcp=setenv devtype dhcp; run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_legacy_mmc0=setenv mmcdev 0; setenv bootpart 0:2 ; run mmcboot
bootcmd_legacy_mmc1=setenv mmcdev 1; setenv bootpart 1:2 ; run mmcboot
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_mmc1=devnum=1; run mmc_boot
bootcmd_nand=run nandboot
bootcmd_orig=if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=devnum=0; run usb_boot
bootcount=1
bootdelay=2
bootdir=/boot
bootenvfile=uEnv.txt
bootfile=zImage
bootm_size=0x10000000
bootpart=0:2
bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
console=ttyO0,115200n8
cpu=armv7
dfu_alt_info_emmc=rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 1 1;MLO.raw raw 0x100 0x200;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;spl-os-args.raw raw 0x1500 0x200;spl-os-image.raw raw 0x1700 0x6900;spl-os-args fat 1 1;spl-os-image fat 1 1;u-boot.img fat 1 1;uEnv.txt fat 1 1
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x200;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;spl-os-args.raw raw 0x1500 0x200;spl-os-image.raw raw 0x1700 0x6900;spl-os-args fat 0 1;spl-os-image fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1
dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;u-boot-spl-os part 0 6;kernel part 0 8;rootfs part 0 9
dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
dtboaddr=0x89000000
efi_dtb_prefixes=/ /dtb/ /dtb/current/
envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run loadbootenv; then echo Loaded env from ${bootenvfile};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;fi;fi;
eth1addr=6c:ec:eb:ab:52:66
eth2addr=6c:ec:eb:ab:52:64
eth3addr=de:ad:be:ef:00:01
ethact=usb_ether
ethaddr=6c:ec:eb:ab:52:64
fdt_addr_r=0x88000000
fdtaddr=0x88000000
fdtcontroladdr=9df41050
fdtfile=undefined
findfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A335BNLT; then setenv fdtfile am335x-boneblack.dtb; fi; if test $board_name = A335PBGL; then setenv fdtfile am335x-pocketbeagle.dtb; fi; if test $board_name = BBBW; then setenv fdtfile am335x-boneblack-wireless.dtb; fi; if test $board_name = BBG1; then setenv fdtfile am335x-bonegreen.dtb; fi; if test $board_name = BBGW; then setenv fdtfile am335x-bonegreen-wireless.dtb; fi; if test $board_name = BBBL; then setenv fdtfile am335x-boneblue.dtb; fi; if test $board_name = BBEN; then setenv fdtfile am335x-sancloud-bbe.dtb; fi; if test $board_name = A33515BB; then setenv fdtfile am335x-evm.dtb; fi; if test $board_name = A335X_SK; then setenv fdtfile am335x-evmsk.dtb; fi; if test $board_name = A335_ICE; then setenv fdtfile am335x-icev2.dtb; fi; if test $fdtfile = undefined; then echo WARNING: Could not determine device tree to use; fi;
finduuid=part uuid mmc ${bootpart} uuid
get_overlaystring=for overlay in $name_overlays;do;setenv overlaystring ${overlaystring}'#'${overlay};done;
importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
init_console=if test $board_name = A335_ICE; then setenv console ttyO3,115200n8;else setenv console ttyO0,115200n8;fi;
ipaddr=192.168.0.100
kernel_addr_r=0x82000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
mmcboot=mmc dev ${mmcdev}; devnum=${mmcdev}; devtype=mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then run args_mmc; if test ${boot_fit} -eq 1; then run run_fit; else run mmcloados;fi;fi;fi;
mmcdev=0
mmcloados=if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
mmcrootfstype=ext4 rootwait
mtdids=nand0=nand.0
mtdparts=mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)
name_fit=fitImage
nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}
nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.u-boot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadaddr} - ${fdtaddr}
nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048
nandrootfstype=ubifs rootwait=1
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
netboot=echo Booting from network ...; setenv autoload no; dhcp; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr}
netloadfdt=tftp ${fdtaddr} ${fdtfile}
netloadimage=tftp ${loadaddr} ${bootfile}
nfsopts=nolock
partitions=uuid_disk=${uuid_gpt_disk};name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}
pxefile_addr_r=0x80100000
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
ramboot=echo Booting from ramdisk ...; run ramargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}
ramdisk_addr_r=0x88080000
ramroot=/dev/ram0 rw
ramrootfstype=ext2
rdaddr=0x88080000
rootpath=/export/rootfs
run_fit=bootm ${addr_fit}#${fdtfile}${overlaystring}
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x80000000
serial#=5014BBBK1826
serverip=192.168.0.1
soc=am33xx
spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}
spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; bootz ${loadaddr}
spibusno=0
spiimgsize=0x362000
spiroot=/dev/mtdblock4 rw
spirootfstype=jffs2
spisrcaddr=0xe0000
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial#44e09000
stdin=serial#44e09000
stdout=serial#44e09000
update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit}
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
usbnet_devaddr=f8:dc:7a:00:00:02
usbnet_hostaddr=f8:dc:7a:00:00:01
vendor=ti
ver=U-Boot 2021.01-ga6e7892957 (May 14 2021 - 05:06:14 +0000)
Environment size: 10427/131068 bytes
=>
I created a cfg file and added it to my kernel recipe, configuration is below. But I am still unable to achieve nfs mounting. Any suggestions?
Is there a way to make sure, may configuration changes are in the built kernel?
I have put all files, MLO, Uboot, dtb and zImage in Boot partition of the sdcard, is it correct?
CONFIG_USB_COMMON=y
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_GADGET=y
CONFIG_USB_MUSB_DSPS=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_AM335X_CONTROL_USB=y
CONFIG_AM335X_PHY_USB=y
CONFIG_USB_GADGET=y
CONFIG_USB_LIBCOMPOSITE=y
CONFIG_USB_U_ETHER=y
CONFIG_USB_F_ECM=y
CONFIG_USB_F_SUBSET=y
CONFIG_USB_F_RNDIS=y
CONFIG_USB_ETH=y
Thank you.
printk is one of the core debug technique we use in Linux driver development. I have recently experience a weird problem. I read somewhere saying printk can be used in any context. However, when I use printk inside driver "read" function implementation, I see kernel error after it runs for a while. The error message is as following:
[ 113.017140] cdns-i2c e0005000.i2c: timeout waiting on completion
[ 113.023177] edt_ft5426 1-0038: edt_ft5426_ts_read: read error, addr=0x2 len=29.
[ 113.030585] Unable to handle kernel NULL pointer dereference at virtual address 00000043
[ 113.038688] pgd = c0004000
[ 113.041392] [00000043] *pgd=00000000
[ 113.044964] Internal error: Oops - BUG: 17 [#1] PREEMPT SMP ARM
[ 113.050872] Modules linked in: bfcore(O)
[ 113.054803] CPU: 1 PID: 690 Comm: irq/60-edt-ft54 Tainted: G O 4.14.0-xilinx #1
[ 113.058533] dma_desc_p[MIC_DMA].ready = 0
[ 113.058539] dma_desc_p[SMAP_DMA].ready = 0
[ 113.071478] Hardware name: Xilinx Zynq Platform
[ 113.076004] task: df7e86c0 task.stack: df6f6000
[ 113.080535] PC is at irq_finalize_oneshot+0x0/0xf0
[ 113.085318] LR is at irq_thread_fn+0x2c/0x34
[ 113.089577] pc : [<c0153b00>] lr : [<c0153c1c>] psr: 600f0113
[ 113.095835] sp : df6f7f48 ip : 00000000 fp : df77751c
[ 113.101051] r10: 00000000 r9 : 00000001 r8 : ded48624
[ 113.106268] r7 : c0ffffff r6 : ffffffff r5 : 00000001 r4 : ffffffff
[ 113.112787] r3 : 00000000 r2 : 00000000 r1 : ffffffff r0 : ffffffff
[ 113.119307] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 113.126433] Control: 18c5387d Table: 1ec0c04a DAC: 00000051
[ 113.132171] Process irq/60-edt-ft54 (pid: 690, stack limit = 0xdf6f6210)
[ 113.138862] Stack: (0xdf6f7f48 to 0xdf6f8000)
[ 113.143215] 7f40: df50b600 ffffe000 ded48600 c0153edc 00000000 c0153d04
[ 113.151383] 7f60: 00000000 df777500 df7e4980 df6f6000 00000000 ded48600 c0153d88 df43db70
[ 113.159553] 7f80: df77751c c01332c4 df6f6000 df7e4980 c0133194 00000000 00000000 00000000
[ 113.167727] 7fa0: 00000000 00000000 00000000 c0106fb0 00000000 00000000 00000000 00000000
[ 113.175894] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 113.184062] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 113.192243] [<c0153b00>] (irq_finalize_oneshot) from [<c0153d04>] (irq_thread_dtor+0x0/0x7c)
[ 113.196794] dma_desc_p[MIC_DMA].ready = 0
[ 113.196799] dma_desc_p[SMAP_DMA].ready = 0
[ 113.208925] [<c0153d04>] (irq_thread_dtor) from [<df6f6000>] (0xdf6f6000)
[ 113.215713] Code: 13a00001 e12fff1e e3a00000 e12fff1e (e5903044)
[ 113.221937] ---[ end trace 97dcf8cac1432a55 ]---
[ 113.226572] genirq: exiting task "irq/60-edt-ft54" (690) is an active IRQ thread (irq 60)
The setup is on a Xilinx Zynq 7020 device. I run a UI program which need touch screen as input device. So I need I2C for that. My driver responsible for reading data from FPGA. After it runs for a while, I got the error. In the log, I have:
[ 113.196794] dma_desc_p[MIC_DMA].ready = 0
[ 113.196799] dma_desc_p[SMAP_DMA].ready = 0
These are generated by my printk statements from the "read" function. If I comment away all the printk statements, the program runs ok. Any idea why there is a conflict between printk and I2C driver?
Having a hard time booting the tinycore linux kernel for an ARM A10 here, on boot the device crashes.
3.0.42 config found here: http://distro.ibiblio.org/tinycorelinux/5.x/armv7/Allwinner-A10/a10Core-kernel-3.0.42.config
U-Boot SPL 2013.01 (Feb 11 2013 - 15:19:28)
Board: mk802ii
DRAM: 1024MB
SUNXI SD/MMC: 0
U-Boot 2013.01 (Feb 11 2013 - 15:19:28) Allwinner Technology
CPU: SUNXI Family
Board: mk802ii
I2C: ready
DRAM: 1 GiB
MMC: SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: wemac
Hit any key to stop autoboot: 0
reading uEnv.txt
117 bytes read in 2 ms (56.6 KiB/s)
Loaded environment from uEnv.txt
reading boot.scr
304 bytes read in 3 ms (98.6 KiB/s)
Jumping to boot.scr
## Executing script at 44000000
reading script.bin
42132 bytes read in 6 ms (6.7 MiB/s)
reading uImage
4109016 bytes read in 213 ms (18.4 MiB/s)
reading uCore
2951575 bytes read in 154 ms (18.3 MiB/s)
## Booting kernel from Legacy Image at 48000000 ...
Image Name: Linux-3.0.42
Created: 2015-02-16 20:40:40 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4108952 Bytes = 3.9 MiB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 43100000 ...
Image Name: uCore for Allwinner A10
Created: 2014-12-26 21:12:42 UTC
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 2951511 Bytes = 2.8 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
<6>Initializing cgroup subsys cpuset
<5>Linux version 3.0.42 (root#localhost.localdomain) (gcc version 4.9.1 20140717 (Red Hat Cross 4.9.1-1) (GCC) ) #3 PREEMPT Mon Feb 16 15:40:29 EST 2015
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: sun4i
<6>Memory Reserved:
<6> SYS : 0x43000000 - 0x4300ffff ( 64 kB)
<6> VE : 0x44000000 - 0x48ffffff ( 80 MB)
<6> G2D : 0x58000000 - 0x58ffffff ( 16 MB)
<6> LCD : 0x5a000000 - 0x5bffffff ( 32 MB)
Memory policy: ECC disabled, Data cache writeback
<6>BROM Ver: 1100 1100 1623
<6>chip-id: A10 (AW1623 revision C)
<7>On node 0 totalpages: 262144
<7>free_area_init_node: node 0, pgdat c07e60e4, node_mem_map c08ab000
<7> Normal zone: 1280 pages used for memmap
<7> Normal zone: 0 pages reserved
<7> Normal zone: 162560 pages, LIFO batch:31
<7> HighMem zone: 768 pages used for memmap
<7> HighMem zone: 97536 pages, LIFO batch:31
<7>pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
<7>pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
<5>Kernel command line: console=tty0 init=/init rootwait panic=10 loglevel=3 dis p.screen0_output_mode=EDID:1280x720p60 hdmi.audio=EDID:0 nozswap nortc
<6>PID hash table entries: 4096 (order: 2, 16384 bytes)
<6>Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
<6>Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
<6>Memory: 1024MB = 1024MB total
<5>Memory: 896644k/896644k available, 151932k reserved, 393216K highmem
<5>Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xe8800000 - 0xf0000000 ( 120 MB)
lowmem : 0xc0000000 - 0xe8000000 ( 640 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.init : 0xc0008000 - 0xc0035000 ( 180 kB)
.text : 0xc0035000 - 0xc07a3000 (7608 kB)
.data : 0xc07a4000 - 0xc07ef9f0 ( 303 kB)
.bss : 0xc07ef9f0 - 0xc08aa768 ( 748 kB)
<6>SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
<6>NR_IRQS:96 nr_irqs:96 96
<6>timer0: Periodic Mode
<6>Console: colour dummy device 80x30
<6>console [tty0] enabled
<6>Calibrating delay loop... <c>1001.88 BogoMIPS (lpj=5009408)
<6>pid_max: default: 32768 minimum: 301
<6>Mount-cache hash table entries: 512
<6>Initializing cgroup subsys cpuacct
<6>Initializing cgroup subsys devices
<6>Initializing cgroup subsys freezer
<6>Initializing cgroup subsys blkio
<6>CPU: Testing write buffer coherency: ok
<6>hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
<6>devtmpfs: initialized
<6>print_constraints: dummy:
<6>NET: Registered protocol family 16
<6>hw-breakpoint: debug architecture 0x4 unsupported.
[ccmu] try to set apb1 parent to sata_pll failed!
SOFTWINNER DMA Driver, (c) 2003-2004,2006 Simtec Electronics
<6>Initialize DMAC OK
<6>bio: create slab <bio-0> at 0
<5>SCSI subsystem initialized
<7>libata version 3.00 loaded.
<6>usbcore: registered new interface driver usbfs
<6>usbcore: registered new interface driver hub
<6>usbcore: registered new device driver usb
<6>Advanced Linux Sound Architecture Driver Version 1.0.24.
<6>Bluetooth: Core ver 2.16
<6>NET: Registered protocol family 31
<6>Bluetooth: HCI device and connection manager initialized
<6>Bluetooth: HCI socket layer initialized
<6>Bluetooth: L2CAP socket layer initialized
<6>Bluetooth: SCO socket layer initialized
Init eGon pin module V2.0
<6>Switching to clocksource aw 64bits couter
<6>cfg80211: Calling CRDA to update world regulatory domain
<5>FS-Cache: Loaded
<6>CacheFiles: Loaded
<6>Switched to NOHz mode on CPU #0
<1>Unable to handle kernel NULL pointer dereference at virtual address 00000001
<1>pgd = c0004000
<1>[00000001] *pgd=00000000
<0>Internal error: Oops: 5 [#1] PREEMPT
<d>Modules linked in:
CPU: 0 Not tainted (3.0.42 #3)
PC is at kmem_cache_alloc+0x78/0xd0
LR is at con_insert_unipair+0xc0/0x10c
pc : [<c00f6e7c>] lr : [<c031508c>] psr: 60000093
sp : e783be88 ip : 0000025b fp : e783bea4
r10: c07c37d0 r9 : 00000001 r8 : 00000003
r7 : 00000003 r6 : 000000d0 r5 : e7802200 r4 : 00000001
r3 : 20000013 r2 : 00000000 r1 : c10b0040 r0 : 00000001
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c5387d Table: 40004019 DAC: 00000015
PC: 0xc00f6dfc:
6dfc eafffff2 c0596580 e1a0c00d e92dd878 e24cb004 e1a05000 e1a06001 e5953000
6e1c e593c004 e5934000 e3540000 0a000018 e10f3000 f10c0080 e5951000 e5910000
6e3c e1540000 0a000007 e3a00000 e121f003 e3500000 0afffff0 e3160902 1a000017
6e5c e1a00004 e89da878 e5912004 e15c0002 1afffff4 e5952014 e28cc001 e3a00001
6e7c e7942002 e5812000 e5952000 e582c004 eaffffed e1a01006 e1a0200e e1a00005
6e9c e7e067d6 ebffff2a e3500000 03a06000 12066001 e1a04000 e3560000 0affffe7
6ebc e5951010 e3510000 0affffe4 e1a00004 eb06e873 eaffffe1 e1a0c00d e92dd878
6edc e24cb004 e3074dc0 e1a06000 e34c4088 e1a05001 e5943054 e3530003 0a00000f
LR: 0xc031500c:
500c e0844a07 e3a00000 e1a03083 e18c70b3 e5963084 e0834004 e5864084 e89da8f0
502c e3073dd8 e34c3088 e593001c e3500000 0a00001c e3a010d0 ebf7876e e3500000
504c e7860105 0a00001e e2403004 e280e07c e3a0c000 e5a3c004 e153000e 1afffffc
506c eaffffe0 e3073dd8 e34c3088 e593001c e3500000 0a00000f e3a010d0 ebf7875d
508c e3500000 e1a0c000 e5850000 0a00000c e1a0000c e3a010ff e3a02080 ebfe6fcc
50ac e1a0c000 eaffffd4 e3a01010 e7861105 e1a00001 eaffffe3 e3a0c010 e585c000
50cc eafffff2 e3e0000b e89da8f0 e1a0c00d e92ddbf0 e24cb004 e2506000 089dabf0
50ec e5964098 e3540000 0a000024 e1a00004 e3a01b01 ebfe6fe6 e2466004 e3a07000
SP: 0xe783be08:
be08 e783c980 ffd23940 ffffffff 0a21fe80 e783be5c 0000040f 00000005 000000d0
be28 00000003 00000003 e783bea4 e783be40 c003b750 c0035214 00000001 c10b0040
be48 00000000 20000013 00000001 e7802200 000000d0 00000003 00000003 00000001
be68 c07c37d0 e783bea4 0000025b e783be88 c031508c c00f6e7c 60000093 ffffffff
be88 c0887dd8 00002665 e78bc5e4 e786d780 e783bec4 e783bea8 c031508c c00f6e10
bea8 00000000 00000001 e786d780 00000003 e783bf04 e783bec8 c0315d70 c0314fd8
bec8 c08952b4 e7803200 c07c3a28 c07c37ce e783befc 00000001 00000014 c08954d8
bee8 00000002 00000004 00000000 00000000 e783bf24 e783bf08 c001e220 c0315c88
FP: 0xe783be24:
be24 000000d0 00000003 00000003 e783bea4 e783be40 c003b750 c0035214 00000001
be44 c10b0040 00000000 20000013 00000001 e7802200 000000d0 00000003 00000003
be64 00000001 c07c37d0 e783bea4 0000025b e783be88 c031508c c00f6e7c 60000093
be84 ffffffff c0887dd8 00002665 e78bc5e4 e786d780 e783bec4 e783bea8 c031508c
bea4 c00f6e10 00000000 00000001 e786d780 00000003 e783bf04 e783bec8 c0315d70
bec4 c0314fd8 c08952b4 e7803200 c07c3a28 c07c37ce e783befc 00000001 00000014
bee4 c08954d8 00000002 00000004 00000000 00000000 e783bf24 e783bf08 c001e220
bf04 c0315c88 00000000 00000000 c08953b4 00000001 e783bf54 e783bf28 c001e734
R1: 0xc10affc0:
ffc0 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffe0 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
0000 e78015e0 0000002e c0d9b020 00000000 e7802580 0000000b c0d9b040 00000000
0020 e786d840 00000299 c0d9bda0 00000000 e78bd880 000009d2 c0d9c7a0 00000000
0040 00000001 0000025a c0d9c780 00000000 e785c700 0000000d c0d9bb80 00000000
0060 e78bea00 000002d2 c0d9c7c0 00000000 e78a0400 0000000c c0d9c400 00000000
0080 e785a000 00000004 c0d9bb00 00000000 e7812000 0000025e c0d9b200 00000000
00a0 e780a000 00000001 c0d9b100 00000000 e7823130 00000291 c0d9b460 00000000
R5: 0xe7802180:
2180 c10b0030 00000000 00000006 00000040 00000040 00000000 00000040 00000040
21a0 00000040 00000000 00000004 00000000 00000040 00000040 00000000 e7800040
21c0 e7802140 e7802240 00000000 00000000 00000000 00000000 00000000 00000000
21e0 00000000 00000000 00000000 e7801060 ffffffff ffffffff ffffffff ffffffff
2200 c10b0040 00000000 00000007 00000080 00000080 00000000 00000020 00000020
2220 00000020 00000000 00000008 00000000 00000080 00000040 00000000 e7800080
2240 e78021c0 e78022c0 00000000 00000000 00000000 00000000 00000000 00000000
2260 00000000 00000000 00000000 e7801080 ffffffff ffffffff ffffffff ffffffff
R10: 0xc07c3750:
3750 f0c5f0c4 f0c7f0c6 f0c9f0c8 f0cbf0ca f0cdf0cc f0cff0ce f0d1f0d0 f0d3f0d2
3770 f0d5f0d4 f0d7f0d6 f0d9f0d8 f0dbf0da f0ddf0dc f0dff0de f0e1f0e0 f0e3f0e2
3790 f0e5f0e4 f0e7f0e6 f0e9f0e8 f0ebf0ea f0edf0ec f0eff0ee f0f1f0f0 f0f3f0f2
37b0 f0f5f0f4 f0f7f0f6 f0f9f0f8 f0fbf0fa f0fdf0fc f0fff0fe 263a0000 2665263b
37d0 25c62666 26602663 25d82022 25d925cb 26402642 266b266a 00a4263c 25ba25b6
37f0 25c425c0 203c2195 00a700b6 21a825ac 21932191 21902192 2194221f 25bc25b2
3810 00210020 00a80022 00240023 00260025 00b40027 00290028 002b002a 00b8002c
3830 00ad002d 002f002e 00310030 00330032 00350034 00370036 00390038 003b003a
<0>Process swapper (pid: 1, stack limit = 0xe783a2e8)
<0>Stack: (0xe783be88 to 0xe783c000)
<0>be80: c0887dd8 00002665 e78bc5e4 e786d780 e783bec4 e783bea8
<0>bea0: c031508c c00f6e10 00000000 00000001 e786d780 00000003 e783bf04 e783bec8
<0>bec0: c0315d70 c0314fd8 c08952b4 e7803200 c07c3a28 c07c37ce e783befc 00000001
<0>bee0: 00000014 c08954d8 00000002 00000004 00000000 00000000 e783bf24 e783bf08
<0>bf00: c001e220 c0315c88 00000000 00000000 c08953b4 00000001 e783bf54 e783bf28
<0>bf20: c001e734 c001e1e0 c0740fc8 e783bf38 c015d534 c0894ef8 00000000 c0627944
<0>bf40: 00000013 00000000 e783bf74 e783bf58 c001dcd8 c001e5ac c06f9560 e783bf7c
<0>bf60: 0000000c c0896500 e783bf9c e783bf78 c001f2f8 c001dbb0 c070e9d4 00000001
<0>bf80: 00000013 c07efa00 e783a020 00000001 e783bfe4 e783bfa0 c003549c c001f234
<0>bfa0: e783bfbc e783bfb0 00000000 c001f228 e783bfcc e783bfc0 c00ae8f4 c002d83c
<0>bfc0: c002de00 00000001 00000013 00000000 00000000 00000000 e783bff4 e783bfe8
<0>bfe0: c0008b44 c0035380 00000000 e783bff8 c006c9fc c0008a44 ffffffff ffffffff
Backtrace:
[<c00f6e04>] (kmem_cache_alloc+0x0/0xd0) from [<c031508c>] (con_insert_unipair+0 xc0/0x10c)
r6:e786d780 r5:e78bc5e4 r4:00002665 r3:c0887dd8
[<c0314fcc>] (con_insert_unipair+0x0/0x10c) from [<c0315d70>] (con_set_default_u nimap+0xf4/0x18c)
r7:00000003 r6:e786d780 r5:00000001 r4:00000000
[<c0315c7c>] (con_set_default_unimap+0x0/0x18c) from [<c001e220>] (console_map_i nit+0x4c/0x58)
[<c001e1d4>] (console_map_init+0x0/0x58) from [<c001e734>] (vty_init+0x194/0x1a4 )
r6:00000001 r5:c08953b4 r4:00000000 r3:00000000
[<c001e5a0>] (vty_init+0x0/0x1a4) from [<c001dcd8>] (tty_init+0x134/0x14c)
r8:00000000 r7:00000013 r6:c0627944 r5:00000000 r4:c0894ef8
[<c001dba4>] (tty_init+0x0/0x14c) from [<c001f2f8>] (chr_dev_init+0xd0/0xdc)
r5:c0896500 r4:0000000c
[<c001f228>] (chr_dev_init+0x0/0xdc) from [<c003549c>] (do_one_initcall+0x128/0x 180)
r6:00000001 r5:e783a020 r4:c07efa00
[<c0035374>] (do_one_initcall+0x0/0x180) from [<c0008b44>] (kernel_init+0x10c/0x 190)
[<c0008a38>] (kernel_init+0x0/0x190) from [<c006c9fc>] (do_exit+0x0/0x754)
<0>Code: 1afffff4 e5952014 e28cc001 e3a00001 (e7942002)
<4>---[ end trace 1871642cfdaefb45 ]---
<0>Kernel panic - not syncing: Attempted to kill init!
Backtrace:
[<c003f900>] (dump_backtrace+0x0/0x10c) from [<c058702c>] (dump_stack+0x18/0x1c)
r6:e783c000 r5:c07afc64 r4:c07f2bb0 r3:00000000
[<c0587014>] (dump_stack+0x0/0x1c) from [<c0587124>] (panic+0x78/0x188)
[<c05870ac>] (panic+0x0/0x188) from [<c006d150>] (complete_and_exit+0x0/0x24)
r3:00000000 r2:e783bbd0 r1:e783bbc8 r0:c0703720
r7:00000001
[<c006c9fc>] (do_exit+0x0/0x754) from [<c003fd8c>] (die+0x298/0x300)
r7:00000001
[<c003faf4>] (die+0x0/0x300) from [<c058709c>] (__do_kernel_fault.part.5+0x6c/0x 7c)
[<c0587030>] (__do_kernel_fault.part.5+0x0/0x7c) from [<c004465c>] (do_page_faul t+0x12c/0x3a8)
r7:00000001 r3:e783be40
[<c0044530>] (do_page_fault+0x0/0x3a8) from [<c0044a20>] (do_translation_fault+0 xa4/0xa8)
[<c004497c>] (do_translation_fault+0x0/0xa8) from [<c0035248>] (do_DataAbort+0x4 0/0xa0)
r6:c004497c r5:00000005 r4:c07aaa68 r3:60000093
[<c0035208>] (do_DataAbort+0x0/0xa0) from [<c003b750>] (__dabt_svc+0x70/0xa0)
Exception stack(0xe783be40 to 0xe783be88)
be40: 00000001 c10b0040 00000000 20000013 00000001 e7802200 000000d0 00000003
be60: 00000003 00000001 c07c37d0 e783bea4 0000025b e783be88 c031508c c00f6e7c
be80: 60000093 ffffffff
r8:00000003 r7:00000003 r6:000000d0 r5:00000005 r4:0000040f
[<c00f6e04>] (kmem_cache_alloc+0x0/0xd0) from [<c031508c>] (con_insert_unipair+0 xc0/0x10c)
r6:e786d780 r5:e78bc5e4 r4:00002665 r3:c0887dd8
[<c0314fcc>] (con_insert_unipair+0x0/0x10c) from [<c0315d70>] (con_set_default_u nimap+0xf4/0x18c)
r7:00000003 r6:e786d780 r5:00000001 r4:00000000
[<c0315c7c>] (con_set_default_unimap+0x0/0x18c) from [<c001e220>] (console_map_i nit+0x4c/0x58)
[<c001e1d4>] (console_map_init+0x0/0x58) from [<c001e734>] (vty_init+0x194/0x1a4 )
r6:00000001 r5:c08953b4 r4:00000000 r3:00000000
[<c001e5a0>] (vty_init+0x0/0x1a4) from [<c001dcd8>] (tty_init+0x134/0x14c)
r8:00000000 r7:00000013 r6:c0627944 r5:00000000 r4:c0894ef8
[<c001dba4>] (tty_init+0x0/0x14c) from [<c001f2f8>] (chr_dev_init+0xd0/0xdc)
r5:c0896500 r4:0000000c
[<c001f228>] (chr_dev_init+0x0/0xdc) from [<c003549c>] (do_one_initcall+0x128/0x 180)
r6:00000001 r5:e783a020 r4:c07efa00
[<c0035374>] (do_one_initcall+0x0/0x180) from [<c0008b44>] (kernel_init+0x10c/0x 190)
[<c0008a38>] (kernel_init+0x0/0x190) from [<c006c9fc>] (do_exit+0x0/0x754)
<0>Rebooting in 10 seconds..
Looks like infamous ARM memset() bug. Check this bugreport for solution: https://bugs.linaro.org/show_bug.cgi?id=928#c7
This is a kernel bug, which was fixed in year 2013 by following commits in mainline Linux repository:
455bd4c430b0c0a361f38e8658a0d6cb469942b5 ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations
418df63adac56841ef6b0f1fcf435bc64d4ed177 ARM: 7670/1: fix the memset fix
The problem should be fixed by backporting those patches (in most cases patches could be applied without any modifications), or can be worked around with -fno-builtin-memset
I got the same kind of problem with yocto. By disabling the power management in the kernel, I was able to boot correctly. It's a workaround... I did not find the root cause yet.
My kernel oopsed at kmem_cache_alloc with Oops number 5. I googled what that denotes, and found that it means 'Page protection fault during read access in user mode'. I am not able to find what page protection fault is. Is it the same as general protection fault?
[ 402.554964] Unable to handle kernel NULL pointer dereference at virtual address 00000001
[ 402.562995] pgd = c84ac000
[ 402.566132] [00000001] *pgd=00000000
[ 402.573958] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 402.579209] Modules linked in: bcmdhd
[ 402.582923] CPU: 0 PID: 2507 Comm: MediaScannerSer Not tainted 3.10.10+ #1
[ 402.589703] task: c7eab480 ti: c23b0000 task.ti: c23b0000
[ 402.595036] PC is at kmem_cache_alloc+0x78/0x1c4
[ 402.599603] LR is at fat_parse_long+0x2e4/0x314
[ 402.604095] pc : [<c01031bc>] lr : [<c01f3f2c>] psr: 20000013
[ 402.604095] sp : c23b1bf8 ip : c23b1c38 fp : c23b1c34
[ 402.615400] r10: 007d9000 r9 : 00000000 r8 : c01f3f2c
[ 402.620579] r7 : 000000d0 r6 : ef001b80 r5 : c23b0000 r4 : 00000001
[ 402.637275] r3 : 00000000 r2 : c23b1c9c r1 : 000000d0 r0 : ef001b80
[ 402.643702] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 402.650719] Control: 10c5387d Table: 584ac06a DAC: 00000015
Thanks in advance.
[ 402.554964] Unable to handle kernel NULL pointer dereference at virtual address 00000001
Probably, you have a NULL pointer somewhere in your code. You have something like this:
my_variable->my_sub_structure->my_field
where my_sub_structure is NULL, so the code tries to reach my_field from an invalid memory address.
I am trying to debug our embedded linux system under very low temperatures (<40C). The problem is that it does not always boot correctly and I am trying to figure out why. After some analysis I saw that the kernel goes into panic during the start-up with the following output:
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
/opt/elinos-5.1/linux/linux-ppc-2.6.34/drivers/rtc/hctosys.c: unable to open rtc
device (rtc0)
ADDRCONF(NETDEV_UP): eth0: link is not ready
IP-Config: Complete:
device=eth0, addr=192.168.100.100, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.100.100, domain=, nis-domain=(none),
bootserver=192.168.100.20, rootserver=192.168.100.20, rootpath=
Freeing unused kernel memory: 156k init
init started: BusyBox v1.6.1 (2013-06-03 11:53:03 CEST) multi-call binary
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
udevd-work[84]: '/sbin/modprobe -bv of:NioctlT<NULL>Cfsl,mpc5125-ioctl' unexpect
ed exit with status 0x000b
------------[ cut here ]------------
Badness at /opt/elinos-5.1/linux/linux-ppc-2.6.34/kernel/sched.c:3574
NIP: c001acfc LR: c001ace4 CTR: c01c5fa4
REGS: c790f7c0 TRAP: 0700 Not tainted (2.6.34.7-ELinOS-146-ipipe)
MSR: 00021032 <ME,CE,IR,DR> CR: 28000482 XER: 20000000
TASK = c3ba6cb0[71] 'udevd' THREAD: c78e0000
GPR00: 00000000 c790f870 c3ba6cb0 00000001 c790f8b8 00000008 00000000 00000000
GPR08: 00000000 c0370000 00000001 c0370000 5d0fabd2 10033420 10019a6c 00000000
GPR16: 10019328 100194d4 100194c0 1002bad0 10019328 10019474 bfa35428 100192fc
GPR24: 100321f0 00000000 00000000 c649e840 00000000 00000901 00000000 00000000
NIP [c001acfc] add_preempt_count+0x48/0xac
LR [c001ace4] add_preempt_count+0x30/0xac
Call Trace:
Instruction dump:
409e0038 54290024 8009000c 2f800000 40bc0028 48133285 2f830000 419e0068
3d20c037 8009d298 2f800000 409e0058 <0fe00000> 48000050 3d20c037 8009d130
Unable to handle kernel paging request for instruction fetch
Faulting instruction address: 0x00000000
Oops: Kernel access of bad area, sig: 11 [#1]
PREEMPT LTT NESTING LEVEL : 0
ORION
last sysfs file: /sys/devices/platform/gpio-keys-polled/input/input0/uevent
NIP: 00000000 LR: 00000000 CTR: c01c7778
REGS: c790f990 TRAP: 0400 Tainted: G W (2.6.34.7-ELinOS-146-ipipe)
MSR: 20009032 <EE,ME,IR,DR> CR: 28000484 XER: 20000000
TASK = c3ba6cb0[71] 'udevd' THREAD: c78e0000
GPR00: 00000000 c790fa40 c3ba6cb0 00000008 00000008 00000008 c7912804 c0348ba4
GPR08: 00000047 c78a5414 00000000 00000004 28000482 10033420 10019a6c 00000000
GPR16: 10019328 100194d4 100194c0 1002bad0 10019328 10019474 bfa35428 100192fc
GPR24: 100321f0 00000000 c790f618 00200200 00000000 c790fa34 00200200 00000000
NIP [00000000] (null)
LR [00000000] (null)
Call Trace:
Instruction dump:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
Kernel panic - not syncing: Fatal exception in interrupt
Call Trace:
Rebooting in 180 seconds..
INFO: RCU detected CPU 0 stall (t=2500 jiffies)
INFO: RCU detected CPU 0 stall (t=10000 jiffies)
INFO: RCU detected CPU 0 stall (t=17500 jiffies)
INFO: RCU detected CPU 0 stall (t=25000 jiffies)
INFO: RCU detected CPU 0 stall (t=32500 jiffies)
INFO: RCU detected CPU 0 stall (t=40000 jiffies)
System Halted, OK to turn off power
------------[ cut here ]------------
kernel BUG at /opt/elinos-5.1/linux/linux-ppc-2.6.34/mm/vmalloc.c:1228!
Oops: Exception in kernel mode, sig: 5 [#2]
PREEMPT LTT NESTING LEVEL : 0
ORION
last sysfs file: /sys/devices/platform/gpio-keys-polled/input/input0/uevent
NIP: c009b0cc LR: c0013518 CTR: 00000000
REGS: c790f7c0 TRAP: 0700 Tainted: G D W (2.6.34.7-ELinOS-146-ipipe)
MSR: 00029032 <EE,ME,CE,IR,DR> CR: 28000484 XER: 20000000
TASK = c3ba6cb0[71] 'udevd' THREAD: c78e0000
GPR00: 078fe000 c790f870 c3ba6cb0 00001000 00000001 00000001 c9000000 fddff000
GPR08: ffffffff 000000d0 c001018c c790e000 48000488 10033420 10019a6c 00000000
GPR16: 10019328 100194d4 100194c0 1002bad0 10019328 10019474 bfa35428 100192fc
GPR24: c001018c 000000d0 00001000 ffffffff c9000000 fddff000 00000001 00000001
NIP [c009b0cc] __get_vm_area_node+0x68/0x204
LR [c0013518] __ioremap_caller+0x90/0x134
Call Trace:
Instruction dump:
7c9e2378 93e1003c 7cbf2b78 90010044 9261000c 92810010 92a10014 92c10018
92e1001c 93410028 800b000c 5400016e <0f000000> 70a00001 41820030 7c7e0034
Kernel panic - not syncing: Fatal exception in interrupt
Call Trace:
Rebooting in 180 seconds..:
Could anybody give me some hints how to approach the problem? What I want is to understand which component of the system (i.e. memory chip, etc.) causes this failure. I will be very happy to hear any ideas. Thanks.
All the OOPS/panic information show the exception happened in udevd context, I think it may be triggered by "/sbin/modprobe -bv of:NioctlTCfsl,mpc5125-ioctl".
To verify this, you can remove the "/sbin/modprobe -bv of:NioctlTCfsl,mpc5125-ioctl" entry in your root file system to see whether the system can boot up successfully.
I guess your platform CPU is PowerPC architecture. If so, the exception vector is 0x700, it means the instruction fetch exception. CPU tried to fetch one instruction from invalid address. The instruction flow is incremented if there are no jump/branch instructions. If option 1 is verified that it is related to "/sbin/modprobe", please check the kernel module to analysis the instruction fetch exception.
Good luck!