summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/uboot-grub/PKGBUILD73
-rw-r--r--libre/uboot-grub/config.am335x_evm443
-rw-r--r--libre/uboot-grub/uEnv-am335x_evm.txt1
-rw-r--r--libre/uboot-grub/uboot-am335x_evm_boot-on-grub.patch99
-rw-r--r--libre/uboot-grub/uboot-grub-am335x_evm.install3
-rwxr-xr-xlibre/uboot-grub/uboot-grub-install-am335x_evm.sh44
6 files changed, 663 insertions, 0 deletions
diff --git a/libre/uboot-grub/PKGBUILD b/libre/uboot-grub/PKGBUILD
new file mode 100644
index 000000000..8eb8dffbe
--- /dev/null
+++ b/libre/uboot-grub/PKGBUILD
@@ -0,0 +1,73 @@
+# Maintainer: Márcio Silva <coadde@parabola.nu>
+
+_pkgbase=u-boot
+pkgbase=uboot-grub
+pkgname=('uboot-grub-am335x_evm')
+pkgver=2015.07
+pkgrel=1
+url='http://www.denx.de/wiki/U-Boot/'
+license=('GPL2')
+makedepends=('bc')
+source=("ftp://ftp.denx.de/pub/${_pkgbase}/${_pkgbase}-${pkgver}.tar.bz2"
+ 'uboot-am335x_evm_boot-on-grub.patch'
+ 'config.am335x_evm'
+ 'uEnv-am335x_evm.txt'
+ "${pkgbase}-install-am335x_evm.sh")
+sha512sums=('40878f28c19f077bc83b82687c9f656c64ef2bdbbc3b4caf3f7ec657a7200ce212713cd5adbc0cb23379950fe804767d1efb9108cc8c33b66faa7c7d3a831ffe'
+ 'c292fa1c90c33d4291e5d24d3ff4834949fc14f9835fe71b6a3de29005438910b3ed6ade081e8c78617302b3912edcaf9b7806596506fa1fdc3154d929d9a055'
+ 'ade631646eb5de3a7f0cbd4577cfbf50979d242bce6f1a00e31ab49c15fd44295c61bd4f12a66e521a0c04b394e7a9172a70241281f119cfd3d56394d514e531'
+ 'd8287e898bdcb1a542693c2bf94eead62a640d845145527005ce37e1bbba1e73552ef2728271b7486c7fb059239de7f18fe254af30b03b4293a5993ce1e8b351'
+ '3ed1c1f4e8ad2ffc3ba74b139900ed113e4e6b574fbeb8e7d39ad18393bb941561042df3d778cc7497385ce18df645da4768542db2343a9c6b2d2765a3b815f3')
+
+_prepare_uboot-grub-am335x_evm() {
+ msg 'Copy the U-Boot building source for am335x_evm to run GRUB'
+ cp -r "${srcdir}/${_pkgbase}-${pkgver}/" "${srcdir}/${pkgbase}-am335x_evm-${pkgver}/"
+ cd "${srcdir}/${pkgbase}-am335x_evm-${pkgver}/"
+
+ # patch to boot on grub
+ patch -p1 -i "${srcdir}/uboot-am335x_evm_boot-on-grub.patch"
+
+ cat "${srcdir}/config.am335x_evm" > '.config'
+
+ unset CFLAGS CXXFLAGS LDFLAGS
+
+ msg 'get U-Boot version'
+ make prepare
+
+ msg 'Rewrite configuration'
+ yes '' | make config >/dev/null
+}
+
+prepare() {
+ if [[ "${CARCH}" == "armv7h" ]]; then
+ msg "Prepare U-Boot for am335x_evm to run GRUB"
+ _prepare_uboot-grub-am335x_evm
+ fi
+}
+
+_build_uboot-grub-am335x_evm() {
+ cd "${srcdir}/${pkgbase}-am335x_evm-${pkgver}/"
+
+ unset CFLAGS CXXFLAGS LDFLAGS
+
+ make LOCALVERSION=
+}
+
+build() {
+ if [ "${CARCH}" = 'armv7h' ]; then
+ msg 'Build U-Boot for am335x_evm to run GRUB'
+ _build_uboot-grub-am335x_evm
+ fi
+}
+
+package_uboot-grub-am335x_evm() {
+ install="${pkgname}.install"
+ cd "${srcdir}/${pkgname}-${pkgver}/"
+
+ msg 'Package U-Boot for am335x_evm to run GRUB'
+ install -vDm 0644 'MLO' "${pkgdir}/boot/${pkgname}"
+ install -vDm 0644 'u-boot.img' "${pkgdir}/boot/${pkgname}"
+ install -vDm 0644 "${srcdir}/uEnv-am335x_evm.txt" "${pkgdir}/boot/${pkgname}/uEnv.txt"
+ install -vDm 0644 "${srcdir}/${pkgbase}-install-am335x_evm.sh" "${pkgdir}/boot/${pkgname}/uboot-install.sh"
+ install -vDm 0644 'Licenses/README' "${pkgdir}/usr/share/licenses/${pkgname}"
+}
diff --git a/libre/uboot-grub/config.am335x_evm b/libre/uboot-grub/config.am335x_evm
new file mode 100644
index 000000000..64598a39f
--- /dev/null
+++ b/libre/uboot-grub/config.am335x_evm
@@ -0,0 +1,443 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# U-Boot 2015.07 Configuration
+#
+CONFIG_HAVE_GENERIC_BOARD=y
+# CONFIG_ARC is not set
+CONFIG_ARM=y
+# CONFIG_AVR32 is not set
+# CONFIG_BLACKFIN is not set
+# CONFIG_M68K is not set
+# CONFIG_MICROBLAZE is not set
+# CONFIG_MIPS is not set
+# CONFIG_NDS32 is not set
+# CONFIG_NIOS2 is not set
+# CONFIG_OPENRISC is not set
+# CONFIG_PPC is not set
+# CONFIG_SANDBOX is not set
+# CONFIG_SH is not set
+# CONFIG_SPARC is not set
+# CONFIG_X86 is not set
+CONFIG_SYS_ARCH="arm"
+CONFIG_SYS_CPU="armv7"
+CONFIG_SYS_SOC="am33xx"
+CONFIG_SYS_VENDOR="ti"
+CONFIG_SYS_BOARD="am335x"
+CONFIG_SYS_CONFIG_NAME="am335x_evm"
+
+#
+# ARM architecture
+#
+CONFIG_HAS_VBAR=y
+CONFIG_CPU_V7=y
+# CONFIG_SEMIHOSTING is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_TARGET_EDB93XX is not set
+# CONFIG_TARGET_SCB9328 is not set
+# CONFIG_TARGET_VCMA9 is not set
+# CONFIG_TARGET_SMDK2410 is not set
+# CONFIG_TARGET_ASPENITE is not set
+# CONFIG_TARGET_GPLUGD is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_KIRKWOOD is not set
+# CONFIG_TARGET_DB_88F6820_GP is not set
+# CONFIG_TARGET_DB_MV784MP_GP is not set
+# CONFIG_TARGET_MAXBCM is not set
+# CONFIG_TARGET_DEVKIT3250 is not set
+# CONFIG_TARGET_WORK_92105 is not set
+# CONFIG_TARGET_MX25PDK is not set
+# CONFIG_TARGET_TX25 is not set
+# CONFIG_TARGET_ZMX25 is not set
+# CONFIG_TARGET_APF27 is not set
+# CONFIG_TARGET_IMX27LITE is not set
+# CONFIG_TARGET_MAGNESIUM is not set
+# CONFIG_TARGET_APX4DEVKIT is not set
+# CONFIG_TARGET_XFI3 is not set
+# CONFIG_TARGET_M28EVK is not set
+# CONFIG_TARGET_MX23EVK is not set
+# CONFIG_TARGET_MX28EVK is not set
+# CONFIG_TARGET_MX23_OLINUXINO is not set
+# CONFIG_TARGET_BG0900 is not set
+# CONFIG_TARGET_SANSA_FUZE_PLUS is not set
+# CONFIG_TARGET_SC_SPS_1 is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ORION5X is not set
+# CONFIG_TARGET_SPEAR300 is not set
+# CONFIG_TARGET_SPEAR310 is not set
+# CONFIG_TARGET_SPEAR320 is not set
+# CONFIG_TARGET_SPEAR600 is not set
+# CONFIG_TARGET_STV0991 is not set
+# CONFIG_TARGET_X600 is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_TARGET_IMX31_PHYCORE is not set
+# CONFIG_TARGET_QONG is not set
+# CONFIG_TARGET_MX31ADS is not set
+# CONFIG_TARGET_MX31PDK is not set
+# CONFIG_TARGET_TT01 is not set
+# CONFIG_TARGET_IMX31_LITEKIT is not set
+# CONFIG_TARGET_WOODBURN is not set
+# CONFIG_TARGET_WOODBURN_SD is not set
+# CONFIG_TARGET_FLEA3 is not set
+# CONFIG_TARGET_MX35PDK is not set
+# CONFIG_ARCH_BCM283X is not set
+# CONFIG_TARGET_VEXPRESS_CA15_TC2 is not set
+# CONFIG_TARGET_VEXPRESS_CA5X2 is not set
+# CONFIG_TARGET_VEXPRESS_CA9X4 is not set
+# CONFIG_TARGET_KWB is not set
+# CONFIG_TARGET_TSERIES is not set
+# CONFIG_TARGET_CM_T335 is not set
+# CONFIG_TARGET_PEPPER is not set
+# CONFIG_TARGET_AM335X_IGEP0033 is not set
+# CONFIG_TARGET_PCM051 is not set
+# CONFIG_TARGET_DRACO is not set
+# CONFIG_TARGET_THUBAN is not set
+# CONFIG_TARGET_RASTABAN is not set
+# CONFIG_TARGET_PXM2 is not set
+# CONFIG_TARGET_RUT is not set
+# CONFIG_TARGET_PENGWYN is not set
+# CONFIG_TARGET_AM335X_BALTOS is not set
+CONFIG_TARGET_AM335X_EVM=y
+# CONFIG_TARGET_AM43XX_EVM is not set
+# CONFIG_TARGET_BAV335X is not set
+# CONFIG_TARGET_TI814X_EVM is not set
+# CONFIG_TARGET_TI816X_EVM is not set
+# CONFIG_TARGET_BCM28155_AP is not set
+# CONFIG_TARGET_BCMCYGNUS is not set
+# CONFIG_TARGET_BCMNSP is not set
+# CONFIG_ARCH_EXYNOS is not set
+# CONFIG_ARCH_S5PC1XX is not set
+# CONFIG_ARCH_HIGHBANK is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_KEYSTONE is not set
+# CONFIG_ARCH_MX6 is not set
+# CONFIG_ARCH_MX5 is not set
+# CONFIG_TARGET_M53EVK is not set
+# CONFIG_TARGET_IMA3_MX53 is not set
+# CONFIG_TARGET_MX51EVK is not set
+# CONFIG_TARGET_MX53ARD is not set
+# CONFIG_TARGET_MX53EVK is not set
+# CONFIG_TARGET_MX53LOCO is not set
+# CONFIG_TARGET_MX53SMD is not set
+# CONFIG_TARGET_MX51_EFIKAMX is not set
+# CONFIG_TARGET_VISION2 is not set
+# CONFIG_TARGET_UDOO is not set
+# CONFIG_TARGET_WANDBOARD is not set
+# CONFIG_TARGET_WARP is not set
+# CONFIG_TARGET_TITANIUM is not set
+# CONFIG_TARGET_NITROGEN6X is not set
+# CONFIG_TARGET_CGTQMX6EVAL is not set
+# CONFIG_TARGET_EMBESTMX6BOARDS is not set
+# CONFIG_TARGET_ARISTAINETOS is not set
+# CONFIG_TARGET_ARISTAINETOS2 is not set
+# CONFIG_TARGET_MX6QARM2 is not set
+# CONFIG_TARGET_MX6QSABREAUTO is not set
+# CONFIG_TARGET_MX6SABRESD is not set
+# CONFIG_TARGET_MX6CUBOXI is not set
+# CONFIG_TARGET_MX6SLEVK is not set
+# CONFIG_TARGET_MX6SXSABRESD is not set
+# CONFIG_TARGET_GW_VENTANA is not set
+# CONFIG_TARGET_KOSAGI_NOVENA is not set
+# CONFIG_TARGET_TBS2910 is not set
+# CONFIG_TARGET_OT1200 is not set
+# CONFIG_TARGET_PLATINUM_PICON is not set
+# CONFIG_TARGET_PLATINUM_TITANIUM is not set
+# CONFIG_OMAP34XX is not set
+# CONFIG_OMAP44XX is not set
+# CONFIG_OMAP54XX is not set
+# CONFIG_RMOBILE is not set
+# CONFIG_TARGET_CM_FX6 is not set
+# CONFIG_ARCH_SOCFPGA is not set
+# CONFIG_ARCH_SUNXI is not set
+# CONFIG_TARGET_SNOWBALL is not set
+# CONFIG_TARGET_U8500_HREF is not set
+# CONFIG_TARGET_VF610TWR is not set
+# CONFIG_TARGET_COLIBRI_VF is not set
+# CONFIG_ARCH_ZYNQ is not set
+# CONFIG_TARGET_XILINX_ZYNQMP is not set
+# CONFIG_TEGRA is not set
+# CONFIG_TARGET_VEXPRESS64_AEMV8A is not set
+# CONFIG_TARGET_VEXPRESS64_BASE_FVP is not set
+# CONFIG_TARGET_VEXPRESS64_JUNO is not set
+# CONFIG_TARGET_LS2085A_EMU is not set
+# CONFIG_TARGET_LS2085A_SIMU is not set
+# CONFIG_TARGET_LS2085AQDS is not set
+# CONFIG_TARGET_LS2085ARDB is not set
+# CONFIG_TARGET_LS1021AQDS is not set
+# CONFIG_TARGET_LS1021ATWR is not set
+# CONFIG_TARGET_BALLOON3 is not set
+# CONFIG_TARGET_H2200 is not set
+# CONFIG_TARGET_PALMLD is not set
+# CONFIG_TARGET_PALMTC is not set
+# CONFIG_TARGET_PALMTREO680 is not set
+# CONFIG_TARGET_PXA255_IDP is not set
+# CONFIG_TARGET_TRIZEPSIV is not set
+# CONFIG_TARGET_VPAC270 is not set
+# CONFIG_TARGET_XAENIAX is not set
+# CONFIG_TARGET_ZIPITZ2 is not set
+# CONFIG_TARGET_LP8X4X is not set
+# CONFIG_TARGET_COLIBRI_PXA270 is not set
+# CONFIG_TARGET_JORNADA is not set
+# CONFIG_ARCH_UNIPHIER is not set
+# CONFIG_TARGET_STM32F429_DISCOVERY is not set
+CONFIG_SYS_MALLOC_F_LEN=0x400
+CONFIG_CONS_INDEX=1
+# CONFIG_NOR is not set
+
+#
+# ARM debug
+#
+# CONFIG_DEBUG_LL is not set
+CONFIG_DEFAULT_DEVICE_TREE=""
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_EXPERT=y
+CONFIG_SYS_MALLOC_CLEAR_ON_INIT=y
+
+#
+# Boot images
+#
+CONFIG_SUPPORT_SPL=y
+CONFIG_SPL=y
+CONFIG_SPL_STACK_R=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
+# CONFIG_FIT is not set
+CONFIG_SYS_EXTRA_OPTIONS="NAND"
+
+#
+# Command line interface
+#
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_HUSH_PARSER=y
+
+#
+# Autoboot options
+#
+# CONFIG_AUTOBOOT_KEYED is not set
+
+#
+# Commands
+#
+
+#
+# Info commands
+#
+CONFIG_CMD_BDI=y
+CONFIG_CMD_CONSOLE=y
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
+
+#
+# Boot commands
+#
+CONFIG_CMD_BOOTD=y
+CONFIG_CMD_BOOTM=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_RUN=y
+CONFIG_CMD_IMI=y
+CONFIG_CMD_IMLS=y
+CONFIG_CMD_XIMG=y
+
+#
+# Environment commands
+#
+CONFIG_CMD_EXPORTENV=y
+CONFIG_CMD_IMPORTENV=y
+CONFIG_CMD_EDITENV=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_ENV_EXISTS=y
+
+#
+# Memory commands
+#
+CONFIG_CMD_MEMORY=y
+CONFIG_CMD_CRC32=y
+# CONFIG_LOOPW is not set
+CONFIG_CMD_MEMTEST=y
+# CONFIG_CMD_MX_CYCLIC is not set
+CONFIG_CMD_MEMINFO=y
+
+#
+# Device access commands
+#
+CONFIG_CMD_DM=y
+# CONFIG_CMD_DEMO is not set
+CONFIG_CMD_LOADB=y
+CONFIG_CMD_LOADS=y
+CONFIG_CMD_FLASH=y
+CONFIG_CMD_NAND=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_FPGA=y
+
+#
+# Shell scripting commands
+#
+CONFIG_CMD_ECHO=y
+CONFIG_CMD_ITEST=y
+CONFIG_CMD_SOURCE=y
+CONFIG_CMD_SETEXPR=y
+
+#
+# Network commands
+#
+CONFIG_CMD_NET=y
+# CONFIG_CMD_TFTPPUT is not set
+# CONFIG_CMD_TFTPSRV is not set
+# CONFIG_CMD_RARP is not set
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_NFS=y
+CONFIG_CMD_PING=y
+# CONFIG_CMD_CDP is not set
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_LINK_LOCAL=y
+
+#
+# Misc commands
+#
+CONFIG_CMD_TIME=y
+CONFIG_CMD_MISC=y
+CONFIG_CMD_TIMER=y
+
+#
+# Boot timing
+#
+# CONFIG_BOOTSTAGE is not set
+CONFIG_BOOTSTAGE_USER_COUNT=20
+CONFIG_BOOTSTAGE_STASH_ADDR=0
+CONFIG_BOOTSTAGE_STASH_SIZE=4096
+
+#
+# Power commands
+#
+CONFIG_SUPPORT_OF_CONTROL=y
+
+#
+# Device Tree Control
+#
+# CONFIG_OF_CONTROL is not set
+CONFIG_NET=y
+# CONFIG_NET_RANDOM_ETHADDR is not set
+
+#
+# Device Drivers
+#
+CONFIG_DM=y
+# CONFIG_SPL_DM is not set
+CONFIG_DM_WARN=y
+CONFIG_DM_DEVICE_REMOVE=y
+CONFIG_DM_STDIO=y
+CONFIG_DM_SEQ_ALIAS=y
+# CONFIG_CPU is not set
+# CONFIG_DM_DEMO is not set
+
+#
+# PCI
+#
+# CONFIG_DM_PCI is not set
+
+#
+# NAND Device Support
+#
+# CONFIG_NAND_DENALI is not set
+# CONFIG_NAND_VF610_NFC is not set
+# CONFIG_SYS_NAND_VF610_NFC_45_ECC_BYTES is not set
+# CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES is not set
+
+#
+# Generic NAND options
+#
+# CONFIG_SPL_NAND_DENALI is not set
+
+#
+# SPI Flash Support
+#
+CONFIG_SPI_FLASH=y
+# CONFIG_SPI_FLASH_BAR is not set
+# CONFIG_SPI_FLASH_MTD is not set
+# CONFIG_CROS_EC is not set
+# CONFIG_CONFIG_FSL_SEC_MON is not set
+# CONFIG_PCA9551_LED is not set
+# CONFIG_DM_ETH is not set
+CONFIG_NETDEVICES=y
+# CONFIG_ETH_DESIGNWARE is not set
+# CONFIG_CROS_EC_KEYB is not set
+CONFIG_DM_SERIAL=y
+# CONFIG_DEBUG_UART is not set
+# CONFIG_TPM_TIS_SANDBOX is not set
+# CONFIG_DM_I2C is not set
+# CONFIG_DM_I2C_COMPAT is not set
+
+#
+# SPI Support
+#
+# CONFIG_DM_SPI is not set
+# CONFIG_FSL_ESPI is not set
+# CONFIG_TI_QSPI is not set
+CONFIG_DM_GPIO=y
+# CONFIG_LPC32XX_GPIO is not set
+# CONFIG_VYBRID_GPIO is not set
+
+#
+# Power
+#
+# CONFIG_DM_PMIC is not set
+# CONFIG_DM_REGULATOR is not set
+# CONFIG_VIDEO_VESA is not set
+# CONFIG_VIDEO_LCD_SSD2828 is not set
+# CONFIG_DISPLAY_PORT is not set
+# CONFIG_VIDEO_TEGRA124 is not set
+# CONFIG_SOUND is not set
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB=y
+# CONFIG_DM_USB is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_XHCI_HCD is not set
+# CONFIG_USB_XHCI is not set
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI=y
+CONFIG_USB_STORAGE=y
+
+#
+# MMC Host controller Support
+#
+# CONFIG_DM_RTC is not set
+# CONFIG_FSL_CAAM is not set
+# CONFIG_DM_THERMAL is not set
+# CONFIG_PHYS_TO_BUS is not set
+
+#
+# File systems
+#
+
+#
+# Library routines
+#
+CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
+CONFIG_HAVE_PRIVATE_LIBGCC=y
+# CONFIG_USE_PRIVATE_LIBGCC is not set
+CONFIG_SYS_HZ=1000
+# CONFIG_SYS_VSNPRINTF is not set
+CONFIG_REGEX=y
+CONFIG_LIB_RAND=y
+# CONFIG_RSA is not set
+
+#
+# Hashing Support
+#
+# CONFIG_SHA1 is not set
+# CONFIG_SHA256 is not set
+# CONFIG_SHA_HW_ACCEL is not set
+# CONFIG_ERRNO_STR is not set
+# CONFIG_UNIT_TEST is not set
diff --git a/libre/uboot-grub/uEnv-am335x_evm.txt b/libre/uboot-grub/uEnv-am335x_evm.txt
new file mode 100644
index 000000000..f432efc6b
--- /dev/null
+++ b/libre/uboot-grub/uEnv-am335x_evm.txt
@@ -0,0 +1 @@
+optargs=coherent_pool=1M
diff --git a/libre/uboot-grub/uboot-am335x_evm_boot-on-grub.patch b/libre/uboot-grub/uboot-am335x_evm_boot-on-grub.patch
new file mode 100644
index 000000000..8ff1c238f
--- /dev/null
+++ b/libre/uboot-grub/uboot-am335x_evm_boot-on-grub.patch
@@ -0,0 +1,99 @@
+diff -Nur a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
+--- a/include/configs/am335x_evm.h 2015-07-14 14:32:21.000000000 -0300
++++ b/include/configs/am335x_evm.h 2015-09-29 03:46:04.805107365 -0300
+@@ -58,9 +58,8 @@
+ "nandrootfstype=ubifs rootwait=1\0" \
+ "nandboot=echo Booting from nand ...; " \
+ "run nandargs; " \
+- "nand read ${fdtaddr} NAND.u-boot-spl-os; " \
+ "nand read ${loadaddr} NAND.kernel; " \
+- "bootz ${loadaddr} - ${fdtaddr}\0"
++ "bootm ${loadaddr}\0"
+ #else
+ #define NANDARGS ""
+ #endif
+@@ -70,11 +69,9 @@
+ #ifndef CONFIG_SPL_BUILD
+ #define CONFIG_EXTRA_ENV_SETTINGS \
+ DEFAULT_LINUX_BOOT_ENV \
+- "boot_fdt=try\0" \
+- "bootpart=0:2\0" \
++ "bootpart=0:1\0" \
+ "bootdir=/boot\0" \
+- "bootfile=zImage\0" \
+- "fdtfile=undefined\0" \
++ "bootfile=grub/arm-uboot/core.img\0" \
+ "console=ttyO0,115200n8\0" \
+ "partitions=" \
+ "uuid_disk=${uuid_gpt_disk};" \
+@@ -98,7 +95,7 @@
+ "${optargs} " \
+ "root=${spiroot} " \
+ "rootfstype=${spirootfstype}\0" \
+- "bootenv=uEnv.txt\0" \
++ "bootenv=uboot-grub-am335x_evm/uEnv.txt\0" \
+ "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
+ "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
+ "source ${loadaddr}\0" \
+@@ -111,21 +108,8 @@
+ "rootfstype=${ramrootfstype}\0" \
+ "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
+ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
+- "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+ "mmcloados=run mmcargs; " \
+- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
+- "if run loadfdt; then " \
+- "bootz ${loadaddr} - ${fdtaddr}; " \
+- "else " \
+- "if test ${boot_fdt} = try; then " \
+- "bootz; " \
+- "else " \
+- "echo WARN: Cannot load the DT; " \
+- "fi; " \
+- "fi; " \
+- "else " \
+- "bootz; " \
+- "fi;\0" \
++ "bootm ${loadaddr}; " \
+ "mmcboot=mmc dev ${mmcdev}; " \
+ "if mmc rescan; then " \
+ "echo SD/MMC found on device ${mmcdev};" \
+@@ -149,28 +133,16 @@
+ "run spiargs; " \
+ "sf probe ${spibusno}:0; " \
+ "sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
+- "bootz ${loadaddr}\0" \
++ "bootm ${loadaddr}\0" \
+ "ramboot=echo Booting from ramdisk ...; " \
+ "run ramargs; " \
+- "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
+- "findfdt="\
+- "if test $board_name = A335BONE; then " \
+- "setenv fdtfile am335x-bone.dtb; fi; " \
+- "if test $board_name = A335BNLT; then " \
+- "setenv fdtfile am335x-boneblack.dtb; fi; " \
+- "if test $board_name = A33515BB; then " \
+- "setenv fdtfile am335x-evm.dtb; fi; " \
+- "if test $board_name = A335X_SK; then " \
+- "setenv fdtfile am335x-evmsk.dtb; fi; " \
+- "if test $fdtfile = undefined; then " \
+- "echo WARNING: Could not determine device tree to use; fi; \0" \
++ "bootm ${loadaddr} ${rdaddr}\0" \
+ NANDARGS \
+ NETARGS \
+ DFUARGS
+ #endif
+
+ #define CONFIG_BOOTCOMMAND \
+- "run findfdt; " \
+ "run mmcboot;" \
+ "setenv mmcdev 1; " \
+ "setenv bootpart 1:2; " \
+@@ -379,7 +351,6 @@
+ #define DFU_ALT_INFO_RAM \
+ "dfu_alt_info_ram=" \
+ "kernel ram 0x80200000 0xD80000;" \
+- "fdt ram 0x80F80000 0x80000;" \
+ "ramdisk ram 0x81000000 0x4000000\0"
+ #define DFUARGS \
+ "dfu_alt_info_emmc=rawemmc raw 0 3751936\0" \
diff --git a/libre/uboot-grub/uboot-grub-am335x_evm.install b/libre/uboot-grub/uboot-grub-am335x_evm.install
new file mode 100644
index 000000000..8456693e6
--- /dev/null
+++ b/libre/uboot-grub/uboot-grub-am335x_evm.install
@@ -0,0 +1,3 @@
+post_install() {
+ echo '>>> To install the Das U-Boot, run /boot/uboot-grub-am335x_evm/uboot-install.sh'
+}
diff --git a/libre/uboot-grub/uboot-grub-install-am335x_evm.sh b/libre/uboot-grub/uboot-grub-install-am335x_evm.sh
new file mode 100755
index 000000000..4c6206ba4
--- /dev/null
+++ b/libre/uboot-grub/uboot-grub-install-am335x_evm.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# U-Boot install script.
+# Copyright (C) 2015 Márcio Alexandre Silva Delgado <coadde@parabola.nu>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+_uboot-install-question() {
+ echo "Do you want to install the Das U-Boot to Parabola $(if [ "$(uname -o)" = 'GNU/Linux' ]; then echo "$(uname -o)"-libre; else echo "$(uname -o)"; fi) $(uname -m)"?
+ _wait-for-uboot-install-answer
+}
+
+_wait-for-uboot-install-answer() {
+ select _answer in yes no; do
+ case ${_answer} in
+ yes)
+ echo 'Installing the Das U-Boot (MLO file)'
+ dd if=/boot/uboot-grub-am335x_evm/MLO of=/dev/mmcblk0 count=1 seek=1 conv=notrunc bs=128k" || echo '!!! ERROR !!!' && exit 1
+ echo 'Installing the Das U-Boot (u-boot.img file)'
+ dd if=/boot/uboot-grub-am335x_evm/u-boot.img of=/dev/mmcblk0 count=2 seek=1 conv=notrunc bs=384k" || echo '!!! ERROR !!!' && exit 1
+ echo 'OK, installed' && exit 0
+ ;;
+ no)
+ echo 'OK, exit without changes' && exit 0
+ ;;
+ *)
+ _uboot-install-question
+ ;;
+ esac
+ done
+}
+
+_uboot-install-question