Nexx WT3020 upgrading flash storage : compilation failed

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

I follow this patch below
https://lists.openwrt.org/pipermail/openwrt-devel/2016-May/041349.html

patch cannot be implemented 100% in lede since source code a bit different especially in lede/target/linux/ramips/image/Makefile cannot implement this changes below

+# wrappers for boards that have 4MB, 8MB and 16MB versions
+define BuildFirmware/DefaultThreeSize/squashfs
+	$(call BuildFirmware/Default4M/$(1),$(1),$(2)-4M,$(3)-4M)
+	$(call BuildFirmware/Default8M/$(1),$(1),$(2)-8M,$(3)-8M)
+	$(call BuildFirmware/Default16M/$(1),$(1),$(2)-16M,$(3)-16M)
+endef
+define BuildFirmware/DefaultThreeSize/initramfs
+	$(call BuildFirmware/OF/initramfs,$(1),$(2)-4M,$(3)-4M)
+	$(call BuildFirmware/OF/initramfs,$(1),$(2)-8M,$(3)-8M)
+	$(call BuildFirmware/OF/initramfs,$(1),$(2)-16M,$(3)-16M)
+endef
+
 # build Seama header images
 define BuildFirmware/Seama/squashfs
 	$(call MkImageLzmaDtb,$(2),$(3),$(5))
@@ -239,6 +255,25 @@ define BuildFirmware/PorayDualSize/squashfs
 endef
 BuildFirmware/PorayDualSize/initramfs=$(call
BuildFirmware/DefaultDualSize/initramfs,$(1),$(2),$(3))

+define BuildFirmware/PorayThreeSize/squashfs
+	$(call BuildFirmware/DefaultThreeSize/$(1),$(1),$(2),$(3))
+	if [ -e "$(call sysupname,$(1),$(2)-4M)" ]; then \
+		mkporayfw -B $(3) -F 4M \
+			-f $(call sysupname,$(1),$(2)-4M) \
+			-o $(call imgname,$(1),$(2)-4M)-factory.bin; \
+	fi
+	if [ -e "$(call sysupname,$(1),$(2)-8M)" ]; then \
+		mkporayfw -B $(3) -F 8M \
+			-f $(call sysupname,$(1),$(2)-8M) \
+			-o $(call imgname,$(1),$(2)-8M)-factory.bin; \
+	fi
+	if [ -e "$(call sysupname,$(1),$(2)-16M)" ]; then \
+		mkporayfw -B $(3) -F 16M \
+			-f $(call sysupname,$(1),$(2)-16M) \
+			-o $(call imgname,$(1),$(2)-16M)-factory.bin; \
+	fi
+endef
+BuildFirmware/PorayThreeSize/initramfs=$(call
BuildFirmware/DefaultThreeSize/initramfs,$(1),$(2),$(3))

WT3020-16M showing at "make menuconfig" however compilation still stop with similar error. Somehow make image checking file size whether bigger than 8M flash chip and failed to generate if bigger.
Anybody have idea where this code to check image file size?

