MBS wrote:I have had a closer look into it and would guess, that it would be better to start over properly. That said, checkout the sources of trunk and make the appropriate changes in the way of this added device.
I have repeated the above steps and have a new target profile called BR-6478AC-V2, I had only half done this step before. The build is much more cleaner, and the edimax tool now also builds a factory-ready image. Image grew from 3.1M to 3.9M.
I have defined the "firmware" MTD partition in target/linux/ramips/dts/BR-6478AC-V2.dts from the start of the kernel 0x070000, to the end of the flash device (8M). I did hope the kernel would find the rootfs automatically during boot, but I seem to be stuck with the same error.
Without rootfs= boot option
Starting kernel ...
[ 0.000000] Linux version 3.18.23 (buildbot@builder1) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r47269) ) 6
[ 0.000000] Board has DDR2
[ 0.000000] Analog PMU set to hw control
[ 0.000000] Digital PMU set to hw control
[ 0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[ 0.000000] MIPS: machine is Edimax BR-6478AC V2
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 04000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000-0x03ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0x03ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x00000000-0x03ffffff]
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Writing ErrCtl register=000426ce
[ 0.000000] Readback ErrCtl register=000426ce
[ 0.000000] Memory: 61228K/65536K available (2622K kernel code, 129K rwdata, 528K rodata, 168K init, 190K bss, 4308)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:256
[ 0.000000] CPU Clock: 580MHz
[ 0.000000] systick: running - mult: 214748, shift: 32
[ 0.010000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[ 0.070000] pid_max: default: 32768 minimum: 301
[ 0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.090000] pinctrl core: initialized pinctrl subsystem
[ 0.100000] NET: Registered protocol family 16
[ 0.430000] PCI host bridge /pcie@10140000 ranges:
[ 0.440000] MEM 0x0000000020000000..0x000000002fffffff
[ 0.450000] IO 0x0000000010160000..0x000000001016ffff
[ 0.460000] rt2880_gpio 10000600.gpio: registering 24 gpios
[ 0.470000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[ 0.480000] PCI host bridge to bus 0000:00
[ 0.480000] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[ 0.490000] pci_bus 0000:00: root bus resource [io 0xffffffff]
[ 0.500000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 0.510000] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.520000] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[ 0.530000] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[ 0.540000] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[ 0.550000] pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
[ 0.560000] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[ 0.570000] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[ 0.580000] pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
[ 0.590000] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 0.590000] pci 0000:00:00.0: bridge window [mem 0x20000000-0x200fffff]
[ 0.600000] pci 0000:00:00.0: bridge window [mem 0x20100000-0x201fffff pref]
[ 0.610000] pci 0000:00:00.0: card - bus=0x0, slot = 0x0 irq=0
[ 0.620000] pci 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[ 0.630000] Switched to clocksource systick
[ 0.640000] NET: Registered protocol family 2
[ 0.640000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.660000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.670000] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.680000] TCP: reno registered
[ 0.690000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.700000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.710000] NET: Registered protocol family 1
[ 0.720000] rt-timer 10000100.timer: maximum frequency is 2441Hz
[ 0.740000] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.760000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.770000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.790000] msgmni has been set to 119
[ 0.800000] io scheduler noop registered
[ 0.800000] io scheduler deadline registered (default)
[ 0.820000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.830000] console [ttyS0] disabled
[ 0.840000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[ 0.860000] console [ttyS0] enabled
[ 0.860000] console [ttyS0] enabled
[ 0.870000] bootconsole [early0] disabled
[ 0.870000] bootconsole [early0] disabled
[ 0.910000] m25p80 spi32766.0: mx25l6405d (8192 Kbytes)
[ 0.920000] 5 ofpart partitions found on MTD device spi32766.0
[ 0.930000] Creating 5 MTD partitions on "spi32766.0":
[ 0.940000] 0x000000000000-0x000000030000 : "u-boot"
[ 0.950000] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.960000] 0x000000040000-0x000000050000 : "factory"
[ 0.980000] 0x000000050000-0x000000070000 : "cimage"
[ 0.990000] 0x000000070000-0x000000800000 : "firmware"
[ 1.090000] ralink_soc_eth 10100000.ethernet: generated random MAC address 16:fb:74:1a:3a:8f
[ 1.110000] libphy: mdio: probed
[ 1.110000] ralink_soc_eth 10100000.ethernet: connected port 4 to PHY at mdio-bus:04 [uid=03a2940d, driver=Generic ]
[ 1.140000] ralink_soc_eth 10100000.ethernet: loaded mt7620 driver
[ 1.150000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[ 1.160000] rt2880_wdt 10000120.watchdog: Initialized
[ 1.170000] TCP: cubic registered
[ 1.180000] NET: Registered protocol family 17
[ 1.190000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_ne.
[ 1.220000] Bridge firewalling registered
[ 1.220000] 8021q: 802.1Q VLAN Support v1.8
[ 1.240000] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 1.250000] Please append a correct "root=" boot option; here are the available partitions:
[ 1.270000] 1f00 192 mtdblock0 (driver?)
[ 1.280000] 1f01 64 mtdblock1 (driver?)
[ 1.290000] 1f02 64 mtdblock2 (driver?)
[ 1.300000] 1f03 128 mtdblock3 (driver?)
[ 1.310000] 1f04 7744 mtdblock4 (driver?)
[ 1.320000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 1.320000] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
With rootfs=1f04 (firmware partition address, where else?)
Starting kernel ...
[ 0.000000] Linux version 3.18.23 (buildbot@builder1) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r47269) ) 6
[ 0.000000] Board has DDR2
[ 0.000000] Analog PMU set to hw control
[ 0.000000] Digital PMU set to hw control
[ 0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[ 0.000000] MIPS: machine is Edimax BR-6478AC V2
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 04000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000-0x03ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0x03ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x00000000-0x03ffffff]
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,57600 root=1f04 rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Writing ErrCtl register=000426c8
[ 0.000000] Readback ErrCtl register=000426c8
[ 0.000000] Memory: 61228K/65536K available (2622K kernel code, 129K rwdata, 528K rodata, 168K init, 190K bss, 4308)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:256
[ 0.000000] CPU Clock: 580MHz
[ 0.000000] systick: running - mult: 214748, shift: 32
[ 0.010000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[ 0.070000] pid_max: default: 32768 minimum: 301
[ 0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.090000] pinctrl core: initialized pinctrl subsystem
[ 0.100000] NET: Registered protocol family 16
[ 0.430000] PCI host bridge /pcie@10140000 ranges:
[ 0.440000] MEM 0x0000000020000000..0x000000002fffffff
[ 0.450000] IO 0x0000000010160000..0x000000001016ffff
[ 0.460000] rt2880_gpio 10000600.gpio: registering 24 gpios
[ 0.470000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[ 0.480000] PCI host bridge to bus 0000:00
[ 0.480000] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[ 0.490000] pci_bus 0000:00: root bus resource [io 0xffffffff]
[ 0.500000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 0.510000] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.520000] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[ 0.530000] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[ 0.540000] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[ 0.550000] pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
[ 0.560000] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[ 0.570000] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[ 0.580000] pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
[ 0.590000] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 0.590000] pci 0000:00:00.0: bridge window [mem 0x20000000-0x200fffff]
[ 0.600000] pci 0000:00:00.0: bridge window [mem 0x20100000-0x201fffff pref]
[ 0.610000] pci 0000:00:00.0: card - bus=0x0, slot = 0x0 irq=0
[ 0.620000] pci 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[ 0.630000] Switched to clocksource systick
[ 0.640000] NET: Registered protocol family 2
[ 0.640000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.660000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.670000] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.680000] TCP: reno registered
[ 0.690000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.700000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.710000] NET: Registered protocol family 1
[ 0.720000] rt-timer 10000100.timer: maximum frequency is 2441Hz
[ 0.740000] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.760000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.770000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.790000] msgmni has been set to 119
[ 0.800000] io scheduler noop registered
[ 0.800000] io scheduler deadline registered (default)
[ 0.820000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.830000] console [ttyS0] disabled
[ 0.840000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[ 0.860000] console [ttyS0] enabled
[ 0.860000] console [ttyS0] enabled
[ 0.870000] bootconsole [early0] disabled
[ 0.870000] bootconsole [early0] disabled
[ 0.910000] m25p80 spi32766.0: mx25l6405d (8192 Kbytes)
[ 0.920000] 5 ofpart partitions found on MTD device spi32766.0
[ 0.930000] Creating 5 MTD partitions on "spi32766.0":
[ 0.940000] 0x000000000000-0x000000030000 : "u-boot"
[ 0.950000] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.960000] 0x000000040000-0x000000050000 : "factory"
[ 0.980000] 0x000000050000-0x000000070000 : "cimage"
[ 0.990000] 0x000000070000-0x000000800000 : "firmware"
[ 1.090000] ralink_soc_eth 10100000.ethernet: generated random MAC address ae:a6:36:91:60:36
[ 1.110000] libphy: mdio: probed
[ 1.110000] ralink_soc_eth 10100000.ethernet: connected port 4 to PHY at mdio-bus:04 [uid=03a2940d, driver=Generic ]
[ 1.140000] ralink_soc_eth 10100000.ethernet: loaded mt7620 driver
[ 1.150000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[ 1.160000] rt2880_wdt 10000120.watchdog: Initialized
[ 1.170000] TCP: cubic registered
[ 1.180000] NET: Registered protocol family 17
[ 1.190000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_ne.
[ 1.220000] Bridge firewalling registered
[ 1.220000] 8021q: 802.1Q VLAN Support v1.8
[ 1.240000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x5343 instead
[ 1.260000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x4e52 instead
[ 1.280000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0xce0e instead
[ 1.300000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x0527 instead
[ 1.310000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0xed1f instead
[ 1.330000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0xc357 instead
[ 1.350000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x1200 instead
[ 1.370000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x0080 instead
[ 1.390000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000028: 0x0080 instead
[ 1.410000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000002c: 0x2fae instead
[ 1.430000] jffs2: Further such events for this erase block will not be printed
target/linux/ramips/dts/BR-6478AC-V2.dts
/dts-v1/;
/include/ "mt7620a.dtsi"
/ {
compatible = "ralink,mt7620a-eval-board", "ralink,mt7620a-soc";
model = "Edimax BR-6478AC V2";
chosen {
//bootargs = "console=ttyS0,57600 console=ttyS1,57600n8 root=1f05";
//bootargs = "console=ttyS0,57600 root=1f05 rootfstype=squashfs";
bootargs = "console=ttyS0,57600 root=1f04";
};
palmbus@10000000 {
spi@b00 {
status = "okay";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "mx25l6405d";
reg = <0 0>;
linux,modalias = "m25p80", "mx25l6405d";
spi-max-frequency = <10000000>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
label = "cimage";
reg = <0x50000 0x20000>;
read-only;
};
//partition@170000 {
// reg = <0x00270000 0x00590000>;
// label = "rootfs";
//};
partition@70000 {
reg = <0x00070000 0x00790000>;
label = "firmware";
};
};
};
// uart@500 { // edimax ttyS0
// compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a";
// reg = <0x500 0x100>;
// resets = <&rstctrl 12>;
// reset-names = "uart";
// interrupt-parent = <&intc>;
// interrupts = <5>;
// reg-shift = <2>;
// //status = "enabled";
// };
//uartlite@c00 { // edimax ttyS1
// compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a";
// reg = <0xc00 0x100>;
// resets = <&rstctrl 19>;
// reset-names = "uartl";
// interrupt-parent = <&intc>;
// interrupts = <12>;
// reg-shift = <2>;
// pinctrl-names = "default";
// pinctrl-0 = <&uartlite_pins>;
// };
};
pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "i2c", "uartf";
ralink,function = "gpio";
};
};
};
ethernet@10100000 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
ralink,port-map = "llllw";
port@4 {
status = "okay";
phy-mode = "rgmii";
phy-handle = <&phy4>;
};
port@5 {
status = "okay";
phy-mode = "rgmii";
phy-handle = <&phy5>;
};
mdio-bus {
status = "okay";
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
phy5: ethernet-phy@5 {
reg = <5>;
phy-mode = "rgmii";
};
};
};
gsw@10110000 {
ralink,port4 = "gmac";
};
sdhci@10130000 {
status = "okay";
};
pcie@10140000 {
status = "okay";
};
gpio-leds {
compatible = "gpio-leds";
power {
label = "br-6478ac-v2:white:power";
gpios = <&gpio1 15 1>;
};
wlan {
label = "br-6478ac-v2:blue:wlan";
gpios = <&gpio3 0 1>;
};
};
gpio-keys-polled {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <20>;
s2 {
label = "S2";
gpios = <&gpio0 1 1>;
linux,code = <0x100>;
};
s3 {
label = "S3";
gpios = <&gpio0 2 1>;
linux,code = <0x101>;
};
};
ehci@101c0000 {
status = "okay";
};
ohci@101c1000 {
status = "okay";
};
};
Once again, any help will be most greatly appreciated.