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

Upgrade base image to debian:bullseye, and introduce per-arch images #10

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Terminus-IMRC
Copy link
Contributor

@Terminus-IMRC Terminus-IMRC commented Oct 18, 2021

A slight improvement of #9.

The per-arch images are now built in separate stages, so we can generate all the images by:

for tag in buster buster-slim bullseye bullseye-slim; do
    for target in base builder armv6 armv7 armv8 aarch64; do
        docker build --build-arg DEBIAN_IMAGE_TAG=$tag --target $target --tag idein/cross-rpi:$tag-crosstool-ng-1.24.0-$target .
    done
    docker build --build-arg DEBIAN_IMAGE_TAG=$tag --tag idein/cross-rpi:$tag-crosstool-ng-1.24.0 .
done

@notogawa @eldesh @ishiy1993 The slim images (buster-slim* and bullseye-slim*) are now pushed to Docker Hub: https://hub.docker.com/r/idein/cross-rpi .
Can you have a try and review them?

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Copy link
Contributor

@notogawa notogawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idein/cross-rpi:$tag-$target image workdir is /tmp. Did you forget to change /home/idein ?

@Terminus-IMRC
Copy link
Contributor Author

Thanks, you are correct. I will fix this and push the images.

Copy link
Contributor

@eldesh eldesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to build the agent with this new image, and confirmed that it can be built successfully for the Raspberry Pi.

@eldesh
Copy link
Contributor

eldesh commented Oct 19, 2021

When building for jetson, I get the following error, but I don't think it's a problem with the docker image (probably caused by libssl or build script).

...
wn-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcfg_if-2429be076ac41b0a.rlib" "/home/idein/.rustup/toolchains/1.55.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-ff4d4e08b608f71d.r
lib" "/home/idein/.rustup/toolchains/1.55.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-1efea38fcbfa7713.rlib" "/home/idein/.rustup/toolchains/1.55.0-x86_64-unknown-linux-gnu/lib/rustlib/a
arch64-unknown-linux-gnu/lib/librustc_std_workspace_core-28f6f7f3696eaa95.rlib" "/home/idein/.rustup/toolchains/1.55.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore-e7f3c603b70ec422.rlib" "-W
l,--end-group" "/home/idein/.rustup/toolchains/1.55.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcompiler_builtins-8a52d897724ca515.rlib" "-Wl,-Bdynamic" "-lv4l2" "-lssl" "-lcrypto" "-lgcc_s" "
-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/idein/.rustup/toolchains/1.55.0-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-o" "/home/idein/act
cast/actcast_agent/target/aarch64-unknown-linux-gnu/debug/deps/actcast_agentd-2629c8767bd5352e" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-Wl,-rpath-link,/lib/aarch64-linux-gnu" "-Wl,-rpath-l
ink,/usr/lib/aarch64-linux-gnu"
  = note: /home/idein/x-tools/aarch64-rpi3-linux-gnuhf/lib/gcc/aarch64-rpi3-linux-gnuhf/8.3.0/../../../../aarch64-rpi3-linux-gnuhf/bin/ld.bfd: /home/idein/raspbian/usr/lib/aarch64-linux-gnu/libssl.a(ssl_cert.o): in funct
ion `ssl_cert_free':
          (.text+0x58c): undefined reference to `__aarch64_ldadd4_relax'
          /home/idein/x-tools/aarch64-rpi3-linux-gnuhf/lib/gcc/aarch64-rpi3-linux-gnuhf/8.3.0/../../../../aarch64-rpi3-linux-gnuhf/bin/ld.bfd: /home/idein/raspbian/usr/lib/aarch64-linux-gnu/libssl.a(ssl_lib.o): in functi
on `SSL_up_ref':
          (.text+0xa28): undefined reference to `__aarch64_ldadd4_relax'
          /home/idein/x-tools/aarch64-rpi3-linux-gnuhf/lib/gcc/aarch64-rpi3-linux-gnuhf/8.3.0/../../../../aarch64-rpi3-linux-gnuhf/bin/ld.bfd: /home/idein/raspbian/usr/lib/aarch64-linux-gnu/libssl.a(ssl_lib.o): in functi
on `SSL_copy_session_id':
          (.text+0x1e1c): undefined reference to `__aarch64_ldadd4_relax'
          /home/idein/x-tools/aarch64-rpi3-linux-gnuhf/lib/gcc/aarch64-rpi3-linux-gnuhf/8.3.0/../../../../aarch64-rpi3-linux-gnuhf/bin/ld.bfd: /home/idein/raspbian/usr/lib/aarch64-linux-gnu/libssl.a(ssl_lib.o): in functi
on `SSL_CTX_up_ref':
          (.text+0x38f4): undefined reference to `__aarch64_ldadd4_relax'
          /home/idein/x-tools/aarch64-rpi3-linux-gnuhf/lib/gcc/aarch64-rpi3-linux-gnuhf/8.3.0/../../../../aarch64-rpi3-linux-gnuhf/bin/ld.bfd: /home/idein/raspbian/usr/lib/aarch64-linux-gnu/libssl.a(ssl_lib.o): in function `SSL_CTX_free':
          (.text+0x392c): undefined reference to `__aarch64_ldadd4_relax'
          /home/idein/x-tools/aarch64-rpi3-linux-gnuhf/lib/gcc/aarch64-rpi3-linux-gnuhf/8.3.0/../../../../aarch64-rpi3-linux-gnuhf/bin/ld.bfd: /home/idein/raspbian/usr/lib/aarch64-linux-gnu/libssl.a(ssl_lib.o):(.text+0x5a0c): more undefined references to `__aarch64_ldadd4_relax' follow
          /home/idein/x-tools/aarch64-rpi3-linux-gnuhf/lib/gcc/aarch64-rpi3-linux-gnuhf/8.3.0/../../../../aarch64-rpi3-linux-gnuhf/bin/ld.bfd: /home/idein/raspbian/usr/lib/aarch64-linux-gnu/libcrypto.a(eng_init.o): in function `engine_unlocked_init':
          (.text+0x48): undefined reference to `__aarch64_ldadd4_acq_rel'
          /home/idein/x-tools/aarch64-rpi3-linux-gnuhf/lib/gcc/aarch64-rpi3-linux-gnuhf/8.3.0/../../../../aarch64-rpi3-linux-gnuhf/bin/ld.bfd: /home/idein/raspbian/usr/lib/aarch64-linux-gnu/libcrypto.a(eng_lib.o): in function `engine_free_util':
          (.text+0x1b4): undefined reference to `__aarch64_ldadd4_acq_rel'
...

@notogawa
Copy link
Contributor

What’s the status now?

@Terminus-IMRC
Copy link
Contributor Author

Raspberry Pi OS bullseye has now been released and the new bullseye image with libraspberrypi 2+git20210928~141951+6e8f786-2 has been pushed to the hub, but I've been unable to spend much time and I haven't touched the issue above yet.

Terminus-IMRC and others added 3 commits December 20, 2021 08:07
... as it is not required since we no longer switch to another user.

Co-authored-by: notogawa <n.ohkawa@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants