Initial commit
commit
39ad5ae78f
|
@ -0,0 +1,23 @@
|
|||
# Flash Tool for Aruba AP-105
|
||||
|
||||
Tool to exchange Aruba AP-105 boot loader with uboot for flashing OpenWRT.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
ap105-flash <SERIAL NUMBER>
|
||||
```
|
||||
|
||||
The flash will be secured into files:
|
||||
|
||||
- `AP105-<SERIAL NUMBER>-dump0.rom`
|
||||
- `AP105-<SERIAL NUMBER>-dump1.rom`
|
||||
|
||||
The `AP105-<SERIAL_NUMBER>-dump0.rom` will be patched with uboot binary `uboot.bin` and the file `AP105-<SERIAL NUMBER>-patch.rom` will be created.
|
||||
|
||||
After a confirmation the patched file will be flashed to the device.
|
||||
|
||||
## Sources
|
||||
|
||||
- [git repository for uboot loader @chunkey](https://github.com/chunkeey/u-boot-ap105/releases)
|
||||
- [OpenWRT device page](https://openwrt.org/toh/aruba/ap-105)
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
SN="$1"
|
||||
if [ -z "${SN}" ] ; then
|
||||
echo A non empty serial number is required as first argument
|
||||
fi
|
||||
|
||||
CHIP="MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F"
|
||||
DEV="linux_spi:dev=/dev/spidev0.0,spispeed=16500"
|
||||
|
||||
echo "Testing for a flash chip"
|
||||
flashrom -p ${DEV} -c ${CHIP}
|
||||
|
||||
echo "Dumping flash"
|
||||
|
||||
# Secure the flash twice
|
||||
flashrom -r AP105-${SN}-dump0.rom -p ${DEV} -c ${CHIP}
|
||||
flashrom -r AP105-${SN}-dump1.rom -p ${DEV} -c ${CHIP}
|
||||
|
||||
echo "Patching rom"
|
||||
cp AP105-${SN}-dump0.rom AP105-${SN}-patch.rom
|
||||
dd if=/dev/zero bs=256K count=1 |tr "\000" "\377" |dd of=AP105-${SN}-patch.rom conv=notrunc
|
||||
dd if=u-boot.bin of=AP105-${SN}-patch.rom conv=notrunc
|
||||
|
||||
|
||||
echo "Rom patched. Press enter to flash"
|
||||
read
|
||||
flashrom -w AP105-${SN}-patch.rom -p ${DEV} -c ${CHIP}
|
Binary file not shown.
Loading…
Reference in New Issue