Commit b3c25086 authored by Vagrant Cascadian's avatar Vagrant Cascadian

Add a machine db entry and boot script for Odroid-U3.

parent 1733a110
# Set some compatibility variables for distro_bootcmd emulation using
# the default values from u-boot 2016.05 for the odroid target.
if test -z "${devtype}"; then
setenv devtype mmc
fi
if test -z "${devnum}" ; then
setenv devnum ${mmcbootdev}
fi
if test -z "${distro_bootpart}" ; then
setenv distro_bootpart ${mmcbootpart}
fi
if test -z "${kernel_addr_r}" ; then
setenv kernel_addr_r 0x40007fc0
fi
if test -z "${fdt_addr_r}" ; then
setenv fdt_addr_r ${fdtaddr}
fi
if test -z "${ramdisk_addr_r}" ; then
setenv ramdisk_addr_r ${initrdaddr}
fi
# Bootscript using the new unified bootcmd handling
# introduced with u-boot v2014.10, and patched into
# the debian odroid target since 2016.03+dfsg1-5.
#
# Expects to be called with the following environment variables set:
#
# devtype e.g. mmc/scsi etc
# devnum The device number of the given type
# bootpart The partition containing the boot files
# distro_bootpart The partition containing the boot files
# (introduced in u-boot mainline 2016.01)
# prefix Prefix within the boot partiion to the boot files
# kernel_addr_r Address to load the kernel to
# fdt_addr_r Address to load the FDT to
# ramdisk_addr_r Address to load the initrd to.
#
# The uboot must support the bootz and generic filesystem load commands.
# Workaround lack of baudrate included with console on various iMX
# systems (e.g. wandboard, cubox-i, hummingboard)
if test "${console}" = "ttymxc0" && test -n "${baudrate}"; then
setenv console "${console},${baudrate}"
fi
if test -n "${console}"; then
setenv bootargs "${bootargs} console=${console}"
fi
setenv bootargs @@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@
@@UBOOT_ENV_EXTRA@@
if test -z "${fk_kvers}"; then
setenv fk_kvers '@@KERNEL_VERSION@@'
fi
# These two blocks should be the same apart from the use of
# ${fk_kvers} in the first, the syntax supported by u-boot does not
# lend itself to removing this duplication.
if test -n "${fdtfile}"; then
setenv fdtpath dtbs/${fk_kvers}/${fdtfile}
else
setenv fdtpath dtb-${fk_kvers}
fi
if test -z "${distro_bootpart}"; then
setenv partition ${bootpart}
else
setenv partition ${distro_bootpart}
fi
load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${prefix}vmlinuz-${fk_kvers} \
&& load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}${fdtpath} \
&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img-${fk_kvers} \
&& echo "Booting Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}..." \
&& bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${prefix}vmlinuz \
&& load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}dtb \
&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img \
&& echo "Booting Debian from ${devtype} ${devnum}:${partition}..." \
&& bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
......@@ -398,6 +398,13 @@ DTB-Id: sun4i-a10-marsboard.dtb
U-Boot-Script-Name: bootscr.sunxi
Required-Packages: u-boot-tools
Machine: Hardkernel ODROID-U3 board based on Exynos4412
Kernel-Flavors: armmp armmp-lpae
DTB-Id: exynos4412-odroidu3.dtb
Boot-Script-Path: /boot/boot.scr
U-Boot-Script-Name: bootscr.odroid
Required-Packages: u-boot-tools
Machine: Hardkernel Odroid XU4
Kernel-Flavors: armmp armmp-lpae
DTB-Id: exynos5422-odroidxu4.dtb
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment