1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
svn-openwrt-archive/target/linux/imx6/image/bootscript-ventana
Luka Perkov 8d8ef5288c imx6: ventana: remove invalid video options from bootscript
Removed video related kernel params that are only appropriate for the
Freescale downstream vendor kernel and not appriate for mainline linux.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>

SVN-Revision: 47532
2015-11-20 05:21:19 +00:00

77 lines
2.3 KiB
Plaintext

echo "Gateworks Ventana OpenWrt Boot script v1.00"
# set some defaults
# set some defaults
test -n "$fs" || fs=ext2
test -n "$disk" || disk=0
setenv nextcon 0
setenv bootargs console=${console},${baudrate}
setenv loadaddr 10800000
setenv fdt_addr 18000000
# detect dtype and bootdev by looking for kernel on media the bootloader
# has mounted (in order of preference: usb/mmc/sata)
#
# This assumes the bootloader has already started the respective subsystem
# or mounted the filesystem if appropriate to get to this bootscript
#
# To Speed up boot set dtype manually
if test -n "$dtype" ; then
echo "Using dtype from env: $dtype"
else
echo "Detecting boot device (dtype)..."
if ${fs}load usb ${disk}:1 ${loadaddr} ${bootdir}/uImage ; then
dtype=usb
elif ${fs}load mmc ${disk}:1 ${loadaddr} ${bootdir}/uImage ; then
dtype=mmc
elif ${fs}load sata ${disk}:1 ${loadaddr} ${bootdir}/uImage ; then
dtype=sata
elif ubifsload ${loadaddr} ${bootdir}/uImage ; then
dtype=nand
fi
echo "detected dtype:$dtype"
fi
if test -n "$bootdev" ; then
echo "Using bootdev from env: $bootdev"
else
if itest.s "x${dtype}" == "xmmc" ; then
bootdev=mmcblk0
else
bootdev=sda
fi
fi
if itest.s "x${dtype}" == "xnand" ; then
echo "Booting from NAND..."
# fix partition name
# OpenWrt kernel bug prevents partition name of 'rootfs' from booting
# instead name the partition ubi which is what is looked for by
# procd sysupgrade
mtdparts del rootfs && mtdparts add nand0 - ubi
echo "mtdparts:${mtdparts}"
setenv fsload ubifsload
setenv root "ubi0:ubi ubi.mtd=2 rootfstype=squashfs,ubifs"
else
echo "Booting from block device ${bootdev}..."
setenv fsload "${fs}load ${dtype} ${disk}:1"
setenv root "root=/dev/${bootdev}"
fi
setenv bootargs "${bootargs}" "${root}" "${video}" "${extra}"
if ${fsload} ${loadaddr} ${bootdir}/uImage; then
if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then
echo Loaded DTB from ${bootdir}/${fdt_file}
bootm ${loadaddr} - ${fdt_addr}
elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then
echo Loaded DTB from ${bootdir}/${fdt_file1}
bootm ${loadaddr} - ${fdt_addr}
elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then
echo Loaded DTB from ${bootdir}/${fdt_file2}
bootm ${loadaddr} - ${fdt_addr}
else
echo "Error loading device-tree"
fi
else
echo "Error loading kernel image"
fi