dde_linux: add busybox port

Fix genodelabs/genode#5214
This commit is contained in:
Stefan Kalkowski 2024-05-13 15:53:29 +02:00 committed by Christian Helmuth
parent aad80e81da
commit 32bc1b14d4
8 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1 @@
06b318191dfd5f9ba3aff5a38810d22d71b2e574

View File

@ -0,0 +1,7 @@
LICENSE := GPLv2
VERSION := 1.36.1
DOWNLOADS := busybox.archive
URL(busybox) := https://busybox.net/downloads/busybox-$(VERSION).tar.bz2
SHA(busybox) := b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314
DIR(busybox) := src/busybox

View File

@ -0,0 +1,26 @@
Busybox port
############
For convenience reasons this target builds a busybox binary that can be used,
e.g., within run-scripts to provide an initram-filesystem for a Linux guest OS,
or native Linux kernel during device-driver porting.
Requirements
~~~~~~~~~~~~
Tom compile and link busybox appropriatedly, the Genode toolchain is not
sufficient. Instead tools of the host system are used. When building busybox
on a x86_64 host machine for either ARM or x86 32-bit machines these targets
require a cross-compilation toolchain to be installed first.
On a x86_64 Debian-based machine, one needs to install for ARM 32-bit:
! apt-get install crossbuild-essential-armhf
and for ARM 64-bit:
! apt-get install crossbuild-essential-arm64
for x86 32-bit cross compilation, you need:
! apt-get install crossbuild-essential-i386

View File

@ -0,0 +1,6 @@
$(call check_tool,arm-linux-gnueabihf-gcc)
REQUIRES := arm
BB_MK_ARGS := ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
include $(PRG_DIR)/../target.inc

View File

@ -0,0 +1,6 @@
$(call check_tool,aarch64-linux-gnu-gcc)
REQUIRES := arm_v8a
BB_MK_ARGS := ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
include $(PRG_DIR)/../target.inc

View File

@ -0,0 +1,20 @@
TARGET := busybox
CUSTOM_TARGET_DEPS := busybox.links
BB_DIR := $(call select_from_ports,busybox)/src/busybox
PWD := $(shell pwd)
# do not confuse third-party sub-makes
unexport .SHELLFLAGS
# filter for make output of kernel build system
BUILD_OUTPUT_FILTER = 2>&1 | sed "s/^/ [Busybox] /"
busybox.links:
$(MSG_CONFIG)Buildroot
$(VERBOSE)$(MAKE) -C $(BB_DIR) O=$(PWD) $(BB_MK_ARGS) defconfig $(BUILD_OUTPUT_FILTER)
$(VERBOSE)sed -i -e 's/^# CONFIG_STATIC.*/CONFIG_STATIC=y/' .config
$(MSG_BUILD)Buildroot
$(VERBOSE)$(MAKE) $(BB_MK_ARGS) $(BUILD_OUTPUT_FILTER)
$(VERBOSE)$(MAKE) $(BB_MK_ARGS) CONFIG_PREFIX=rootfs install $(BUILD_OUTPUT_FILTER)

View File

@ -0,0 +1,6 @@
$(call check_tool,i686-linux-gnu-gcc)
REQUIRES := x86_32
BB_MK_ARGS := ARCH=i386 CROSS_COMPILE=i686-linux-gnu-
include $(PRG_DIR)/../target.inc

View File

@ -0,0 +1,4 @@
REQUIRES := x86_64
BB_MK_ARGS := ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-
include $(PRG_DIR)/../target.inc