diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2018-06-08 23:50:48 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2018-06-10 07:18:18 +0200 |
commit | 8ae0ee8bec214f0c5b5922000ebc07588067588b (patch) | |
tree | 86cad4498132fafe7540797090ee877a9fd76d95 /package/yaboot | |
parent | 75925d793a64da4429b0db17c423d19ea2bce874 (diff) |
yaboot: add new package
Diffstat (limited to 'package/yaboot')
-rw-r--r-- | package/yaboot/Makefile | 33 | ||||
-rw-r--r-- | package/yaboot/patches/patch-Makefile | 95 | ||||
-rw-r--r-- | package/yaboot/patches/patch-second_cfg_c | 20 | ||||
-rw-r--r-- | package/yaboot/patches/patch-second_fs_c | 23 |
4 files changed, 171 insertions, 0 deletions
diff --git a/package/yaboot/Makefile b/package/yaboot/Makefile new file mode 100644 index 000000000..48ddcdba8 --- /dev/null +++ b/package/yaboot/Makefile @@ -0,0 +1,33 @@ +# 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:= yaboot +PKG_VERSION:= 1.3.17 +PKG_RELEASE:= 1 +PKG_HASH:= 2fb738d8fd48b94ab2534a4fdf63738ad02c1a30f4b2add91f837baff8fa2aa1 +PKG_DESCR:= ppc32 bootloader +PKG_SECTION:= base/boot +PKG_BUILDDEP:= e2fsprogs +PKG_URL:= http://yaboot.ozlabs.org/ +PKG_SITES:= http://yaboot.ozlabs.org/releases/ + +DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz + +include $(ADK_TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,YABOOT,yaboot,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION))) + +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + +yaboot-install: + $(INSTALL_DIR) $(IDIR_YABOOT)/etc + $(CP) $(WRKBUILD)/etc/yaboot.conf \ + $(IDIR_YABOOT)/etc + $(INSTALL_DIR) $(IDIR_YABOOT)/sbin + $(INSTALL_BIN) $(WRKBUILD)/second/yaboot \ + $(IDIR_YABOOT)/sbin + +include $(ADK_TOPDIR)/mk/pkg-bottom.mk diff --git a/package/yaboot/patches/patch-Makefile b/package/yaboot/patches/patch-Makefile new file mode 100644 index 000000000..08d117b6e --- /dev/null +++ b/package/yaboot/patches/patch-Makefile @@ -0,0 +1,95 @@ +--- yaboot-1.3.17.orig/Makefile 2011-10-18 06:11:10.000000000 +0200 ++++ yaboot-1.3.17/Makefile 2018-06-08 23:26:05.000000000 +0200 +@@ -7,7 +7,7 @@ VERSION = 1.3.17 + DEBUG = 0 + # make install vars + ROOT = +-PREFIX = usr/local ++PREFIX = usr + MANDIR = man + # command used to get root (needed for tarball creation) + GETROOT = fakeroot +@@ -25,7 +25,7 @@ KERNELADDR = 0x00000000 + # Set this to the prefix of your cross-compiler, if you have one. + # Else leave it empty. + # +-CROSS = ++CROSS ?= + + CC := $(CROSS)gcc + LD := $(CROSS)ld +@@ -39,7 +39,7 @@ YBCFLAGS += -DVERSION="\"${VERSION}${VER + YBCFLAGS += -DTEXTADDR=$(TEXTADDR) -DDEBUG=$(DEBUG) + YBCFLAGS += -DMALLOCADDR=$(MALLOCADDR) -DMALLOCSIZE=$(MALLOCSIZE) + YBCFLAGS += -DKERNELADDR=$(KERNELADDR) +-YBCFLAGS += -Werror -fdiagnostics-show-option ++YBCFLAGS += -fdiagnostics-show-option + YBCFLAGS += -I ./include + YBCFLAGS += -fno-strict-aliasing + +@@ -59,22 +59,18 @@ ifeq ($(CONFIG_FS_XFS),y) + YBCFLAGS += -DCONFIG_FS_XFS + endif + +-ifeq ($(CONFIG_FS_REISERFS),y) +-YBCFLAGS += -DCONFIG_FS_REISERFS +-endif +- + # Link flags + # +-LFLAGS = -Ttext $(TEXTADDR) -Bstatic -melf32ppclinux ++LFLAGS = -static -Ttext $(TEXTADDR) -melf32ppclinux + + # Libraries + # +-LLIBS = -lext2fs ++#LLIBS = -lext2fs -static + + # For compiling userland utils + # + UCFLAGS = -Os $(CFLAGS) -Wall -I/usr/include +-UCFLAGS += -Werror -fdiagnostics-show-option ++UCFLAGS += -fdiagnostics-show-option + + # For compiling build-tools that run on the host. + # +@@ -85,7 +81,7 @@ HOSTCFLAGS = -O2 $(CFLAGS) -Wall -I/usr/ + + OBJS = second/crt0.o second/yaboot.o second/cache.o second/prom.o second/file.o \ + second/partition.o second/fs.o second/cfg.o second/setjmp.o second/cmdline.o \ +- second/fs_of.o second/fs_ext2.o second/fs_iso.o second/fs_swap.o \ ++ second/fs_of.o second/fs_iso.o second/fs_swap.o \ + second/iso_util.o \ + lib/nonstd.o \ + lib/nosys.o lib/string.o lib/strtol.o lib/vsprintf.o lib/ctype.o lib/malloc.o lib/strstr.o +@@ -98,14 +94,10 @@ ifeq ($(CONFIG_FS_XFS),y) + OBJS += second/fs_xfs.o + endif + +-ifeq ($(CONFIG_FS_REISERFS),y) +-OBJS += second/fs_reiserfs.o +-endif +- + # compilation + lgcc = `$(CC) -m32 -print-libgcc-file-name` + +-all: yaboot addnote mkofboot ++all: yaboot + + yaboot: $(OBJS) + $(LD) $(LFLAGS) $(OBJS) $(LLIBS) $(lgcc) -o second/$@ +@@ -181,13 +173,11 @@ strip: all + strip util/addnote + strip --remove-section=.comment --remove-section=.note util/addnote + +-install: all strip ++install: all + install -d -o root -g root -m 0755 ${ROOT}/etc/ + install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/sbin/ + install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/lib + install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/lib/yaboot +- install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man5/ +- install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man8/ + install -o root -g root -m 0644 second/yaboot ${ROOT}/$(PREFIX)/lib/yaboot + install -o root -g root -m 0755 util/addnote ${ROOT}/${PREFIX}/lib/yaboot/addnote + install -o root -g root -m 0644 first/ofboot ${ROOT}/${PREFIX}/lib/yaboot/ofboot diff --git a/package/yaboot/patches/patch-second_cfg_c b/package/yaboot/patches/patch-second_cfg_c new file mode 100644 index 000000000..135d9a596 --- /dev/null +++ b/package/yaboot/patches/patch-second_cfg_c @@ -0,0 +1,20 @@ +--- yaboot-1.3.17.orig/second/cfg.c 2011-10-18 06:11:10.000000000 +0200 ++++ yaboot-1.3.17/second/cfg.c 2018-06-08 23:24:14.000000000 +0200 +@@ -132,7 +132,7 @@ void cfg_warn (char *msg,...) + prom_printf (" near line %d in file %s\n", line_num, file_name); + } + +-inline int getc () ++static inline int __getc () + { + if (currp == endp) + return EOF; +@@ -145,7 +145,7 @@ static int next (void) + int ch; + + if (!back) +- return getc (); ++ return __getc (); + ch = back; + back = 0; + return ch; diff --git a/package/yaboot/patches/patch-second_fs_c b/package/yaboot/patches/patch-second_fs_c new file mode 100644 index 000000000..1bd67b95d --- /dev/null +++ b/package/yaboot/patches/patch-second_fs_c @@ -0,0 +1,23 @@ +--- yaboot-1.3.17.orig/second/fs.c 2011-10-18 06:11:10.000000000 +0200 ++++ yaboot-1.3.17/second/fs.c 2018-06-08 23:14:20.000000000 +0200 +@@ -36,20 +36,12 @@ extern const struct fs_t swap_fil + extern const struct fs_t xfs_filesystem; + #endif /* CONFIG_FS_XFS */ + +-#ifdef CONFIG_FS_REISERFS +-extern const struct fs_t reiserfs_filesystem; +-#endif /* CONFIG_FS_REISERFS */ +- + /* Filesystem handlers yaboot knows about */ + static const struct fs_t *block_filesystems[] = { + &swap_filesystem, /* swap signature checker */ +- &ext2_filesystem, /* ext2 */ + #ifdef CONFIG_FS_XFS + &xfs_filesystem, /* XFS */ + #endif /* CONFIG_FS_XFS */ +-#ifdef CONFIG_FS_REISERFS +- &reiserfs_filesystem, /* reiserfs */ +-#endif /* CONFIG_FS_REISERFS */ + &of_filesystem, /* HFS/HFS+, ISO9660, UDF, UFS */ + NULL + }; |