New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: build armhf on GNU/Linux #1482
Conversation
Could you add I've not tested myself yet, but does changing
Lol, good catch! EDIT: Once this is all working, should we also start publishing armv7hf builds to bintray? |
Done!
This whole ARM architecture mess confuses me, but as far as I understand, both |
Yeah, let's try to sort out snapshot Bintray builds first. |
...and lots of other people too! ;-)
https://wiki.debian.org/ArmHardFloatPort says "Currently the Debian armhf port requires at least an ARMv7 CPU with Thumb-2 and VFP3D16." so I guess the I'm not sure what |
Once we get this running, I'll give the compiled package a go in an armv7l Pi and we'll see how that goes. |
IMAGE_ID="etcher-build-$ARGV_ARCHITECTURE" | ||
DOCKER_ARCHITECTURE=$(./scripts/build/architecture-convert.sh -r "$ARGV_ARCHITECTURE" -t docker) | ||
DOCKERFILE="$HERE/Dockerfile-$DOCKER_ARCHITECTURE" | ||
IMAGE_ID="etcher-build-$DOCKER_ARCHITECTURE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much nicer 🎉
Although does changing IMAGE_ID
from etcher-build-$ARGV_ARCHITECTURE
to etcher-build-$DOCKER_ARCHITECTURE
mean that any existing Docker images will become invalidated / redundant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just on your build environment, so that's fine, they will get re-created the next time.
312d5bd
to
d87baee
Compare
Makefile
Outdated
@@ -73,7 +73,7 @@ else | |||
HOST_ARCH = x86 | |||
endif | |||
ifeq ($(shell uname -m),armv7l) | |||
HOST_ARCH = armv7l | |||
HOST_ARCH = armhf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO we should keep this 'top-level' ARCH string as armv7hf
, as that's much more specific, and then convert it as necessary inside the other scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I thought about that, however I think it'd be even more confusing that various armv7
similar architectures (like armv7l
and armv7hf
) generate the same armhf
package. What do you think?
Since they all result in the same generic architecture, maybe its worth to convey that very clearly from the start?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "generate the same armhf package" is an OS-specific assumption. E.g. just because armv7hf
actually maps to armhf
on Debian, there might be separate armv6hf
and armv7hf
packages on some other OS. So IMHO we should keep the Makefile
as specific as possible, and then let architecture-convert.sh
map that to whatever arch-strings different systems / platforms / OSes / tools need, as necessary.
EDIT: but yeah, I agree that we should probably treat armv7hf
and armv7l
as equivalent - I've asked for more info about it in flowdock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. Check my latest changes!
@@ -51,17 +51,25 @@ if [ "$ARGV_TYPE" == "node" ]; then | |||
RESULT=ia32 | |||
elif [ "$ARGV_ARCHITECTURE" == "x64" ]; then | |||
RESULT=x64 | |||
elif [ "$ARGV_ARCHITECTURE" == "armv7l" ]; then | |||
elif [ "$ARGV_ARCHITECTURE" == "armhf" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be armv7hf
;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might also be worth this script checking that the supplied $ARGV_ARCHITECTURE
is in the list [x86, x64, armv7hf]
of 'recognised arches' before then checking the $ARGV_TYPE
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I missed that one!
It might also be worth this script checking that the supplied $ARGV_ARCHITECTURE is in the list [x86, x64, armv7hf] of 'recognised arches' before then checking the $ARGV_TYPE?
What would be the difference? Unless I'm missing something, if the architecture is not set by the specified type, then the script will complain when it finds out that RESULT
is not defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's just a "belt and braces" approach, but you're right in that it's probably not necessary. As long as we're always sure that the type-blocks are always checking for the identical ARCH strings ;)
team, please make sure to be in line with the designations the rest of the
resin team uses for architectures etc, as we want to prevent divergence
that will be a mess to handle in the future.
…--
*Alexandros Marinos*
Founder & CEO, Resin.io
+1 206-637-5498
@alexandrosm
On Thu, Jun 1, 2017 at 1:47 PM, Juan Cruz Viotti ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In scripts/build/architecture-convert.sh
<#1482 (comment)>:
> @@ -51,17 +51,25 @@ if [ "$ARGV_TYPE" == "node" ]; then
RESULT=ia32
elif [ "$ARGV_ARCHITECTURE" == "x64" ]; then
RESULT=x64
- elif [ "$ARGV_ARCHITECTURE" == "armv7l" ]; then
+ elif [ "$ARGV_ARCHITECTURE" == "armhf" ]; then
Oops, I missed that one!
It might also be worth this script checking that the supplied
$ARGV_ARCHITECTURE is in the list [x86, x64, armv7hf] of 'recognised
arches' before then checking the $ARGV_TYPE?
What would be the difference? Unless I'm missing something, if the
architecture is not set by the specified type, then the script will
complain when it finds out that RESULT is not defined.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1482 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABLUCEmfEpqRJv0GJ9X_X3flIWkIFc6Rks5r_yNzgaJpZM4NpuW8>
.
|
What is the current source of truth? Should I look at the current device types, given we're aware they are already diverging in some cases?
—
Juan Cruz Viotti
--- original message ---
On Thu, Jun 1, 2017 at 06:00 pm, <notifications@github.com> Alexandros Marinos wrote:
team, please make sure to be in line with the designations the rest of the
resin team uses for architectures etc, as we want to prevent divergence
that will be a mess to handle in the future.
--
*Alexandros Marinos*
Founder & CEO, Resin.io
+1 206-637-5498
@alexandrosm
On Thu, Jun 1, 2017 at 1:47 PM, Juan Cruz Viotti ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In scripts/build/architecture-convert.sh
<#1482 (comment)>:
> @@ -51,17 +51,25 @@ if [ "$ARGV_TYPE" == "node" ]; then
RESULT=ia32
elif [ "$ARGV_ARCHITECTURE" == "x64" ]; then
RESULT=x64
- elif [ "$ARGV_ARCHITECTURE" == "armv7l" ]; then
+ elif [ "$ARGV_ARCHITECTURE" == "armhf" ]; then
Oops, I missed that one!
It might also be worth this script checking that the supplied
$ARGV_ARCHITECTURE is in the list [x86, x64, armv7hf] of 'recognised
arches' before then checking the $ARGV_TYPE?
What would be the difference? Unless I'm missing something, if the
architecture is not set by the specified type, then the script will
complain when it finds out that RESULT is not defined.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<<#1482 (comment)>, or mute
the thread
<<https://github.com/notifications/unsubscribe-auth/ABLUCEmfEpqRJv0GJ9X_X3flIWkIFc6Rks5r_yNzgaJpZM4NpuW8>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
--- end of original message ---
|
@shaunmulligan can provide guidance
…--
*Alexandros Marinos*
Founder & CEO, Resin.io
+1 206-637-5498
@alexandrosm
On Thu, Jun 1, 2017 at 4:01 PM, Juan Cruz Viotti <notifications@github.com>
wrote:
What is the current source of truth? Should I look at the current device
types, given we're aware they are already diverging in some cases?
—
Juan Cruz Viotti
--- original message ---
On Thu, Jun 1, 2017 at 06:00 pm, ***@***.***> Alexandros
Marinos wrote:
team, please make sure to be in line with the designations the rest of the
resin team uses for architectures etc, as we want to prevent divergence
that will be a mess to handle in the future.
--
*Alexandros Marinos*
Founder & CEO, Resin.io
+1 206-637-5498 <(206)%20637-5498>
@alexandrosm
On Thu, Jun 1, 2017 at 1:47 PM, Juan Cruz Viotti ***@***.***
>
wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In scripts/build/architecture-convert.sh
> <#1482 (comment)>:
>
> > @@ -51,17 +51,25 @@ if [ "$ARGV_TYPE" == "node" ]; then
> RESULT=ia32
> elif [ "$ARGV_ARCHITECTURE" == "x64" ]; then
> RESULT=x64
> - elif [ "$ARGV_ARCHITECTURE" == "armv7l" ]; then
> + elif [ "$ARGV_ARCHITECTURE" == "armhf" ]; then
>
> Oops, I missed that one!
>
> It might also be worth this script checking that the supplied
> $ARGV_ARCHITECTURE is in the list [x86, x64, armv7hf] of 'recognised
> arches' before then checking the $ARGV_TYPE?
>
> What would be the difference? Unless I'm missing something, if the
> architecture is not set by the specified type, then the script will
> complain when it finds out that RESULT is not defined.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <<#1482 (comment)>,
or mute
> the thread
> <<https://github.com/notifications/unsubscribe-auth/ABLUCEmfEpqRJv0GJ9X_
X3flIWkIFc6Rks5r_yNzgaJpZM4NpuW8>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
--- end of original message ---
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1482 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABLUCLm1KCq0xK2ZOuzdjsNj4h841uN4ks5r_0LAgaJpZM4NpuW8>
.
|
90dd633
to
3403c8c
Compare
@petrosagg @nghiant2710 Sorry to bother again, but can someone help me out with this? The builds don't work, I have no clue why, and my Docker knowledge is far from enough to debug this issue. The Travis CI builds just silently stop without any errors, and I get some weird Go stacktraces on misc1.dev.resin.io. |
Nope, it says
Maybe that's because the docker on misc1 has these qemu patches already built-in, and so gets confused when you try doing the 'manual workaround' for non-patched docker? (just a guess!) |
Oh, good observation. I increased the timeout limit to 40 minutes just to see if another error is thrown, but we should investigate why it takes so long, since that's definitely not expected (it takes very little time on misc1 with the non qemu base image). |
"(and of course everything is being run through qemu so that'll be slowing things down too)" And misc1 probably has many more spare CPU cycles (and disk bandwidth) than the overloaded Travis VMs ;) |
I now get a scary go stacktrace in the builds. Any ideas @petrosagg ?
|
0c36617
to
70c88a0
Compare
@jviotti I assume we'll pick this up again when the local CI machines that @brownjohnf is setting up for us are live? |
@lurch What do you think about merging the changes to the Makefile, etc, but delay making the CI services actually build this target? |
6249fae
to
b9d46f4
Compare
Haha, I was just pondering exactly the same thing myself... :-D |
Haha, check my latest changes! I think this should already be merge-able |
If we're only changing the Makefile as you suggested, then I'm not sure if we should be changing |
b9d46f4
to
c5ba59e
Compare
Ah, there was an extra |
Are we sure the Dockerfiles actually work locally? (I could test myself, but quicker to ask @jviotti 😉 ) Remember that none of the instructions we provide actually refer to Docker. ...although if people don't have an actual ARM device, why would they want to build the ARM version of Etcher? 😆 |
c5ba59e
to
18f24d0
Compare
This commit makes use of the `resin/armv7hf-debian` Docker image to test and generate armhf builds. We needed to add a slash before `build` in `.gitignore` given that git was refusing to include any changes on `scripts/build` otherwise. Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
18f24d0
to
d355dd0
Compare
I can confirm it works on misc1, but its slow as hell.
I was thinking people would want to build it on a more powerful host, but ARM on Docker seems to be painfully slow anyway :P |
@@ -138,6 +82,62 @@ $(error Can't build $(TARGET_ARCH) binaries on a $(HOST_ARCH) host) | |||
endif | |||
|
|||
# --------------------------------------------------------------------- | |||
# Application configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, why this massive change to the Makefile
? Or is it just GH going crazy again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This snippet uses TARGET_ARCH
, which is declared a bit above, so we needed to move down the whole section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me
This commit makes use of the
resin/armv7hf-debian
Docker image totest and generate armhf builds.
We needed to add a slash before
build
in.gitignore
given that gitwas refusing to include any changes on
scripts/build
otherwise.Signed-off-by: Juan Cruz Viotti jviotti@openmailbox.org