Code Monkey home page Code Monkey logo

armutils's Introduction

armutils will no longer be maintained

REUSE status

armutils

With chroot environments and QEMU it's possible to build Arch Linux packages for ARM architectures in a rather simple and convenient way. armutils provides the corresponding tools:

  • mkarmchroot creates an Arch Linux chroot environment for an ARM architecture from an image file. Such image files can be downloaded from Arch Linux ARM
  • arm-nspawn spawns a command in an ARM chroot environment, wrapping systemd-nspawn
  • makearmpkg builds a package in an ARM chroot environment

These tools mimic the behaviour of their x86_64 counterparts mkarchroot, arch-nspawn and makechrootpkg. qemu-user-static and qemu-user-static-binfmt are used to "translate" between the ARM chroot and the x86_64 host.

mkarmchroot

mkarmchroot is an implementation of the approach described on nerdstuff.org. The tool must be called with:

  • either an URL of an ARM image archive or the path of an image archive on the local file system. Such an image can be obtained from Arch Linux ARM for different ARM architectures.
  • the desired path of the root directory of the new chroot environment
  • a list of packages / package groups that shall be installed.

mkarmchroot creates the root folder for the chroot environment, extracts the image files into it, updates the environment and installs the packages.

arm-nspawn

arm-nspawn is a fork of arch-nspawn with major changes since arch-nspawn is made to be used for x86_64 chroot environments. The interfaces of both commands are almost equal - arm-nspawndoes not provide the -s option.

Using arch-chroot to execute commands in ARM chroots can lead to strange error messages, therefore I recommended to use arm-nspawninstead.

makearmpkg

makearmpkg is a fork of makechrootpkg with minor changes since makechrootpkg is made to be used for x86_64 chroot environments. The calls of arch-nspawn are replaced by calls of arm-nspawn. The interfaces and functionalities of makearmpkg and makechrootpkg are equal. It requires a chroot environment where the packages of base-devel are installed.

Example

The command

$ mkarmchroot -u http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz <YOUR-PATH>/aarch64/root base-devel

creates a chroot environment for ARMv8 / AArch64 under the folder <YOUR-PATH>/aarch64/root and installs the package group base-devel.

If the PKGBUILD file of an AUR package is stored in <YOUR-PATH>/pkg, the package can be built with:

$ cd <YOUR-PATH>/pkg
$ sudo makearmpkg -r ../aarch64 -- -c --syncdeps --noconfirm

The options -c, --syncdeps and --noconfirm are passed to makepkg. makapkg cleans the working directory after the build (-c), installs missing dependencies (--syncdeps) and suppresss user input (--noconfirm).

armutils's People

Contributors

mipimipi avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.