armbian-build/config/bootscripts/boot-onecloud.cmd
hzyitc a863b5a242
Onecloud: fix some bugs (#3873)
* Refactor patches

* Fix bug: the USB closed to the HDMI doesn't work

* Fix bug: cpufreq doesn't work

* Fix bug: thermal_zone doesn't work

* More frequency governors

* Add bootscript

* Fix bug: add missing dependency
needed for gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf
2022-06-11 18:03:03 +02:00

45 lines
1.5 KiB
Batchfile

# DO NOT EDIT THIS FILE
#
# Please edit /boot/armbianEnv.txt to set supported parameters
#
# We can't use `test -z` due to the bug: https://lists.denx.de/pipermail/u-boot/2005-August/011447.html
test -n "${bootdev}" && test -n "${rootdev}"
if test $? != 0; then
echo '=============================================================='
echo 'Please set "bootdev" and "rootdev" before calling this script.'
echo ''
echo 'Boot from usb:'
echo ' bootdev="usb 0"'
echo ' rootdev="/dev/sda2"'
echo ' usb start'
echo ' fatload ${bootdev} 0x20800000 boot.scr && autoscr 0x20800000'
echo ''
echo 'Boot from eMMC:'
echo ' bootdev="mmc 1"'
echo ' rootdev="/dev/mmcblk1p2"'
echo ' fatload ${bootdev} 0x20800000 boot.scr && autoscr 0x20800000'
echo '=============================================================='
exit 22
fi
echo "Try to boot from ${bootdev}"
fatload ${bootdev} 0x20800000 /armbianEnv.txt && env import -t 0x20800000 ${filesize}
test -n "${consoleargs}" || setenv consoleargs "console=ttyAML0,115200n8"
# Boot Arguments
setenv bootargs ""
setenv bootargs "${bootargs} root=${rootdev} rootwait rw"
setenv bootargs "${bootargs} ${consoleargs} no_console_suspend consoleblank=0"
# Booting
fatload ${bootdev} 0x20800000 /uImage || exit 1
fatload ${bootdev} 0x22000000 /uInitrd || exit 1
fatload ${bootdev} 0x21800000 /dtb/meson8b-onecloud.dtb || exit 1
bootm 0x20800000 0x22000000 0x21800000
# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr