Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Fix issue with Buster base image and add support for arm64 #95

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rahul-thakoor
Copy link

  • replace libgnome-keyring with libsecret
  • add dockerfile targeting arm64

Change-type: minor
Signed-off-by: Rahul Thakoor rahul@balena.io

@lurch
Copy link

lurch commented Sep 25, 2019

Fixes #94 ?

###
# Build stage
##
FROM balenalib/raspberrypi3-node:10-build as build
Copy link

Choose a reason for hiding this comment

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

According to https://www.balena.io/docs/reference/base-images/devicetypes/ raspberrypi3 is armv7hf, not aarch64 ?

Copy link
Author

Choose a reason for hiding this comment

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

yes, we use the rpi3 base image for 32-bit support

Copy link

Choose a reason for hiding this comment

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

So why is the rpi3 base image being used in Dockerfile.aarch64? Apologies if I'm not understanding something.

Copy link
Contributor

Choose a reason for hiding this comment

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

@lurch because the 32-bit raspberrypi base image also has the raspbian repositories, so it's not directly the armv7hf base image. Here those might or might not be used, but for other device types, e.g. a Pi3, it would be a balenalib/raspberrypi3-node base image, and it's better to be on par, than one device type using the architecture base image, the other the device type bsae image (where they are not direcly the same)

Copy link
Contributor

Choose a reason for hiding this comment

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

@rahul-thakoor maybe I would specify 10-buster-build here and in the other one, to ensure it's the right kind of debian, and less surprising.

Also, have you tried to build with 12-? If we could bump that it would be grand!

Copy link

Choose a reason for hiding this comment

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

I still don't quite see why the "32-bit raspberrypi base image" is being used in the 64-bit Dockerfile.aarch64, but I'm not really that bothered so I won't bother hassling you any further 🙂

Copy link
Author

Choose a reason for hiding this comment

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

@lurch there might be cases where 64bit packages or libraries are not available. so using 32-bit base image we can still make use of those on a 64bit system. Perhaps the following 2 PRs might be helpful to understand:

  1. https://github.com/balena-io-playground/balena-senseoflife/pull/2/files
  2. Add support for Pi3/4 64-bit images by using packages from Alpine balena-senseoflife#3

Copy link

Choose a reason for hiding this comment

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

Oh, so even though the filename says Dockerfile.aarch64, the actual built image is actually all 32-bit code?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, Dockerfile.aarch64 targets 64bit systems and on those, we explicitly use 32-bit images otherwise they would default to the 64-bit ones

- replace `libgnome-keyring` with `libsecret`
- add dockerfile targeting arm64

Change-type: minor
Signed-off-by: Rahul Thakoor <rahul@balena.io>
Change-type: minor
Signed-off-by: Rahul Thakoor <rahul@balena.io>
@rahul-thakoor
Copy link
Author

@imrehg I pinned the based image to buster and use node-12
Tested on pi4(64bit balenaOS) and pi3 model b

@Ciantic
Copy link

Ciantic commented Jan 23, 2020

@rahul-thakoor how did you make it to work with pi4? Did you use the Dockerfile.aarch64?

To me it seems like it's targeting 32bit, it says FROM balenalib/raspberrypi3-node:12-buster-build as build

and now I started to build it all the packages are armhf.

@Ciantic
Copy link

Ciantic commented Jan 23, 2020

But, sir! It works! Using armhf build and rpi4.

Maybe not ideal. Should test for raspberrypi4-64-node support too, it would be fantastic!

@smarthomeagentur
Copy link

Hi,
are there any news here for pi4? This would be a great combination with electron. I only get to build but x11 crashes with " (EE) no screens found(EE) "

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants