Skip to content
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

Download template delivers armhf binaries although armel requested #183

Closed
mw9 opened this issue Jun 17, 2019 · 3 comments
Closed

Download template delivers armhf binaries although armel requested #183

mw9 opened this issue Jun 17, 2019 · 3 comments

Comments

@mw9
Copy link

mw9 commented Jun 17, 2019

I have just tried to build a container for Debian stretch armel:

lxc-create -n testlxcusr -f testlxcusr.conf -t download -- --dist debian --arch armel --release stretch

And I have been given armhf binaries, which is puzzling:

You just created a Debian stretch armhf (20190617_05:24) container.

And it would seem to be so:

readelf -h testlxcusr/rootfs/bin/tar|grep Flags
  Flags:                             0x5000400, Version5 EABI, hard-float ABI

Here's a trace from the executing template which suggests that it was looking in the right place for armel binaries:

wget_wrapper -T 30 -q https://images.linuxcontainers.org//images/debian/stretch/armel/default/20190617_05:24//meta.tar.xz.asc -O /tmp/tmp.uKsle76i5a/meta.tar.xz.asc

So - is there something amiss with the build process ? Or should I have done something differently to get hold of the armel build ?

LXC version is 2.0.7.

Top section of the generated config:

# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template: -d debian -a armel -r stretch
# Template script checksum (SHA-1): 740c51206e35463362b735e68b867876048a8baf
# For additional config options, please look at lxc.container.conf(5)

# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)


# Distribution configuration
lxc.include = /usr/share/lxc/config/debian.common.conf
lxc.include = /usr/share/lxc/config/debian.userns.conf
lxc.arch = linux32

The config file I gave it:

lxc.network.type = veth
#lxc.network.flags = up
lxc.network.link = br0
lxc.network.hwaddr = fe:06:ae:7f:c6:38

lxc.id_map = u 0 100000 65536
lxc.id_map = g 0 100000 65536
@stgraber stgraber transferred this issue from lxc/lxc-ci Jun 17, 2019
@stgraber
Copy link
Member

Moving to distrobuilder as I think I've tracked down the issue to the logic we have to translate between architecture names. As armel is a userspace name with the kernel name being the same for armel and armhf, we incorrectly remap armel requests to armhf...

I sent a somewhat ugly fix which special cases armel and skips the translation in such cases.

@mw9
Copy link
Author

mw9 commented Jun 17, 2019

The lxc-debian template also seems to fail in its host 'auto-detection' which was a puzzle until I learned to explicitly feed it with --arch armel. Perhaps similar issues.

lxc-debian uses arch=$(uname -m) to set hostarch, but doesn't seem to "fix it up".

FWIW, on this Debianized armel box:

uname -m;uname -s
armv5tel
Linux

I don't have a Debianized armhf box. The RaspberryPi, which I think is perhaps a mostly Debianized box, and needs --arch armhf, gives:

uname -m;uname -s
armv6l
Linux

There are other variants, I have an armv5tejl somewhere.

I suppose dpkg --print-architecture might give the definitive userspace name on a debian/debian_derived box, if it is installed.

@mw9
Copy link
Author

mw9 commented Jul 19, 2019

Thanks, armel binaries now arriving, as expected.

@mw9 mw9 closed this as completed Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants