##// END OF EJS Templates
autoselect local apt-cacher-ng instance...
burnbabyburn -
r343:b08ad2f7992a
parent child
Show More
@@ -46,7 +46,7 CONFIG_TEMPLATE=rpi2stretch ./rpi23-gen-image.sh
46 46 Set Debian packages server address. Choose a server from the list of Debian worldwide [mirror sites](https://www.debian.org/mirror/list). Using a nearby server will probably speed-up all required downloads within the bootstrapping process.
47 47
48 48 ##### `APT_PROXY`=""
49 Set Proxy server address. Using a local Proxy-Cache like `apt-cacher-ng` will speed-up the bootstrapping process because all required Debian packages will only be downloaded from the Debian mirror site once.
49 Set Proxy server address. Using a local Proxy-Cache like `apt-cacher-ng` will speed-up the bootstrapping process because all required Debian packages will only be downloaded from the Debian mirror site once. If `apt-cacher-ng` is running on default `http://127.0.0.1:3142` it is autodetected and you don't need to set this.
50 50
51 51 ##### `APT_INCLUDES`=""
52 52 A comma separated list of additional packages to be installed by debootstrap during bootstrapping.
@@ -19,7 +19,7 if [ "$ENABLE_MINBASE" = true ] ; then
19 19 fi
20 20
21 21 # Base debootstrap (unpack only)
22 http_proxy=${APT_PROXY} debootstrap "${APT_EXCLUDES}" --arch="${RELEASE_ARCH}" --foreign ${VARIANT} --components="${COMPONENTS}" --include="${APT_INCLUDES}" "${RELEASE}" "${R}" "http://${APT_SERVER}"
22 http_proxy=${APT_PROXY} debootstrap ${APT_EXCLUDES} --arch="${RELEASE_ARCH}" --foreign ${VARIANT} --components="${COMPONENTS}" --include="${APT_INCLUDES}" "${RELEASE}" "${R}" "http://${APT_SERVER}"
23 23
24 24 # Copy qemu emulator binary to chroot
25 25 install -m 755 -o root -g root "${QEMU_BINARY}" "${R}${QEMU_BINARY}"
@@ -27,7 +27,20 if [ "$ENABLE_VIDEOCORE" = true ] ; then
27 27 rm -fr "${temp_dir}"
28 28 fi
29 29
30 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 -DVIDEOCORE_BUILD_DIR="${R}"/opt/vc
31 make -j $(nproc)
32 chroot_exec PATH=${PATH}:/opt/vc/bin
30 if [ "$RELEASE_ARCH" = "arm64" ] ; then
31 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}"/opt/vc "${R}/tmp/userland"
32 fi
33
34 if [ "$RELEASE_ARCH" = "armel" ] ; then
35 cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=arm-linux-gnueabi-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabi-g++ -DCMAKE_ASM_COMPILER=arm-linux-gnueabi-gcc -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE" -DCMAKE_ASM_FLAGS="${CMAKE_ASM_FLAGS} -c" -DCMAKE_SYSTEM_PROCESSOR="arm" -DVIDEOCORE_BUILD_DIR="${R}"/opt/vc "${R}/tmp/userland"
36 fi
37
38 if [ "$RELEASE_ARCH" = "armhf" ] ; then
39 cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_BUILD_TYPE=release -DCMAKE_TOOLCHAIN_FILE="${R}"/tmp/userland/makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake -DVIDEOCORE_BUILD_DIR="${R}"/opt/vc "${R}/tmp/userland"
40 fi
41
42 #build userland
43 make -j "$(nproc)"
44 #include default_installdir in path
45 chroot_exec PATH="${PATH}":/opt/vc/bin
33 46 fi
@@ -195,6 +195,9 CHROOT_SCRIPTS=${CHROOT_SCRIPTS:=""}
195 195 APT_INCLUDES=${APT_INCLUDES:=""}
196 196 APT_INCLUDES="${APT_INCLUDES},apt-transport-https,apt-utils,ca-certificates,debian-archive-keyring,dialog,sudo,systemd,sysvinit-utils,locales,keyboard-configuration,console-setup"
197 197
198 #Packages to exclude from chroot build environment
199 APT_EXCLUDES=${APT_EXCLUDES:=""}
200
198 201 # Packages required for bootstrapping
199 202 REQUIRED_PACKAGES="debootstrap debian-archive-keyring qemu-user-static binfmt-support dosfstools rsync bmap-tools whois git bc psmisc dbus sudo netselect-apt"
200 203 MISSING_PACKAGES=""
@@ -202,6 +205,16 MISSING_PACKAGES=""
202 205 # Packages installed for c/c++ build environment in chroot (keep empty)
203 206 COMPILER_PACKAGES=""
204 207
208 #If init and systemd-sysv are wanted e.g. halt/reboot/shutdown scripts
209 if [ "$ENABLE_SYSVINIT" = false ] ; then
210 APT_EXCLUDES="--exclude=${APT_EXCLUDES},init,systemd-sysv"
211 fi
212
213 #Check if apt-cacher-ng has its default port open on and set APT_PROXY
214 if [ -n "$(lsof -i :3142)" ] ; then
215 HTTP_PROXY=http://127.0.0.1:3142/
216 fi
217
205 218 #ipinfo=$(curl ipinfo.io | grep country )
206 219 #grep -o '\"[^"]*\"' $ipinfo | tr -d '"'
207 220 #grep -Po '"country":.*?[^\\]",' $(curl ipinfo.io | grep country )
@@ -249,7 +262,7 if [ -n "$SET_ARCH" ] ; then
249 262 KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img}
250 263 CROSS_COMPILE=${CROSS_COMPILE:=aarch64-linux-gnu-}
251 264 else
252 echo "error: At the moment Raspberry PI 3 and 3B+ are the only Models which support 64bit"
265 echo "error: Only Raspberry PI 3 and 3B+ support 64bit"
253 266 exit 1
254 267 fi
255 268 fi
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant