Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3189

modding another u-boot (no replies)

$
0
0
As I mentioned in another thread in the u-boot section, a few months ago i bought a nexx wt3020 minirouter device.

for those wondering, here is the openwrt page, it's white and cute, but it has CHINESE written all over it (literally) https://wiki.openwrt.org/toh/nexx/wt3020
I have the one with the USB port obviously.

The plan was to "marry" it (marry= connect it in a kinda permanent way) with a huawei 3372h usb 3g/4g dongle, since that dongle also features a microSD slot (and 2 external antenna ports) I could use to expand the firmware into.
Then hack together a battery pack for it with a couple 18650 li-ion cells I have laying around + voltage control circuit, and get a FOSS, pro-hacker version of the soap-like battery-powered 3g/4g devices you can get for 80 euros or so at the local carrier shop (or unbranded from ebay).

(a quick digression: I also cross-flashed the dongle back to "stickmode", the official name for "stay in plain USB modem mode", by default these devices seem to run some kind of weird router firmware with its own IP address, webinterface and all, the mode/firmware is called "HiLink")

At the moment everything works fine with stock bootloader (u-boot), OpenWrt inside and extroot into the external storage.

But I wanted a slightly less brainless bootloader that could allow me to boot an uimage + dtb from an ext4 partition on usb, just like we can do with Debian here.

This way I could devise some scripts to keep my little precious auto-updated from openwrt trunk's uImage and rootfs without the annoyance of dealing with read-only squashfs, kernels flashed raw to flash, and all that.

It isn't a kirkwood device, obviously (that's why I posted here), but its bootloader is u-boot and there are sources around.

I found sources of a working u-boot for my device here (last post, on second page talks about dtb and the modifications he did to the u-boot for that web-recovery feature) https://forum.openwrt.org/viewtopic.php?id=54717 (also on github) and found out it is basically based off mediatek sources and compliled with their SDK, so I uhm... fetched the latest mediatek SDK from uhm... shady chinese-only filesharing sites, now I have sources and toolchain to build it.
I was wondering if someone could give me some pointers.

From the sources it seems the current u-boot (in the /common folder of either full sources and custom u-boot sources) can already work with usb as it does have the usb code and also the code to do a fatload.

I was wondering what would happen if I just copy-pasted the ext4load code (and its dependencies), plus change the "boot" code to boot with dtb (by looking at other sources of a command that does) then I ricompile with the toolkit.

This SoC does not have the VERY VERY NICE feature of serial booting we have in kirkwood, or if it has none is talking about it. Will have to look at the docs of the .... um... SDK. At least they are in english.

I'm currently looking for a good spi flash programmer, possibly one that works on linux and with flashrom, so that I can test my bootloader and debrick this device when I test my new uboot.

So far I found only good ones that only work on Windows. this is the current best of the bunch (I'm avoiding chinese ones as I know the quality of their control software, that it likely won't run at all on anything newer than XP, and of the translations in the program interface) http://www.ebay.com/itm/291574131371?_trksid=p2060353.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Viewing all articles
Browse latest Browse all 3189

Trending Articles