From: Trent Piepho <tpiepho@impinj.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] core/sdk: generate the SDK tarball ourselves
Date: Mon, 11 Jun 2018 17:20:57 +0000 [thread overview]
Message-ID: <1528737656.28705.131.camel@impinj.com> (raw)
In-Reply-To: <e4bbb78b-8301-e576-7e65-f83d55e0da7b@mind.be>
On Sun, 2018-06-10 at 23:21 +0200, Arnout Vandecappelle wrote:
>
> > .PHONY: sdk
> > -sdk: world
> > +sdk: world $(BR2_TAR_HOST_DEPENDENCY)
> > @$(call MESSAGE,"Rendering the SDK relocatable")
> > $(TOPDIR)/support/scripts/fix-rpath host
> > $(TOPDIR)/support/scripts/fix-rpath staging
> > $(INSTALL) -m 755 $(TOPDIR)/support/misc/relocate-sdk.sh $(HOST_DIR)/relocate-sdk.sh
> > mkdir -p $(HOST_DIR)/share/buildroot
> > echo $(HOST_DIR) > $(HOST_DIR)/share/buildroot/sdk-location
> > + $(Q)mkdir -p $(BINARIES_DIR)
> > + $(TAR) czf $(BINARIES_DIR)/buildroot-sdk.$(GNU_TARGET_NAME)-$(BR2_VERSION_FULL).tar.gz \
>
> Wouldn't it make more sense to make a .xz, or perhaps a .bz2? Although, that
> probably gives a significant hit to the build time. But since it's explicit in
> 'make sdk' I don't mind that much.
>
I'm using the SDK with Docker. It can add tar.gz files into the
container, but now tar.xz. Having to recompress the archive would be a
significant increase in build time.
> > + -C $(HOST_DIR) \
> > + --transform='s#^\.#buildroot-sdk.$(GNU_TARGET_NAME)-$(BR2_VERSION_FULL)#' \
>
> Perhaps move that "buildroot-sdk.$(GNU_TARGET_NAME)-$(BR2_VERSION_FULL)" into a
> variable?
So having extracted an SDK, in an automated CI script, how does one use
it? I'll add it to the Docker container:
ARG sdk_file
ENV SDK=/mnt/sdk
ADD --chown=user:user ${sdk_file} ${SDK}
Now it needs to be relocated. Something like:
RUN cd ${SDK}/buildroot-sdk.arm-buildroot-linux-gnueabihf-2018.02-00035-ge588bdd3e8 && ./relocate-sdk.sh
Is the problem with using this tarball apparent? The dockerfile needs
to be hand edited on every single build to use the correct path to the
SDK.
I've already added a "sdk-tar" to my external.mk to do this, but used
the tarbomb approach. While annoying for those who extract it in their
home dir, it's much easier to use in an automated processes since there
is no unknown path name component.
It is good if archives that are going to be used in an automated
process do not contain unpredictable path names!
Now one might say that I can just make a tarball with a different
process. But that would mean creating two SDK tarballs, since there is
no way to prep the host dir for making a SDK tar without also making
the tarball. That's a significant amount of wasted time.
next prev parent reply other threads:[~2018-06-11 17:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-09 21:06 [Buildroot] [PATCH] core/sdk: generate the SDK tarball ourselves Yann E. MORIN
2018-06-09 21:16 ` Yann E. MORIN
2018-06-10 6:03 ` Thomas Petazzoni
2018-06-10 7:47 ` Yann E. MORIN
2018-06-10 21:21 ` Arnout Vandecappelle
2018-06-11 17:20 ` Trent Piepho [this message]
2018-06-11 19:01 ` Thomas Petazzoni
2018-06-11 22:10 ` Trent Piepho
2018-06-12 9:57 ` Thomas Petazzoni
2018-06-12 17:11 ` Trent Piepho
2018-06-12 13:30 ` Arnout Vandecappelle
2018-06-12 17:47 ` Trent Piepho
2018-06-12 18:07 ` Stefan Becker
2018-06-12 19:01 ` Thomas Petazzoni
2018-06-12 19:25 ` Stefan Becker
2018-06-13 8:32 ` Andreas Naumann
2018-06-13 10:12 ` Arnout Vandecappelle
2018-06-13 15:46 ` Andreas Naumann
2018-06-13 9:47 ` Arnout Vandecappelle
2018-06-13 9:57 ` Thomas Petazzoni
2018-06-13 10:03 ` Stefan Becker
2018-06-13 11:58 ` Thomas Petazzoni
2018-06-15 18:27 ` Peter Korsgaard
2018-06-13 7:46 ` Arnout Vandecappelle
2018-06-13 7:59 ` Stefan Becker
2018-06-15 18:12 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1528737656.28705.131.camel@impinj.com \
--to=tpiepho@impinj.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox