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

Add Raspberry Pi Support (armv7l) #3237

Closed
jhihn opened this issue Mar 16, 2021 · 8 comments
Closed

Add Raspberry Pi Support (armv7l) #3237

jhihn opened this issue Mar 16, 2021 · 8 comments
Labels
core This issue is not accepting PRs from outside contributors enhancement a request to improve CLI packaging

Comments

@jhihn
Copy link

jhihn commented Mar 16, 2021

Describe the feature or problem you’d like to solve

The only ARM arch supprt is arm64, however even the most recent Raspberry Pi 4 is only ArmV7L

Proposed solution

This will empower Raspberry Pi users from 2, 3 4, zero, etc.

@jhihn jhihn added the enhancement a request to improve CLI label Mar 16, 2021
@jhihn jhihn changed the title Add Raspberry Pi Supprt (armv7l) Add Raspberry Pi Support (armv7l) Mar 16, 2021
@AaronDewes
Copy link

AaronDewes commented Apr 8, 2021

@jhihn The Raspberry Pi supports arm64 since the 2B Rev. 1.2, so every Pi except older Pi 2s, 1, Zero and Pico support arm64. The Raspberry Pi Foundation recently released a 64bit Raspberry Pi OS: http://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2020-08-24/2020-08-20-raspios-buster-arm64.zip.
I'm using GitHub CLI myself on a Raspberry Pi 4 and it works perfectly.

On the Raspberry Pi 4 with 8GB, you even need arm64 to be able to use all 8GB of RAM properly.

@mislav
Copy link
Contributor

mislav commented Apr 9, 2021

@AaronDewes the 64bit Raspberry Pi OS is still highly experimental and not officially recommended for casual use. I wouldn't suggest switching to 64bit just to be able to use existing GitHub CLI packages.

Instead, you could use any computer with Go 1.13+ and make installed to precompile a binary for your Raspberry Pi:

git clone https://github.com/cli/cli gh-cli
cd gh-cli
make clean
GOOS=linux GOARCH=arm GOARM=7 make bin/gh

@AaronDewes
Copy link

Thanks!

I think many RPi 4 8GB users are already using the arm64 version. I'm using it myself and it works perfectly, so while the Raspberry Pi Foundation might hasn't done much testing, it works perfect in most cases. I didn't switch only because of GitHub CLI, arm64 is often better supported by many apps. Just for example, I wanted to run Umbrel on my Raspberry Pi while still having it for other things, and it worked perfectly for me, in the end, you'll decide if it's worth supporting armv7, I just wanted to make @jhihn aware that it's already possible to run GitHub CLI on the Pi.

@jhihn
Copy link
Author

jhihn commented Apr 9, 2021

I'm aware of the experimental 64 version. (Seems the Pi Zero is the 32bit laggard, so PiZeros can't use 64bit and therefore gh?) There's a substantial install base of 32bit raspian, and I don't know how to upgrade that install base to 64 bit. If you follow the Pi foundation recommendation, they are still recommending the install of 32 bit.

Of course, the easiest way may be just to address my only use case: pulling PRs. Your little command wizard thing doesn't give the standard git command and funneling us into using gh:
Screen Shot 2021-04-09 at 9 34 49 AM

If the website also gave the normal git, then we would not be here right now. But absent a way to upgrade the Pi Zero and the existing pi install base to 64 bit I think the idea of arm7 is a still useful one. I know it's a Zero, but they still count right? ;-)

Edit: Real world addendum: I have 2 Pi 4s, 1 Pi3 and 4 Pi Zeros. I am trying to use a raspicam PR on a Pi Zero.

@mislav
Copy link
Contributor

mislav commented Apr 9, 2021

@jhihn To pull PRs using plain git, you can do this:

git fetch origin +pull/NUM/head:my-branch
git checkout my-branch

where "NUM" is the number of the PR you want to check out.

I think the reason that we don't give these instructions in the web UI is that they can't be condensed to a single line, and there are some edge cases where it won't work (for example, if you are already on my-branch, or when the git remote isn't named "origin", etc.).

But ideally, I think GitHub CLI should be readily available on Raspberry Pi in the future so nobody needs to manually compile anything. We will try to publish binaries compatible with both 32-bit or 64-bit Pi OS.

@vilmibm
Copy link
Contributor

vilmibm commented Apr 21, 2021

I've read through the comments here and did cursory googling, but is there a succinct reason why we wouldn't just compile for 32bit ARM?

@vilmibm vilmibm added the core This issue is not accepting PRs from outside contributors label Apr 21, 2021
@jhihn
Copy link
Author

jhihn commented Apr 22, 2021

I've read through the comments here and did cursory googling, but is there a succinct reason why we wouldn't just compile for 32bit ARM?

Well, I'd like to flip that question. Why are they packaging for arm64? Is there a reason why gh needs a 64bit address space? Then everyone would be happy. 32bits ought to be enough for anybody.

@mislav
Copy link
Contributor

mislav commented Aug 17, 2021

Closing since we've been supporting Raspberry Pi OS since Dec 2020 with our arm (more precisely: armv6hf) builds #2621

I've just tried on Raspberry Pi 4 and our 32-bit package works without problems, even though the Pi's processor is technically armv7l. When 64-bit Raspberry Pi OS comes out of beta, we can add official builds for those as well, but until then I feel there is no need.

@mislav mislav closed this as completed Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core This issue is not accepting PRs from outside contributors enhancement a request to improve CLI packaging
Projects
None yet
Development

No branches or pull requests

4 participants