[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4694: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4695: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4696: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
8devices Community - View topic - How to increase OpenWrt Firmware image(sysupgrade.bin) size
www.8devices.com
View unanswered posts | View active topics It is currently 28 Apr 2024, 14:09



Reply to topic  [ 2 posts ] 
 How to increase OpenWrt Firmware image(sysupgrade.bin) size 
Author Message

Joined: 06 Sep 2012, 09:15
Posts: 14
Hi,
I have carambola Ralink 3050F target board and it has 8MB flash memory.

Here OpenWrt firmware image (openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin) size resricted to 8MB.

I have gone through the link http://8devices.com/wiki_carambola/doku ... e_to_start
and able to download and build Carambola Software. Here i have built carambola source with version : v2.3-rc4

After this, i included many packages as per our requirement in OpenWrt menuconfig and able to build the OpenWrt firmware image (openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin) with size 7.7 MB.

Now we included hardware support for 16MB flash memory in carambola.

So in order to generate OpenWrt firmware image size greater than 8 MB, i have gone through the link https://forum.openwrt.org/viewtopic.php?id=32512

As per this link i have done below changes

Edited the file carambola/tools/firmware-utils/src/mktplinkfw.c

changed from

static struct flash_layout layouts[] = {
{
.id = "4M",
.fw_max_len = 0x3c0000,
.kernel_la = 0x80060000,
.kernel_ep = 0x80060000,
.rootfs_ofs = 0x140000,
}, {
.id = "4Mlzma",
.fw_max_len = 0x3c0000,
.kernel_la = 0x80060000,
.kernel_ep = 0x80060000,
.rootfs_ofs = 0x100000,
}, {
.id = "8M",
.fw_max_len = 0x7c0000,
.kernel_la = 0x80060000,
.kernel_ep = 0x80060000,
.rootfs_ofs = 0x140000,
}, {
.id = "8Mlzma",
.fw_max_len = 0x7c0000,
.kernel_la = 0x80060000,
.kernel_ep = 0x80060000,
.rootfs_ofs = 0x100000,
}, {
/* terminating entry */
}
};

to

static struct flash_layout layouts[] = {
{
.id = "4M",
.fw_max_len = 0x3c0000,
.kernel_la = 0x80060000,
.kernel_ep = 0x80060000,
.rootfs_ofs = 0x140000,
}, {
.id = "4Mlzma",
.fw_max_len = 0x3c0000,
.kernel_la = 0x80060000,
.kernel_ep = 0x80060000,
.rootfs_ofs = 0x100000,
}, {
.id = "8M",
.fw_max_len = 0xfc0000,
.kernel_la = 0x80060000,
.kernel_ep = 0x80060000,
.rootfs_ofs = 0x140000,
}, {
.id = "8Mlzma",
.fw_max_len = 0xfc0000,
.kernel_la = 0x80060000,
.kernel_ep = 0x80060000,
.rootfs_ofs = 0x100000,
}, {
/* terminating entry */
}
};

Here i changed fw_max_len from 0x7c0000 to 0xfc0000 in the id 8M and 8Mlzma respectively.

and also edited the file carambola/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-carambola.c

changed from

#define CARAMBOLA_ROOTFS_SIZE 0x690000 /* 6720KB

to

#define CARAMBOLA_ROOTFS_SIZE 0xe90000 /* 14912KB */


As i told earlier, i am able to build OpenWrt image with size 7.7 MB.
On the top of this, i have included more packages in OpenWrt menuconfig and started building OpenWrt firware using command : $ make V=s

After building firmware, OpenWrt fail to generate OpenWrt Firmware image (openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin)

I would like to know

1) How to generate OpenWrt Firmware image (openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin) size resricted to 16 MB but which has been restricted to 8MB currently ?

2) Whether any changes required in u-boot source code for supporting 16MB flash on Carambola

Please guide me on this.


Please find the attachment for mach-carambola.c and mktplinkfw.c files

Thanks,
Prashant N


Attachments:
File comment: The file path: carambola/tools/firmware-utils/src/mktplinkfw.c
mktplinkfw.c [22.73 KiB]
Downloaded 532 times
File comment: The file path : carambola/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-carambola.c
mach-carambola.c [3.56 KiB]
Downloaded 519 times
17 Apr 2013, 08:17
Profile

Joined: 06 Sep 2012, 09:15
Posts: 14
Hi,
I am able to solve this problem i,e able to generate OpenWrt firmware image (openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin) with size greater than 8MB and restricted to 15.6875MB.

Follow below steps

1) Edit the file carambola/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-carambola.c

change from

#define CARAMBOLA_ROOTFS_SIZE 0x690000 /* 6720KB */

to

#define CARAMBOLA_ROOTFS_SIZE 0xe90000 /* 14912KB */

And also edit the file carambola/build_dir/linux-ramips_rt305x/linux-3.3.8/arch/mips/ralink/rt305x/mach-carambola.c


change from

#define CARAMBOLA_ROOTFS_SIZE 0x690000 /* 6720KB */

to

#define CARAMBOLA_ROOTFS_SIZE 0xe90000 /* 14912KB */

Also edit the file carambola/target/linux/ramips/image/Makefile

change from

define BuildFirmware/CARAMBOLA
$(call BuildFirmware/Generic,$(1),$(2),$(call mkcmdline,$(3),ttyS1,115200),1179648,6881280)

endef

to

define BuildFirmware/CARAMBOLA
$(call BuildFirmware/Generic,$(1),$(2),$(call mkcmdline,$(3),ttyS1,115200),1179648,15269888)
endef

Here we changed root file system size from 6881280 bytes (6720KB) to 15269888 bytes (14912KB)


2) select the packages from menuconfig
$ cd carambola
$ make menuconfig

Here choose many more packages so that image size will be greater than 8MB.

3) Build the firmware

$ make V=s

After completing build process, the new built OpenWrt firmware image (openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin) with size greater than 8 MB will be
located in the path carambola/bin/ramips



Thanks,
Prashant N


18 Apr 2013, 11:39
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.