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_startand 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