summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-05-27 14:55:21 -0500
committerWaldemar Brodkorb <wbx@openadk.org>2015-05-27 14:55:31 -0500
commit4e1f91b02ac6acd7fe077599d3ba719260ad4aba (patch)
treecb1a5db517e33853766df221932add0b56b40589
parent8e28bf47d341336163eb549bc56a07fe1eea73d5 (diff)
we need another u-boot variant for xtensa :(
-rw-r--r--package/u-boot-git/Makefile2
-rw-r--r--package/u-boot-xtensa/Makefile57
-rw-r--r--package/u-boot-xtensa/files/fw_env.config1
-rwxr-xr-xpackage/u-boot-xtensa/files/uboot_print_env5
-rwxr-xr-xpackage/u-boot-xtensa/files/uboot_set_env5
-rw-r--r--package/u-boot-xtensa/patches/patch-Makefile12
-rw-r--r--package/u-boot/Makefile2
7 files changed, 82 insertions, 2 deletions
diff --git a/package/u-boot-git/Makefile b/package/u-boot-git/Makefile
index 47fff684e..c2fb1d8f1 100644
--- a/package/u-boot-git/Makefile
+++ b/package/u-boot-git/Makefile
@@ -13,7 +13,7 @@ PKG_BUILDDEP:= u-boot-git-host
PKG_URL:= http://www.denx.de/wiki/U-Boot
PKG_SITES:= git://git.denx.de/u-boot.git
-PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 atmel-ngw100 banana-pro xilinx-kintex7
+PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 atmel-ngw100 banana-pro
include $(ADK_TOPDIR)/mk/host.mk
include $(ADK_TOPDIR)/mk/package.mk
diff --git a/package/u-boot-xtensa/Makefile b/package/u-boot-xtensa/Makefile
new file mode 100644
index 000000000..0613d9164
--- /dev/null
+++ b/package/u-boot-xtensa/Makefile
@@ -0,0 +1,57 @@
+# 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-xtensa
+PKG_VERSION:= fe85520cfb23b815207fa1a0ad840ec795eecedf
+PKG_RELEASE:= 1
+PKG_DESCR:= portable bootloader
+PKG_SECTION:= base/boot
+HOST_BUILDDEP:= openssl-host device-tree-compiler-host
+PKG_BUILDDEP:= u-boot-xtensa-host
+PKG_URL:= https://github.com/jcmvbkbc/u-boot-xtensa/tree/xtensa-for-mainline
+PKG_SITES:= https://github.com/jcmvbkbc/u-boot-xtensa.git
+
+PKG_SYSTEM_DEPENDS:= xilinx-kintex7
+
+include $(ADK_TOPDIR)/mk/host.mk
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,U_BOOT_XTENSA,u-boot-xtensa,$(PKG_VERSION)-$(PKG_RELEASE)))
+$(eval $(call PKG_template,U_BOOT_XTENSA,u-boot-xtensa,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+
+UBOOT:= u-boot.bin
+CONFIG:= xtfpga_defconfig
+
+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-xtensa-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))
+
+u-boot-xtensa-install:
+ $(CP) $(WRKBUILD)/$(UBOOT) $(FW_DIR)
+
+include $(ADK_TOPDIR)/mk/host-bottom.mk
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/u-boot-xtensa/files/fw_env.config b/package/u-boot-xtensa/files/fw_env.config
new file mode 100644
index 000000000..5571d60e0
--- /dev/null
+++ b/package/u-boot-xtensa/files/fw_env.config
@@ -0,0 +1 @@
+/mnt/uboot.env 0x0000 0x4000
diff --git a/package/u-boot-xtensa/files/uboot_print_env b/package/u-boot-xtensa/files/uboot_print_env
new file mode 100755
index 000000000..7231e1a47
--- /dev/null
+++ b/package/u-boot-xtensa/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-xtensa/files/uboot_set_env b/package/u-boot-xtensa/files/uboot_set_env
new file mode 100755
index 000000000..7b5a33ccc
--- /dev/null
+++ b/package/u-boot-xtensa/files/uboot_set_env
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+mount /dev/mmcblk0p1 /mnt
+fw_setenv "$@"
+umount /mnt
diff --git a/package/u-boot-xtensa/patches/patch-Makefile b/package/u-boot-xtensa/patches/patch-Makefile
new file mode 100644
index 000000000..bf15f64b7
--- /dev/null
+++ b/package/u-boot-xtensa/patches/patch-Makefile
@@ -0,0 +1,12 @@
+--- u-boot-xtensa-fe85520cfb23b815207fa1a0ad840ec795eecedf.orig/Makefile 2015-05-27 14:16:15.000000000 -0500
++++ u-boot-xtensa-fe85520cfb23b815207fa1a0ad840ec795eecedf/Makefile 2015-05-27 14:48:47.588823659 -0500
+@@ -561,9 +561,6 @@ KBUILD_AFLAGS += -Wa,-gstabs,-S
+ endif
+ endif
+
+-# Prohibit date/time macros, which would make the build non-deterministic
+-KBUILD_CFLAGS += $(call cc-option,-Werror=date-time)
+-
+ ifneq ($(CONFIG_SYS_TEXT_BASE),)
+ KBUILD_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
+ endif
diff --git a/package/u-boot/Makefile b/package/u-boot/Makefile
index 0b821228c..781f3cd9d 100644
--- a/package/u-boot/Makefile
+++ b/package/u-boot/Makefile
@@ -16,7 +16,7 @@ PKG_SITES:= ftp://ftp.denx.de/pub/u-boot/
DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 atmel-ngw100 xilinx-kintex7
+PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 atmel-ngw100
include $(ADK_TOPDIR)/mk/host.mk
include $(ADK_TOPDIR)/mk/package.mk