Modify

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#12551 closed defect (worksforme)

Wrong/empty kernel cmdline in openwrt-ar71xx-generic-vmlinux

Reported by: till@… Owned by: developers
Priority: high Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: Cc:

Description

I just flashed OpenWRT 12.09-rc1 to a Ubiquiti RouterstatioPro using the following files:

My FIS table looks like this:

RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0xBF000000  0xBF000000  0x00030000  0x00000000
kernel            0xBF030000  0x80060000  0x00100000  0x80060000
rootfs            0xBF130000  0xBF130000  0x00EC0000  0x00000000
FIS directory     0xBFFF0000  0xBFFF0000  0x0000F000  0x00000000
RedBoot config    0xBFFFF000  0xBFFFF000  0x00001000  0x00000000

My RedBoot init script looks like this:

fis load -d -e kernel
exec

When booting the kernel seems to get an invalid or empty cmdline. Here is what I get on the serial line:

RedBoot> exec
Now booting linux kernel:
 Base address 0x80050000 Entry 0x80060000
 memsize=0x08000000
 modetty0=0,n,8,1,hw
 board=RouterStation PRO
 ethaddr=00.15.6d.c4.25.7d
[    0.000000] Linux version 3.3.8 (blogic@Debian-60-squeeze-64-minimal) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Sun Nov 18 04:31:55 UTC 2012
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR7161 rev 2
[    0.000000] Clocks: CPU:720.000MHz, DDR:360.000MHz, AHB:180.000MHz, Ref:40.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00008000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00008000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:   ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
[    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] 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] Writing ErrCtl register=0007fe32
[    0.000000] Readback ErrCtl register=0007fe32
[    0.000000] Memory: 126472k/131072k available (2209k kernel code, 4600k reserved, 412k data, 212k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 479.23 BogoMIPS (lpj=2396160)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 512
[    0.070000] NET: Registered protocol family 16
[    0.070000] gpiochip_add: registered GPIOs 0 to 15 on device: ath79
[    0.080000] MIPS: machine is Ubiquiti RouterStation Pro
[    0.380000] registering PCI controller with io_map_base unset
[    2.690000] bio: create slab <bio-0> at 0
[    2.690000] PCI host bridge to bus 0000:00
[    2.700000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x16ffffff]
[    2.700000] pci_bus 0000:00: root bus resource [io  0x0000]
[    2.710000] pci 0000:00:13.0: BAR 0: assigned [mem 0x10000000-0x1000ffff]
[    2.710000] pci 0000:00:13.0: using irq 42 for pin 1
[    2.720000] Switching to clocksource MIPS
[    2.720000] NET: Registered protocol family 2
[    2.730000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    2.730000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    2.740000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    2.740000] TCP: Hash tables configured (established 4096 bind 4096)
[    2.750000] TCP reno registered
[    2.750000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.760000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.760000] NET: Registered protocol family 1
[    2.780000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.780000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.790000] msgmni has been set to 247
[    2.800000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    2.810000] io scheduler noop registered
[    2.810000] io scheduler deadline registered (default)
[    2.820000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    2.850000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A

After that, I don't get any further messages. The system seems to hang.

When I start the kernel like this:

fis load -d -e kernel
exec -c "rootfstype=squashfs,yaffs,jffs2 console=ttyS0,115200"

I get:

Now booting linux kernel:
 Base address 0x80050000 Entry 0x80060000
 Cmdline : rootfstype=squashfs,yaffs,jffs2 console=ttyS0,115200
 memsize=0x08000000
 modetty0=0,n,8,1,hw
 board=RouterStation PRO
 ethaddr=00.15.6d.c4.25.7d
[    0.000000] Linux version 3.3.8 (blogic@Debian-60-squeeze-64-minimal) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Sun Nov 18 04:31:55 UTC 2012
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR7161 rev 2
[    0.000000] Clocks: CPU:720.000MHz, DDR:360.000MHz, AHB:180.000MHz, Ref:40.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00008000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00008000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:   rootfstype=squashfs,yaffs,jffs2 console=ttyS0,115200 ethaddr=00.15.6d.c4.25.7d board=UBNT-RSPRO rootfstype=squashfs,jffs2 noinitrd
[    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] 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] Writing ErrCtl register=0007fe32
[    0.000000] Readback ErrCtl register=0007fe32
[    0.000000] Memory: 126472k/131072k available (2209k kernel code, 4600k reserved, 412k data, 212k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 479.23 BogoMIPS (lpj=2396160)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 512
[    0.070000] NET: Registered protocol family 16
[    0.070000] gpiochip_add: registered GPIOs 0 to 15 on device: ath79
[    0.080000] MIPS: machine is Ubiquiti RouterStation Pro
[    0.380000] registering PCI controller with io_map_base unset
[    2.690000] bio: create slab <bio-0> at 0
[    2.690000] PCI host bridge to bus 0000:00
[    2.700000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x16ffffff]
[    2.700000] pci_bus 0000:00: root bus resource [io  0x0000]
[    2.710000] pci 0000:00:13.0: BAR 0: assigned [mem 0x10000000-0x1000ffff]
[    2.710000] pci 0000:00:13.0: using irq 42 for pin 1
[    2.720000] Switching to clocksource MIPS
[    2.720000] NET: Registered protocol family 2
[    2.730000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    2.730000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    2.740000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    2.740000] TCP: Hash tables configured (established 4096 bind 4096)
[    2.750000] TCP reno registered
[    2.750000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.760000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.760000] NET: Registered protocol family 1
[    2.780000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.780000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.790000] msgmni has been set to 247
[    2.800000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    2.810000] io scheduler noop registered
[    2.810000] io scheduler deadline registered (default)
[    2.820000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    2.850000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    2.850000] console [ttyS0] enabled, bootconsole disabled
[    2.850000] console [ttyS0] enabled, bootconsole disabled
[    2.870000] m25p80 spi0.0: found mx25l12805d, expected m25p80
[    2.870000] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    2.880000] Searching for RedBoot partition table in spi0.0 at offset 0xfe0000
[    2.910000] Searching for RedBoot partition table in spi0.0 at offset 0xff0000
[    2.930000] 5 RedBoot partitions found on MTD device spi0.0
[    2.940000] Creating 5 MTD partitions on "spi0.0":
[    2.940000] 0x000000000000-0x000000030000 : "RedBoot"
[    2.950000] 0x000000030000-0x000000130000 : "kernel"
[    2.960000] 0x000000130000-0x000000ff0000 : "rootfs"
[    2.960000] mtd: partition "rootfs" set to be root filesystem
[    2.970000] split_squashfs: no squashfs found in "spi0.0"
[    2.970000] 0x000000ff0000-0x000000fff000 : "FIS directory"
[    2.980000] 0x000000fff000-0x000001000000 : "RedBoot config"
[    3.100000] ag71xx_mdio: probed
[    3.110000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[    3.430000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.0:04 [uid=004dd041, driver=Atheros AR8216/AR8236/AR8316]
[    3.450000] eth1: Atheros AG71xx at 0xba000000, irq 5
[    3.770000] eth1: Atheros AR8316 switch driver attached.
[    3.780000] ar8316: Using port 4 as PHY
[    3.870000] ag71xx ag71xx.1: eth1: connected to PHY at ag71xx-mdio.0:00 [uid=004dd041, driver=Atheros AR8216/AR8236/AR8316]
[    3.880000] TCP cubic registered
[    3.880000] NET: Registered protocol family 17
[    3.890000] Bridge firewalling registered
[    3.890000] 8021q: 802.1Q VLAN Support v1.8
[    3.900000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x4f50 instead
[    3.910000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x5253 instead
[    3.910000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x4f2e instead
[    3.920000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x3731 instead
[    3.930000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x7072 instead
[    3.940000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x4f70 instead
[    3.950000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x5772 instead
[    3.960000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x7233 instead
[    3.970000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x3835 instead
[    3.980000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000104: 0xa5fb instead
[    3.990000] Further such events for this erase block will not be printed
...
[    9.390000] Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[    9.400000] empty_blocks 192, bad_blocks 0, c->nr_blocks 236
[    9.400000] VFS: Cannot open root device "(null)" or unknown-block(31,2)
[    9.410000] Please append a correct "root=" boot option; here are the available partitions:
[    9.420000] 1f00             192 mtdblock0  (driver?)
[    9.420000] 1f01            1024 mtdblock1  (driver?)
[    9.430000] 1f02           15104 mtdblock2  (driver?)
[    9.430000] 1f03              60 mtdblock3  (driver?)
[    9.440000] 1f04               4 mtdblock4  (driver?)
[    9.440000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)

When trying with...

fis load -d -e kernel
exec -c "rootfstype=squashfs,yaffs,jffs2 console=ttyS0,115200 root=/dev/mtdblock2"

...the boot process stops with:

...
[    9.330000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002b0024: 0x9737 instead
[    9.340000] Further such events for this erase block will not be printed
[    9.390000] Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[    9.400000] empty_blocks 192, bad_blocks 0, c->nr_blocks 236
[    9.400000] VFS: Cannot open root device "mtdblock2" or unknown-block(31,2)
[    9.410000] Please append a correct "root=" boot option; here are the available partitions:
[    9.420000] 1f00             192 mtdblock0  (driver?)
[    9.420000] 1f01            1024 mtdblock1  (driver?)
[    9.430000] 1f02           15104 mtdblock2  (driver?)
[    9.430000] 1f03              60 mtdblock3  (driver?)
[    9.440000] 1f04               4 mtdblock4  (driver?)
[    9.440000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)

Now I am lost. What cmdline should I specify to get 12.09rc1 booting?

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by jow

  • Resolution set to worksforme
  • Status changed from new to closed

You're supposed to flash http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/ar71xx/generic/openwrt-ar71xx-generic-ubnt-rspro-squashfs-factory.bin via TFTP.

The generic kernel image does not contain any cmdline (hence generic).
For reference; the embedded cmdline in the RSPro specific image is "board=UBNT-RSPRO console=ttyS0,115200"

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.