From 1487fbc1b876036e7f7f2cdf8cd8736ce1901e7d 2018-11-22 17:18:41 From: Unknown Date: 2018-11-22 17:18:41 Subject: [PATCH] a --- diff --git a/bootstrap.d/16-videocore.sh b/bootstrap.d/16-videocore.sh index 026b9ee..b81f4dd 100644 --- a/bootstrap.d/16-videocore.sh +++ b/bootstrap.d/16-videocore.sh @@ -30,7 +30,7 @@ if [ "$ENABLE_VIDEOCORE" = true ] ; then # Create build dir mkdir "${R}"/tmp/userland/build # push us to build directory - pushd "${R}"/tmp/userland/build + cd "${R}"/tmp/userland/build if [ "$RELEASE_ARCH" = "arm64" ] ; then cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_BUILD_TYPE=release -DARM64=ON -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_ASM_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE" -DCMAKE_ASM_FLAGS="${CMAKE_ASM_FLAGS} -c" -DVIDEOCORE_BUILD_DIR="${R}" "${R}/tmp/userland" @@ -47,5 +47,5 @@ if [ "$ENABLE_VIDEOCORE" = true ] ; then #build userland make -j "$(nproc)" #pop us out of build dir - popd + cd "${WORKDIR}" fi diff --git a/functions.sh b/functions.sh index 8b05871..a16a8bd 100644 --- a/functions.sh +++ b/functions.sh @@ -1,3 +1,4 @@ +#!/bin/sh # This file contains utility functions used by rpi23-gen-image.sh cleanup (){ @@ -79,8 +80,8 @@ chroot_remove_cc() { #https://github.com/sakaki-/bcmrpi3-kernel-bis/blob/master/conform_config.sh set_kernel_config() { # flag as $1, value to set as $2, config must exist at "./.config" - local TGT="CONFIG_${1#CONFIG_}" - local REP="${2//\//\\/}" + TGT="CONFIG_${1#CONFIG_}" + REP="${2}" if grep -q "^${TGT}[^_]" .config; then sed -i "s/^\(${TGT}=.*\|# ${TGT} is not set\)/${TGT}=${REP}/" .config else diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index 8296e71..59e5988 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -217,11 +217,6 @@ MISSING_PACKAGES="" # Packages installed for c/c++ build environment in chroot (keep empty) COMPILER_PACKAGES="" -#If init and systemd-sysv are wanted e.g. halt/reboot/shutdown scripts -if [ "$ENABLE_SYSVINIT" = false ] ; then -APT_EXCLUDES="--exclude=${APT_EXCLUDES},init,systemd-sysv" -fi - #Check if apt-cacher-ng has its default port open on and set APT_PROXY if [ -n "$(lsof -i :3142)" ] ; then HTTP_PROXY=http://127.0.0.1:3142/