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

ARM64 Support #4

Open
faddat opened this issue Nov 10, 2020 · 26 comments
Open

ARM64 Support #4

faddat opened this issue Nov 10, 2020 · 26 comments
Assignees
Labels
resolution:fixed Fixed type:feature New feature or request

Comments

@faddat
Copy link
Contributor

faddat commented Nov 10, 2020

Some of our software has known security issues in 32 bit environments.

Would you accept a patch that extends pi-builder to support the creation of 64 bit images?

@mdevaev
Copy link
Member

mdevaev commented Nov 11, 2020

Hi! Yes, why not. Check the commit #6d5ccc76a2bc7b0b829a94ec99150accac53e3df to start. I used to have aarch64 support, but I removed it because I didn't use it. it seems that there was a basic working capacity, but it was a long time ago and I don't remember the details anymore. Note that QEMU 5.1 is broken, so you need to use QEMU 5.0.1 right now.

@mdevaev mdevaev self-assigned this Nov 11, 2020
@mdevaev mdevaev added the type:feature New feature or request label Nov 11, 2020
@faddat
Copy link
Contributor Author

faddat commented Nov 12, 2020

That's wonderful.

I haven't made the transition yet but my expectation is that I will be able to use your software to dramatically reduce our image build times.

@mdevaev
Copy link
Member

mdevaev commented Nov 12, 2020

Ha-ha, well, that's the main reason I did it :) This helped me a lot when developing Pi-KVM, otherwise I could have waited hours for the build to complete.

@faddat
Copy link
Contributor Author

faddat commented Nov 14, 2020

