commit 39ad5ae78f8cddef1221ab8b3ec9833867ee8775 Author: Alexander Böhm Date: Fri Jun 10 01:38:32 2022 +0200 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..e8d33d2 --- /dev/null +++ b/README.md @@ -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 +``` + +The flash will be secured into files: + +- `AP105--dump0.rom` +- `AP105--dump1.rom` + +The `AP105--dump0.rom` will be patched with uboot binary `uboot.bin` and the file `AP105--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) diff --git a/ap105-flash b/ap105-flash new file mode 100755 index 0000000..fe532bb --- /dev/null +++ b/ap105-flash @@ -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} diff --git a/u-boot.bin b/u-boot.bin new file mode 100755 index 0000000..11ef401 Binary files /dev/null and b/u-boot.bin differ