I am trying to install openwrt stable 19.07.7 on a mt7628nn device (intenso memory 2 move pro). With the following commands, a stock version of mt7628 19.07.7 build from imagebuilder can be installed on the spi flash, which boots fine.
tftpboot
erase linux
cp.linux
However, the device has 64MB ram and 16MB flash, the stock 19.07.7 contains the kernel only for 32MB ram and 4MB flash device. Then I tried to build from source and modified the following files:
file 1: openwrt/target/linux/ramips/image/mt76x8.mk
define Device/mt7628
DTS := MT7628
BLOCKSIZE := 64k
-IMAGE_SIZE := $(ralink_default_fw_size_4M)
+IMAGE_SIZE := $(ralink_default_fw_size_16M)
DEVICE_TITLE := MediaTek MT7628 EVB
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
endef
file 2: openwrt/target/linux/ramips/dts/MT7628.dts
memory@0 {
device_type = "memory";
-reg = <0x0 0x2000000>;
+reg = <0x0 0x4000000>;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
-reg = <0x50000 0x7b0000>;
+reg = <0x50000 0xfb0000>;
};
after flash the sysupgrade image to flash, it failed to boot and the uboot reports Bad Data CRC
U-Boot 1.1.3 (Dec 11 2014 - 20:44:28)
Board: Ralink APSoC DRAM: 64 MB
relocate_code Pointer at: 83fb4000
******************************
Software System Reset Occurred
******************************
flash manufacture id: c8, device id 40 18
find flash: GD25Q128C
============================================
Ralink UBoot Version: 4.3.0.0
--------------------------------------------
ASIC 7628_MP (Port5<->None)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: 8 MBytes NOR Flash
Date:Dec 11 2014 Time:20:44:28
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768
##### The CPU freq = 575 MHZ ####
estimate memory size =64 Mbytes
RESET MT7628 PHY!!!!!!
Initialize vs configure module
Initialize GPIO
Input i key to enter men 0
## Booting image at 80500000 ...
Image Name: MIPS OpenWrt Linux-4.14.221
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1595938 Bytes = 1.5 MB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... Bad Data CRC
However, when I try to load the image via tftp server and boot from ram, it boots successfully, and all 64MB ram and 16MB flash are usable.
Any idea why uboot can not boot the image from flash?
Thanks in advance.