mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
94 lines
2.5 KiB
Batchfile
94 lines
2.5 KiB
Batchfile
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
# Copyright (C) 2018
|
|
# Lukasz Majewski, DENX Software Engineering, lukma@denx.de
|
|
# This is an example file to generate boot.scr - a boot script for U-Boot
|
|
# Generate boot.scr:
|
|
# ./tools/mkimage -c none -A arm -T script -d tpcboot.cmd boot.scr
|
|
#
|
|
|
|
|
|
# Input envs (to be set in environment)
|
|
# Mandatory:
|
|
# kernel_file = "fitImage"
|
|
# boardname = "XXXX" // set automatically in u-boot
|
|
# boardsoc = "imx6q" // set automatically in u-boot
|
|
#
|
|
# Optional:
|
|
# bootcmd_force = "nfs" "tftp_kernel"
|
|
# If not set - eMMC/SD boot
|
|
|
|
# Generic setup
|
|
setenv mmcroot "/dev/mmcblk${devnum}p2 rootwait rw"
|
|
setenv displayargs ""
|
|
setenv mmcargs "setenv bootargs console=${console} ${smp} root=${mmcroot} \
|
|
${displayargs}"
|
|
setenv boot_fitImage "
|
|
setenv fdt_conf 'conf@${boardsoc}-${boardname}.dtb';
|
|
setenv itbcfg "\"#\${fdt_conf}\"";
|
|
print itbcfg;
|
|
bootm '${loadaddr}${itbcfg}';"
|
|
|
|
#------------------------------------------------------------
|
|
#
|
|
# Provide default 'bootcmd' command
|
|
#------------------------------------------------------------
|
|
setenv bootcmd "
|
|
if test -e ${devtype} ${devnum}:${distro_bootpart} ${kernel_file}; then
|
|
echo Found kernel image: ${kernel_file};
|
|
if load ${devtype} ${devnum}:${distro_bootpart} ${loadaddr} \
|
|
${kernel_file}; then
|
|
run mmcargs;
|
|
run boot_fitImage;
|
|
fi;
|
|
fi;"
|
|
|
|
#------------------------------------------------------------
|
|
#
|
|
# Provide 'boot_tftp_kernel' command
|
|
#------------------------------------------------------------
|
|
setenv download_kernel "tftpboot ${loadaddr} ${kernel_file}"
|
|
|
|
setenv boot_tftp_kernel "
|
|
if run download_kernel; then
|
|
run mmcargs;
|
|
run boot_fitImage;
|
|
fi"
|
|
|
|
#------------------------------------------------------------
|
|
#
|
|
# Provide 'boot_nfs' command
|
|
#------------------------------------------------------------
|
|
setenv rootpath "/srv/tftp/KP/rootfs"
|
|
setenv nfsargs "setenv bootargs root=/dev/nfs rw \
|
|
nfsroot=${serverip}:${rootpath},nolock,nfsvers=3"
|
|
setenv addip "setenv bootargs ${bootargs} \
|
|
ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:\
|
|
${hostname}:eth0:on"
|
|
|
|
setenv boot_nfs "
|
|
if run download_kernel; then
|
|
run nfsargs;
|
|
run addip;
|
|
setenv bootargs ${bootargs} console=${console};
|
|
|
|
run boot_fitImage;
|
|
fi"
|
|
|
|
#------------------------------------------------------------
|
|
#
|
|
# Set correct boot flow
|
|
#------------------------------------------------------------
|
|
|
|
setenv bcmd "
|
|
if test ! -n ${bootcmd_force}; then
|
|
run bootcmd;
|
|
fi;
|
|
if test ${bootcmd_force} = nfs; then
|
|
run boot_nfs;
|
|
else if test ${bootcmd_force} = tftp_kernel; then
|
|
run boot_tftp_kernel;
|
|
fi;
|
|
fi"
|
|
|
|
run bcmd
|