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

doc: Add Arch Linux ARM startup guide #44

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

samueldr
Copy link
Contributor

@samueldr samueldr commented Jun 29, 2021

Ideally this would be managed by the upstream project, and we'd link to it.

Note that I only followed these instructions once while I was writing them. It's possible there's a silly mistake or more.

And it is by design that we're not installing a package to manage Tow-Boot or U-Boot. The extlinux.conf file is enough.

Oh, and the partition scheme? GPT is strongly suggested. There's no reasons, in 2021, to go with MBR, except Amlogic boards without SPI Flash. Or misplaced nostalgia? And only one partition? Makes things simpler. But advanced users will know what to do, hopefully, to make it work with more partitions.

Note that I am unsure about how the parted command will react with an SD card started from the shared disk image. I'll want to test:

  • Test with a shared disk image

It's not obvious how to tell parted, in the imperative command-based interface, "make one partition after the current one, fill the space".

Verified to boot on:

  • Pine A64-LTS
  • (partially) on Libre Computer ROC-RK3399-PC (but fails due to fusb302, built-in module, kernel bug where it kills the type-c power during boot)
  • something happens on the Pinebook Pro, but I was unable to determine the actual boot process as the display turned off. And I wasn't setup to debug it at the time.

So I guess it's YMMV for Pinebook Pro users.

Ideally this would be managed by the upstream project, and we'd link to
it.
@n2qz
Copy link

n2qz commented Jun 30, 2021

Partition step should be:

parted /dev/sdb -- mkpart archlinuxarm-rootfs 1 100%

@qiu-x
Copy link

qiu-x commented Jul 28, 2021

@n2qz Why can't the partition start at 0% when using the dedicated storage method?

@n2qz
Copy link

n2qz commented Jul 28, 2021

@n2qz Why can't the partition start at 0% when using the dedicated storage method?

Partition will end up misaligned if you try that (and parted will provide a warning to that effect).

@samueldr samueldr changed the base branch from released to development November 15, 2021 19:48
@benthetechguy
Copy link

Nice, I unknowingly wrote very similar instructions on the Pine64 Wiki for using Tow-Boot to get Arch Linux ARM running on the Pinebook Pro.

@benthetechguy
Copy link

benthetechguy commented Jun 1, 2022

As for the last part, normal UEFI installation via pacstrap should be relatively simple except for the fact that you need an existing Arch Linux ARM install to run it from since pacstrap doesn't support foreign architectures like debootstrap.
Speaking of Debian, I have a package waiting for a Debian member to sponsor the upload of that would allow someone to package pacstrap for Debian, which would greatly simplify things, as many people can run some form of Debian easily on their boards.

EDIT: I just tested installing Arch Linux ARM via the official pacstrap installation method on the Arch Wiki and it worked perfectly without my needing to change anything except for the name of the kernel from linux to linux-aarch64. Even down to the partitioning and bootloader, everything worked exactly the same as it would on an x86 UEFI system. The only issue remaining is getting to an environment where pacstrap can be run.

@benthetechguy
Copy link

you need an existing Arch Linux ARM install to run it from since pacstrap doesn't support foreign architectures like debootstrap

The only issue remaining is getting to an environment where pacstrap can be run.

OK, I have now figured out how to pacstrap Arch Linux ARM from x86_64 Arch Linux.

  1. Install qemu-user-static and binfmt-user-static from the AUR.
  2. Download and install the Arch Linux ARM keyring:
    pacman -U archlinuxarm-keyring-20140119-1-any.pkg.tar.xz
  3. Download Arch Linux ARM mirrorlist and pacman.conf:
    https://archlinuxarm.org/packages/aarch64/pacman/files/pacman.conf
    https://archlinuxarm.org/packages/any/pacman-mirrorlist/files/mirrorlist
  4. Replace CARCH in pacman.conf with desired arch (aarch64 or armv7h):
    sed -i 's/@CARCH@/aarch64/' pacman.conf or sed -i 's/@CARCH@/armv7h/' pacman.conf
  5. Replace /etc/pacman.d/mirorlist with local mirrorlist:
    sed -i "s|Include = /etc/pacman.d|Include = $(pwd)|" pacman.conf
  6. Run pacstrap with -G, -M, and -C to ensure use of ARM pacman.conf and mirrorlist:
    pacstrap -GM -C pacman.conf /path/to/destination whatever packages here

@samueldr samueldr added this to the [blocked or WIP] milestone Jun 2, 2022
@samueldr samueldr added the 4. type: documentation Improvements or additions to documentation label Jun 2, 2022
@leo60228
Copy link

For what it's worth, I used these instructions as a guideline and I successfully installed using shared storage with fdisk instead of parted. I had to change Image to zImage, though.

@leo60228
Copy link

Instructions to install using pacstrap and a UEFI bootable USB drive, just like "normal" Arch Linux would be welcome. It would make things easier for everyone to start considering those ARM platforms that can do standards-based boots "normal" platforms and simply do the usual installation steps.

I found multiple people who managed to build UEFI installer ISOs for aarch64, but I'm not sure that the Tow-Boot docs should be linking unofficial installers. Additionally, these are both only for aarch64, while these instructions work for armv7.

@vincele
Copy link
Contributor

vincele commented Nov 20, 2022

FWIW, I used @benthetechguy's instruction on the pine64 wiki (which are similar to the ones proposed here) on a pinebookpro. Tested tow boot (on SD card, emmc disconnected, SPI empty) : pine64-pinebookPro-2021.10-005. This is nicely working. Thanks.

EDIT: and then borrowing on those I added a page to install void linux the same way here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. type: documentation Improvements or additions to documentation
Development

Successfully merging this pull request may close these issues.

None yet

6 participants