I am very new to this. I know enough to make a custom device image (and roughly enough to configure the thing through LuCi, though I feel that the tooltips and names could stand to be less cryptic; I'm probably doing something insecure), but I still have trouble figuring out low-level features like how the all the hardware gets set up or how the init scripts run, get registered, or are located.
What all that gibberish means is that I'd like a detailed and simple explanation/guide, if possible.
My router uses an 8-pin SPI NOR Flash chip, the MX 25L6406E. It is the HooToo TM-02, so far as the image creator and the hardware are concerned (the manufacturer and layout are different, but schematic and hardware are the same).
The CPU is a RT5350 with 32MB of RAM. I would like to be able to install a larger Flash chip and keep the WiFi working too. Apparently, there's a special partition/data block that needs to be located at the end of the chip.
Can you please tell me how to get the OS installed on the new chip and make sure all the offsets to the partitions are still correct? I have the following questions:
What type of flash chip is this (I think I recall hearing about some kind of 8/16 thing that can make your chips appear larger or smaller, and I'd prefer to avoid mismatching), and what one should I buy to get the most possible flash space?
How do I get the OS to know that it now has a larger chip than before and to thus use the new space (and where do I configure this -- I suspect both the Uboot and device tree would need updating, but I don't know where to find either)?
How do I actually get the data onto the chip? I hear that I can use JTAG (I care not for how long this would take, and getting a JTAG programmer would hopefully help me if I bugger something up too much), or I could probably get a programmer for flash chips. I regularly use Ubuntu 16.04 (at the moment, since it's the newest LTS) Desktop and would prefer a fully open-source software tool (no blobs if I can help it), so what tool should I get for best performance/versatility with that in mind?
How do I move the ART partition (the "Magic Make The WiFi Bits Work Partition") to the new location (I am rather bad with figuring out addresses, so tips would be great -- or perhaps some double-checking of my work), and how do I register it with the router so that it uses the ART from the new location?
According to this, it just automagically knows where the file is. Would that still apply here?
Please note: While I have read the linked article above, it does not assuage all of my concerns (not to mention this is a different manufacturer and router, so it may not apply to me) about how the system knows to use the full chip size and the new ART location, or how to actually get the data on the chip.
Edit: I have since found that the partition layout is actually shown at the old wiki here (https://wiki.openwrt.org/doc/techref/flash.layout#example_2hoo_too_ht-tm02) to have no ART partition. I guess this simplifies things? But what are the extra partitions for?
Does this use a different u-boot?