From: Joachim Wiberg <troglobit@gmail.com>
To: Matt Weber <matt@thewebers.ws>, buildroot@buildroot.org
Cc: Matt Weber <matt@thewebers.ws>,
konrad.schwarz@siemens.com,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>,
angelo@amarulasolutions.com
Subject: Re: [Buildroot] [[Next]RFC] sdk-docker: new make target using Dockcross
Date: Sat, 01 Jan 2022 15:01:23 +0100 [thread overview]
Message-ID: <87ee5r1rnw.fsf@gmail.com> (raw)
In-Reply-To: <20210215053258.3323654-1-matt@thewebers.ws>
Hi,
sorry for the late review:
On Sun, Feb 14, 2021 at 23:32, Matt Weber <matt@thewebers.ws> wrote:
> This patch adds a new make target for building a Docker with
> an SDK installed. This patch has not been broken up and is for
> RFC only to get feedback on the technical approach.
>
> - `make sdk-docker` first sets up the dockcross package and
> the environment-setup script to stage the environment.
>
> - The dockcross package in Buildroot includes a folder with
> a custom Dockerfile and pre-exec setup scripts which are
> copied into the dockcross build folder at configure time.
> This Dockerfile uses the Buildroot base and sets up other
> tools to allow a project to completely execute a build flow
> with make / cmake / meson / scons.
>
> - Within the Dockcross package, the entrypoint and sudo
> scripting are reused but a new standard image/custom image
> is not defined. Instead this patchset duplicates the
> docker build step in the Buildroot top-level Makefile.
> The entrypoint / sudo scripting were reused because it
> handles seamless mapping of the calling user into the
> container for the build and back with all the files uid/gid
> intacted.
>
> - One of the best advantages of this environment is the
> fact it resets on each new lauch and is clean for a new
> build. I.e. just the PWD which is mapped as /work inside
> is maintained after the container tears down.
>
> - I'm unsure if it makes sense to use dockcross or just pull
> over the concepts they use into Buildroot directly....
> I think I found a good balance considering each Buildroot
> defconfig build is unique so it doesn't seem like there is
> a chance to upstream a Buildroot configuration to dockcross.
>
> - TODO: Add a manual section that includes usage notes
>
> - How to test
> make qemu_aarch64_virt_defconfig
> make sdk-docker
> # Usage from https://github.com/dockcross/dockcross
> # Setup container launch script
> docker run --rm dockcross/buildroot-sdk-aarch64-buildroot-linux-gnu > ./dockcross
> # This dockcross script maps the pwd into the container as /work
> # as well as the current users $HOME as $HOME inside.
> # Executing the script to dump the env, should list all the
> # environment-setup exported values for use
> ./dockcross bash -c 'export'
> # Check that the cross toolchain executes
> ./dockcross bash -c '$CC -version'
>
> Signed-off-by: Matt Weber <matt@thewebers.ws>
This looks *really* interesting! At $DAYJOB we currently have locally
maintained docker containers to get reproducible build environments on
developer laptops. Having it integrated in Buildroot would be great!
I've tested your patch using latest Buildroot and qemu_x86_64_defconfig
but it failed with the following, which turned out to be a too old
buildroot/base. When I bumped to 20211120.1925 it worked fine. Turns
out GitHub dropped insecure cryptos last summer and the old Debian base
had a bit too old curl:
Downloading https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64
######################################################################## 100.0%
curl: (35) Unknown SSL protocol error in connection to objects.githubusercontent.com:443
The command '/bin/sh -c set -x && /buildscripts/install-gosu-binary.sh && /buildscripts/install-gosu-binary-wrapper.sh && rm -rf /buildscripts' returned a non-zero code: 35
make[1]: *** [Makefile:629: sdk-docker] Error 35
Only two things that stick out to me are:
1. might need to have some small check in the top Makefile to verify
that 'docker' is available on the host system -- maybe obvious to
experienced users, but it would help reduce the support burden for
the mailing list, I think
2. the dockcross project apparently doesn't do releases, or even tags,
so it might be a bit of a hassle to track changes and do updates?
Maybe we could reach out to them and ask for tags, at least
Can't give better technical feedback than that, maybe Mr Petazzoni can
chime in here wrt the actual integration.
Reviewed-by: Joachim Wiberg <troglobit@gmail.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-01-01 14:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-15 5:32 [Buildroot] [[Next]RFC] sdk-docker: new make target using Dockcross Matt Weber
2022-01-01 14:01 ` Joachim Wiberg [this message]
2022-07-23 9:59 ` Romain Naour
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=87ee5r1rnw.fsf@gmail.com \
--to=troglobit@gmail.com \
--cc=angelo@amarulasolutions.com \
--cc=buildroot@buildroot.org \
--cc=konrad.schwarz@siemens.com \
--cc=matt@thewebers.ws \
--cc=thomas.de_schampheleire@nokia.com \
--cc=thomas.petazzoni@bootlin.com \
/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