librerouterorg / u-boot Goto Github PK
View Code? Open in Web Editor NEWLibreRouter (QCA9558) bootloader U-Boot source code
License: Other
LibreRouter (QCA9558) bootloader U-Boot source code
License: Other
LibreRouter u-boot bootloader ----------------------------- This is the source code of the u-boot for the LibreRouter V1. The code is GPL based on a Qualcomm fork of a very old u-boot version (original README moved to UBOOT_README) The official binary release is buit using the 18.06 openwrt toolchain downloaded from https://archive.openwrt.org/releases/18.06.1/targets/ar71xx/generic/openwrt-sdk-18.06.1-ar71xx-generic_gcc-7.3.0_musl.Linux-x86_64.tar.xz Build instructions ------------------ Download and uncompress the openwrt toolchain $ wget https://archive.openwrt.org/releases/18.06.1/targets/ar71xx/generic/openwrt-sdk-18.06.1-ar71xx-generic_gcc-7.3.0_musl.Linux-x86_64.tar.xz $ tar xf openwrt-sdk-18.06.1-ar71xx-generic_gcc-7.3.0_musl.Linux-x86_64.tar.xz Run the build command passing the path to the toolchain's bin directory, for example: ./build.sh ~/Downloads/openwrt-sdk-18.06.1-ar71xx-generic_gcc-7.3.0_musl.Linux-x86_64/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl/bin/ Flashing instructions --------------------- Connect the LibreRouter to a PC using a serial adapter (TTL voltage) and ETH cable (default u-boot ip address is 192.168.1.1). Turn on the device and stop the bootloader sending any key through the serial interface. As you need a TFTP server you can use the script in `tools/tftp_server.sh`. To use it run `sudo ./tools/tftp_server.sh eth0 path/to/lr-u-boot-v1.1.0.bin` and replace eth0 with your network interface. At the serial interface execute: ath> tftp 82000000 lr-u-boot-v1.1.0.bin ath> erase 1:0-4 ath> cp.b 0x82000000 0x9f000000 0x30000 ath> reset To flash a firmware: run `sudo ./tools/tftp_server.sh eth0 path/to/openwrt-ar71xx-generic-librerouter-v1-squashfs-sysupgrade.bin` and at the serial interface execute: ath> tftp 82000000 openwrt-ar71xx-generic-librerouter-v1-squashfs-sysupgrade.bin ath> erase 0x9f050000 +$filesize ath> cp.b 0x82000000 0x9f050000 $filesize ath> boot
Very good !
Your version is very easy to compile.
But I want to compile a RAM version of u-boot. How to do it
Thank you.
To support power loss when updating the environment a redundant environment should be used.
u-boot has the config CFG_REDUNDAND_ENVIRONMENT for this:
- CFG_ENV_ADDR_REDUND
CFG_ENV_SIZE_REDUND
These settings describe a second storage area used to hold
a redundand copy of the environment data, so that there is
a valid backup copy in case there is a power failure during
a "saveenv" operation.
It must be tested and an upgrade path from the current layout provided (probably using the previous sector to the ART)
Provide a way to load a new firmware using a rescue script that is trigered when booting while pressing the button. Ideally it is an http server like in https://github.com/pepe2k/u-boot_mod but a simpler tftp command could be used.
Another idea is to enable netconsole when the btn is pressed.
To support dual-booting it is convenient to have the u-boot environment saved to the "env" partition from factory. One way is to start the serial console and type saveenv
but this is cumbersome and error prone. Another way is to do an automatic saveenv
if it is detected that it is not stored, like for example checking the CRC or if a variable is not there.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.