Created
February 26, 2016 13:06
-
-
Save kadamski/b3d89fb587eb9da6f2af to your computer and use it in GitHub Desktop.
Script for booting OrangePI PC in FEL mode
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
g#!/bin/bash | |
UBOOTDIR=./u-boot/ | |
KERNELDIR=./linux-sunxi/ | |
INITRAMFS=~/Downloads/buildroot-2015.11.1/output/images/rootfs.cpio.uboot | |
KERNEL_ADDR=0x42000000 | |
RAMDISK_ADDR=0x43300000 | |
FDT_ADDR=0x43000000 | |
SCRIPT_ADDR=0x43100000 | |
cat << _END_ > bootcmd_fel.txt | |
setenv fdt_high ffffffff | |
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait | |
bootm $KERNEL_ADDR $RAMDISK_ADDR $FDT_ADDR | |
_END_ | |
mkimage -C none -A arm -T script -d bootcmd_fel.txt bootfel.scr | |
sunxi-tools/sunxi-fel uboot ${UBOOTDIR}/u-boot-sunxi-with-spl.bin \ | |
write ${KERNEL_ADDR} ${KERNELDIR}/arch/arm/boot/uImage \ | |
write ${FDT_ADDR} ${KERNELDIR}/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dtb \ | |
write ${SCRIPT_ADDR} ./bootfel.scr \ | |
write ${RAMDISK_ADDR} ${INITRAMFS} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good one, thank you!