[arch-ports] Advice on bootstrapping Arch onto a new

Sijie Bu tombu at tombu.info
Mon Apr 26 09:34:18 UTC 2021


Thank you! The information are indeed useful!


________________________________
From: Andreas Baumann
Sent: Monday, April 26, 2021 02:27
To: Discussion regarding the porting of Arch Linux to non-x86_64 architectures
Cc: Sijie Bu
Subject: Re: [arch-ports] Advice on bootstrapping Arch onto a new

architecture?
Reply-To: Andreas Baumann <mail at andreasbaumann.cc>
In-Reply-To: <BY5PR14MB3669ACC64AF81801392F1F64DA429 at BY5PR14MB3669.namprd14.prod.outlook.com>

On Mon, Apr 26, 2021 at 09:00:04AM +0000, Sijie Bu via arch-ports wrote:
> (This message was originally posted on arch-general and I was redirected by a member to this list.)
>
> Hello,

Hi,


> I am about to start working as an intern at CIP United, a company focusing on MIPS chips, and I will be bootstrapping Arch Linux onto the MIPS64r6 architecture, in a fashion similar to Arch Linux ARM.
>
> I have checked the Arch Linux MIPS project, but it seems to be inactive for years now. I have checked ArchWiki's DeveloperWiki section, but it seems to lack guidelines or suggestions on bootstrapping Arch onto a new architecture. Therefore I have a few questions:
> - Intuitively, I think I should cross-compile the packages of the "core" section (sans a few x64-specific packages) and build a bootable rootfs, but I was having some trouble finding how should I set makepkg to cross-compile. Do I just set up an Arch developer environment as usual, but substitute the toolchain with the cross ones?

I did a "cross-compile" from x86_64 to i486 some time ago, you can maybe
find some useful information in https://git.archlinux32.org/bootstrap32/.

I can also recommend the oakensource's RISC-V port at
https://github.com/oaken-source/parabola-cross-bootstrap

Basically yes, you'll need a cross toolchain for MIPS, either from the AUR
or use a cross-platorm distro like http://t2sde.org/ to bootstrap directly
from MIPS (in qemu or so).

> - Does adding a new architecture require modifications to the pacman source code? Or pacman itself should support new architectures? I have also tried looking at pacman source code, and it seems to not have hard-coded list of architectures, but I am not 100% sure about this (if I'll have to modify the source code of pacman, I will be emailing the pacman-dev mailing list regarding their policies on patches etc.).

In theory pacman should be quite portable (it runs at least on x86_64, IA32,
ARM 32-bit, AARCH64). So the typical 32-/64-bit issues should have been
fixed.

You will have to make pacman know about your new architecture (and
eventually subarchitectures). See our fork of pacman on
https://git.archlinux32.org/pacman/
(basically auto-detection for SSE2, support for sub-architectures
'i486', 'i686', 'pentium4').

Most work I expect in breaking cycles and dependencies in PKGBUILDs.

>
> Thank you for your time and have a nice day.
> Sincerely
> _______________________________________________
> arch-ports mailing list
> arch-ports at lists.archlinux.org
> https://lists.archlinux.org/listinfo/arch-ports

Happy porting, feel free to ask questions on IRC at #archinux-ports or #archlinux32. :-)

Cheers

Andreas

--
Andreas Baumann
Trottenstrasse 20
CH-8037 Zuerich
Telefon: +41(0)76/373 01 29
E-mail: mail at andreasbaumann.cc
Homepage: www.andreasbaumann.cc<http://www.andreasbaumann.cc>


More information about the arch-ports mailing list