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.
I am having am335x based custom board. with 4.9.28 kernel on buildroot.
Right now we are migrating to yocto and build a custom image for Beagleboneblack which is based on am335x processor with 4.14.54 kernel.
I am trying to load yocto 4.15.54 kernel zimage on custom board with uboot. Now i am getting fallowing error.
U-Boot SPL 2013.10 (Apr 27 2018 - 10:48:10)
ALC enable_board_pin_mux
Init SDRAM using EEPROM Params
Could not probe the base board expander; something fundamentally wrong on the I2C bus
Could not probe the base board EEPROM; something fundamentally wrong on the I2C bus
reading u-boot.img
reading u-boot.img
U-Boot 2013.10 (Apr 27 2018 - 10:48:10)
I2C: ready
DRAM: 128 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Change rotary switches to 911 to enter Recovery Mode
i2c_read: error waiting for addr ACK (status=0x116)
Rotary Switch Setting is 1534
start delay
delay over
CAN1_TX gpio set to 1
Net: cpsw, usb_ether
Hit any key to stop autoboot: 0
mmc1(part 0) is current device
Saving Environment to MMC...
Writing to MMC(1)... done
** File not found /boot/zImage.4.14.54 **
--WARN: Cannot load the zImage.4.9.28--
Here is the printenv of the uboot.
printenv
ACTIVE_SLOT=ROOTFS_A
BOOT_A_LEFT=0
BOOT_B_LEFT=10
ROOTFS_A_VALID=NO
ROOTFS_B_VALID=YES
UPGRADE_STATE=0
actualslotA=actual_slot=ROOTFS_A
actualslotB=actual_slot=ROOTFS_B
arch=arm
baudrate=115200
board=pic6
board_name=pic6_alc
bootargs=console=ttyO0,115200n8 loginShell=allow earlyprintk user_debug=0 loginShell=allow rootflags=data=ordered,journal_checksum,cA
bootcmd=run mmc_boot
bootdelay=3
bootdir=/boot
bootfile=zImage.4.14.54
bootpart=1:5
check_boot_count=test -n "${ACTIVE_SLOT}" || setenv ACTIVE_SLOT ROOTFS_A; test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 10; test -n
cpu=armv7
default_bootargs=console=ttyO0,115200n8 loginShell=allow earlyprintk user_debug=0 loginShell=allow rootflags=data=ordered,journal_cht
eth1addr=b0:d5:cc:4d:f3:f4
ethact=cpsw
ethaddr=b0:d5:cc:4d:f3:f2
fdtaddr=0x80F80000
fdtfile=pic6_4.9.28_j7_ccn_j10_modbus_j8_modbus.dtb
filesize=a031
loadaddr=0x80200000
loadfdt=if load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} ; then echo INFO: loaded ${fdtfile};else echo WARNING: loading defa;
loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
mmc_boot=mmc dev 1; if mmc rescan;then run check_boot_count; run mmc_load_kernel_dtb; else echo mmc1 not found; fi
mmc_load_kernel_dtb=if run loadimage; then echo --loading zImage.4.9.28 done--;run mmcloados;else echo --WARN: Cannot load the zImag;
mmcboot=mmc dev 1; if mmc rescan; then echo SD/MMC found on device 1;if run loadimage; then run mmcloados;fi;fi;
mmcdev=1
mmcloados=if run loadfdt; then echo --loaded pic6 dtb done-- ; bootz 0x80200000 - 0x80F80000; else echo WARNING: Cannot load the pic;
rootpartA=root=/dev/mmcblk0p5
rootpartB=root=/dev/mmcblk0p10
serverip=192.168.7.2
soc=am33xx
stderr=serial
stdin=serial
stdout=serial
usbnet_devaddr=b0:d5:cc:4d:f3:f4
vendor=ti
ver=U-Boot 2013.10 (Apr 27 2018 - 10:48:10)
Environment size: 3033/131067 bytes
I just changed the u-boot env variable loadaddr to 0x82000000. with this change i am getting same error image not found.
siva nallamalli said:** File not found /boot/zImage.4.14.54 **
--WARN: Cannot load the zImage.4.9.28--
It's not finding the file... A couple quick possibilities are:
siva nallamalli said:bootpart=1:5
Are you sure that's correct? If you stop at the u-boot prompt you can inspect things. For example, here's an example using a BBB where I'm booting from SD card:
=> mmc list
OMAP SD/MMC: 0 (SD)
OMAP SD/MMC: 1
=> mmc part
Partition Map for MMC device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 2048 143360 bf8d4462-01 0c Boot
2 145408 15345664 bf8d4462-02 83
First I ran "mmc list" to see the devices (0 and 1). Then I ran "mmc part" to see what partitions are available. In my case device 0 was already selected and so that's what it's showing. In other words, the file system on my SD card can be found at device 0, partition 2. Correspondingly I have bootpart set as 0:2.
Your u-boot version looks very old, so the commands may not precisely align any more. You should be able to run "help mmc" to see the valid commands.
siva nallamalli said:I just changed the u-boot env variable loadaddr to 0x82000000. with this change i am getting same error image not found.
Based on the specific error message you received, I don't think the loadaddr has even come into play, i.e. the error seems to be in finding the file, not copying it.
It's not finding the file... A couple quick possibilities are:
Is your file name correct? Is that how it is written in the file system (i.e. with the kernel version as part of the name)?
yes, the file name was written.
yes,There are two rootfile systems and 10 partitions for two images(designed to Fallback when fails after 10times). There are two images one was zImage.4.9.28 and new image was 4.14.54.
I tried to load zImage.4.14.54 with xmodem protocol. loadx 0x82000000.
I tried to load am335x-bone-black.dtb file with command loadx 0x88000000.
ran bootz 0x82000000 - 0x88000000.
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8ef22000, end 8ef2d6ce ... OK
Starting kernel ...
with this command i kernel loaded and board was hung.
Please show the output from the commands I mentioned. I'd like to verify that u-boot's view of your file system matches your description. I recommend trying out the "load" command directly from the command line instead of relying on the variables.
yes, I tried using load command. Actually there are two partitions to look for zImage. bootpart:1:5 that contains updated zImage.4.15.54 & bootpart:1:a that contains legacy working imagezImage.4.9.28.
with latest image load command throws error saying
load mmc 1:a 0x80200000 /boot/zImage.4.15.54
** File not found /boot/zImage.4.15.54 **
with old image load command was successfull.
load mmc 1:a 0x80200000 /boot/zImage.4.9.28
3806520 bytes read in 274 ms (13.2 MiB/s)
Any thoughts on why kernel hangs(i.e latest zImage.4.15.54) after statement "starting kernel"? i tried with loadx command using xmodem
siva nallamalli said:load mmc 1:a 0x80200000 /boot/zImage.4.15.54
** File not found /boot/zImage.4.15.54 **with old image load command was successfull.
load mmc 1:a 0x80200000 /boot/zImage.4.9.28
3806520 bytes read in 274 ms (13.2 MiB/s)
Clearly something is wrong with the file name.
Can you take your card, plug into a computer, and run "ls -l" command to show the zImage.4.9.28 and zImage.4.15.54 files?
Hi Brad,
There is no sdcard with this custom board.
This board was in production and it can be upgraded over a usb connected to board when linux was up & running. It is having a script to untar the Firmware upgrade package and place it accordingly in oneset of 5 flash partions.
After reboot uboot will choose the latest partition and load zImage from that partion and mount rootfs accordingly. If the boot sequence fails due to any reason u-boot will switch to old partion and loads zImage and mounts rootfs.
In my case i created Firmware Upgrade package with latest zImage4.14.54. rest is same only.
I made progress of one more step with loadx command after enabling kernel flags CONFIG_DEBUG_AM33XXUART1=y.
loadx 0x80200000 (To load zImage4.14.54)
loadx 0x80f80000 (To load pic6_4.9.28_j7_ccn_j10_modbus_j8_modbus.dtb)
bootz 0x80200000 - 0x80f80000
// enabled kernel config flags regarding UART derrived from pic6
Kernel image @ 0x80200000 [ 0x000000 - 0x3d0200 ]
## Flattened Device Tree blob at 80f80000
Booting using the fdt blob at 0x80f80000
Loading Device Tree to 87330000, end 8733d030 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Still the kernel was hung, Any Inputs on this ?
Regards,
Siva.
siva nallamalli said:loadx 0x80f80000 (To load pic6_4.9.28_j7_ccn_j10_modbus_j8_modbus.dtb)
Are you reusing the binary from the older kernel? Have you tried rebuilding it against the new kernel?
siva nallamalli said:I made progress of one more step with loadx command after enabling kernel flags CONFIG_DEBUG_AM33XXUART1=y.
You might want to check this thread related to early printk:
Are you reusing the binary from the older kernel? Have you tried rebuilding it against the new kernel?
yes i am using binary from older kernel? I didn't tried rebuilding with new kernel.
Hi Brad,
I enabled CONFIG_EARLY_PRINTK kernel configuration. with this i am getting some logs and there was a kernel panic.
After googling i came to know that i need to disable omap rtc. Still i am getting the same issue. Any inputs on this is very helpful?
bootz 0x80200000 - 0x80f80000
Kernel image @ 0x80200000 [ 0x000000 - 0x3d0200 ]
## Flattened Device Tree blob at 80f80000
Booting using the fdt blob at 0x80f80000
Loading Device Tree to 87330000, end 8733d030 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.54-g0b59bc3be7 (oe-user@oe-host) (gcc version 7.3.0 (GCC)) #1 PREEMPT Fri Jan 3 08:35:37 UTC 2020
[ 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 ALC
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 48 MiB at 0x84000000
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (neon)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32480
[ 0.000000] Kernel command line: console=ttyO0,115200n8 loginShell=allow earlyprintk user_debug=0 loginShell=allow rootflags=dataB
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Memory: 67420K/131072K available (8192K kernel code, 333K rwdata, 2580K rodata, 1024K init, 278K bss, 14500K reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc8800000 - 0xff800000 ( 880 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0900000 (9184 kB)
[ 0.000000] .init : 0xc0c00000 - 0xc0d00000 (1024 kB)
[ 0.000000] .data : 0xc0d00000 - 0xc0d53408 ( 334 kB)
[ 0.000000] .bss : 0xc0d53408 - 0xc0d98ea4 ( 279 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[ 0.000019] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.008177] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.017752] OMAP clocksource: timer1 at 24000000 Hz
[ 0.023105] timer_probe: no matching timers found
[ 0.028361] Console: colour dummy device 80x30
[ 0.033066] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[ 0.039866] This ensures that you still see kernel messages. Please
[ 0.046411] update your kernel commandline.
[ 0.050827] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
[ 0.109152] pid_max: default: 32768 minimum: 301
[ 0.114218] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.121116] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.129415] CPU: Testing write buffer coherency: ok
[ 0.135389] Setting up static identity map for 0x80100000 - 0x80100060
[ 0.142366] Hierarchical SRCU implementation.
[ 0.147376] EFI services will not be available.
[ 0.153925] devtmpfs: initialized
[ 0.170087] random: get_random_u32 called from bucket_table_alloc+0x8c/0x1ac with crng_init=0
[ 0.179721] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.188127] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.198378] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.209069] pinctrl core: initialized pinctrl subsystem
[ 0.215478] DMI not present or invalid.
[ 0.219991] NET: Registered protocol family 16
[ 0.227671] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.253373] omap_hwmod: debugss: _wait_target_disable failed
[ 0.259571] Unhandled fault: external abort on non-linefetch (0x1028) at 0xf9e3e078
[ 0.267533] pgd = c0004000
[ 0.270403] [f9e3e078] *pgd=44e11452(bad)
[ 0.274631] Internal error: : 1028 [#1] PREEMPT ARM
[ 0.279734] Modules linked in:
[ 0.282971] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.54-g0b59bc3be7 #1
[ 0.290127] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 0.296478] task: c3838000 task.stack: c383c000
[ 0.301238] PC is at _update_sysc_cache+0x34/0x90
[ 0.306164] LR is at _enable+0x1ac/0x284
[ 0.310285] pc : [<c011b010>] lr : [<c011b77c>] psr: 40000013
[ 0.316815] sp : c383de60 ip : 00000000 fp : c383de6c
[ 0.322271] r10: c0c3b838 r9 : c0d53440 r8 : c0c3b820
[ 0.327731] r7 : c0d0b314 r6 : c0d53974 r5 : 00000000 r4 : c0d0adc0
[ 0.334533] r3 : f9e3e078 r2 : c0d0b89c r1 : 00000078 r0 : c0d0adc0
[ 0.341333] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 0.348758] Control: 10c5387d Table: 80004019 DAC: 00000051
[ 0.354755] Process swapper (pid: 1, stack limit = 0xc383c208)
[ 0.360843] Stack: (0xc383de60 to 0xc383e000)
[ 0.365416] de60: c383de94 c383de70 c011b77c c011afe8 c0d0adc0 c0d09ac4 c0d0adc0 c0d0adf0
[ 0.373920] de80: c0d0ae04 c0d53440 c383dec4 c383de98 c0c0b088 c011b5dc c383dec4 c383dea8
[ 0.382421] dea0: c011a2d0 c088a3d0 c0d07e08 c0d0adc0 c0d07e60 ffffe000 c383dedc c383dec8
[ 0.390925] dec0: c0c0b590 c0c0afc4 00000000 c0c0b49c c383df4c c383dee0 c0101a10 c0c0b4a8
[ 0.399430] dee0: c383df4c c383def0 c0145800 c0c00624 c0aaef98 c0aaef78 c0aaefc4 c0ab96c4
[ 0.407930] df00: 00000000 c0aaef50 00000002 00000002 c0aa61bc c0b83d7c c7fffbb9 c7fffbc5
[ 0.416430] df20: 00000000 c0b83d7c 00000003 c0b83d7c c0c4c360 00000003 c0d53440 c0c3b820
[ 0.424934] df40: c383df94 c383df50 c0c00eac c01019d0 00000002 00000002 00000000 c0c00618
[ 0.433439] df60: c0c00618 000000e7 00000000 00000000 c088f780 00000000 00000000 00000000
[ 0.441941] df80: 00000000 00000000 c383dfac c383df98 c088f790 c0c00d74 00000000 c088f780
[ 0.450441] dfa0: 00000000 c383dfb0 c0108108 c088f78c 00000000 00000000 00000000 00000000
[ 0.458944] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 0.467445] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 0085c082 50000094
[ 0.475936] Backtrace:
[ 0.478550] [<c011afdc>] (_update_sysc_cache) from [<c011b77c>] (_enable+0x1ac/0x284)
[ 0.486710] [<c011b5d0>] (_enable) from [<c0c0b088>] (_setup.part.12+0xd0/0x3fc)
[ 0.494404] r7:c0d53440 r6:c0d0ae04 r5:c0d0adf0 r4:c0d0adc0
[ 0.500320] [<c0c0afb8>] (_setup.part.12) from [<c0c0b590>] (__omap_hwmod_setup_all+0xf4/0x108)
[ 0.509355] r6:ffffe000 r5:c0d07e60 r4:c0d0adc0
[ 0.514199] [<c0c0b49c>] (__omap_hwmod_setup_all) from [<c0101a10>] (do_one_initcall+0x4c/0x170)
[ 0.523321] r5:c0c0b49c r4:00000000
[ 0.527091] [<c01019c4>] (do_one_initcall) from [<c0c00eac>] (kernel_init_freeable+0x144/0x1dc)
[ 0.536127] r8:c0c3b820 r7:c0d53440 r6:00000003 r5:c0c4c360 r4:c0b83d7c
[ 0.543115] [<c0c00d68>] (kernel_init_freeable) from [<c088f790>] (kernel_init+0x10/0x11c)
[ 0.551707] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c088f780
[ 0.559844] r4:00000000
[ 0.562547] [<c088f780>] (kernel_init) from [<c0108108>] (ret_from_fork+0x14/0x2c)
[ 0.570421] r5:c088f780 r4:00000000
[ 0.574190] Code: e31c0c01 e5903054 e0833001 1a00000a (e5933000)
[ 0.580564] ---[ end trace 3e66a8fe4b34ad18 ]---
[ 0.585479] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 0.585479]
[ 0.595056] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 0.595056]
[ 2.902648] random: fast init done
Regards,
Siva.
siva nallamalli said:[ 0.259571] Unhandled fault: external abort on non-linefetch (0x1028) at 0xf9e3e078
Do you consistently get the same error in the same place, or are you seeing different errors in different places? If you're seeing a lot of different errors, that could be either due to a DDR issue (i.e. marginal configuration) or perhaps a power issue.
Siva,
It looks like you marked this earlier reply as the answer:
https://e2e.ti.com/support/processors/f/791/p/868725/3217077#3217077
Did rebuilding the dtb with the updated kernel resolve the issue, or was that marked by mistake? If it did not resolve the issue, please go back to that answer and mark it as not the answer to keep this open.
Also, I see you created another thread here:
https://e2e.ti.com/support/processors/f/791/t/870007
I suggest that we use that thread to focus on resolving the kernel panic. This thread (per the title) should remain focused on figuring out why you're seeing a "file not found" message. Along those lines, can you please share info like I requested previously related to running various mmc commands from u-boot to explore the file system as observed by u-boot?
Best regards,
Brad