* [ptxdist] [PATCH] opkg-utils: use toolchain provided ar @ 2012-01-19 15:02 Andreas Bießmann 2012-01-19 16:52 ` Bernhard Walle ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Andreas Bießmann @ 2012-01-19 15:02 UTC (permalink / raw) To: PTXdist ML On OS X (and other maybe 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 <andreas@biessmann.de> --- Sorry, I don't know how to provide correct patches/series. Is there any guideline how to use this git-ptx-patches magic? .../0005-opkg-allow-CROSS_COMPILE-ar.diff | 12 ++++++++++++ patches/opkg-utils-r4747/series | 1 + rules/post/ptxd_make_xpkg_finish.make | 3 ++- 3 files changed, 15 insertions(+), 1 deletions(-) create mode 100644 patches/opkg-utils-r4747/0005-opkg-allow-CROSS_COMPILE-ar.diff diff --git a/patches/opkg-utils-r4747/0005-opkg-allow-CROSS_COMPILE-ar.diff b/patches/opkg-utils-r4747/0005-opkg-allow-CROSS_COMPILE-ar.diff new file mode 100644 index 0000000..43a9ed6 --- /dev/null +++ b/patches/opkg-utils-r4747/0005-opkg-allow-CROSS_COMPILE-ar.diff @@ -0,0 +1,12 @@ +diff -Nrupa opkg-utils-r4747.orig/opkg-build opkg-utils-r4747/opkg-build +--- opkg-utils-r4747.orig/opkg-build 2012-01-19 14:20:32.000000000 +0100 ++++ opkg-utils-r4747/opkg-build 2012-01-19 15:49:06.000000000 +0100 +@@ -250,7 +250,7 @@ if [ "$outer" = "ar" ] ; then + # chown the content to "0:0". files. This is needed as high UID values (> + # 99999) 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..4752b71 100644 --- a/patches/opkg-utils-r4747/series +++ b/patches/opkg-utils-r4747/series @@ -4,3 +4,4 @@ 0003-opkg-build-don-t-use-bashism.patch 0004-opkg-Added-sha256-support.patch # 84a0f076891d7ac6d8273feb988f63df - git-ptx-patches magic +0005-opkg-allow-CROSS_COMPILE-ar.diff diff --git a/rules/post/ptxd_make_xpkg_finish.make b/rules/post/ptxd_make_xpkg_finish.make index 27a74a7..ba9342d 100644 --- a/rules/post/ptxd_make_xpkg_finish.make +++ b/rules/post/ptxd_make_xpkg_finish.make @@ -27,7 +27,8 @@ install_finish = \ # $1: xpkg label # xpkg/finish = \ - $(call xpkg/env, $(1)) \ + CROSS_COMPILE="$(call ptx/escape,$(PTXCONF_COMPILER_PREFIX))" \ + $(call xpkg/env, $(1)) \ ptxd_make_xpkg_finish # vim: syntax=make -- 1.7.8.3 -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [PATCH] opkg-utils: use toolchain provided ar 2012-01-19 15:02 [ptxdist] [PATCH] opkg-utils: use toolchain provided ar Andreas Bießmann @ 2012-01-19 16:52 ` Bernhard Walle 2012-01-19 18:16 ` Andreas Bießmann 2012-01-19 20:54 ` Michael Olbrich 2012-01-20 8:19 ` [ptxdist] [PATCH v2] " Andreas Bießmann 2 siblings, 1 reply; 7+ messages in thread From: Bernhard Walle @ 2012-01-19 16:52 UTC (permalink / raw) To: ptxdist Am 19.01.12 16:02, schrieb Andreas Bießmann: > On OS X (and other maybe other systems) the default provided ar is not a > GNU version and does not understand all the required switches. That should also fix the problem that ar on Darwin (regardless whether it's the GNU variant built by Mac Ports or if it's the ar from Apple) create ar archives without leading '/' in the index, which needs a small patch for arfile.py [1]. Right? Regards, Bernhard [1] https://bitbucket.org/bwalle/ptxdist-arm-boards/raw/5aa5555ce267/patches/opkg-utils-r4747/0005-opkg-darwin.diff -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [PATCH] opkg-utils: use toolchain provided ar 2012-01-19 16:52 ` Bernhard Walle @ 2012-01-19 18:16 ` Andreas Bießmann 0 siblings, 0 replies; 7+ messages in thread From: Andreas Bießmann @ 2012-01-19 18:16 UTC (permalink / raw) To: ptxdist; +Cc: Bernhard Walle Hi Bernhard, On 19.01.12 17:52, Bernhard Walle wrote: > Am 19.01.12 16:02, schrieb Andreas Bießmann: >> On OS X (and other maybe other systems) the default provided ar is not a >> GNU version and does not understand all the required switches. > > That should also fix the problem that ar on Darwin (regardless whether > it's the GNU variant built by Mac Ports or if it's the ar from Apple) > create ar archives without leading '/' in the index, which needs a small > patch for arfile.py [1]. Right? indeed, your 0005-opkg-darwin.diff is not required then. best regards Andreas Bießmann -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [PATCH] opkg-utils: use toolchain provided ar 2012-01-19 15:02 [ptxdist] [PATCH] opkg-utils: use toolchain provided ar Andreas Bießmann 2012-01-19 16:52 ` Bernhard Walle @ 2012-01-19 20:54 ` Michael Olbrich 2012-01-20 8:19 ` [ptxdist] [PATCH v2] " Andreas Bießmann 2 siblings, 0 replies; 7+ messages in thread From: Michael Olbrich @ 2012-01-19 20:54 UTC (permalink / raw) To: ptxdist On Thu, Jan 19, 2012 at 04:02:42PM +0100, Andreas Bießmann wrote: > On OS X (and other maybe 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 <andreas@biessmann.de> > --- > Sorry, I don't know how to provide correct patches/series. Is there any > guideline how to use this git-ptx-patches magic? You can do the following: # extract with git: $ ptxdist --git extract opkg-utils $ cd platform-<myplat>/build-host/opkg-utils-r4747/ # fit the patch: $ git commit --amend --reset-author -s # recreate the patches: $ git ptx-patches There will be some minor changes to the other patches. Add those to the commit as well. Michael > > .../0005-opkg-allow-CROSS_COMPILE-ar.diff | 12 ++++++++++++ > patches/opkg-utils-r4747/series | 1 + > rules/post/ptxd_make_xpkg_finish.make | 3 ++- > 3 files changed, 15 insertions(+), 1 deletions(-) > create mode 100644 patches/opkg-utils-r4747/0005-opkg-allow-CROSS_COMPILE-ar.diff > > diff --git a/patches/opkg-utils-r4747/0005-opkg-allow-CROSS_COMPILE-ar.diff b/patches/opkg-utils-r4747/0005-opkg-allow-CROSS_COMPILE-ar.diff > new file mode 100644 > index 0000000..43a9ed6 > --- /dev/null > +++ b/patches/opkg-utils-r4747/0005-opkg-allow-CROSS_COMPILE-ar.diff > @@ -0,0 +1,12 @@ > +diff -Nrupa opkg-utils-r4747.orig/opkg-build opkg-utils-r4747/opkg-build > +--- opkg-utils-r4747.orig/opkg-build 2012-01-19 14:20:32.000000000 +0100 > ++++ opkg-utils-r4747/opkg-build 2012-01-19 15:49:06.000000000 +0100 > +@@ -250,7 +250,7 @@ if [ "$outer" = "ar" ] ; then > + # chown the content to "0:0". files. This is needed as high UID values (> > + # 99999) 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..4752b71 100644 > --- a/patches/opkg-utils-r4747/series > +++ b/patches/opkg-utils-r4747/series > @@ -4,3 +4,4 @@ > 0003-opkg-build-don-t-use-bashism.patch > 0004-opkg-Added-sha256-support.patch > # 84a0f076891d7ac6d8273feb988f63df - git-ptx-patches magic > +0005-opkg-allow-CROSS_COMPILE-ar.diff > diff --git a/rules/post/ptxd_make_xpkg_finish.make b/rules/post/ptxd_make_xpkg_finish.make > index 27a74a7..ba9342d 100644 > --- a/rules/post/ptxd_make_xpkg_finish.make > +++ b/rules/post/ptxd_make_xpkg_finish.make > @@ -27,7 +27,8 @@ install_finish = \ > # $1: xpkg label > # > xpkg/finish = \ > - $(call xpkg/env, $(1)) \ > + CROSS_COMPILE="$(call ptx/escape,$(PTXCONF_COMPILER_PREFIX))" \ > + $(call xpkg/env, $(1)) \ > ptxd_make_xpkg_finish > > # vim: syntax=make > -- > 1.7.8.3 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* [ptxdist] [PATCH v2] opkg-utils: use toolchain provided ar 2012-01-19 15:02 [ptxdist] [PATCH] opkg-utils: use toolchain provided ar Andreas Bießmann 2012-01-19 16:52 ` Bernhard Walle 2012-01-19 20:54 ` Michael Olbrich @ 2012-01-20 8:19 ` Andreas Bießmann 2012-01-21 18:28 ` Michael Olbrich 2012-01-22 9:44 ` [ptxdist] [PATCH v3] " Andreas Bießmann 2 siblings, 2 replies; 7+ messages in thread From: Andreas Bießmann @ 2012-01-20 8:19 UTC (permalink / raw) To: PTXdist ML 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 <andreas@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 a3c1fe9c1ec7e5257fd186a7720f412fe44440cc Mon Sep 17 00:00:00 2001 From: George McCollister <george.mccollister@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..b000082 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 0000000..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?= <andreas@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 <andreas@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 (> + # 99999) 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 +#tag:base --start-number 1 0001-opkg-utils-use-env-python-instead-of-fixed-path.patch 0002-opkg-make-ar-deterministic.patch 0003-opkg-build-don-t-use-bashism.patch 0004-opkg-Added-sha256-support.patch -# 84a0f076891d7ac6d8273feb988f63df - git-ptx-patches magic +0005-opkg-build-use-CROSS_COMPILE-ar.patch +# 3a9d9f3edf82a47598bc29fe4458b0fd - git-ptx-patches magic diff --git a/rules/post/ptxd_make_xpkg_finish.make b/rules/post/ptxd_make_xpkg_finish.make index 27a74a7..ba9342d 100644 --- a/rules/post/ptxd_make_xpkg_finish.make +++ b/rules/post/ptxd_make_xpkg_finish.make @@ -27,7 +27,8 @@ install_finish = \ # $1: xpkg label # xpkg/finish = \ - $(call xpkg/env, $(1)) \ + CROSS_COMPILE="$(call ptx/escape,$(PTXCONF_COMPILER_PREFIX))" \ + $(call xpkg/env, $(1)) \ ptxd_make_xpkg_finish # vim: syntax=make -- 1.7.8.3 -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [PATCH v2] opkg-utils: use toolchain provided ar 2012-01-20 8:19 ` [ptxdist] [PATCH v2] " Andreas Bießmann @ 2012-01-21 18:28 ` Michael Olbrich 2012-01-22 9:44 ` [ptxdist] [PATCH v3] " Andreas Bießmann 1 sibling, 0 replies; 7+ messages in thread From: Michael Olbrich @ 2012-01-21 18:28 UTC (permalink / raw) To: ptxdist On Fri, Jan 20, 2012 at 09:19:19AM +0100, Andreas Bießmann wrote: > 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 <andreas@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 a3c1fe9c1ec7e5257fd186a7720f412fe44440cc Mon Sep 17 00:00:00 2001 > From: George McCollister <george.mccollister@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..b000082 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 0000000..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?= <andreas@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 <andreas@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 (> > + # 99999) 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 > +#tag:base --start-number 1 > 0001-opkg-utils-use-env-python-instead-of-fixed-path.patch > 0002-opkg-make-ar-deterministic.patch > 0003-opkg-build-don-t-use-bashism.patch > 0004-opkg-Added-sha256-support.patch > -# 84a0f076891d7ac6d8273feb988f63df - git-ptx-patches magic > +0005-opkg-build-use-CROSS_COMPILE-ar.patch > +# 3a9d9f3edf82a47598bc29fe4458b0fd - git-ptx-patches magic > diff --git a/rules/post/ptxd_make_xpkg_finish.make b/rules/post/ptxd_make_xpkg_finish.make > index 27a74a7..ba9342d 100644 > --- a/rules/post/ptxd_make_xpkg_finish.make > +++ b/rules/post/ptxd_make_xpkg_finish.make > @@ -27,7 +27,8 @@ install_finish = \ > # $1: xpkg label > # > xpkg/finish = \ > - $(call xpkg/env, $(1)) \ > + CROSS_COMPILE="$(call ptx/escape,$(PTXCONF_COMPILER_PREFIX))" \ why ptx/escape? PTXCONF_COMPILER_PREFIX or just COMPILER_PREFIX (see rules/other/Namespace.make) shouldn't be anything more than "arm-v5te-linux-gnueabi-" or something like that. Michael > + $(call xpkg/env, $(1)) \ > ptxd_make_xpkg_finish > > # vim: syntax=make > -- > 1.7.8.3 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* [ptxdist] [PATCH v3] opkg-utils: use toolchain provided ar 2012-01-20 8:19 ` [ptxdist] [PATCH v2] " Andreas Bießmann 2012-01-21 18:28 ` Michael Olbrich @ 2012-01-22 9:44 ` Andreas Bießmann 1 sibling, 0 replies; 7+ messages in thread From: Andreas Bießmann @ 2012-01-22 9:44 UTC (permalink / raw) To: PTXdist ML 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 <andreas@biessmann.de> --- Changes since v2 * don't use ptx/escape Changes since v1 * provide proper patch series ...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 a3c1fe9c1ec7e5257fd186a7720f412fe44440cc Mon Sep 17 00:00:00 2001 From: George McCollister <george.mccollister@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..b000082 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 0000000..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?= <andreas@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 <andreas@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 (> + # 99999) 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 +#tag:base --start-number 1 0001-opkg-utils-use-env-python-instead-of-fixed-path.patch 0002-opkg-make-ar-deterministic.patch 0003-opkg-build-don-t-use-bashism.patch 0004-opkg-Added-sha256-support.patch -# 84a0f076891d7ac6d8273feb988f63df - git-ptx-patches magic +0005-opkg-build-use-CROSS_COMPILE-ar.patch +# 3a9d9f3edf82a47598bc29fe4458b0fd - git-ptx-patches magic diff --git a/rules/post/ptxd_make_xpkg_finish.make b/rules/post/ptxd_make_xpkg_finish.make index 27a74a7..4b50fcb 100644 --- a/rules/post/ptxd_make_xpkg_finish.make +++ b/rules/post/ptxd_make_xpkg_finish.make @@ -27,7 +27,8 @@ install_finish = \ # $1: xpkg label # xpkg/finish = \ - $(call xpkg/env, $(1)) \ + CROSS_COMPILE="$(COMPILER_PREFIX)" \ + $(call xpkg/env, $(1)) \ ptxd_make_xpkg_finish # vim: syntax=make -- 1.7.8.3 -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-01-22 9:44 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-01-19 15:02 [ptxdist] [PATCH] opkg-utils: use toolchain provided ar Andreas Bießmann 2012-01-19 16:52 ` Bernhard Walle 2012-01-19 18:16 ` Andreas Bießmann 2012-01-19 20:54 ` Michael Olbrich 2012-01-20 8:19 ` [ptxdist] [PATCH v2] " Andreas Bießmann 2012-01-21 18:28 ` Michael Olbrich 2012-01-22 9:44 ` [ptxdist] [PATCH v3] " Andreas Bießmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox