I am trying to add support for Unielec U7621-06 with 512 MB RAM and 64 MB Flash. I have the device with me.
I was able to modify DTS files and add support for 512 MB RAM. Initramfs image is booting up properly and network is working.
I need help with adding support for 64 MB flash. I have modified the DTS and other files in linux/target/ramips/ which had reference to supported U7621-06 with 16 MB flash.
Bootloader is Ralink U-Boot:
MT7621 stage1 code done
CPU=50000000 HZ BUS=16666666 HZ
***** led set *****
U-Boot 1.1.3 (Dec 24 2014 - 22:25:27)
Board: Ralink APSoC DRAM: 512 MB
relocate_code Pointer at: 9bfb8000
Config XHCI 40M PLL
Software System Reset Occurred
flash manufacture id: c2, device id 20 1a
find flash: MX66L51235F
Ralink UBoot Version: 4.2.1.0
ASIC 7621_MP (MAC to MT7530 Mode)
DRAM_CONF_FROM: Auto-Detection
DRAM_TYPE: DDR3
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: SPI Flash
Date:Dec 24 2014 Time:22:25:27
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:256, ways:4, linesz:32 ,total:32768
The CPU freq = 880 MHZ
estimate memory size =512 Mbytes
#Reset_MT7530
Please choose the operation:
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
2
You choosed 4
0
4: System Enter Boot Command Line Interface.
U-Boot 1.1.3 (Dec 24 2014 - 22:25:27)
MT7621 #
U-Boot reports the flash chip to be MX66L51235F while below is the kernel log from the firmware I have compiled:
[ 3.122253] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[ 3.136584] spi-mt7621 1e000b00.spi: sys_freq: 50000000
[ 3.147977] m25p80 spi0.0: mx66l51235l (65536 Kbytes)
[ 3.158128] 4 fixed-partitions partitions found on MTD device spi0.0
[ 3.170777] Creating 4 MTD partitions on "spi0.0":
[ 3.180339] 0x000000000000-0x000000030000 : "bootloader"
[ 3.192140] 0x000000030000-0x000000040000 : "config"
[ 3.203164] 0x000000040000-0x000000050000 : "factory"
[ 3.214371] 0x000000050000-0x000004000000 : "firmware"
[ 3.478858] libphy: Fixed MDIO Bus: probed
[ 3.557890] libphy: mdio: probed
[ 4.964786] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[ 4.977393] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 22
[ 4.996824] NET: Registered protocol family 10
[ 5.007455] Segment Routing with IPv6
[ 5.014846] NET: Registered protocol family 17
[ 5.023812] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 5.049614] 8021q: 802.1Q VLAN Support v1.8
[ 5.060441] hctosys: unable to open rtc device (rtc0)
[ 5.071408] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 5.086317] Please append a correct "root=" boot option; here are the available partitions:
[ 5.102953] 1f00 192 mtdblock0
[ 5.102959] (driver?)
[ 5.115973] 1f01 64 mtdblock1
[ 5.115978] (driver?)
[ 5.128974] 1f02 64 mtdblock2
[ 5.128979] (driver?)
[ 5.141974] 1f03 65216 mtdblock3
[ 5.141979] (driver?)
[ 5.154974] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 5.173113] Rebooting in 1 seconds..
Below are the excerpts from DTS file:
memory@0 {
device_type = "memory";
reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
};
};
&spi0 {
status = "okay";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <14000000>;
m25p,chunked-io = <32>;
partition@0 {
label = "bootloader";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "config";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
firmware: partition@50000 {
label = "firmware";
reg = <0x50000 0x3fb0000>;
};
};
};
And image size defined in target/linux/ramips/image/mt7621.mk
is IMAGE_SIZE := 65216k
This is my first attempt at adding support for a device, but somehow I feel that there is something not right with flash partition sizes and/or image size definition.
Thanks in advance