-
-
Notifications
You must be signed in to change notification settings - Fork 33
Amlogic notes
c0rnelius edited this page Jan 24, 2024
·
17 revisions
make usbboot board=$board
Flash the img created to an SDCARD, insert both the USB drive and SDCARD into the unit and power on.
On the Odroid N2 you can also remove petitboot and replace it with u-boot. Although I have had success
doing it this way, I have also had fails.
Recovery; https://wiki.odroid.com/odroid-n2/os_images/petitboot
- Remove Petitboot
NOTE: Detach eMMC module and boot from SDCARD. This will not work correctly if the module is still
attached to the unit.
Add overlay to /boot/extlinux/extlinux.conf
fdtoverlays ../amlogic/overlays/meson-g12b-odroid-n2-spi.dtbo
Load the PMENU:
Petitboot: select exit to shell and erase /dev/mtd{0,1,2,3}
flash_eraseall /dev/mtd0
flash_eraseall /dev/mtd1
flash_eraseall /dev/mtd2
flash_eraseall /dev/mtd3
reboot
Check /dev/mtdblock0
odroid: ~ $ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mtdblock0 31:0 0 8M 0 disk
Flash u-boot to /dev/mtdblock0
sudo dd if=/lib/u-boot/u-boot.bin of=/dev/mtdblock0
Remove overlay from /boot/extlinux/extlinux.conf
#fdtoverlays ../amlogic/overlays/meson-g12b-odroid-n2-spi.dtbo
Reboot the unit ...
Boot order: usb sd emmc
- Update SPI
Depends: sudo apt install -y mtd-utils
Add overlay to /boot/extlinux/extlinux.conf
fdtoverlays ../amlogic/overlays/meson-g12b-odroid-n2-spi.dtbo
Reboot the unit ...
odroid: ~ $ ls /dev/mtd*
/dev/mtd0 /dev/mtd0ro /dev/mtdblock0
sudo flash_eraseall /dev/mtd0
Result:
Erasing 8192 Kibyte @ 0 -- 100 % complete
sudo dd if=/lib/u-boot/u-boot.bin of=/dev/mtdblock0
Result:
2252+1 records in
2252+1 records out
1153392 bytes (1.2 MB, 1.1 MiB) copied, 16.2089 s, 71.2 kB/s
Remove overlay from /boot/extlinux/extlinux.conf
#fdtoverlays ../amlogic/overlays/meson-g12b-odroid-n2-spi.dtbo
Reboot the unit ... done.
You may need to erase Android from; or flash mainline u-boot to; the eMMC before booting from SD.
I found using fastboot to be the quickest and easiest method when using Linux.
Put the device in maskrom mode and run lsusb
to verify.
Bus 001 Device 048: ID 1b8e:c003 Amlogic, Inc. GX-CHIP
Run the following to flash mainline u-boot. When done. power down board, insert SD and power on.
sudo apt update; sudo apt install -y python3-pip fastboot
sudo pip3 install pyamlboot --upgrade
wget -cq https://github.com/pyavitz/debian-image-builder/raw/feature/files/boot/uboot/radxazero/fastboot-loader.bin
wget -cq https://github.com/pyavitz/debian-image-builder/raw/feature/files/boot/uboot/radxazero/u-boot.bin
sudo boot-g12.py fastboot-loader.bin
sudo fastboot flash 0x200 u-boot.bin
sudo fastboot reboot
- LED Overlay Support (rev 1.5 is gpio 10)
fdtoverlays ../amlogic/overlays/meson-g12a-radxa-zero-gpio-8-led.dtbo
fdtoverlays ../amlogic/overlays/meson-g12a-radxa-zero-gpio-10-led.dtbo