-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathREADME
More file actions
45 lines (32 loc) · 1.92 KB
/
Copy pathREADME
File metadata and controls
45 lines (32 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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