Image does not boot (RALINK RT5350F, 8Mbyte Flash, 32Mbyte RAM)

Hi

I have a hardware with RALINK RT5350F, 8Mbyte Flash, 32Mbyte RAM
I started editing the A5-V11 which was similar.
I have already done the same way a year ago and everything worked fine.

This Uboot upload, using server TFTP
https://pastebin.com/cDj8Qu7U

This boot con consolle:
https://pastebin.com/bfQf3F8L

(I could not embed text on the body of the message, word exceed max)

This Step:

git clone https://git.openwrt.org/openwrt/openwrt.git
./scripts/feeds update -a
./scripts/feeds install -a

Copied in /files/ some files

Modified a5-v11:
/target/linux/ramips/image/rt305x.mk
(Flash Size 4M to 8M IMAGE_SIZE := 3776k to IMAGE_SIZE := 7872k )
/tools/firmware-utils/src/mkporayfw.c
(Flash Size 4M to 8M)
/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts
&esw {
mediatek,portmap = <0x00>;
mediatek,portdisable = <0x0f>;
};
/target/linux/ramips/base-files/etc/board.d/02_network
a5-v11)
ucidef_set_interface_lan "eth0.1"
ucidef_add_switch "switch0" "6@eth0"
ucidef_add_switch_vlan "switch0" "1" "6t"
;;

make menuconfig
	Target  "Mediatek Ralink MIPS"
	Subtarghet  "RT5350"
	Targhet profile "A5-V11"
	Global Build Settings  ---->
		Select all taghet
		Select all 
	Base system:
		Block-mount  - block device mounting and checking
		Blockd - Block device automounting
	Kernel module ---->
		Filesystem --->
			Kmod-fs-msdos
			Kmod-fs-vfat
		Usb Support --> 
			kmod-usb2
			kmod-usb-uhci
			kmod-usb-ohci
			kmod-usb-storage
			kmod-usb-storage-extras
			kmod-usb-storage-uas
			kmod-usb-wdm
			kmod-usb-serial
	Network ---->
		Web Server ---->
			apache
		Chat
		Iperf
		Iperf3
		ppp
		ppp-mod-pppoa
		ppp-mod-pppoe
		ppp-mod-pppol2tp
		ppp-mod-pptp
	Luci ---->
		Collection ---->
			Luci
		Application ----> 
			Luci-app-samb
		Themes ---->
			Material
	Utility -->
		usb-modeswitchusbutils

make -j1 V=s (debug)

0x000000050000-0x000000400000 : "firmware"

Your partition table is still only 4M. You need to modify the dts to partition out to 8M.

This isn't the problem-- yet-- but it's going to be easy to run out of RAM when you load more than a few small applications into the image and actually get to the point of trying to run them. I would avoid heavy stuff like Apache web server.

@mk24

You mean this on /target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts ?

partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x3b0000>;
};

Way 3b0000 is 4M ?
8M is 760000 ?

It works well in the compilation of a year ago.
But I can use a lightweight server for luci?

Ok, it worked well.
I found out that there was already uHTTPd webserver by default and works well.

Any advice for accelerating the boot ?


[details="Summary"]
Starting kernel ...

