I have nexx wt3020f and I want to upgrade flash chip from 8MB to 16MB
I follow openwrt forum below
https://forum.openwrt.org/viewtopic.php?id=54717
Based on that link, my understanding is I just need to change dts file
at lede/target/linux/ramips/dts/WT3020-8M.dts
So my modified WT3020-8M.dts looks like below
/dts-v1/;
#include "WT3020.dtsi"
/ {
compatible = "nexx,wt3020-8m", "nexx,wt3020", "ralink,mt7620n-soc";
model = "Nexx WT3020 (8M)";
};
&spi0 {
status = "okay";
m25p160@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
However compilation error at image generation
Any idea what's missing?
touch /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-4.9.58/.image
make -C image compile install TARGET_BUILD=
make[5]: Entering directory `/home/user/lede/target/linux/ramips/image'
make[5]: Nothing to be done for `compile'.
mkdir -p /home/user/lede/bin/targets/ramips/mt7620 /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp
/home/user/lede/staging_dir/host/bin/mksquashfs4 /home/user/lede/build_dir/target-mipsel_24kc_musl/root-ramips /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/root.squashfs -nopad -noappend -root-owned -comp xz -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2 -b 256k -p '/dev d 755 0 0' -p '/dev/console c 600 0 0 5 1' -processors 1 -fixed-time 1508768614
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/root.squashfs, block size 262144.
Pseudo file "/dev" exists in source filesystem "/home/user/lede/build_dir/target-mipsel_24kc_musl/root-ramips/dev".
Ignoring, exclude it (-e/-ef) to override.
[============================================================================================/] 2112/2112 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
compressed data, compressed metadata, compressed fragments, no xattrs
duplicates are removed
Filesystem size 13257.89 Kbytes (12.95 Mbytes)
31.32% of uncompressed filesystem size (42328.10 Kbytes)
Inode table size 17954 bytes (17.53 Kbytes)
21.76% of uncompressed inode table size (82513 bytes)
Directory table size 24054 bytes (23.49 Kbytes)
46.14% of uncompressed directory table size (52131 bytes)
Number of duplicate files found 83
Number of inodes 2496
Number of files 2033
Number of fragments 74
Number of symbolic links 305
Number of device nodes 1
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 157
Number of ids (unique uids + gids) 1
Number of uids 1
root (0)
Number of gids 1
root (0)
rm -f /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin
cp /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/vmlinux /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin
mipsel-openwrt-linux-musl-cpp -nostdinc -x assembler-with-cpp -I/home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-4.9.58/arch/mips/boot/dts -I/home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-4.9.58/arch/mips/boot/dts/include -undef -D__DTS__ -o /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin.dtb.tmp ../dts/WT3020-8M.dts
/home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-4.9.58/scripts/dtc/dtc -O dtb -i../dts/ -o /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin.dtb /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin.dtb.tmp
Warning (unit_address_vs_reg): Node /cpus/cpu@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /cpuintc@0 has a unit name, but no reg property
rm -f /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin.dtb.tmp
/home/user/lede/staging_dir/host/bin/patch-dtb /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin.dtb
DT size used is default of 16KB
/home/user/lede/staging_dir/host/bin/lzma e /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin -lc1 -lp2 -pb2 /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin.new
mkimage -A mips -O linux -T kernel -C lzma -a 0x80000000 -e 0x80000000 -n 'MIPS LEDE Linux-4.9.58' -d /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin.new
Image Name: MIPS LEDE Linux-4.9.58
Created: Mon Oct 23 14:23:34 2017
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1361084 Bytes = 1329.18 kB = 1.30 MB
Load Address: 80000000
Entry Point: 80000000
mv /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin.new /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin
[ -f /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin -a -f /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/root.squashfs ]
dd if=/home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin >> /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin
2658+1 records in
2658+1 records out
1361148 bytes (1.4 MB) copied, 0.0209862 s, 64.9 MB/s
dd if=/home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/root.squashfs >> /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin
26515+1 records in
26515+1 records out
13576080 bytes (14 MB) copied, 0.164602 s, 82.5 MB/s
/home/user/lede/staging_dir/host/bin/padjffs2 /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin 4 8 16 64 128 256
padding image to 00e3f000
padding image to 00e40000
echo '{ "supported_devices":["wt3020-8M","wt3020"], "version": { "dist": "LEDE", "version": "SNAPSHOT", "revision": "r5126-8348106", "board": "ramips" } }' | fwtool -I - /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin
WARNING: Image file /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin is too big
cp /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin /home/user/lede/bin/targets/ramips/mt7620/lede-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin
cp: cannot stat '/home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin': No such file or directory
make[5]: [/home/user/lede/bin/targets/ramips/mt7620/lede-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin] Error 1 (ignored)
[ -f /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin -a -f /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/root.squashfs ]
dd if=/home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-8M-kernel.bin >> /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-factory.bin
2658+1 records in
2658+1 records out
1361148 bytes (1.4 MB) copied, 0.0328112 s, 41.5 MB/s
dd if=/home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/root.squashfs >> /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-factory.bin
26515+1 records in
26515+1 records out
13576080 bytes (14 MB) copied, 0.192854 s, 70.4 MB/s
/home/user/lede/staging_dir/host/bin/padjffs2 /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-factory.bin 4 8 16 64 128 256
padding image to 00e3f000
padding image to 00e40000
WARNING: Image file /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-factory.bin is too big
/home/user/lede/staging_dir/host/bin/mkporayfw -B WT3020 -F 8M -f /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-factory.bin -o /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-factory.bin.new
[mkporayfw] *** error: stat failed on /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-factory.bin:No such file or directory
make[5]: *** [/home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-8M-squashfs-factory.bin] Error 255
make[5]: Leaving directory `/home/user/lede/target/linux/ramips/image'
make[4]: *** [install] Error 2
make[4]: Leaving directory `/home/user/lede/target/linux/ramips'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/home/user/lede/target/linux'
make[2]: *** [target/linux/install] Error 2
make[2]: Leaving directory `/home/user/lede'
make[1]: *** [/home/user/lede/staging_dir/target-mipsel_24kc_musl/stamp/.target_install] Error 2
make[1]: Leaving directory `/home/user/lede'
make: *** [world] Error 2