From 2c564b6fc8d396c5b56eab073d5ac89fc6b3cce1 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 17 Mar 2017 20:15:56 +0100 Subject: arcboot: new package, bootloader for SGI --- package/arcboot/Makefile | 36 +++++++++++++++++++++++++ package/arcboot/patches/patch-Makefile | 20 ++++++++++++++ package/arcboot/patches/patch-ext2load_Makefile | 11 ++++++++ 3 files changed, 67 insertions(+) create mode 100644 package/arcboot/Makefile create mode 100644 package/arcboot/patches/patch-Makefile create mode 100644 package/arcboot/patches/patch-ext2load_Makefile 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) -- cgit v1.2.3