Hi!
I am currently trying to get a RUT104 running with the SVN Head
revision. RUT104 is a Gemini Platform Router based on the Wiliboard
WBD-111 with a Option GSM Modem and a WLAN Adapter.
At the moment I get the head revision to boot into a read-only state
since the rootfs partition in /proc/mtd is named Ramdisk and there is
no rootfs_data partition. Therefore no jffs2 partition will generated
and the system remains read-only.
The old 2.6.37 tree contains a patch which prefers the hard-coded
partition table over the table from the FIS.
In Kernel 3.3.8 the mtd partition Names are retrieved from the FIS
Table in the Flash instead of the hardcoded values in the arch source
(arch/arm/mach-gemini/board-wbd111.c) of the kernel.
I have taken a look into the current kernel sources of mtd, but due
to lack of deeper understanding of the sources I've found no way to
port the 2.6 patch to the current 3.3.8 kernel source.
On the other hand it was relatively easy to build a ugly hack where
the "Ramdisk" labeled FIS entry is renamed to "rootfs" and the
"Application" entry is renamed to rootfs_data. This has the drawback
that the rootfs can only get 3.9 MB big, and the rootfs_data cant get
bigger the 1.4 MB. On the other hand, on this way the rootfs_dara
Partition can also survive a firmware upgrade via TFTP, since the
Partition will never get overwritten.
Any thoughts about that?
* Bootloader FIS
Boot Menu
==============================================================================
0: Reboot 1: Start the Kernel Code
2: List Image 3: Delete Image
4: Create New Image 5: Enter Command Line Interface
6: Set IP Address 7: Set MAC Address
8: Show Configuration F: Create Default FIS
X: Upgrade Boot Y: Upgrade Kernel
Z: Upgrade Firmware A: Upgrade Application
R: Upgrade RAM Disk M: Memory Test
L: Load And Run T: TFTP Rescue mode
=> Select: 2
Name FLASH addr Mem addr Datalen Entry point
BOOT 0x30000000-307F0701 0x00000000 0x007F0702 0x00000000
FIS directory 0x307F0000-307FFFFF 0x307F0000 0x00001400 0x00000000
Kern 0x30020000-300F0427 0x01600000 0x000D0428 0x01600000
Ramdisk 0x30120000-304FFFFF 0x00800000 0x003E0000 0x00800000
Application 0x30620000-307BFFFF 0x00000000 0x001A0000 0x00000000
CurConf 0x307D0000-307EFFFF 0x00000000 0x00020000 0x00000000
VCTL 0x307C0000-307CFFFF 0x00000000 0x00010000 0x00000000
* Kernel 2.6.37 Log excerp
[ 1.040000] physmap platform flash device: 00800000 at 30000000
[ 1.050000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit
bank. Manufacturer ID 0x000020 Chip ID 0x0022ed
[ 1.050000] Amd/Fujitsu Extended Query Table at 0x0040
[ 1.050000] Amd/Fujitsu Extended Query version 1.3.
[ 1.050000] physmap-flash.0: Swapping erase regions for top-boot CFI
table.
[ 1.050000] number of CFI chips: 1
[ 1.050000] Using physmap partition information
[ 1.050000] Creating 6 MTD partitions on "physmap-flash.0":
[ 1.050000] 0x000000000000-0x000000020000 : "RedBoot"
[ 1.050000] 0x000000020000-0x000000120000 : "kernel"
[ 1.060000] 0x000000120000-0x0000007c0000 : "rootfs"
[ 1.060000] mtd: partition "rootfs_data" created automatically,
ofs=400000, len=3C0000
[ 1.060000] 0x000000400000-0x0000007c0000 : "rootfs_data"
[ 1.070000] 0x0000007c0000-0x0000007d0000 : "VCTL"
[ 1.070000] 0x0000007d0000-0x0000007e0000 : "cfg"
[ 1.080000] 0x0000007e0000-0x0000007f0000 : "FIS"
[
* Kernel 3.3.8 Log excerp
[ 0.650000] physmap platform flash device: 00800000 at 30000000
[ 0.660000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit
bank. Manufacturer ID 0x000020 Chip ID 0x0022ed
[ 0.670000] Amd/Fujitsu Extended Query Table at 0x0040
[ 0.680000] Amd/Fujitsu Extended Query version 1.3.
[ 0.690000] physmap-flash.0: Swapping erase regions for top-boot CFI
table.
[ 0.700000] number of CFI chips: 1
[ 0.710000] Searching for RedBoot partition table in physmap-flash.0
at offset 0x7f0000
[ 0.740000] 7 RedBoot partitions found on MTD device physmap-flash.0
[ 0.750000] Creating 7 MTD partitions on "physmap-flash.0":
[ 0.760000] 0x000000000000-0x0000007f0702 : "BOOT"
[ 0.770000] mtd: partition "BOOT" must either start or end on erase
block boundary or be smaller than an erase block -- forcing read-only
[ 0.790000] 0x000000020000-0x0000000f0428 : "Kern"
[ 0.800000] mtd: partition "Kern" must either start or end on erase
block boundary or be smaller than an erase block -- forcing read-only
[ 0.820000] 0x000000120000-0x000000500000 : "Ramdisk"
[ 0.830000] 0x000000620000-0x0000007c0000 : "Application"
[ 0.850000] 0x0000007c0000-0x0000007d0000 : "VCTL"
[ 0.860000] 0x0000007d0000-0x0000007f0000 : "CurConf"
[ 0.880000] 0x0000007f0000-0x000000800000 : "FIS directory"
* Kernel Patch
--- mtdpart.c.save 2012-09-02 23:11:56.045564105 +0200
+++ mtdpart.c 2012-09-02 23:13:52.602142075 +0200
@@ -890,6 +890,22 @@
printk(KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n",
nbparts, master->name);
for (i = 0; i < nbparts; i++) {
+ /* Ugly Hack for WBD-111 / RUT-104 */
+ if (!strcmp(parts[i].name, "Ramdisk")) {
+ printk(KERN_NOTICE "mtd: partition \"rootfs\" "
+ "renamed to rootfs\n");
+ dump_stack();
+ /* Ramdisk is longer than rootfs therefore we overwrite the
string */
+ strcpy(parts[i].name,"rootfs");
+ }
+ if (!strcmp(parts[i].name, "Application")) {
+ printk(KERN_NOTICE "mtd: partition \"Application\" "
+ "renamed to rootfs_data\n");
+ dump_stack();
+ /* Application is as long as rootfs_data therefore we
overwrite the string */
+ strcpy(parts[i].name,"rootfs_data");
+ }
+
slave = allocate_partition(master, parts + i, i, cur_offset);
if (IS_ERR(slave))
return PTR_ERR(slave);
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel