mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
46 lines
2.0 KiB
Batchfile
46 lines
2.0 KiB
Batchfile
# DO NOT EDIT THIS FILE
|
|
#
|
|
# Please edit /boot/armbianEnv.txt to set supported parameters
|
|
#
|
|
|
|
setenv rootdev "LABEL=armbi_root"
|
|
setenv rootfstype "ext4"
|
|
|
|
# Default Console Device Setting
|
|
setenv console "both"
|
|
setenv verbosity "1"
|
|
|
|
# Enable/Disable USB autosuspend (seems broken on current (6.x) kernels)
|
|
# 0 = disabled
|
|
# 1 = enabled
|
|
setenv usb_autosuspend "0"
|
|
|
|
# Find the bootdev
|
|
# Same order is followed as in factory U-BOOT, when searching for this script,
|
|
# so same device should be found.
|
|
# We can't use `test -z` due to the bug: https://lists.denx.de/pipermail/u-boot/2005-August/011447.html
|
|
env set bootdev ""
|
|
if test -n "${bootdev}"; test $? != 0; then if fatload usb 0 11000000 s805_autoscript; then env set bootdev "usb 0"; fi; fi;
|
|
if test -n "${bootdev}"; test $? != 0; then if fatload usb 1 11000000 s805_autoscript; then env set bootdev "usb 1"; fi; fi;
|
|
if test -n "${bootdev}"; test $? != 0; then if fatload usb 2 11000000 s805_autoscript; then env set bootdev "usb 2"; fi; fi;
|
|
if test -n "${bootdev}"; test $? != 0; then if fatload usb 3 11000000 s805_autoscript; then env set bootdev "usb 3"; fi; fi;
|
|
if test -n "${bootdev}"; test $? != 0; then if fatload mmc 0 11000000 s805_autoscript; then env set bootdev "mmc 0"; fi; fi;
|
|
|
|
fatload ${bootdev} 0x20800000 /armbianEnv.txt && env import -t 0x20800000 ${filesize}
|
|
|
|
###########################################
|
|
if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi
|
|
if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyAML0,115200n8 ${consoleargs}"; fi
|
|
setenv consoleargs "${consoleargs} no_console_suspend consoleblank=0"
|
|
if test "${usb_autosuspend}" = "0"; then setenv extraargs "usbcore.autosuspend=-1"; fi
|
|
|
|
# Boot Arguments
|
|
setenv bootargs "root=${rootdev} rootwait rw ${consoleargs} rootfstype=${rootfstype} loglevel=${verbosity} ${extraargs}"
|
|
|
|
# Booting
|
|
fatload "${bootdev}" 0x20800000 /uImage
|
|
fatload "${bootdev}" 0x22000000 /uInitrd
|
|
fatload "${bootdev}" 0x21800000 "${dtb_file}"
|
|
|
|
bootm 0x20800000 0x22000000 0x21800000
|