TRS-80 Posted November 16, 2020 Share Posted November 16, 2020 I am trying to convert my recent experience into something more generalized, in order to improve documentation. I already split off into a new page of docs Recovery, now I would like to add a new section to that page about manually replacing u-boot. In my case, sunxi was pretty easy, but trying to generalize this it gets more complex. I am not too familiar, so I researched for a while today and I think I have some idea, but before I start writing I want to make sure I am recommending the right approach. Basically I think I will recommend in 2 parts: 1. Explain how to extract u-boot from deb package after downloading from e.g. https://apt.armbian.com/pool/main/l/linux-u-boot-BOARD-RELEASE. 2. Search in https://github.com/armbian/build/tree/master/config/sources/families for `write_uboot_platform` function, out of which you will get parameters for dd like where to flash to (seek=), etc. Problem with #2 as I see it, some of them are slightly more complex like ODROID-XU4 for instance: dd if=$1/bl1.bin.hardkernel of=$device seek=$signed_bl1_position conv=fsync > /dev/null 2>&1 dd if=$1/bl2.bin.hardkernel.720k_uboot of=$device seek=$bl2_position conv=fsync > /dev/null 2>&1 dd if=$1/u-boot-dtb.bin of=$device bs=512 seek=$uboot_position conv=fsync > /dev/null 2>&1 dd if=$1/tzsw.bin.hardkernel of=$device seek=$tzsw_position conv=fsync > /dev/null 2>&1 dd if=/dev/zero of=$device seek=$env_position bs=512 count=32 conv=fsync > /dev/null 2>&1 Also some are inside include directory there. I am trying to keep this as general and simple as possible (for wide audience), so I started to wonder if this is the right approach. I start to wonder, instead of docs, if I should write some script that figure out all parameters and do it automatically. But maybe it exists already? Somehow adapt some existing script, but instead of working from a running system, to run from a recovery context? Now I am not sure what is the best approach. Any feedback would be appreciated. I am willing to do the leg work, just need a bit of guidance. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.