summaryrefslogtreecommitdiff
path: root/package/u-boot-avr32
diff options
context:
space:
mode:
Diffstat (limited to 'package/u-boot-avr32')
-rw-r--r--package/u-boot-avr32/Makefile92
-rw-r--r--package/u-boot-avr32/files/boot.script.bpi4
-rw-r--r--package/u-boot-avr32/files/boot.script.clearfog4
-rw-r--r--package/u-boot-avr32/files/boot.script.imx64
-rw-r--r--package/u-boot-avr32/files/fw_env.config1
-rw-r--r--package/u-boot-avr32/files/uEnv.txt.bbb12
-rwxr-xr-xpackage/u-boot-avr32/files/uboot_print_env5
-rwxr-xr-xpackage/u-boot-avr32/files/uboot_set_env5
8 files changed, 127 insertions, 0 deletions
diff --git a/package/u-boot-avr32/Makefile b/package/u-boot-avr32/Makefile
new file mode 100644
index 000000000..ac1b799b6
--- /dev/null
+++ b/package/u-boot-avr32/Makefile
@@ -0,0 +1,92 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= u-boot-avr32
+PKG_VERSION:= 2017.05
+PKG_RELEASE:= 1
+PKG_HASH:= c8373949d7f0de1059e507b83a655d4cea539f75dc66ccdbb27adbd38d83095e
+PKG_DESCR:= portable bootloader
+PKG_SECTION:= base/boot
+HOST_BUILDDEP:= libressl-host dtc-host
+PKG_BUILDDEP:= u-boot-host
+PKG_URL:= http://www.denx.de/wiki/U-Boot
+PKG_SITES:= ftp://ftp.denx.de/pub/u-boot/
+
+DISTFILES:= u-boot-$(PKG_VERSION).tar.bz2
+
+PKG_SYSTEM_DEPENDS:= atmel-ngw100
+
+include $(ADK_TOPDIR)/mk/host.mk
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,U_BOOT_AVR32,u-boot-avr32,$(PKG_VERSION)-$(PKG_RELEASE)))
+$(eval $(call PKG_template,U_BOOT_AVR32,u-boot-avr32,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+
+UBOOT:= u-boot.bin
+ifeq ($(ADK_TARGET_SYSTEM_ATMEL_NGW100),y)
+CONFIG:= atngw100_defconfig
+endif
+
+HOST_MAKE_FLAGS+= HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" \
+ HOSTLDFLAGS="$(HOST_LDFLAGS) -ldl"
+HOST_STYLE:= manual
+CONFIG_STYLE:= manual
+BUILD_STYLE:= manual
+INSTALL_STYLE:= manual
+
+host-build:
+ (cd $(WRKBUILD) && env $(HOST_MAKE_ENV) $(MAKE) -f $(MAKE_FILE) \
+ $(HOST_MAKE_FLAGS) sandbox_defconfig )
+ (cd $(WRKBUILD) && env $(HOST_MAKE_ENV) $(MAKE) -f $(MAKE_FILE) \
+ $(HOST_MAKE_FLAGS) tools $(MAKE_TRACE) )
+
+u-boot-hostinstall:
+ $(INSTALL_BIN) $(WRKBUILD)/tools/mk{,env}image \
+ $(STAGING_HOST_DIR)/usr/bin
+
+do-configure:
+ (cd $(WRKBUILD) && $(MAKE) $(CONFIG))
+
+do-build:
+ (cd $(WRKBUILD) && env \
+ PATH='$(HOST_PATH)' \
+ CROSS_COMPILE='$(TARGET_CROSS)' \
+ GCC_HONOUR_COPTS=s $(MAKE))
+ifneq ($(OS_FOR_BUILD),Darwin)
+ (cd $(WRKBUILD) && env \
+ PATH='$(HOST_PATH)' \
+ CROSS_COMPILE='$(TARGET_CROSS)' \
+ GCC_HONOUR_COPTS=s $(MAKE) env)
+endif
+
+u-boot-install:
+ $(CP) $(WRKBUILD)/$(UBOOT) $(FW_DIR)
+ $(INSTALL_DIR) $(IDIR_U_BOOT)/etc
+ $(CP) ./files/fw_env.config $(IDIR_U_BOOT)/etc
+ifneq ($(OS_FOR_BUILD),Darwin)
+ $(INSTALL_DIR) $(IDIR_U_BOOT)/usr/bin
+ $(INSTALL_BIN) $(WRKBUILD)/tools/env/fw_printenv \
+ $(IDIR_U_BOOT)/usr/bin
+ (cd $(IDIR_U_BOOT)/usr/bin && ln -sf fw_printenv fw_setenv)
+ $(INSTALL_BIN) ./files/uboot_print_env $(IDIR_U_BOOT)/usr/bin
+ $(INSTALL_BIN) ./files/uboot_set_env $(IDIR_U_BOOT)/usr/bin
+endif
+ifeq ($(ADK_TARGET_SYSTEM_BANANA_PRO),y)
+ $(INSTALL_BIN) ./files/boot.script.bpi $(FW_DIR)
+endif
+ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG),y)
+ $(INSTALL_BIN) ./files/boot.script.clearfog $(FW_DIR)
+endif
+ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6),y)
+ $(INSTALL_BIN) $(WRKBUILD)/SPL $(FW_DIR)
+ $(INSTALL_BIN) ./files/boot.script.imx6 $(FW_DIR)
+endif
+ifeq ($(ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK),y)
+ $(CP) ./files/uEnv.txt.bbb $(FW_DIR)/uEnv.txt
+ $(INSTALL_BIN) $(WRKBUILD)/MLO $(FW_DIR)
+endif
+
+include $(ADK_TOPDIR)/mk/host-bottom.mk
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/u-boot-avr32/files/boot.script.bpi b/package/u-boot-avr32/files/boot.script.bpi
new file mode 100644
index 000000000..754c43dba
--- /dev/null
+++ b/package/u-boot-avr32/files/boot.script.bpi
@@ -0,0 +1,4 @@
+setenv bootargs console=tty0 console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait
+ext4load mmc 0:1 0x42000000 boot/${fdtfile}
+ext4load mmc 0:1 0x48000000 boot/kernel
+bootm 0x48000000 - 0x42000000
diff --git a/package/u-boot-avr32/files/boot.script.clearfog b/package/u-boot-avr32/files/boot.script.clearfog
new file mode 100644
index 000000000..78c2bfdc3
--- /dev/null
+++ b/package/u-boot-avr32/files/boot.script.clearfog
@@ -0,0 +1,4 @@
+setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait'
+ext2load mmc 0:1 0x01800000 /boot/armada-388-clearfog.dtb
+ext2load mmc 0:1 0x02000000 /boot/kernel
+bootz 0x02000000 - 0x01800000
diff --git a/package/u-boot-avr32/files/boot.script.imx6 b/package/u-boot-avr32/files/boot.script.imx6
new file mode 100644
index 000000000..24d1b2a93
--- /dev/null
+++ b/package/u-boot-avr32/files/boot.script.imx6
@@ -0,0 +1,4 @@
+setenv bootargs 'console=ttymxc0,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 root=/dev/mmcblk0p1'
+ext4load mmc 0:1 0x18000000 boot/${fdtfile}
+ext4load mmc 0:1 0x10800000 boot/kernel
+bootz 0x10800000 - 0x18000000
diff --git a/package/u-boot-avr32/files/fw_env.config b/package/u-boot-avr32/files/fw_env.config
new file mode 100644
index 000000000..5571d60e0
--- /dev/null
+++ b/package/u-boot-avr32/files/fw_env.config
@@ -0,0 +1 @@
+/mnt/uboot.env 0x0000 0x4000
diff --git a/package/u-boot-avr32/files/uEnv.txt.bbb b/package/u-boot-avr32/files/uEnv.txt.bbb
new file mode 100644
index 000000000..3d83fe424
--- /dev/null
+++ b/package/u-boot-avr32/files/uEnv.txt.bbb
@@ -0,0 +1,12 @@
+loadaddr=0x82000000
+fdtaddr=0x88000000
+fdt_high=0xffffffff
+mmcroot=/dev/mmcblk0p2
+mmcfs=ext4
+kernelfile=kernel
+console=ttyO2,115200n8
+loadximage=load mmc 0:2 ${loadaddr} /boot/${kernelfile}
+loadxfdt=load mmc 0:2 ${fdtaddr} /boot/${fdtfile}
+loadall=run loadximage; run loadxfdt;
+mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcfs}
+uenvcmd=run loadall; run mmcargs; bootz ${loadaddr} - ${fdtaddr};
diff --git a/package/u-boot-avr32/files/uboot_print_env b/package/u-boot-avr32/files/uboot_print_env
new file mode 100755
index 000000000..7231e1a47
--- /dev/null
+++ b/package/u-boot-avr32/files/uboot_print_env
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+mount -r /dev/mmcblk0p1 /mnt
+fw_printenv "$@"
+umount /mnt
diff --git a/package/u-boot-avr32/files/uboot_set_env b/package/u-boot-avr32/files/uboot_set_env
new file mode 100755
index 000000000..7b5a33ccc
--- /dev/null
+++ b/package/u-boot-avr32/files/uboot_set_env
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+mount /dev/mmcblk0p1 /mnt
+fw_setenv "$@"
+umount /mnt