# u-boot-update is a shell script which will source configuration files in this
# order (overwriting variables set by former scripts):
# 1. /etc/default/u-boot
# 2. /usr/share/u-boot-menu/conf.d/*.conf
# 3. /etc/u-boot-menu/conf.d/*.conf
#
# Thus, if you want to make changes to the Reform defaults found in
# /usr/share/u-boot-menu/conf.d/reform.conf you should put them into
# /etc/u-boot-menu/conf.d/reform.conf
#
# U_BOOT_ROOT and U_BOOT_PARAMETERS variables together form the "append" line
# in extlinux.conf like this:
#     append ${U_BOOT_ROOT} ${U_BOOT_PARAMETERS}"

# The U_BOOT_ROOT variable is meant to store the root=/dev/... parameter which
# is obtained as follows:
#  1. If both U_BOOT_PARAMETERS and U_BOOT_ROOT are empty, the root= parameter
#     is retrieved from /etc/kernel/cmdline.
#  2. If U_BOOT_ROOT is still empty, /etc/fstab is investigated for the "/"
#     entry.
#  3. If even that failed, the root= parameter is taken from /proc/cmdline
#
# Since we do not want to set the root= parameter (the initramfs takes care of
# figuring it out) but we also don't want this variable to have an effect, we
# set it to a single space which makes the variable not-empty, thus disabling
# above processing.
U_BOOT_ROOT=" "

# If not set, the U_BOOT_PARAMETERS variable by default gets set to "ro quiet".
#
# We rely on \${bootargs} (the backslash escapes the dollar sign with is a
# special shell character) to obtain the platform specific kernel parameters
# from u-boot.
#
# If you are not happy with the result, either append your custom options to
# the end of the U_BOOT_PARAMETERS string or take complete control over your
# cmdline by removing \${bootargs} from it so that you can ignore what u-boot
# tries to pass on.
#
# You can obtain the platform specific defaults by running this:
#
#     $ sh -c '. "/usr/share/reform-tools/machines/$(cat /proc/device-tree/model).conf"; echo $BOOTARGS'
#
U_BOOT_PARAMETERS="ro no_console_suspend cryptomgr.notests plymouth.ignore-serial-consoles pcie_aspm=off \${bootargs} console=tty1"

# The time to wait in the u-boot menu to give the user time to select the
# desired kernel to boot.
# The default of this value is 50 and the unit is deciseconds, which means a
# tenth of a second and thus a 5 second delay by default.
# We set this to the lowest value (0 would mean to wait forever) because most
# platforms for the Reform (all except imx8mq) do not support graphical u-boot.
# If you are running imx8mq and want to select the kernel manually during boot
# consider overriding this value in your /etc/default/u-boot
U_BOOT_TIMEOUT=1
