From 1abf64c76c8fe8bf3ae27db85e5f80b6ef5a7c16 Mon Sep 17 00:00:00 2001 From: Bastian Date: Thu, 7 Nov 2024 11:57:10 +0100 Subject: [PATCH] v2023.2.4 and dockerized build --- Makefile | 2 +- dockerfile_build | 6 ++++ patches/targets-raspberry-pi-4.patch | 26 +++++++++++++++++ scripts/install_build_dependencies.sh | 40 +++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 dockerfile_build create mode 100644 patches/targets-raspberry-pi-4.patch create mode 100644 scripts/install_build_dependencies.sh diff --git a/Makefile b/Makefile index 7ad4b7e..fd99816 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ GLUON_BUILD_DIR := gluon-build GLUON_GIT_URL := https://github.com/freifunk-gluon/gluon -GLUON_GIT_REF := 4e2bd01d5f7ee1677d522e75c3818719e513eb01 +GLUON_GIT_REF := v2023.2.4 PATCH_DIR := ./patches diff --git a/dockerfile_build b/dockerfile_build new file mode 100644 index 0000000..05d8121 --- /dev/null +++ b/dockerfile_build @@ -0,0 +1,6 @@ +FROM ubuntu:22.04 + +ADD ./scripts/install_build_dependencies.sh / +RUN /install_build_dependencies.sh \ + && apt-get clean \ + && rm -r /var/lib/apt/lists/* \ No newline at end of file diff --git a/patches/targets-raspberry-pi-4.patch b/patches/targets-raspberry-pi-4.patch new file mode 100644 index 0000000..d3f0212 --- /dev/null +++ b/patches/targets-raspberry-pi-4.patch @@ -0,0 +1,26 @@ +diff --git a/targets/bcm27xx-bcm2711 b/targets/bcm27xx-bcm2711 +new file mode 100644 +index 00000000..ba631911 +--- /dev/null ++++ b/targets/bcm27xx-bcm2711 +@@ -0,0 +1,9 @@ ++include 'bcm27xx.inc' ++ ++device('raspberry-pi-4-model-b', 'rpi-4', { ++ manifest_aliases = { ++ 'raspberry-pi-4-model-b-rev-1.1', ++ 'raspberry-pi-4-model-b-rev-1.2', ++ 'raspberry-pi-4-model-b-rev-1.4', ++ }, ++}) +diff --git a/targets/targets.mk b/targets/targets.mk +index d5f605aa..d27865b0 100644 +--- a/targets/targets.mk ++++ b/targets/targets.mk +@@ -25,5 +25,6 @@ $(eval $(call GluonTarget,x86,64)) + + ifeq ($(BROKEN),1) + $(eval $(call GluonTarget,bcm27xx,bcm2710)) # BROKEN: Untested ++$(eval $(call GluonTarget,bcm27xx,bcm2711)) # BROKEN: Untested + $(eval $(call GluonTarget,mvebu,cortexa9)) # BROKEN: No 11s support + endif diff --git a/scripts/install_build_dependencies.sh b/scripts/install_build_dependencies.sh new file mode 100644 index 0000000..a0f7f26 --- /dev/null +++ b/scripts/install_build_dependencies.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env sh + +set -eux + +# Verify that the script is running in Ubuntu +. /etc/lsb-release +if [ "$DISTRIB_ID" != "Ubuntu" ]; then + echo "Error: This script only works in Ubuntu" + exit 1 +fi + +# Avoid tzdata from asking which timezone to choose +export DEBIAN_FRONTEND=noninteractive + +apt-get update + +# ca-certificates required for Github git cloning +apt-get -y --no-install-recommends install ca-certificates + +# Install build environment +apt-get -y --no-install-recommends install \ + bash \ + bzip2 \ + curl \ + diffutils \ + file \ + g++ \ + gawk \ + gcc \ + git \ + libncurses5-dev \ + make \ + patch \ + perl \ + python3 \ + qemu-utils \ + rsync \ + tar \ + unzip \ + wget