[ptxdist] [PATCH v2] opkg-utils: use toolchain provided ar
On OS X (and maybe some other systems) the default provided ar is not a GNU version and does not understand all the required switches. To circumvent this fact always use the ar from cross tools which is proven to be a GNU binutils version (at least with OSELAS.Toolchain). Signed-off-by: Andreas Bießmann andr...@biessmann.de --- ...tils-use-env-python-instead-of-fixed-path.patch |3 -- .../0002-opkg-make-ar-deterministic.patch |3 -- .../0003-opkg-build-don-t-use-bashism.patch|3 -- .../0004-opkg-Added-sha256-support.patch |6 +--- .../0005-opkg-build-use-CROSS_COMPILE-ar.patch | 28 patches/opkg-utils-r4747/series|4 ++- rules/post/ptxd_make_xpkg_finish.make |3 +- 7 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 patches/opkg-utils-r4747/0005-opkg-build-use-CROSS_COMPILE-ar.patch diff --git a/patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch b/patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch index 4e64f97..7f2fe24 100644 --- a/patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch +++ b/patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch @@ -65,6 +65,3 @@ index 807f8f4..3864fa5 100755 import sys, os from glob import glob --- -1.7.5.1 - diff --git a/patches/opkg-utils-r4747/0002-opkg-make-ar-deterministic.patch b/patches/opkg-utils-r4747/0002-opkg-make-ar-deterministic.patch index 8bca65f..a0d219f 100644 --- a/patches/opkg-utils-r4747/0002-opkg-make-ar-deterministic.patch +++ b/patches/opkg-utils-r4747/0002-opkg-make-ar-deterministic.patch @@ -48,6 +48,3 @@ index 012afd3..1c323c3 100755 else ( cd $tmp_dir tar -zcf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) fi --- -1.7.5.1 - diff --git a/patches/opkg-utils-r4747/0003-opkg-build-don-t-use-bashism.patch b/patches/opkg-utils-r4747/0003-opkg-build-don-t-use-bashism.patch index 159ad3c..582fe1e 100644 --- a/patches/opkg-utils-r4747/0003-opkg-build-don-t-use-bashism.patch +++ b/patches/opkg-utils-r4747/0003-opkg-build-don-t-use-bashism.patch @@ -20,6 +20,3 @@ index 1c323c3..f9251ea 100755 pkg_file=$dest_dir/${pkg}_${version}_${arch}.opk else pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk --- -1.7.5.1 - diff --git a/patches/opkg-utils-r4747/0004-opkg-Added-sha256-support.patch b/patches/opkg-utils-r4747/0004-opkg-Added-sha256-support.patch index 16e35c5..1e94faa 100644 --- a/patches/opkg-utils-r4747/0004-opkg-Added-sha256-support.patch +++ b/patches/opkg-utils-r4747/0004-opkg-Added-sha256-support.patch @@ -1,7 +1,6 @@ -From a3c1fe9c1ec7e5257fd186a7720f412fe0cc Mon Sep 17 00:00:00 2001 From: George McCollister george.mccollis...@gmail.com Date: Mon, 11 Jul 2011 12:32:37 -0500 -Subject: [PATCH 4/4] opkg: Added sha256 support. +Subject: [PATCH] opkg: Added sha256 support. MD5 and SHA256 hashes are generated for each package now. @@ -88,6 +87,3 @@ index 3fda9b5..b82 100644 if self.size: out = out + Size: %d\n % int(self.size) if self.installed_size: out = out + InstalledSize: %d\n % int(self.installed_size) if self.filename: out = out + Filename: %s\n % (self.filename) --- -1.7.1 - diff --git a/patches/opkg-utils-r4747/0005-opkg-build-use-CROSS_COMPILE-ar.patch b/patches/opkg-utils-r4747/0005-opkg-build-use-CROSS_COMPILE-ar.patch new file mode 100644 index 000..486eae5 --- /dev/null +++ b/patches/opkg-utils-r4747/0005-opkg-build-use-CROSS_COMPILE-ar.patch @@ -0,0 +1,28 @@ +From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= andr...@biessmann.de +Date: Fri, 20 Jan 2012 09:03:55 +0100 +Subject: [PATCH] opkg-build: use ${CROSS_COMPILE}ar +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some host systems do not provide proper ar, make it possible to switch +to cross-ar here. + +Signed-off-by: Andreas Bießmann andr...@biessmann.de +--- + opkg-build |2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/opkg-build b/opkg-build +index f9251ea..425faea 100755 +--- a/opkg-build b/opkg-build +@@ -250,7 +250,7 @@ if [ $outer = ar ] ; then + # chown the content to 0:0. files. This is needed as high UID values ( + # 9) cause problems when parsing ar file headers + ( cd $tmp_dir chown 0:0 ./debian-binary ./data.tar.gz ./control.tar.gz +- ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) ++ ${CROSS_COMPILE}ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) + else + ( cd $tmp_dir tar -zcf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) + fi diff --git a/patches/opkg-utils-r4747/series b/patches/opkg-utils-r4747/series index d6f32a6..af02bbc 100644 --- a/patches/opkg-utils-r4747/series +++ b/patches/opkg-utils-r4747/series @@ -1,6 +1,8 @@ # generated by git-ptx-patches
Re: [ptxdist] cross-compiling and uname
On 01/20/2012 08:38 AM, Robert Schwebel wrote: On Fri, Jan 20, 2012 at 08:31:44AM +0100, Michael Olbrich wrote: On Fri, Jan 20, 2012 at 06:30:49AM +0100, Robert Schwebel wrote: On Thu, Jan 19, 2012 at 10:47:55PM +0100, Michael Olbrich wrote: we had some patches lately about configure scripts etc. using uname to detect stuff. Why don't we create a fake ../sysroot-cross/bin/uname that produces the output we would expect on the target? This way we don't have to fix all those packages and we have on less source of host system information leaking into the build. Are there any host tools which do also run uname? I'd prefer overwriting cached variables or something like that. That's why I want to place it in sysroot-cross/bin. That's not in PATH for hosttools. Hmm, I'm still not sure if this was side-effect free. However, leaving it as it is will result in at least the same ammount of failures :-) Marc, do you have an oppinion? We cannot overwrite uname, because even configure with --host and --build uses uname: $ strace -o log -e execve -f ./configure --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu $ grep uname log 1610 execve(/bin/uname, [uname, -m], [/* 51 vars */]) = 0 1612 execve(/bin/uname, [uname, -r], [/* 51 vars */]) = 0 1614 execve(/bin/uname, [uname, -s], [/* 51 vars */]) = 0 1616 execve(/bin/uname, [uname, -v], [/* 51 vars */]) = 0 1618 execve(/usr/bin/uname, [/usr/bin/uname, -p], [/* 51 vars */]) = -1 ENOENT (No such file or directory) 1620 execve(/bin/uname, [/bin/uname, -X], [/* 51 vars */]) = 0 Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Description: OpenPGP digital signature -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] cross-compiling and uname
Michael Olbrich wrote: we had some patches lately about configure scripts etc. using uname to detect stuff. Why don't we create a fake ../sysroot-cross/bin/uname that produces the output we would expect on the target? Please not! It would be a hack, not a solution! jbe -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] cross-compiling and uname
Robert Schwebel wrote: On Fri, Jan 20, 2012 at 08:31:44AM +0100, Michael Olbrich wrote: On Fri, Jan 20, 2012 at 06:30:49AM +0100, Robert Schwebel wrote: On Thu, Jan 19, 2012 at 10:47:55PM +0100, Michael Olbrich wrote: we had some patches lately about configure scripts etc. using uname to detect stuff. Why don't we create a fake ../sysroot-cross/bin/uname that produces the output we would expect on the target? This way we don't have to fix all those packages and we have on less source of host system information leaking into the build. Are there any host tools which do also run uname? I'd prefer overwriting cached variables or something like that. That's why I want to place it in sysroot-cross/bin. That's not in PATH for hosttools. Hmm, I'm still not sure if this was side-effect free. However, leaving it as it is will result in at least the same ammount of failures :-) Marc, do you have an oppinion? The autotools already deliver the correct values for the build host and the target host. The correct solution for these kind of failures in the buildsystem is to use the results of the autotools *correctly*. jbe -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] [ANNOUNCE] PTXdist 2012.01.0 released
Hei Michael, Am 19.01.2012 22:59, schrieb Michael Olbrich: -- target: acpid-2.0.8.tar.gz -- error: empty parameter to 'ptxd_make_get' This is a x86 BSP, right? Otherwise acpid should not be built. Is acpid in 'ptxdist print PTX_PACKAGES_SELECTED'? No it's not, it's arm-v5te, sorry, my fault. Actually after running `ptxdist clean acpid` and `ptxdist go` no acpid related stuff is build. However this didn't stop me calling `ptxdist get acpid` (which failed) and the subsequent stages (which were all successful) by hand. O:-) For the record: % ptxdist print PTX_PACKAGES_SELECTED strace at91bootstrap ncurses setmixer busybox alsa-lib libdaemon ppp figlet lshw procps zlib minicom gst-plugins-good base dropbear libmd setserial scripts libfsl-vpu madplay logrotate readline mc u-boot libusb libmad imageubootenv rootfs libconfuse mtd-utils kernel gst-plugins-bad libnl elvis_peri_switch openssl watchdog libid3tag initmethod-bbinit libjpeg gcclibs libpcap libpopt latencytop compcache lighttpd gstreamer ifplugd libc wget ntp liboil libltdl rc-once locales umkimage alsa-utils urshd openvpn ipkg libxml2 imageversioninfo nano bzip2 glib orc gst-plugins-base liblzo patches timezone inadyn libcurl vpnclient mpg123 udev v4l-utils glibc cross-pkg-config-wrapper cross-module-init-tools cross-dummy-strip host-localedef host-libuuid host-ncurses host-flex host-tz-database host-pkg-config host-liblzo host-ipkg-utils host-ipkg host-mtd-utils host-glib host-libiconv host-util-linux-ng host-umkimage host-zlib host-gtk-doc host-fakeroot host-autotools-libtool host-autotools-automake host-autotools-autoconf host-lndir host-xorg-proto-x Sorry for bothering you with this, greets Alex -- »With the first link, the chain is forged. The first speech censured, the first thought forbidden, the first freedom denied, chains us all irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie) *** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 *** -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] building OpenNI with ptxdist
Some progress on this topic: Am 19.01.2012 15:37, schrieb Alexander Dahl: For doing this without ptxdist I create a folder ~/build/sysroot and tried cross compiling. Doing it like in the README this results in an error stating 'unistd.h' is not found. If I copy the content of /opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/gcc-4.5.2-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/sysroot-arm-v5te-linux-gnueabi to ~/build/sysroot/ first, compiling succeeds (after manually cross compiling libusb and installing it to ~/build/sysroot). I asked on the OpenNI mailing list [1] and it seems this will get ugly because of patching their Makefiles with fixed path to the toolchain lets my hackles raise. I guess there's no way of »dynamic patching« depending on environmental things, I would have to hack something in the extract rule maybe to not have fixed pathes in my patches. To make a long story short, I'll see if the OpenNI community has further ideas how to build this before starting a rant of using a cross compile aware build system. ;) Greets Alex [1] https://groups.google.com/group/openni-dev/browse_thread/thread/7a9d1afc8c7cfbd1 -- »With the first link, the chain is forged. The first speech censured, the first thought forbidden, the first freedom denied, chains us all irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie) *** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 *** -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] compiling at91bootstrap v1.16 with gcc 4.6.x fails
Am 13.01.2012 13:56, schrieb Alexander Dahl: Has anybody experienced similar problems here and already got a solution or at least a hint how to solve this issue? Meanwhile there was a helpful answer in the AT91 forum: http://www.at91.com/forum/viewtopic.php/f,12/t,20624 I could compile at91bootstrap again and will test the binary on the target next week. Alex -- »With the first link, the chain is forged. The first speech censured, the first thought forbidden, the first freedom denied, chains us all irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie) *** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 *** -- ptxdist mailing list ptxdist@pengutronix.de