rm -f /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-16M-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-16M-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-16M-kernel.bin.dtb.tmp ../dts/WT3020-16M.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-16M-kernel.bin.dtb /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-16M-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-16M-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-16M-kernel.bin /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-16M-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-16M-kernel.bin -lc1 -lp2 -pb2  /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-16M-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-16M-kernel.bin /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-16M-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:    1361071 Bytes = 1329.17 kB = 1.30 MB
Load Address: 80000000
Entry Point:  80000000
mv /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-16M-kernel.bin.new /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-16M-kernel.bin
[ -f /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-16M-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-16M-kernel.bin >> /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-16M-squashfs-sysupgrade.bin
2658+1 records in
2658+1 records out
1361135 bytes (1.4 MB) copied, 0.027823 s, 48.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-16M-squashfs-sysupgrade.bin
26515+1 records in
26515+1 records out
13576080 bytes (14 MB) copied, 0.198862 s, 68.3 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-16M-squashfs-sysupgrade.bin  4 8 16 64 128 256
padding image to 00e3f000
padding image to 00e40000
echo '{  "supported_devices":["wt3020-16M","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-16M-squashfs-sysupgrade.bin
WARNING: Image file /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-16M-squashfs-sysupgrade.bin is too big
cp /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-16M-squashfs-sysupgrade.bin /home/user/lede/bin/targets/ramips/mt7620/lede-ramips-mt7620-wt3020-16M-squashfs-sysupgrade.bin
cp: cannot stat '/home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-16M-squashfs-sysupgrade.bin': No such file or directory
make[5]: [/home/user/lede/bin/targets/ramips/mt7620/lede-ramips-mt7620-wt3020-16M-squashfs-sysupgrade.bin] Error 1 (ignored)
[ -f /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/wt3020-16M-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-16M-kernel.bin >> /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-16M-squashfs-factory.bin
2658+1 records in
2658+1 records out
1361135 bytes (1.4 MB) copied, 0.0250918 s, 54.2 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-16M-squashfs-factory.bin
26515+1 records in
26515+1 records out
13576080 bytes (14 MB) copied, 0.191957 s, 70.7 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-16M-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-16M-squashfs-factory.bin is too big
/home/user/lede/staging_dir/host/bin/mkporayfw -B WT3020 -F 16M -f /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-16M-squashfs-factory.bin -o /home/user/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/tmp/lede-ramips-mt7620-wt3020-16M-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-16M-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-16M-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

Found source mod in github below.
https://github.com/lede-project/source/pull/1040
I change code accordingly, can successfully generated image
however router cannot boot up.
Now will need to see serial console for understanding what's going on

serial port dump log below
anybody can help what's wrong?

Boot and Recovery Environment for Embedded Devices
Copyright (C) 2017 HackPascal <hackpascal@gmail.com>
Build date 2017-09-21 [git-35a696e]
Version 1.1 (r1126)

DRAM: 64MB
Platform: MediaTek MT7620N ver 2, eco 6
Board: Reference design
Clocks: CPU: 580MHz, Bus: 193MHz
Flash: Winbond W25Q128 (16MB) on rt2880-spi
rt2880-eth: Using MAC address 00:13:13:11:d2:bb
eth0: MediaTek MT7620N built-in 5-port 10/100M switch

Network started on eth0, inet addr 192.168.1.1, netmask 255.255.255.0

Press any key to interrupt autoboot ... 0

Trying to boot firmware from 0x00050000 in flash bank 0 ...
Reading data into memory ...
U-Boot firmware image header detected.
    Image Name:   MIPS LEDE Linux-4.9.58
    Data Size:    1356615 Bytes
    Load Address: 80000000
    Entry Point:  80000000
Uncompressing data (LZMA) ... done.
Flushing cache ... done.

Starting kernel at 0x80000000...

[    0.000000] Linux version 4.9.58 (user@ubuntuvm) (gcc version 5.5.0 (LEDE GCC 5.5.0 r5399-6aa4b97) ) #0 Tue Nov 21 14:15:20 2017
[    0.000000] Board has DDR1
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620N ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is Nexx WT3020 (16M)
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00033a20
[    0.000000] Readback ErrCtl register=00033a20
[    0.000000] Memory: 60444K/65536K available (3155K kernel code, 153K rwdata, 756K rodata, 152K init, 216K bss, 5092K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000011] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015453] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.080604] pid_max: default: 32768 minimum: 301
[    0.089915] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.102941] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.122131] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.141607] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.153752] pinctrl core: initialized pinctrl subsystem
[    0.164717] NET: Registered protocol family 16
[    0.194633] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.205649] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.218246] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.229232] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.241774] rt2880_gpio 10000688.gpio: registering 1 gpios
[    0.252581] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[    0.268357] clocksource: Switched to clocksource systick
[    0.280081] NET: Registered protocol family 2
[    0.289550] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.303322] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.315915] TCP: Hash tables configured (established 1024 bind 1024)
[    0.328642] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.340172] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.352853] NET: Registered protocol family 1
[    0.363640] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    0.376288] Crashlog allocated RAM at address 0x3f00000
[    0.387688] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.408699] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.420173] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.447858] io scheduler noop registered
[    0.455554] io scheduler deadline registered (default)
[    0.466017] ralink-usb-phy usbphy: invalid resource
[    0.476168] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.489814] console [ttyS0] disabled
[    0.496800] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.516569] console [ttyS0] enabled
[    0.516569] console [ttyS0] enabled
[    0.530349] bootconsole [early0] disabled
[    0.530349] bootconsole [early0] disabled
[    0.550444] spi spi0.0: force spi mode3
[    0.558898] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.568306] 4 ofpart partitions found on MTD device spi0.0
[    0.579277] Creating 4 MTD partitions on "spi0.0":
[    0.588834] 0x000000000000-0x000000030000 : "u-boot"
[    0.600365] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.612811] 0x000000040000-0x000000050000 : "factory"
[    0.624742] 0x000000050000-0x000001000000 : "firmware"
[    2.001302] 2 uimage-fw partitions found on MTD device firmware
[    2.013137] 0x000000050000-0x00000019b387 : "kernel"
[    2.024660] 0x00000019b387-0x000001000000 : "rootfs"
[    2.036403] mtd: device 5 (rootfs) set to be root filesystem
[    2.048289] 1 squashfs-split partitions found on MTD device rootfs
[    2.060677] 0x000000ca4000-0x000001000000 : "rootfs_data"
[    2.073743] libphy: Fixed MDIO Bus: probed
[    2.085550] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    2.098201] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    2.115214] rt2880_wdt 10000120.watchdog: Initialized
[    2.126430] NET: Registered protocol family 10
[    2.138278] NET: Registered protocol family 17
[    2.147253] 8021q: 802.1Q VLAN Support v1.8
[    2.172513] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    2.187418] Freeing unused kernel memory: 152K
[    2.196296] This architecture does not have kernel memory protection.
[    2.648309] random: fast init done
[    3.839201] init: Console is alive
[    3.846195] init: - watchdog -
[    7.503825] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    7.870869] usbcore: registered new interface driver usbfs
[    7.881998] usbcore: registered new interface driver hub
[    7.892711] usbcore: registered new device driver usb
[    7.908962] exFAT: Version 1.2.9
[    7.947710] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    7.970992] SCSI subsystem initialized
[    7.983732] ehci-platform: EHCI generic platform driver
[    8.004499] phy phy-usbphy.0: remote usb device wakeup disabled
[    8.016315] phy phy-usbphy.0: UTMI 16bit 30MHz
[    8.025202] ehci-platform 101c0000.ehci: EHCI Host Controller
[    8.036691] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    8.052595] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    8.073188] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    8.086771] hub 1-0:1.0: USB hub found
[    8.094621] hub 1-0:1.0: 1 port detected
[    8.105808] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    8.119750] ohci-platform: OHCI generic platform driver
[    8.130472] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[    8.144073] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[    8.159970] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[    8.198046] hub 2-0:1.0: USB hub found
[    8.205974] hub 2-0:1.0: 1 port detected
[    8.220697] usbcore: registered new interface driver usb-storage
[    8.233636] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    8.252185] init: - preinit -
[   10.150596] 8021q: adding VLAN 0 to HW filter on device eth0
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   11.435150] mount_root: loading kmods from internal overlay
[   11.501603] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   11.517272] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   14.199197] jffs2: notice: (372) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   14.230790] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   14.252860] block: extroot: not configured
[   14.734395] jffs2: notice: (369) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   16.348044] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   16.368344] block: extroot: not configured
[   16.377910] mount_root: switching to jffs2 overlay
[   16.452162] urandom-seed: Seeding with /etc/urandom.seed
[   16.593348] procd: - early -
[   16.599184] procd: - watchdog -
[   17.299743] procd: - watchdog -
[   17.311672] procd: - ubus -
[   18.052937] procd: - init -
Please press Enter to activate this console.
[   18.521968] kmodloader: loading kernel modules from /etc/modules.d/*
[   18.682274] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[   18.707840] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   18.734233] fuse init (API version 7.26)
[   18.750458] usbcore: registered new interface driver cdc_wdm
[   18.764014] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   18.780029] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   18.797904] ip_tables: (C) 2000-2006 Netfilter Core Team
[   18.820259] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   18.835601] nf_conntrack_rtsp v0.7 loading
[   18.906770] nf_nat_rtsp v0.7 loading
[   18.919612] usbcore: registered new interface driver ums-alauda
[   18.933899] usbcore: registered new interface driver ums-cypress
[   18.948290] usbcore: registered new interface driver ums-datafab
[   18.962578] usbcore: registered new interface driver ums-freecom
[   18.976972] usbcore: registered new interface driver ums-isd200
[   18.991327] usbcore: registered new interface driver ums-jumpshot
[   19.005782] usbcore: registered new interface driver ums-karma
[   19.020343] usbcore: registered new interface driver ums-sddr09
[   19.034661] usbcore: registered new interface driver ums-sddr55
[   19.049164] usbcore: registered new interface driver ums-usbat
[   19.072549] usbcore: registered new interface driver usbserial
[   19.084354] usbcore: registered new interface driver usbserial_generic
[   19.097508] usbserial: USB Serial support registered for generic
[   19.139571] xt_time: kernel timezone is -0000
[   19.151113] usbcore: registered new interface driver cdc_ether
[   19.167025] usbcore: registered new interface driver cdc_ncm
[   19.206415] usbcore: registered new interface driver ch341
[   19.217529] usbserial: USB Serial support registered for ch341-uart
[   19.232350] usbcore: registered new interface driver cp210x
[   19.243650] usbserial: USB Serial support registered for cp210x
[   19.258872] usbcore: registered new interface driver ftdi_sio
[   19.270507] usbserial: USB Serial support registered for FTDI USB Serial Device
[   19.287586] usbcore: registered new interface driver huawei_cdc_ncm
[   19.354127] usbcore: registered new interface driver pl2303
[   19.365433] usbserial: USB Serial support registered for pl2303
[   19.382040] PPP generic driver version 2.4.2
[   19.393456] NET: Registered protocol family 24
[   19.405418] usbcore: registered new interface driver qmi_wwan
[   19.420342] usbcore: registered new interface driver rndis_host
[   19.448929] usbcore: registered new interface driver sierra
[   19.460226] usbserial: USB Serial support registered for Sierra USB modem
[   19.477280] usbcore: registered new interface driver sierra_net
[   19.492073] usbcore: registered new interface driver cdc_mbim
[   19.527890] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[   19.542377] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[   19.557828] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected
[   19.611642] kmodloader: done loading kernel modules from /etc/modules.d/*
[   29.956123] 8021q: adding VLAN 0 to HW filter on device eth0
[   30.007338] br-lan: port 1(eth0.1) entered blocking state
[   30.018168] br-lan: port 1(eth0.1) entered disabled state
[   30.029398] device eth0.1 entered promiscuous mode
[   30.038995] device eth0 entered promiscuous mode
[   30.257749] br-lan: port 1(eth0.1) entered blocking state
[   30.268571] br-lan: port 1(eth0.1) entered forwarding state



BusyBox v1.27.2 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (SNAPSHOT, r5399-6aa4b97)
    \________\/    -----------------------------------------------------------

=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@LEDE:/#

You successfully compiled an image, flashed it, and it booted.
Since it is not obvious to me: What do you think is not working as expected?

client on LAN cannot get IP, even if i force static IP, still cannot ping
i compile 8M version and dhcp can assign IP and OK