#1 Uboot autoboot does not correctly boot , reaches to UART initialization then resets to bootloader

Open
opened 2 years ago by Ghost · 1 comments
Ghost commented 2 years ago

Hello, I have flashed the flash.img file but it does not autoboot into openwrt. I have to first boot into bootloader then after i issue boot manually it boots into openwrt.

U-Boot 1.1.413 (Aug 29 2012 - 10:36:47)

AP121-2MB (ar9330) U-boot
DRAM:  32 MB
flash size 8388608, sector count = 128
Flash:  8 MB
In:    serial
Out:   serial
Err:   serial
Net:
eth0: c8:ee:a6:3f:62:ad
eth0 up
eth1: 00:0a:0b:0c:0d:0e
eth1 up
eth0, eth1
Hit any key to stop autoboot:  0
## Booting image at 9f020000 ...
   Image Name:   MIPS OpenWrt Linux-4.19.108
   Created:      2020-04-13   8:14:48 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1809766 Bytes =  1.7 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum at 0x9f020040 ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

[    0.000000] Linux version 4.19.108 (root@uboot) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r12948-97c5fb4709)) #0 Mon Apr 13 08:14:48 2020
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is ZiKing CPE46B
[    0.000000] SoC: Atheros AR9330 rev 1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x98/0x4a8 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8120
[    0.000000] Kernel command line: console=ttyATH0,115200 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 25068K/32768K available (4293K kernel code, 179K rwdata, 1016K rodata, 1224K init, 206K bss, 7700K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 400.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000013] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007566] Calibrating delay loop... 265.98 BogoMIPS (lpj=531968)
[    0.048087] pid_max: default: 32768 minimum: 301
[    0.052885] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.058850] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072098] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.080122] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.086096] pinctrl core: initialized pinctrl subsystem
[    0.092301] NET: Registered protocol family 16
[    0.136603] clocksource: Switched to clocksource MIPS
[    0.141883] NET: Registered protocol family 2
[    0.145997] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.152151] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.158707] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.164763] TCP: Hash tables configured (established 1024 bind 1024)
[    0.171040] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.176468] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.182952] NET: Registered protocol family 1
[    0.191256] Crashlog allocated RAM at address 0x1f00000
[    0.197181] workingset: timestamp_bits=14 max_order=13 bucket_order=0
[    0.212837] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.217063] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.246017] io scheduler noop registered
[    0.248384] io scheduler deadline registered (default)
[    0.254257] pinctrl-single 18040028.pinmux: 64 pins, size 8
[    0.259992] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.265836] 18020000.uart: ttyATH0 at MMIO 0x18020000 (irq = 9, base_baud = 1562500) is a AR933X UART
[    0.274038] console [ttyA 

reaches above the a reset happens

If I enter the bootloader and issue boot command it successfully boots into openwrt.

in uboot the printenv gives me the following:

  printenv
bootparam=0
bootdelay=4
baudrate=115200
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
ipaddr=192.168.1.2
serverip=192.168.1.10
ethact=eth0
bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs,jffs2 init=/bin/init mtdparts=ar7240-nor0:64k(u-boot),64k(u-boot-env),8000k(firmware),64k(ART)
bootcmd=bootm 0x9f020000
stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 1.1.413 (Aug 29 2012 - 10:36:47)

Environment size: 397/65532 bytes
Hello, I have flashed the flash.img file but it does not autoboot into openwrt. I have to first boot into bootloader then after i issue boot manually it boots into openwrt. <pre>U-Boot 1.1.413 (Aug 29 2012 - 10:36:47) AP121-2MB (ar9330) U-boot DRAM: 32 MB flash size 8388608, sector count = 128 Flash: 8 MB In: serial Out: serial Err: serial Net: eth0: c8:ee:a6:3f:62:ad eth0 up eth1: 00:0a:0b:0c:0d:0e eth1 up eth0, eth1 Hit any key to stop autoboot: 0 ## Booting image at 9f020000 ... Image Name: MIPS OpenWrt Linux-4.19.108 Created: 2020-04-13 8:14:48 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 1809766 Bytes = 1.7 MB Load Address: 80060000 Entry Point: 80060000 Verifying Checksum at 0x9f020040 ...OK Uncompressing Kernel Image ... OK No initrd ## Transferring control to Linux (at address 80060000) ... ## Giving linux memsize in bytes, 33554432 Starting kernel ... [ 0.000000] Linux version 4.19.108 (root@uboot) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r12948-97c5fb4709)) #0 Mon Apr 13 08:14:48 2020 [ 0.000000] bootconsole [early0] enabled [ 0.000000] CPU0 revision is: 00019374 (MIPS 24Kc) [ 0.000000] MIPS: machine is ZiKing CPE46B [ 0.000000] SoC: Atheros AR9330 rev 1 [ 0.000000] Determined physical RAM map: [ 0.000000] memory: 02000000 @ 00000000 (usable) [ 0.000000] Initrd not found or empty - disabling initrd [ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. [ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x0000000000000000-0x0000000001ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x0000000001ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff] [ 0.000000] random: get_random_bytes called from start_kernel+0x98/0x4a8 with crng_init=0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 8120 [ 0.000000] Kernel command line: console=ttyATH0,115200 rootfstype=squashfs,jffs2 [ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000000] Writing ErrCtl register=00000000 [ 0.000000] Readback ErrCtl register=00000000 [ 0.000000] Memory: 25068K/32768K available (4293K kernel code, 179K rwdata, 1016K rodata, 1224K init, 206K bss, 7700K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS: 51 [ 0.000000] CPU clock: 400.000 MHz [ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns [ 0.000013] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns [ 0.007566] Calibrating delay loop... 265.98 BogoMIPS (lpj=531968) [ 0.048087] pid_max: default: 32768 minimum: 301 [ 0.052885] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.058850] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.072098] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.080122] futex hash table entries: 256 (order: -1, 3072 bytes) [ 0.086096] pinctrl core: initialized pinctrl subsystem [ 0.092301] NET: Registered protocol family 16 [ 0.136603] clocksource: Switched to clocksource MIPS [ 0.141883] NET: Registered protocol family 2 [ 0.145997] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes) [ 0.152151] TCP established hash table entries: 1024 (order: 0, 4096 bytes) [ 0.158707] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [ 0.164763] TCP: Hash tables configured (established 1024 bind 1024) [ 0.171040] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.176468] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.182952] NET: Registered protocol family 1 [ 0.191256] Crashlog allocated RAM at address 0x1f00000 [ 0.197181] workingset: timestamp_bits=14 max_order=13 bucket_order=0 [ 0.212837] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.217063] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.246017] io scheduler noop registered [ 0.248384] io scheduler deadline registered (default) [ 0.254257] pinctrl-single 18040028.pinmux: 64 pins, size 8 [ 0.259992] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled [ 0.265836] 18020000.uart: ttyATH0 at MMIO 0x18020000 (irq = 9, base_baud = 1562500) is a AR933X UART [ 0.274038] console [ttyA </pre> reaches above the a reset happens If I enter the bootloader and issue boot command it successfully boots into openwrt. in uboot the printenv gives me the following: <pre> printenv bootparam=0 bootdelay=4 baudrate=115200 ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee ipaddr=192.168.1.2 serverip=192.168.1.10 ethact=eth0 bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs,jffs2 init=/bin/init mtdparts=ar7240-nor0:64k(u-boot),64k(u-boot-env),8000k(firmware),64k(ART) bootcmd=bootm 0x9f020000 stdin=serial stdout=serial stderr=serial ver=U-Boot 1.1.413 (Aug 29 2012 - 10:36:47) Environment size: 397/65532 bytes</pre>
g commented 2 years ago
Owner

Hello, unfortunately I do not have the device anymore to further test. I will have another one in dicember, but I can start looking into the issue. I will try to update you as soon as I understand the root cause.

How did you flash?

Hello, unfortunately I do not have the device anymore to further test. I will have another one in dicember, but I can start looking into the issue. I will try to update you as soon as I understand the root cause. How did you flash?
Sign in to join this conversation.
No Label
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.