From 29c56cfafd7e38fffa97f741364ef6d86259e3e4 Mon Sep 17 00:00:00 2001
From: nrb <freifunk@nicoboehr.de>
Date: Sun, 23 May 2021 16:35:51 +0200
Subject: [PATCH] allow enabling BROKEN images

People asked for the Raspberry Pi 4, but it's currently broken and hence
is not build if one doesn't set BROKEN. Thus, allow us to set BROKEN for
some targets to allow these images to be built.
---
 .gitlab-ci.yml | 22 +++++++++++++++++++++-
 buildall.sh    |  2 +-
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d921f2af2..8eef6d3d0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -47,7 +47,7 @@ update:
     - rm -rf gluon/openwrt/dl && mkdir -p gluon/openwrt && ln -s ../../ffs-openwrt-dl-cache gluon/openwrt/dl
     - rm -rf gluon/openwrt/staging_dir && mkdir -p staging_dir && ln -s ../../staging_dir gluon/openwrt/staging_dir
   script:
-    - make -C gluon GLUON_SITEDIR="$CI_PROJECT_DIR" GLUON_TARGET="$GLUON_TARGET" GLUON_BRANCH=stable FFS_BUILD_DATE=$(cat build.date) V=1 -j`nproc`
+    - make -C gluon GLUON_SITEDIR="$CI_PROJECT_DIR" GLUON_TARGET="$GLUON_TARGET" GLUON_BRANCH=stable FFS_BUILD_DATE=$(cat build.date) BROKEN="$BROKEN" V=1 -j`nproc`
     - cd gluon/openwrt/dl && git add . && git commit -m "update DL cache" && git push || true
   except:
     - tags
@@ -65,101 +65,121 @@ target:ar71xx-generic:
   extends: .target
   variables:
     GLUON_TARGET: ar71xx-generic
+    BROKEN: ""
  
 target:ar71xx-tiny:
   extends: .target
   variables:
     GLUON_TARGET: ar71xx-tiny
+    BROKEN: ""
  
 target:ar71xx-nand:
   extends: .target
   variables:
     GLUON_TARGET: ar71xx-nand
+    BROKEN: ""
  
 target:ath79-generic:
   extends: .target
   variables:
     GLUON_TARGET: ath79-generic
+    BROKEN: ""
  
 target:brcm2708-bcm2708:
   extends: .target
   variables:
     GLUON_TARGET: brcm2708-bcm2708
+    BROKEN: ""
  
 target:brcm2708-bcm2709:
   extends: .target
   variables:
     GLUON_TARGET: brcm2708-bcm2709
+    BROKEN: ""
  
 target:ipq40xx-generic:
   extends: .target
   variables:
     GLUON_TARGET: ipq40xx-generic
+    BROKEN: ""
  
 target:ipq806x-generic:
   extends: .target
   variables:
     GLUON_TARGET: ipq806x-generic
+    BROKEN: ""
  
 target:lantiq-xrx200:
   extends: .target
   variables:
     GLUON_TARGET: lantiq-xrx200
+    BROKEN: ""
  
 target:lantiq-xway:
   extends: .target
   variables:
     GLUON_TARGET: lantiq-xway
+    BROKEN: ""
  
 target:mpc85xx-generic:
   extends: .target
   variables:
     GLUON_TARGET: mpc85xx-generic
+    BROKEN: ""
  
 target:mpc85xx-p1020:
   extends: .target
   variables:
     GLUON_TARGET: mpc85xx-p1020
+    BROKEN: ""
  
 target:ramips-mt7620:
   extends: .target
   variables:
     GLUON_TARGET: ramips-mt7620
+    BROKEN: ""
  
 target:ramips-mt7621:
   extends: .target
   variables:
     GLUON_TARGET: ramips-mt7621
+    BROKEN: ""
  
 target:ramips-mt76x8:
   extends: .target
   variables:
     GLUON_TARGET: ramips-mt76x8
+    BROKEN: ""
  
 target:ramips-rt305x:
   extends: .target
   variables:
     GLUON_TARGET: ramips-rt305x
+    BROKEN: ""
  
 target:sunxi-cortexa7:
   extends: .target
   variables:
     GLUON_TARGET: sunxi-cortexa7
+    BROKEN: ""
  
 target:x86-generic:
   extends: .target
   variables:
     GLUON_TARGET: x86-generic
+    BROKEN: ""
  
 target:x86-geode:
   extends: .target
   variables:
     GLUON_TARGET: x86-geode
+    BROKEN: ""
  
 target:x86-64:
   extends: .target
   variables:
     GLUON_TARGET: x86-64
+    BROKEN: ""
 
 package:
   stage: package
diff --git a/buildall.sh b/buildall.sh
index 00e3762e5..589c2d05f 100755
--- a/buildall.sh
+++ b/buildall.sh
@@ -33,5 +33,5 @@ make -C gluon update GLUON_SITEDIR="$sitedir" V=1
 
 for target in ${TARGETS[@]}; do
 	echo Building $target
-	make -C gluon GLUON_TARGET=$target GLUON_BRANCH=$branch GLUON_SITEDIR="$sitedir" V=1 -j`nproc`
+	make -C gluon GLUON_TARGET=$target GLUON_BRANCH=$branch GLUON_SITEDIR="$sitedir" BROKEN=1 V=1 -j`nproc`
 done
-- 
GitLab