From patchwork Mon Mar 4 10:38:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 224684 X-Patchwork-Delegate: chbs@prevas.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id 8E4152C0315 for ; Mon, 4 Mar 2013 21:38:20 +1100 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 8D8693F837 for ; Mon, 4 Mar 2013 11:38:18 +0100 (CET) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail02.prevas.se (mail02.prevas.se [62.95.78.10]) by hugin.dotsrc.org (Postfix) with ESMTPS id 6FB0D3F837 for ; Mon, 4 Mar 2013 11:38:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=6932; q=dns/txt; s=ironport2; t=1362393496; x=1393929496; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version:content-transfer-encoding; bh=HJdsi64n4sniRvTWcamHGkHyzmyHs0ai3qpcNcX0/Xs=; b=YR+b4/tvlIDdi76owrodOy+HNodI8jJ4qKKrDtR4UBYqrGKpEapU8X40 k0DEWf71KzqDtkJbpHyRkIyaDMYr33wL2RPsX2y/kngo3p0HTaVuZjNzf wSgg/O4SLTRZljHRoHKI5t1DxKtz03OVsabHhvy4oKl8I8xg3P/4Z2bqW A=; X-IronPort-AV: E=Sophos;i="4.84,778,1355094000"; d="scan'208";a="2212598" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES128-SHA; 04 Mar 2013 11:38:16 +0100 Received: from dev.prevas.dk (172.16.10.60) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server (TLS) id 14.2.342.3; Mon, 4 Mar 2013 11:38:15 +0100 Received: from arh128 (unknown [172.16.11.15]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: eha) by dev.prevas.dk (Postfix) with ESMTPSA id 94645839D6; Mon, 4 Mar 2013 11:38:15 +0100 (CET) Received: by arh128 (Postfix, from userid 1000) id B9DB3807FE; Mon, 4 Mar 2013 11:38:14 +0100 (CET) From: Esben Haabendal To: Subject: Re: [PATCH 3/3] syslinux: Add new recipe for syslinux References: <42b3f748802aa93975527dcdbc4ef8f1f7c8aff5.1361873632.git.christian.braunersorensen@prevas.dk> Date: Mon, 4 Mar 2013 11:38:14 +0100 In-Reply-To: <42b3f748802aa93975527dcdbc4ef8f1f7c8aff5.1361873632.git.christian.braunersorensen@prevas.dk> (christian braunersorensen's message of "Tue, 26 Feb 2013 10:16:24 +0000") Message-ID: <871ubvbgbt.fsf@arh128.prevas.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Cc: dev@oe-lite.org X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org writes: > From: Christian Sørensen > > --- > recipes/syslinux/syslinux_5.01.oe | 59 +++++++++++++++++++++++++++++++++++ > recipes/syslinux/syslinux_5.01.oe.sig | 1 + > 2 files changed, 60 insertions(+) > create mode 100644 recipes/syslinux/syslinux_5.01.oe > create mode 100644 recipes/syslinux/syslinux_5.01.oe.sig > > diff --git a/recipes/syslinux/syslinux_5.01.oe b/recipes/syslinux/syslinux_5.01.oe > new file mode 100644 > index 0000000..24c8e78 > --- /dev/null > +++ b/recipes/syslinux/syslinux_5.01.oe > @@ -0,0 +1,59 @@ > +DESCRIPTION = "A multi-purpose linux bootloader" > +HOMEPAGE = "http://syslinux.zytor.com/" > +LICENSE = "GPLv2+" > + > +RECIPE_TYPES = "native machine" > + > +inherit c make auto-package-utils > + > +require conf/fetch/kernelorg.conf > +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/syslinux-${PV}.tar.bz2" > + > +DEPENDS += "libuuid" > + > +EXTRA_OEMAKE = " \ > + BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \ > + DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \ > +" > +# syslinux uses $LD for linking, strip `-Wl,' so it can work > +export LDFLAGS = "`echo $LDFLAGS | sed 's/-Wl,//g'`" What is this supposed to do? > + > +do_configure() { > + # drop win32 targets or build fails > + sed -e 's,win32/\S*,,g' -i Makefile > + > + # clean installer executables included in source tarball > + oe_runmake clean > +} > + > +do_compile() { > + # Rebuild only the installer; keep precompiled bootloaders > + # as per author's request (doc/distrib.txt) > + oe_runmake CC="${CC}" -C ${S}/com32/cmenu/ > + oe_runmake CC="${CC}" installer This is broken. When building as native recipe, it will not find staged headers (ie. uuid/uuid.h), and neither staged libraries (libuuid). Building on host without libuuid in host os will thus fail, and building with is wrong (ie. not using the staged library version). Building as machine recipe is of-course a bit worse, as the host arch might not match machine arch. Setting CC="${CC} ${CFLAGS} ${LDFLAGS}" seems to fix it. > +} > + > +do_install() { > + oe_runmake install INSTALLROOT="${D}" > + > + install -d ${D}${libdir}/syslinux/ > + install -m 644 ${S}/core/ldlinux.sys ${D}${libdir}/syslinux/ > + install -m 644 ${S}/core/ldlinux.bss ${D}${libdir}/syslinux/ > +} > + > +AUTO_PACKAGE_UTILS = "extlinux gethostip isohybrid isohybrid.pl \ > + keytab-lilo lss16toppm md5pass memdiskfind \ > + mkdiskimage ppmtolss16 pxelinux-options sha1pass \ > + syslinux syslinux2ansi" > + > +PACKAGES += "${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc" > + > +FILES_${PN} = "${bindir}/syslinux" > +FILES_${PN}-mbr = "${datadir}/${PN}/mbr.bin" > +FILES_${PN}-chain = "${libdir}/${PN}/chain.c32" > +FILES_${PN}-isolinux = "${libdir}/${PN}/isolinux.bin" > +FILES_${PN}-pxelinux = "${libdir}/${PN}/pxelinux.0" > +FILES_${PN}-dev += "${datadir}/${PN}/com32/lib*${SOLIBS} ${datadir}/${PN}/com32/include ${datadir}/${PN}/com32/com32.ld" > +FILES_${PN}-staticdev += "${datadir}/${PN}/com32/lib*.a ${libdir}/${PN}/com32/lib*.a" > +FILES_${PN}-misc = "${libdir}/${PN}/* ${bindir}/* ${datadir}" > + > diff --git a/recipes/syslinux/syslinux_5.01.oe.sig b/recipes/syslinux/syslinux_5.01.oe.sig > new file mode 100644 > index 0000000..566fee9 > --- /dev/null > +++ b/recipes/syslinux/syslinux_5.01.oe.sig > @@ -0,0 +1 @@ > +c41eecaad46a6d90bbdc7a855a6c2561aabc1e03 syslinux-5.01.tar.bz2 The following commit can at least build. Do you have a setup where you can test if it still works? /Esben commit 07f6d6132a0a231e630f9b619c00f41b860dda49 Author: Esben Haabendal Date: Mon Mar 4 11:36:40 2013 +0100 syslinux: Add new recipe for syslinux Based on original patch from Christian B Sørensen. Signed-off-by: Esben Haabendal diff --git a/recipes/syslinux/syslinux.inc b/recipes/syslinux/syslinux.inc new file mode 100644 index 0000000..72f2a8c --- /dev/null +++ b/recipes/syslinux/syslinux.inc @@ -0,0 +1,59 @@ +DESCRIPTION = "A multi-purpose linux bootloader" +HOMEPAGE = "http://syslinux.zytor.com/" + +RECIPE_TYPES = "native machine" + +COMPATIBLE_HOST_ARCHS = "i.86- x86_64-" + +inherit c make auto-package-utils + +require conf/fetch/kernelorg.conf +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/syslinux-${PV}.tar.bz2" + +DEPENDS += "libuuid" + +EXTRA_OEMAKE = "\ + BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \ + DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \ +" + +do_configure() { + # drop win32 targets or build fails + sed -e 's,win32/\S*,,g' -i Makefile + + # clean installer executables included in source tarball + oe_runmake clean +} + +EXTRA_OEMAKE_COMPILE = 'CC="${CC} ${CFLAGS} ${LDFLAGS}"' + +do_compile() { + # Rebuild only the installer; keep precompiled bootloaders + # as per author's request (doc/distrib.txt) + oe_runmake ${EXTRA_OEMAKE_COMPILE} -C ${S}/com32/cmenu/ + oe_runmake ${EXTRA_OEMAKE_COMPILE} installer +} + +do_install() { + oe_runmake install INSTALLROOT="${D}" + + install -d ${D}${libdir}/syslinux/ + install -m 644 ${S}/core/ldlinux.sys ${D}${libdir}/syslinux/ + install -m 644 ${S}/core/ldlinux.bss ${D}${libdir}/syslinux/ +} + +AUTO_PACKAGE_UTILS = "extlinux gethostip isohybrid isohybrid.pl \ + keytab-lilo lss16toppm md5pass memdiskfind \ + mkdiskimage ppmtolss16 pxelinux-options sha1pass \ + syslinux syslinux2ansi" + +PACKAGES += "${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc" + +FILES_${PN} = "${bindir}/syslinux" +FILES_${PN}-mbr = "${datadir}/${PN}/mbr.bin" +FILES_${PN}-chain = "${libdir}/${PN}/chain.c32" +FILES_${PN}-isolinux = "${libdir}/${PN}/isolinux.bin" +FILES_${PN}-pxelinux = "${libdir}/${PN}/pxelinux.0" +FILES_${PN}-dev += "${datadir}/${PN}/com32/lib*${SOLIBS} ${datadir}/${PN}/com32/include ${datadir}/${PN}/com32/com32.ld" +FILES_${PN}-staticdev += "${datadir}/${PN}/com32/lib*.a ${libdir}/${PN}/com32/lib*.a" +FILES_${PN}-misc = "${libdir}/${PN}/* ${bindir}/* ${datadir}" diff --git a/recipes/syslinux/syslinux_5.01.oe b/recipes/syslinux/syslinux_5.01.oe new file mode 100644 index 0000000..9b75917 --- /dev/null +++ b/recipes/syslinux/syslinux_5.01.oe @@ -0,0 +1,2 @@ +require ${PN}.inc +LICENSE = "GPLv2+" diff --git a/recipes/syslinux/syslinux_5.01.oe.sig b/recipes/syslinux/syslinux_5.01.oe.sig new file mode 100644 index 0000000..566fee9 --- /dev/null +++ b/recipes/syslinux/syslinux_5.01.oe.sig @@ -0,0 +1 @@ +c41eecaad46a6d90bbdc7a855a6c2561aabc1e03 syslinux-5.01.tar.bz2