8devices Community https://www.8devices.com/community/ |
|
How to increase OpenWrt Firmware image(sysupgrade.bin) size https://www.8devices.com/community/viewtopic.php?f=1&t=386 |
Page 1 of 1 |
Author: | Prashant N [ 17 Apr 2013, 08:17 ] | |||
Post subject: | How to increase OpenWrt Firmware image(sysupgrade.bin) size | |||
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
|
Author: | Prashant N [ 18 Apr 2013, 11:39 ] |
Post subject: | Re: How to increase OpenWrt Firmware image(sysupgrade.bin) s |
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 |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |