Skip to content

[Older] HOWTO Install required packages on the Host for SEALS

Kaiwan N Billimoria edited this page Feb 3, 2023 · 1 revision

UPDATE- The info here's mostly superseded by the 'SEALS Howto' wiki page.

Setting up your system to try out the SEALS project (in a nutshell, allowing one to build a “skeletal” ARM/Linux kernel and root filesystem emulated using Qemu):

Required Components:

  • x86-to-ARM Linaro toolchain
  • Kernel configuration menu : libncurses5-dev
  • Busybox (see http://busybox.net )
  • mkfs.ext4
  • Qemu for ARM

Optional : strace

Having the versatile 'strace' on-board is always helpful! Finally, have found a website that describes how to successfully cross-compile this elusive little utility for ARM! Here it is: Cross compiling for ARM with Ubuntu 16.04 LTS

Have used it on Fedora 28 with the Linaro toolchain (see below) and all went well.


Details

x86-to-ARM GNU Toolchain

[UPDATE: Apr2022: the download links provided earlier) for the Mentor Graphics toolchain do not work any longer. Thus, we show how to install the toolchain ].

NOTE- often, folks install a toolchain using the distro's package management software (like apt, dnf or yum). Well, that does install a basic toolchain but I find that it's incomplete in an important aspect: the toolchain 'sysroot' libraries, sbin and usr components!

For this reason, I strongly suggest you don't take the shortcut and just install a toolchain via the package manager; rather, follow the steps below to properly install the Linaro x86-to-ARM GNU EABI5 toolchain on Linux:

The links provided below are representative; they're fine as of this writing (Feb 2022) but may change in future.

Update: location for ARM Toolchain download

ARM Toolchain download, from the ARM GNU Toolchain Downloads page

Navigate to the above URL, scroll down to the section labelled x86_64 Linux hosted cross toolchains and download the latest stable version of the AArch32 GNU/Linux target with hard float (arm-none-linux-gnueabihf) toolchain: gcc-arm-w.x.y-x86_64-arm-none-linux-gnueabihf.tar.xz (you can do so with wget <url>).

Steps after downloading:

  1. Extract the above gcc-arm-w.x.y-x86_64-arm-none-linux-gnueabihf.tar.xz file (I extracted them into my ~/Downloads dir)

  2. Then, in the SEAL's build.config file:

    2.1 set the CXX variable to the toolchain prefix (usually arm-none-linux-gnueabihf- )

    2.2 set the CXX_LOC variable to the download location on your disk.

[FYI, other good resources on Toolchains:


For the installs performed below, and in general, it's a good idea to first determine if your network requires to go through a proxy to access the distro's software repositories. Also do a sudo apt-get update first.

Kernel configuration menu :

NOTE Specifying an incorrect kernel configuration often results in the kernel (qemu) hanging very early

at boot. So getting the kernel config right is critical. Hence, to help the user, we provide a working sample kernel config file (for kernel ver 4.14.52) here: doc/kconfig_4.14.52. One could use this as a base.

Support to display the curses-based menu used in 'make menuconfig' requires the installation of certain headers:

sudo apt-get install libncurses5-dev

Qemu for ARM

sudo apt-get install qemu-system-arm