summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-03-17 20:15:56 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-03-17 20:16:25 +0100
commit2c564b6fc8d396c5b56eab073d5ac89fc6b3cce1 (patch)
tree4eb4c3e670137304f4f3b095b59d4c5aafed5cee
parent076d984ad05b3bc5f454859b5e3a80c9b7459808 (diff)
arcboot: new package, bootloader for SGI
-rw-r--r--package/arcboot/Makefile36
-rw-r--r--package/arcboot/patches/patch-Makefile20
-rw-r--r--package/arcboot/patches/patch-ext2load_Makefile11
3 files changed, 67 insertions, 0 deletions
diff --git a/package/arcboot/Makefile b/package/arcboot/Makefile
new file mode 100644
index 000000000..58ef78c9c
--- /dev/null
+++ b/package/arcboot/Makefile
@@ -0,0 +1,36 @@
+# 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:= arcboot
+PKG_VERSION:= 0.3.15
+PKG_RELEASE:= 1
+PKG_HASH:= f197eb1a205530cb5d8abc6344cb66dd18cf012fad477204dd87a7e93c30b17c
+PKG_DESCR:= arc boot loader
+PKG_SECTION:= base/boot
+PKG_BUILDDEP:= e2fsprogs
+PKG_URL:= https://honk.sigxcpu.org/piki/projects/arcboot/
+PKG_SITES:= http://http.debian.net/debian/pool/main/a/arcboot/
+
+DISTFILES:= $(PKG_NAME)_$(PKG_VERSION).tar.gz
+WRKDIST= $(WRKDIR)/$(PKG_NAME)
+
+PKG_ARCH_DEPENDS:= mips mips64
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,ARCBOOT,arcboot,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+
+XAKE_FLAGS+= GCC_HONOUR_COPTS=s \
+ E2FSINCLUDEDIR='$(STAGING_TARGET_DIR)/usr/include/ext2fs' \
+ EXT2LIB='$(STAGING_TARGET_DIR)/usr/lib/libext2fs.a'
+
+CONFIG_STYLE:= manual
+
+arcboot-install:
+ $(INSTALL_DIR) $(IDIR_ARCBOOT)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/arcboot \
+ $(IDIR_ARCBOOT)/usr/bin
+
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/arcboot/patches/patch-Makefile b/package/arcboot/patches/patch-Makefile
new file mode 100644
index 000000000..70d9bd2f2
--- /dev/null
+++ b/package/arcboot/patches/patch-Makefile
@@ -0,0 +1,20 @@
+--- arcboot.orig/Makefile 2011-06-16 23:12:30.000000000 +0200
++++ arcboot/Makefile 2017-01-07 21:53:02.887705156 +0100
+@@ -5,7 +5,7 @@
+ #
+
+ # default subarch
+-SUBARCH ?= IP22
++SUBARCH ?= IP32
+
+ ifeq ($(SUBARCH),IP22)
+ KERNELADDR=0x88002000
+@@ -19,7 +19,7 @@ KERNELADDR=0x80004000
+ MAXLOADSIZE=0x1400000
+ LOADADDR=0x81404000
+ TIP_LOADADDR=$(LOADADDR)
+-OUTPUTFORMAT=elf32-tradbigmips
++OUTPUTFORMAT=elf64btsmip
+ endif
+
+ # these contain subarch independent files
diff --git a/package/arcboot/patches/patch-ext2load_Makefile b/package/arcboot/patches/patch-ext2load_Makefile
new file mode 100644
index 000000000..c85c21ebd
--- /dev/null
+++ b/package/arcboot/patches/patch-ext2load_Makefile
@@ -0,0 +1,11 @@
+--- arcboot.orig/ext2load/Makefile 2011-06-19 17:09:08.000000000 +0200
++++ arcboot/ext2load/Makefile 2017-01-07 21:49:13.930609228 +0100
+@@ -28,7 +28,7 @@ CFLAGS = -O2 -I$(COMMONDIR) -I$(ARCINCLU
+ -DSUBARCH=${SUBARCH} -fno-strict-aliasing \
+ $(WARN_CFLAGS) $(MIPS_CFLAGS) $(DEBUG_CFLAGS)
+
+-LD = ld
++LD ?= ld
+ LDFLAGS = -N -T ld.script
+
+ all: $(TARGETS)