So even with us, build times are still kind of an issue for me. I am hoping to figure out a way to make this even faster and possibly slim down arch linux arm. `bout 5 years ago I remember setting up Arch for an Orange Pi, and I recall just using pacstrap. I don't know if it's still possible or what might be making the initial download the 400 MB that it is but I am hoping to reduce that as well.

For the kind of thing I'm working on, less software ends up being exponentially more.

@faddat
Copy link
Contributor Author

faddat commented Nov 19, 2020

If it's not currently desired then I can tell you that the default raspberry Pi 64-bit kernel is actually not all that stable and you probably don't want to use it so I think that for now I'm going to close this issue.

I solved the problem by using a user contributed kernel that more closely matches what the raspberry Pi inc developers were doing.

@mdevaev
Copy link
Member

mdevaev commented Nov 19, 2020

Okay, if you want to go back to this issue, I won't mind.

@faddat
Copy link
Contributor Author

faddat commented Nov 19, 2020

OK, I'll leave it open-- when mainline smoothly supports Pi 4, it'll make good sense to add arm64 support, I reckon.

@mdef
Copy link

mdef commented Nov 24, 2020

I'm also interested to have 64bit build
or can you confirm if it possible to run 32bit packages what you provide on aarch64 arch linux?

@mdevaev
Copy link
Member

mdevaev commented Nov 25, 2020

I haven't tested this case, so I can't answer.

@faddat
Copy link
Contributor Author

faddat commented Nov 26, 2020

You can't run 32-bit packages on 64-bit arch, unless you want to play with qemu binfmt_misc.

But there are builds of everything in the default repositories though so you shouldn't really need to run 32-bit packages

@mdef
Copy link

mdef commented Nov 28, 2020

I'm actually interested to have 64bit arch linux to run pikvm on it, and other sortware in docker.
Will it work this way:

  • install ArchLinuxARM-rpi-aarch64-latest.tar.gz
  • install precompiled pikvm for aarch64 if the exists somewhere
    Thank you in advance

@mdevaev
Copy link
Member

mdevaev commented Nov 29, 2020

64bit is not compatible with omx encoder required for tc358743. perhaps something else is not working, I have not studied this issue in detail

@faddat
Copy link
Contributor Author

faddat commented Dec 5, 2020

I'm actually interested to have 64bit arch linux to run pikvm on it, and other sortware in docker.
Will it work this way:

  • install ArchLinuxARM-rpi-aarch64-latest.tar.gz
  • install precompiled pikvm for aarch64 if the exists somewhere
    Thank you in advance

No, but it will work this way:

https://github.com/faddat/sos/blob/dcdfa6e029d683d38e379389f2fdad7f393bd0c0/Dockerfile#L29-L33

Those lines are in fact super important. Also, if you'd like, you can just try forking SOS which is more or less a derivative of pi-builder here in fact. The biggest difference between SOS and Pi builder is probably that I offer the user fewer options, and don't really do very much parameterization or use of variables. The build script is quite linear.

I'm also pretty confident that you can actually build SOS on your pi. Typically, I build SOS on an AWS graviton instance, the experience is just delightful.

@mdef I should also mention that I may have been wrong, you may actually be able to run 32 bit arm packages on your 64-bit arm CPU. Of course, your mileage may vary.

@faddat
Copy link
Contributor Author

faddat commented Dec 9, 2020

So the thing that I'd like to contribute I think is actually the use of Docker buildx.

I'm also going to look over that PR that adds multi-device support because I'm tinkering with the same stuff in SOS.

@Zitt
Copy link

Zitt commented Aug 5, 2022

Coming up on two years later and no progress :(

@mdevaev
Copy link
Member

mdevaev commented Nov 18, 2023

Hey guys, better late than never, right?

I have added basic aarch64 support. Not all stages work with them (there is no watchdog, for example), but in general it should work.

However, I caution against further use of pi-builder on x86_64. It will be better to use it on arm or aarch64, i.e. build Raspberry on Raspberry. The reason is that QEMU can fail unpredictably inside different installation scripts in the package manager, and this can lead to unpredictable behavior and generation of faulty OS images. The new QEMU works poorly, QEMU for AArch64 is even more unstable, and the only thing that works well now is old QEMU armv7 on x86_64. I have abandoned cross-assembly and use a cluster of several Raspberries for my purposes.

@onedr0p
Copy link

onedr0p commented Nov 18, 2023

Wow that's awesome, can't wait download the image and flash it when it's all ready

@mdevaev
Copy link
Member

mdevaev commented Dec 1, 2023

I'm marking this as solved, since technically the ability to build ARM64 images has already been implemented. OS for PiKVM is a separate stage.

@mdevaev mdevaev closed this as completed Dec 1, 2023
@mdevaev mdevaev added the resolution:fixed Fixed label Dec 1, 2023
@onedr0p
Copy link

onedr0p commented Apr 23, 2024

@mdevaev is there an issue for tracking building/publishing arm64 images for PiKVM? I would like to use the PiKVM for a few more network utilities/apps in my homelab but the armv7 arch is very limiting.

@mdevaev
Copy link
Member

mdevaev commented Apr 24, 2024

I'm not working on it right now, but I have some plans for this year.

@kaineub
Copy link

kaineub commented Nov 24, 2024

@mdevaev is there any update on that? I also find the 32-bit arch pretty limiting right now.

@mdevaev
Copy link
Member

mdevaev commented Jan 27, 2025

Reopening since I'm working on 64 bit PiKVM.

@mdevaev mdevaev reopened this Jan 27, 2025
@mdevaev
Copy link
Member

mdevaev commented Feb 3, 2025

While I'm working on this, can someone tell me about the use case? Why do you need 64 bit, and why didn't 32 bit meet your needs?

@onedr0p
Copy link

onedr0p commented Feb 3, 2025

@mdevaev since the pikvm is a device that is running all the time I'd like to be able to run additional tools on it like bind, blocky, matchbox, docker etc... the only problem with this currently is the limited support for the armv7 architecture projects either take a long time to compile, or won't at all or docker containers do not exist.

While I understand configuring the pikvm to do more than it's expected to is not supported, the tools I would run wouldn't shorten the life of the sd card nor interfere with pikvm software.

@mdevaev
Copy link
Member

mdevaev commented Feb 5, 2025

@onedr0p Got it, thank you for the info.

Anybody else? :)

@kaineub
Copy link

kaineub commented Feb 6, 2025

I have a recovery tool that relies on having a 64-bit python interpreter. I currently need to have a second machine hooked up in addition to the PiKVM to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:fixed Fixed type:feature New feature or request
Development

No branches or pull requests

6 participants