[    0.000000] Linux version 4.14.143 (gevagiorgio@PC-Ufficio) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r11008-84c263e)) #0 Sat Sep 14 09:43:19 2019
[    0.000000] SoC Type: Ralink RT5350 id:1 rev:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001964c (MIPS 24KEc)
[    0.000000] MIPS: machine is A5-V11
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] random: get_random_bytes called from 0x803a26ec with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=0006dc3a
[    0.000000] Readback ErrCtl register=0006dc3a
[    0.000000] Memory: 27272K/32768K available (3138K kernel code, 162K rwdata, 412K rodata, 1208K init, 191K bss, 5496K 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: 360MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 10618113593 ns
[    0.000016] sched_clock: 32 bits at 180MHz, resolution 5ns, wraps every 11930464253ns
[    0.015705] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
[    0.098030] pid_max: default: 32768 minimum: 301
[    0.107616] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.120732] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.144008] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.163570] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.175826] pinctrl core: initialized pinctrl subsystem
[    0.187318] NET: Registered protocol family 16
[    0.253545] rt2880_gpio 10000600.gpio: registering 22 gpios
[    0.264690] rt2880_gpio 10000600.gpio: registering 22 irq handlers
[    0.277753] rt2880_gpio 10000660.gpio: registering 6 gpios
[    0.288716] rt2880_gpio 10000660.gpio: registering 6 irq handlers
[    0.312070] clocksource: Switched to clocksource MIPS
[    0.324461] NET: Registered protocol family 2
[    0.334770] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.348661] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.361249] TCP: Hash tables configured (established 1024 bind 1024)
[    0.374264] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.385908] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.398870] NET: Registered protocol family 1
[    0.414825] rt-timer 10000100.timer: maximum frequency is 3662Hz
[    0.428521] Crashlog allocated RAM at address 0x1f00000
[    0.443978] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.467602] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.479202] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.526176] io scheduler noop registered
[    0.533964] io scheduler deadline registered (default)
[    0.546168] gpio-export gpio_export: 2 gpio(s) exported
[    0.557115] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.571982] console [ttyS0] disabled
[    0.579183] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.598920] console [ttyS0] enabled
[    0.598920] console [ttyS0] enabled
[    0.612726] bootconsole [early0] disabled
[    0.612726] bootconsole [early0] disabled
[    0.644756] spi spi0.0: force spi mode3
[    0.654088] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    0.664028] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.676764] Creating 4 MTD partitions on "spi0.0":
[    0.686393] 0x000000000000-0x000000030000 : "u-boot"
[    0.698285] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.710891] 0x000000040000-0x000000050000 : "factory"
[    0.723261] 0x000000050000-0x0000007b0000 : "firmware"
[    0.743896] 2 uimage-fw partitions found on MTD device firmware
[    0.755843] Creating 2 MTD partitions on "firmware":
[    0.765855] 0x000000000000-0x0000001387aa : "kernel"
[    0.777681] 0x0000001387aa-0x000000760000 : "rootfs"
[    0.789513] mtd: device 5 (rootfs) set to be root filesystem
[    0.805354] 1 squashfs-split partitions found on MTD device rootfs
[    0.817849] 0x00000063f000-0x000000760000 : "rootfs_data"
[    0.831687] libphy: Fixed MDIO Bus: probed
[    0.849888] rt3050-esw 10110000.esw: link changed 0x00
[    0.863557] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.881235] rt2880_wdt 10000120.watchdog: Initialized
[    0.894151] NET: Registered protocol family 10
[    0.913589] Segment Routing with IPv6
[    0.921137] NET: Registered protocol family 17
[    0.930281] 8021q: 802.1Q VLAN Support v1.8
[    0.957050] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    0.983649] Freeing unused kernel memory: 1208K
**[    0.992776] This architecture does not have kernel memory protection.**
**[    2.592122] random: fast init done**
[    4.666456] init: Console is alive
**[    4.674035] init: - watchdog -**
[    8.725340] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[   10.096876] usbcore: registered new interface driver usbfs
[   10.108199] usbcore: registered new interface driver hub
[   10.119183] usbcore: registered new device driver usb
[   10.142671] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.170747] SCSI subsystem initialized
[   10.188965] ehci-platform: EHCI generic platform driver
[   10.210172] phy phy-usbphy.0: remote usb device wakeup disabled
[   10.222061] phy phy-usbphy.0: UTMI 16bit 30MHz
[   10.230956] ehci-platform 101c0000.ehci: EHCI Host Controller
[   10.242560] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[   10.258707] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[   10.292222] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[   10.307059] hub 1-0:1.0: USB hub found
[   10.315853] hub 1-0:1.0: 1 port detected
[   10.331409] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   10.346934] ohci-platform: OHCI generic platform driver
[   10.358041] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[   10.371796] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[   10.387889] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[   10.468174] hub 2-0:1.0: USB hub found
[   10.476892] hub 2-0:1.0: 1 port detected
[   10.501843] usbcore: registered new interface driver usb-storage
[   10.518378] usbcore: registered new interface driver uas
[   10.530828] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
**[   10.556431] init: - preinit -**
[   14.773288] rt3050-esw 10110000.esw: link changed 0x00
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
[   15.520710] random: procd: uninitialized urandom read (4 bytes read)
**[   16.380386] rt3050-esw 10110000.esw: link changed 0x10**
[   19.592431] mount_root: loading kmods from internal overlay
[   19.691409] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   19.709037] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   20.557489] jffs2: notice: (375) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 1 orphan) and 1 of xref (1 dead, 0 orphan) found.
[   20.589966] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   20.615758] block: extroot: not configured
[   20.811911] jffs2: notice: (373) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 1 orphan) and 1 of xref (1 dead, 0 orphan) found.
[   21.508280] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   21.530795] block: extroot: not configured
[   21.541484] mount_root: switching to jffs2 overlay
[   21.639352] overlayfs: upper fs does not support tmpfile.
[   21.660469] urandom-seed: Seeding with /etc/urandom.seed
[   22.750634] procd: - early -
[   22.758220] procd: - watchdog -
[   23.493827] procd: - watchdog -
[   23.500997] procd: - ubus -
[   24.967287] random: ubusd: uninitialized urandom read (4 bytes read)
[   25.520491] random: jshn: uninitialized urandom read (4 bytes read)
[   25.558048] random: ubusd: uninitialized urandom read (4 bytes read)
**[   25.577407] procd: - init -**
Please press Enter to activate this console.
[   31.826856] urngd: v1.0.0 started.
[   31.908761] kmodloader: loading kernel modules from /etc/modules.d/*
[   31.988098] NET: Registered protocol family 8
[   31.996930] NET: Registered protocol family 20
[   32.098874] l2tp_core: L2TP core driver, V2.0
[   32.124531] l2tp_netlink: L2TP netlink interface
[   32.145026] gre: GRE over IPv4 demultiplexor driver
[   32.175512] ip_gre: GRE over IPv4 tunneling driver
[   32.254426] PPP generic driver version 2.4.2
[   32.345537] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   32.503387] usbcore: registered new interface driver cdc_wdm
[   32.565260] Loading modules backported from Linux version v5.3-rc4-0-gd45331b00ddb
[   32.580519] Backport generated by backports.git v5.3-rc4-1-0-g4ec72687
[   32.675401] usbcore: registered new interface driver dmx_usb
[   32.686871] /home/gevagiorgio/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_rt305x/dmx_usb_module-0.1.20130818/dmx_usb.c: DMX USB Driver v0.1.20130818
[   32.869221] random: crng init done
[   32.876162] random: 6 urandom warning(s) missed due to ratelimiting
[   32.897949] ip_tables: (C) 2000-2006 Netfilter Core Team
[   32.968735] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   33.358093] PPP MPPE Compression module registered
[   33.370989] NET: Registered protocol family 24
[   33.383741] PPTP driver version 0.8.5
[   33.397338] usbcore: registered new interface driver ums-alauda
[   33.414390] usbcore: registered new interface driver ums-cypress
[   33.431625] usbcore: registered new interface driver ums-datafab
[   33.448603] usbcore: registered new interface driver ums-freecom
[   33.465880] usbcore: registered new interface driver ums-isd200
[   33.483240] usbcore: registered new interface driver ums-jumpshot
[   33.500406] usbcore: registered new interface driver ums-karma
[   33.518537] usbcore: registered new interface driver ums-sddr09
[   33.535810] usbcore: registered new interface driver ums-sddr55
[   33.553724] usbcore: registered new interface driver ums-usbat
[   33.577554] usbcore: registered new interface driver usbserial
[   33.589670] usbcore: registered new interface driver usbserial_generic
[   33.603141] usbserial: USB Serial support registered for generic
[   33.622039] usbcore: registered new interface driver visor
[   33.633456] usbserial: USB Serial support registered for Handspring Visor / Palm OS
[   33.649195] usbserial: USB Serial support registered for Sony Clie 5.0
[   33.662679] usbserial: USB Serial support registered for Sony Clie 3.5
[   33.685964] usbcore: registered new interface driver cdc_xr_usb_serial
[   33.699120] xr_usb_serial_common: Exar USB UART (serial port) driver
[   33.752188] xt_time: kernel timezone is -0000
[   33.765144] usbcore: registered new interface driver ark3116
[   33.776896] usbserial: USB Serial support registered for ark3116
[   33.794313] usbcore: registered new interface driver belkin_sa
[   33.806387] usbserial: USB Serial support registered for Belkin / Peracom / GoHubs USB Serial Adapter
[   33.881741] usbcore: registered new interface driver ch341
[   33.893196] usbserial: USB Serial support registered for ch341-uart
[   33.911245] usbcore: registered new interface driver cp210x
[   33.922799] usbserial: USB Serial support registered for cp210x
[   33.940979] usbcore: registered new interface driver cypress_m8
[   33.953265] usbserial: USB Serial support registered for DeLorme Earthmate USB
[   33.968110] usbserial: USB Serial support registered for HID->COM RS232 Adapter
[   33.983126] usbserial: USB Serial support registered for Nokia CA-42 V2 Adapter
[   34.006568] usbcore: registered new interface driver ftdi_sio
[   34.018514] usbserial: USB Serial support registered for FTDI USB Serial Device
[   34.040146] usbcore: registered new interface driver garmin_gps
[   34.052416] usbserial: USB Serial support registered for Garmin GPS usb/tty
[   34.073597] usbcore: registered new interface driver io_edgeport
[   34.086065] usbserial: USB Serial support registered for Edgeport 2 port adapter
[   34.101255] usbserial: USB Serial support registered for Edgeport 4 port adapter
[   34.116408] usbserial: USB Serial support registered for Edgeport 8 port adapter
[   34.131570] usbserial: USB Serial support registered for EPiC device
[   34.163130] usbcore: registered new interface driver keyspan
[   34.174935] usbserial: USB Serial support registered for Keyspan - (without firmware)
[   34.190994] usbserial: USB Serial support registered for Keyspan 1 port adapter
[   34.206009] usbserial: USB Serial support registered for Keyspan 2 port adapter
[   34.221037] usbserial: USB Serial support registered for Keyspan 4 port adapter
[   34.246213] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[   34.326866] usbcore: registered new interface driver mct_u232
[   34.338775] usbserial: USB Serial support registered for MCT U232
[   34.357352] usbcore: registered new interface driver mos7720
[   34.369089] usbserial: USB Serial support registered for Moschip 2 port adapter
[   34.390446] usbcore: registered new interface driver mos7840
[   34.402350] usbserial: USB Serial support registered for Moschip 7840/7820 USB Serial Driver
[   34.430796] usbcore: registered new interface driver oti6858
[   34.442565] usbserial: USB Serial support registered for oti6858
[   34.461075] usbcore: registered new interface driver pl2303
[   34.472688] usbserial: USB Serial support registered for pl2303
[   34.519679] usbcore: registered new interface driver sierra
[   34.531296] usbserial: USB Serial support registered for Sierra USB modem
[   34.552790] usbcore: registered new interface driver ti_usb_3410_5052
[   34.566099] usbserial: USB Serial support registered for TI USB 3410 1 port adapter
[   34.581862] usbserial: USB Serial support registered for TI USB 5052 2 port adapter
[   34.602788] usbcore: registered new interface driver usb_serial_simple
[   34.616251] usbserial: USB Serial support registered for carelink
[   34.628877] usbserial: USB Serial support registered for zio
[   34.640637] usbserial: USB Serial support registered for funsoft
[   34.653051] usbserial: USB Serial support registered for flashloader
[   34.666178] usbserial: USB Serial support registered for google
[   34.678417] usbserial: USB Serial support registered for libtransistor
[   34.691846] usbserial: USB Serial support registered for vivopay
[   34.704284] usbserial: USB Serial support registered for moto_modem
[   34.717208] usbserial: USB Serial support registered for motorola_tetra
[   34.730851] usbserial: USB Serial support registered for novatel_gps
[   34.744002] usbserial: USB Serial support registered for hp4x
[   34.755895] usbserial: USB Serial support registered for suunto
[   34.768169] usbserial: USB Serial support registered for siemens_mpi
[   34.802475] usbcore: registered new interface driver ipw
[   34.813602] usbserial: USB Serial support registered for IPWireless converter
[   34.835095] usbcore: registered new interface driver option
[   34.846670] usbserial: USB Serial support registered for GSM modem (1-port)
[   34.866396] usbcore: registered new interface driver qcserial
[   34.878327] usbserial: USB Serial support registered for Qualcomm USB modem
[   34.937438] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[   34.951998] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5350, rev 0500 detected
[   34.967556] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5350 detected
**[   35.022694] kmodloader: done loading kernel modules from /etc/modules.d/**
[   53.344587] rt3050-esw 10110000.esw: link changed 0x00
**[   54.950825] rt3050-esw 10110000.esw: link changed 0x10**
[   64.729815] IPv6: ADDRCONF(NETDEV_UP): erspan0: link is not ready
[   65.163174] br-lan: port 1(eth0) entered blocking state
[   65.173772] br-lan: port 1(eth0) entered disabled state
[   65.184982] device eth0 entered promiscuous mode
[   65.230355] br-lan: port 1(eth0) entered blocking state
[   65.240917] br-lan: port 1(eth0) entered forwarding state
[   65.394211] br-lan: port 2(eth0.1) entered blocking state
[   65.405163] br-lan: port 2(eth0.1) entered disabled state
[   65.416746] device eth0.1 entered promiscuous mode
[   65.427284] br-lan: port 2(eth0.1) entered blocking state
[   65.438201] br-lan: port 2(eth0.1) entered forwarding state
**[   65.648714] IPv6: ADDRCONF(NETDEV_UP): erspan0: link is not ready**
[   76.061693] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   76.112739] br-lan: port 3(wlan0) entered blocking state
[   76.123486] br-lan: port 3(wlan0) entered disabled state
[   76.134912] device wlan0 entered promiscuous mode
[   76.207551] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   76.220900] br-lan: port 3(wlan0) entered blocking state
[   76.231654] br-lan: port 3(wlan0) entered forwarding state

[/details]

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.