From aa9d077b9380214a8c44262a12a9e1da272f0e04 2018-11-17 23:30:41 From: Unknown Date: 2018-11-17 23:30:41 Subject: [PATCH] convert line ending fixing error "\r command not found" --- diff --git a/bootstrap.d/16-videocore.sh b/bootstrap.d/16-videocore.sh index 139d60f..8621560 100644 --- a/bootstrap.d/16-videocore.sh +++ b/bootstrap.d/16-videocore.sh @@ -1,33 +1,33 @@ -# -# Setup videocore - Raspberry Userland -# - -# Load utility functions -. ./functions.sh - -if [ "$ENABLE_VIDEOCORE" = true ] ; then - # Copy existing videocore sources into chroot directory - if [ -n "$VIDEOCORESRC_DIR" ] && [ -d "$VIDEOCORESRC_DIR" ] ; then - # Copy local U-Boot sources - cp -r "${VIDEOCORESRC_DIR}" "${R}/tmp" - else - # Create temporary directory for U-Boot sources - temp_dir=$(as_nobody mktemp -d) - - # Fetch U-Boot sources - as_nobody git -C "${temp_dir}" clone "${VIDEOCORE_URL}" - - # Copy downloaded U-Boot sources - mv "${temp_dir}/userland" "${R}/tmp/" - - # Set permissions of the U-Boot sources - chown -R root:root "${R}/tmp/userland" - - # Remove temporary directory for U-Boot sources - rm -fr "${temp_dir}" - fi - - 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 - make -j "$(nproc)" - chroot_exec PATH="${PATH}":/opt/vc/bin -fi +# +# Setup videocore - Raspberry Userland +# + +# Load utility functions +. ./functions.sh + +if [ "$ENABLE_VIDEOCORE" = true ] ; then + # Copy existing videocore sources into chroot directory + if [ -n "$VIDEOCORESRC_DIR" ] && [ -d "$VIDEOCORESRC_DIR" ] ; then + # Copy local U-Boot sources + cp -r "${VIDEOCORESRC_DIR}" "${R}/tmp" + else + # Create temporary directory for U-Boot sources + temp_dir=$(as_nobody mktemp -d) + + # Fetch U-Boot sources + as_nobody git -C "${temp_dir}" clone "${VIDEOCORE_URL}" + + # Copy downloaded U-Boot sources + mv "${temp_dir}/userland" "${R}/tmp/" + + # Set permissions of the U-Boot sources + chown -R root:root "${R}/tmp/userland" + + # Remove temporary directory for U-Boot sources + rm -fr "${temp_dir}" + fi + + 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 + make -j "$(nproc)" + chroot_exec PATH="${PATH}":/opt/vc/bin +fi diff --git a/bootstrap.d/41-uboot.sh b/bootstrap.d/41-uboot.sh index 67c4657..992e532 100644 --- a/bootstrap.d/41-uboot.sh +++ b/bootstrap.d/41-uboot.sh @@ -66,6 +66,20 @@ if [ "$ENABLE_UBOOT" = true ] ; then fi fi + if [ "$SET_ARCH" = 64 ] ; then + echo "Setting up config.txt to boot 64bit uboot" + + printf "\n# 64bit-mode" >> "${BOOT_DIR}/config.txt" + printf "\n# arm_control=0x200 is deprecated https://www.raspberrypi.org/documentation/configuration/config-txt/misc.md" >> "${BOOT_DIR}/config.txt" + printf "\narm_64bit=1" >> "${BOOT_DIR}/config.txt" + sed -i "s|bootz|booti|g" "${BOOT_DIR}/uboot.mkimage" + fi + + # instead of sd, boot from usb device + if [ "$ENABLE_UBOOTUSB" = true ] ; then + sed -i "s|mmc|usb|g" "${BOOT_DIR}/uboot.mkimage" + fi + # Set mkfile to use the correct dtb file sed -i "s/^\(setenv dtbfile \).*/\1${DTB_FILE}/" "${BOOT_DIR}/uboot.mkimage"