Created
February 6, 2025 17:30
-
-
Save rhjdvsgsgks/0acefddfebd011ca5d99f1032749b24d to your computer and use it in GitHub Desktop.
install openwrt to nand on bpi r3. without having access to uboot by serial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bpi r3 openwrt install to nand | |
# boot from sd, switch 1111 | |
# dev: size erasesize name | |
# mtd0: 07e00000 00020000 "ubi" | |
# mtd1: 00200000 00020000 "bl2" | |
insmod mtd-rw i_want_a_brick=1 | |
wget https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r3-snand-preloader.bin | |
mtd erase bl2 | |
mtd write openwrt-mediatek-filogic-bananapi_bpi-r3-snand-preloader.bin bl2 | |
ubidetach -d 0 | |
mtd erase ubi | |
ubiformat /dev/mtd0 | |
ubiattach -m 0 | |
ubimkvol /dev/ubi0 -N fip -s 0x200000 -t static | |
wget https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r3-snand-bl31-uboot.fip | |
ubiupdatevol /dev/ubi0_0 openwrt-mediatek-filogic-bananapi_bpi-r3-snand-bl31-uboot.fip | |
wget https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb | |
ubimkvol /dev/ubi0 -N recovery -s $(du -b openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb|awk '{print $1}') | |
ubiupdatevol /dev/ubi0_1 openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb | |
wget https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r3-squashfs-sysupgrade.itb | |
ubimkvol /dev/ubi0 -N fit -s $(du -b openwrt-mediatek-filogic-bananapi_bpi-r3-squashfs-sysupgrade.itb|awk '{print $1}') | |
ubiupdatevol /dev/ubi0_2 openwrt-mediatek-filogic-bananapi_bpi-r3-squashfs-sysupgrade.itb | |
# Volume ID: 0 (on ubi0) | |
# Type: static | |
# Alignment: 1 | |
# Size: 17 LEBs (2158592 bytes, 2.0 MiB) | |
# Data bytes: 1109993 bytes (1.0 MiB) | |
# State: OK | |
# Name: fip | |
# Character device major/minor: 250:1 | |
# ----------------------------------- | |
# Volume ID: 1 (on ubi0) | |
# Type: dynamic | |
# Alignment: 1 | |
# Size: 74 LEBs (9396224 bytes, 8.9 MiB) | |
# State: OK | |
# Name: recovery | |
# Character device major/minor: 250:2 | |
# ----------------------------------- | |
# Volume ID: 2 (on ubi0) | |
# Type: dynamic | |
# Alignment: 1 | |
# Size: 93 LEBs (11808768 bytes, 11.2 MiB) | |
# State: OK | |
# Name: fit | |
# Character device major/minor: 250:3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment