mr fix it wrote:Hi All.
I have a few questions about building openwrt for the RM04 from the latest trunk.
Is there anything special to get the -factory image compiled?. I've tried a few times, with only ramdisk or ramdisk and squashfs checked but it doesn't produce any image with *factory* in the name. I do get an image with initramfs-Uimage in the name. Has this image been updated to use this name? (I tried to flash that through the web UI and it failed).
Also with flashing via webUI, does that update uboot?. Or is the only way with the uimage128.bin file?.
Does uboot output on the serial during startup?. At what settings?. I aim to have a device attached there so I guess im concerned if it outputs boot info and the device wigs out.
My aim for one of these would be to compile a C program that i could run using the serial port on the breakout board, so I can transmit it via a different protocol elsewhere. I'm tempted to use the RM04 as is, and accessing it from a different server to do the translation, but it would be another device in the chain, and seems less cool and hacky then running a small OS to do the job .
Right, so after examining the github repo with the initial supports patches, I've noticed trunk comments out the lines that builds the factory image. So I uncommented them and successfully built it Yay. Upload worked.
Unfortunately for me, these images don't seem to work in 16MB of ram?. At least the latest trunk.
Watching via serial it starts running out of memory and dying hard.
Ocassionally I can get a working console.
PID USER VSZ STAT COMMAND
1 root 1348 S /sbin/procd
2 root 0 SW [kthreadd]
3 root 0 SW [ksoftirqd/0]
5 root 0 SW< [kworker/0:0H]
6 root 0 SW [kworker/u2:0]
7 root 0 SW< [khelper]
8 root 0 SW [kworker/u2:1]
64 root 0 SW< [writeback]
66 root 0 SW< [bioset]
68 root 0 SW< [kblockd]
91 root 0 SW [kworker/0:1]
97 root 0 SW [kswapd0]
142 root 0 SW [fsnotify_mark]
169 root 0 SW [spi32766]
205 root 0 SW< [deferwq]
215 root 0 SW [khubd]
493 root 0 SW< [cfg80211]
494 root 0 SW [kworker/0:2]
1797 root 1476 S /bin/ash --login
1811 root 1476 R ps
meminfo gives
cat /proc/meminfo
MemTotal: 13332 kB
MemFree: 1220 kB
Buffers: 0 kB
Cached: 7024 kB
SwapCached: 0 kB
Active: 492 kB
Inactive: 8 kB
Active(anon): 492 kB
Inactive(anon): 8 kB
Active(file): 0 kB
Inactive(file): 0 kB
Unevictable: 7004 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 496 kB
Mapped: 684 kB
Shmem: 20 kB
Slab: 2212 kB
SReclaimable: 600 kB
SUnreclaim: 1612 kB
KernelStack: 184 kB
PageTables: 68 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 6664 kB
Committed_AS: 1400 kB
VmallocTotal: 1048372 kB
VmallocUsed: 336 kB
VmallocChunk: 1044560 kB
So fun times. I'm not great at reading memory stuff here, and i've noticed I can't actually persist any changes at all. (such as manually disabling some services and then rebooting). /overlay is always empty, and /rom contains a file called note, which I'm thinking is incorrect.
My assumption as this point is that its failing on initial boot, because of lack of ram. So then everything is now sitting on some ramdisk(?) which is ironic as I can't appear to umount the /tmp directory in an effort to reclaim room. Either that or the kernel requires 10mb?, though slab is roughly 2mb?
Icing on the cake is that I used the factory image because I didn't want to change uboot, so I'm not sure if I can tftp boot from that, and without ram I can't transfer a new image across. Insult to injury is open wrt locks down writing to mtd0. So I can't even write a version of uboot that will let me tftp!. Arg!