diff options
-rw-r--r-- | misc/Makefile | 1 | ||||
-rw-r--r-- | misc/seabios/Makefile | 27 | ||||
-rw-r--r-- | misc/seabios/distinfo | 2 | ||||
-rw-r--r-- | misc/seabios/files/0001-build-fix-.text-section-address-alignment.patch (renamed from sysutils/xen-tools/files/0001-build-fix-.text-section-address-alignment.patch) | 26 | ||||
-rw-r--r-- | misc/seabios/pkg-descr | 4 | ||||
-rw-r--r-- | sysutils/xen-tools/Makefile | 24 | ||||
-rw-r--r-- | sysutils/xen-tools/distinfo | 2 | ||||
-rw-r--r-- | sysutils/xen-tools/files/patch-tools_firmware_seabios-dir_scripts_buildversion.sh | 11 | ||||
-rw-r--r-- | sysutils/xen-tools/files/patch-tools_libxc_xc__dom__bzimageloader.c | 11 | ||||
-rw-r--r-- | sysutils/xen-tools/files/patch-tools_misc_xenpm.c | 13 |
10 files changed, 81 insertions, 40 deletions
diff --git a/misc/Makefile b/misc/Makefile index 87c6ef109bcc..4df97329e6ad 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -420,6 +420,7 @@ SUBDIR += shc SUBDIR += shuffle SUBDIR += shuffle-db + SUBDIR += seabios SUBDIR += since SUBDIR += skyutils SUBDIR += sloccount diff --git a/misc/seabios/Makefile b/misc/seabios/Makefile new file mode 100644 index 000000000000..5bd8e0939a3d --- /dev/null +++ b/misc/seabios/Makefile @@ -0,0 +1,27 @@ +# $FreeBSD$ + +PORTNAME= seabios +PORTVERSION= 1.9.1 +CATEGORIES= misc +MASTER_SITES= http://code.coreboot.org/p/seabios/downloads/get/ + +MAINTAINER= royger@FreeBSD.org +COMMENT= Open source implementation of a 16bit X86 BIOS + +LICENSE= LGPL3 + +USES= gmake python:build + +MAKE_ARGS= HOSTCC="${CC}" LD32BIT_FLAG="-melf_i386_fbsd" +USE_GCC= yes + +EXTRA_PATCHES= ${FILESDIR}/0001-build-fix-.text-section-address-alignment.patch:-p1 + +PLIST_FILES= ${DATADIR}/bios.bin + +do-install: + ${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/out/bios.bin ${STAGEDIR}${DATADIR} + +.include <bsd.port.mk> +RUN_DEPENDS:= ${RUN_DEPENDS:Ngcc*} diff --git a/misc/seabios/distinfo b/misc/seabios/distinfo new file mode 100644 index 000000000000..a90bb79f1700 --- /dev/null +++ b/misc/seabios/distinfo @@ -0,0 +1,2 @@ +SHA256 (seabios-1.9.1.tar.gz) = 8a2a562fe5cfd37fe8327cdc4a60accdfe441e235b29e6999fdeb442ba98d608 +SIZE (seabios-1.9.1.tar.gz) = 570186 diff --git a/sysutils/xen-tools/files/0001-build-fix-.text-section-address-alignment.patch b/misc/seabios/files/0001-build-fix-.text-section-address-alignment.patch index 7bd4bf4ad5eb..303adae77e11 100644 --- a/sysutils/xen-tools/files/0001-build-fix-.text-section-address-alignment.patch +++ b/misc/seabios/files/0001-build-fix-.text-section-address-alignment.patch @@ -1,6 +1,6 @@ -From 70a912f04dec2b556f37a60d1f596fcedb13f8a8 Mon Sep 17 00:00:00 2001 +From 8a0df37ee2f77a126925dfe9ae1d6a6bd24aad45 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor <kevin@koconnor.net> -Date: Wed, 24 Feb 2016 11:45:55 +0100 +Date: Fri, 19 Feb 2016 21:34:16 -0500 Subject: [PATCH] build: fix .text section address alignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -14,14 +14,16 @@ alignment of any section placed in ".text". Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reported by: Ed Maste <emaste@FreeBSD.org> + +(cherry picked from commit 3910de0dee216d5b5bf23cfa29bfc80d082b2ee7) --- scripts/layoutrom.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) -diff --git a/tools/firmware/seabios-dir/scripts/layoutrom.py b/tools/firmware/seabios-dir/scripts/layoutrom.py -index dd770fe..c7e406c 100755 ---- a/tools/firmware/seabios-dir/scripts/layoutrom.py -+++ b/tools/firmware/seabios-dir/scripts/layoutrom.py +diff --git a/scripts/layoutrom.py b/scripts/layoutrom.py +index b976fb0..6616721 100755 +--- a/scripts/layoutrom.py ++++ b/scripts/layoutrom.py @@ -34,18 +34,22 @@ COMMONTRAILER = """ # Determine section locations ###################################################################### @@ -48,7 +50,7 @@ index dd770fe..c7e406c 100755 totspace = alignpos(totspace, section.align) + section.size startaddr = int((endaddr - totspace) / minalign) * minalign curaddr = startaddr -@@ -267,7 +271,7 @@ def doLayout(sections, config, genreloc): +@@ -269,7 +273,7 @@ def doLayout(sections, config, genreloc): final_sec32low_end = BUILD_LOWRAM_END zonelow_base = final_sec32low_end - 64*1024 relocdelta = final_sec32low_end - sec32low_end @@ -57,15 +59,15 @@ index dd770fe..c7e406c 100755 sections32low, sec32low_end, 16 , segoffset=zonelow_base - relocdelta) li.sec32low_end = sec32low_end -@@ -399,6 +403,8 @@ def writeLinkerScripts(li, out16, out32seg, out32flat): - filesections32flat = getSectionsFileid(li.sections, '32flat') - out = outXRefs([], exportsyms=li.varlowsyms - , forcedelta=li.final_sec32low_start-li.sec32low_start) +@@ -405,6 +409,8 @@ def writeLinkerScripts(li, out16, out32seg, out32flat): + if li.config.get('CONFIG_MULTIBOOT'): + multiboot_header = "LONG(0x1BADB002) LONG(0) LONG(-0x1BADB002)" + sec32all_start -= 3 * 4 + sec32all_align = max([section.align for section in li.sections]) + sec32all_start = aligndown(sec32all_start, sec32all_align) out += outXRefs(filesections32flat, exportsyms=[li.entrysym]) + """ _reloc_min_align = 0x%x ; zonefseg_start = 0x%x ; -- -2.5.4 (Apple Git-61) +2.6.4 (Apple Git-63) diff --git a/misc/seabios/pkg-descr b/misc/seabios/pkg-descr new file mode 100644 index 000000000000..237fb79fed0c --- /dev/null +++ b/misc/seabios/pkg-descr @@ -0,0 +1,4 @@ +Seabios is an open source implementation of a 16bit X86 BIOS. SeaBIOS can run in +an emulator or it can run natively on X86 hardware + +WWW: http://www.seabios.org diff --git a/sysutils/xen-tools/Makefile b/sysutils/xen-tools/Makefile index 6bf1ed7cb5a8..7a8717667a8e 100644 --- a/sysutils/xen-tools/Makefile +++ b/sysutils/xen-tools/Makefile @@ -2,10 +2,9 @@ PORTNAME= xen PORTVERSION= 4.5.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils emulators -MASTER_SITES= http://bits.xensource.com/oss-xen/release/${PORTVERSION}/ \ - http://code.coreboot.org/p/seabios/downloads/get/:seabios +MASTER_SITES= http://bits.xensource.com/oss-xen/release/${PORTVERSION}/ PKGNAMESUFFIX= -tools MAINTAINER= royger@FreeBSD.org @@ -17,27 +16,25 @@ LICENSE_COMB= multi LIB_DEPENDS= libyajl.so:${PORTSDIR}/devel/yajl \ liblzo2.so:${PORTSDIR}/archivers/lzo2 \ libpixman-1.so:${PORTSDIR}/x11/pixman -BUILD_DEPENDS= dev86>0:${PORTSDIR}/devel/dev86 +BUILD_DEPENDS= dev86>0:${PORTSDIR}/devel/dev86 \ + seabios>0:${PORTSDIR}/misc/seabios OPTIONS_DEFINE= DOCS ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= "not yet ported to anything other than amd64" -SEABIOSVERSION= 1.8.2 -DISTFILES+= ${DISTNAME}.tar.gz \ - seabios-${SEABIOSVERSION}.tar.gz:seabios - WRKSRC= ${WRKDIR}/xen-${PORTVERSION} -USES= cpe gmake libtool perl5 pkgconfig python shebangfix +USES= cpe gmake libtool perl5 pkgconfig python shebangfix localbase USE_GNOME= glib20 USE_LDCONFIG= yes GNU_CONFIGURE= yes CONFIGURE_ENV= HOSTCC="${CC}" CC="${CC}" \ ac_cv_path_BASH=${TRUE} \ ac_cv_path_XGETTEXT=${TRUE} -MAKE_ARGS= HOSTCC="${CC}" CC="${CC}" GCC="${GCC}" cc="${GCC}" +MAKE_ARGS= HOSTCC="${CC}" CC="${CC}" GCC="${CC}" cc="${GCC}" \ + HOSTCFLAGS="${CFLAGS}" SEABIOS_PATH="${LOCALBASE}/share/seabios/bios.bin" QEMU_ARGS= --disable-gtk \ --disable-smartcard-nss \ --disable-sdl \ @@ -47,15 +44,15 @@ QEMU_ARGS= --disable-gtk \ --disable-tools \ --disable-curl \ --cxx=c++ +CFLAGS= -Wno-ignored-attributes -Qunused-arguments -Wno-header-guard \ + -Wno-tautological-compare -Wno-format-extra-args -w EXTRA_PATCHES= ${FILESDIR}/0002-libxc-fix-xc_dom_load_elf_symtab.patch:-p1 \ - ${FILESDIR}/0001-build-fix-.text-section-address-alignment.patch:-p1 \ ${FILESDIR}/xsa160-4.6.patch:-p1 CONFIGURE_ARGS+= --with-extra-qemuu-configure-args="${QEMU_ARGS}" SHEBANG_FILES= tools/misc/xencov_split \ tools/misc/xen-ringwatch -USE_GCC= yes ALL_TARGET= tools docs INSTALL_TARGET= install-tools install-docs @@ -65,9 +62,6 @@ INSTALL_TARGET= install-tools install-docs IGNORE= only supported on FreeBSD .endif -post-extract: - ${MV} ${WRKDIR}/seabios-${SEABIOSVERSION} ${WRKSRC}/tools/firmware/seabios-dir - post-patch: @${REINPLACE_CMD} "s,x86_64,amd64,g" ${WRKSRC}/tools/configure @${REINPLACE_CMD} -e "s,/var/lib,/var/db,g" \ diff --git a/sysutils/xen-tools/distinfo b/sysutils/xen-tools/distinfo index 42babf2c8556..bbc57b46fa18 100644 --- a/sysutils/xen-tools/distinfo +++ b/sysutils/xen-tools/distinfo @@ -1,4 +1,2 @@ SHA256 (xen-4.5.2.tar.gz) = 4c9e5dac4eea484974e9f76da2756c8e0973b4e884d28d37e955df9ebf00e7e8 SIZE (xen-4.5.2.tar.gz) = 18416220 -SHA256 (seabios-1.8.2.tar.gz) = f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 -SIZE (seabios-1.8.2.tar.gz) = 538497 diff --git a/sysutils/xen-tools/files/patch-tools_firmware_seabios-dir_scripts_buildversion.sh b/sysutils/xen-tools/files/patch-tools_firmware_seabios-dir_scripts_buildversion.sh deleted file mode 100644 index ff55a744832c..000000000000 --- a/sysutils/xen-tools/files/patch-tools_firmware_seabios-dir_scripts_buildversion.sh +++ /dev/null @@ -1,11 +0,0 @@ ---- tools/firmware/seabios-dir/scripts/buildversion.sh.orig 2015-03-13 09:02:17 UTC -+++ tools/firmware/seabios-dir/scripts/buildversion.sh -@@ -12,7 +12,7 @@ if [ -z "$BUILD_VERSION" ]; then - else - VERSION="?" - fi -- VERSION="${VERSION}-`date +"%Y%m%d_%H%M%S"`-`hostname`" -+ VERSION="${VERSION}" - else - VERSION="$BUILD_VERSION" - fi diff --git a/sysutils/xen-tools/files/patch-tools_libxc_xc__dom__bzimageloader.c b/sysutils/xen-tools/files/patch-tools_libxc_xc__dom__bzimageloader.c new file mode 100644 index 000000000000..b40552e00a4c --- /dev/null +++ b/sysutils/xen-tools/files/patch-tools_libxc_xc__dom__bzimageloader.c @@ -0,0 +1,11 @@ +--- tools/libxc/xc_dom_bzimageloader.c.orig 2015-11-03 09:11:18 UTC ++++ tools/libxc/xc_dom_bzimageloader.c +@@ -469,7 +469,7 @@ static int xc_try_lzo1x_decode( + + for ( *size = 0; ; ) + { +- lzo_uint src_len, dst_len, out_len; ++ lzo_uint src_len, dst_len, out_len = 0; + unsigned char *tmp_buf; + + msg = "Short input"; diff --git a/sysutils/xen-tools/files/patch-tools_misc_xenpm.c b/sysutils/xen-tools/files/patch-tools_misc_xenpm.c new file mode 100644 index 000000000000..15c33bd5b9dc --- /dev/null +++ b/sysutils/xen-tools/files/patch-tools_misc_xenpm.c @@ -0,0 +1,13 @@ +--- tools/misc/xenpm.c.orig 2015-11-03 09:11:18 UTC ++++ tools/misc/xenpm.c +@@ -97,8 +97,8 @@ static void parse_cpuid_and_int(int argc + + if ( argc == 0 || sscanf(argv[argc > 1], "%d", val) != 1 ) + { +- fprintf(stderr, argc ? "Invalid %s '%s'\n" : "Missing %s\n", +- what, argv[argc > 1]); ++ fprintf(stderr, argc ? "Invalid %s '%s'\n" : "Missing %s\n%s", ++ what, argc ? argv[argc > 1] : ""); + exit(EINVAL); + } + } |