[Replicant] [vendor_replicant-release-scripts] [PATCH 6/6] Add support for building Replicant 11

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Fri Oct 8 13:49:02 UTC 2021


If we don't source envsetup.sh, we have the following when
calling 'make clobber' in Replicant 11:
    build/make/core/main.mk:2: Calling make directly is no longer supported.
    build/make/core/main.mk:3: Either use 'envsetup.sh; m' or 'build/soong/soong_ui.bash --make-mode'
    build/make/core/main.mk:4: *** done.  Stop.
and sourcing envsetup.sh should also work on Replicant 6.0.

As Replicant 11 doesn't have a script to build a toolchain,
we don't run ./vendor/replicant/build-toolchain with
Replicant 11.

As for using $_dir instead of $dir, on Replicant 11, $dir is
set to 'product' after sourcing build/envsetup.sh so we
can't use it.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 build_release.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/build_release.sh b/build_release.sh
index 2228c5c..57334c3 100755
--- a/build_release.sh
+++ b/build_release.sh
@@ -39,13 +39,16 @@ build_all () {
 }
 
 prepare () {
-	dir=$( pwd )
+	_dir="${PWD}"
 	cd "$REPLICANT_DIR"
 
+	. build/envsetup.sh
 	make clobber
-	./vendor/replicant/build-toolchain
+	if is_replicant_6 ; then
+		./vendor/replicant/build-toolchain
+	fi
 
-	cd "$dir"
+	cd "${_dir}"
 }
 
 print_help () {
-- 
2.33.0



More information about the Replicant mailing list