From 588e8264331f51d243ed88d92f36c9b4fa4f7b4c 2017-11-01 19:44:53 From: Gérard Vidal Date: 2017-11-01 19:44:53 Subject: [PATCH] Merge pull request #8 from drtyhlpr/master MàJ depuis la source --- diff --git a/README.md b/README.md index 54f2aab..2181f6f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The following list of Debian packages must be installed on the build system beca ```debootstrap debian-archive-keyring qemu-user-static binfmt-support dosfstools rsync bmap-tools whois git bc psmisc dbus sudo``` -It is recommended to configure the `rpi23-gen-image.sh` script to build and install the latest Raspberry Pi Linux kernel. For the RPi3 this is mandetory. Kernel compilation and linking will be performed on the build system using an ARM (armhf) cross-compiler toolchain. +It is recommended to configure the `rpi23-gen-image.sh` script to build and install the latest Raspberry Pi Linux kernel. For the RPi3 this is mandatory. Kernel compilation and linking will be performed on the build system using an ARM (armhf) cross-compiler toolchain. The script has been tested using the default `crossbuild-essential-armhf` toolchain meta package on Debian Linux `jessie` and `stretch` build systems. Please check the [Debian CrossToolchains Wiki](https://wiki.debian.org/CrossToolchains) for further information. diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index 9946c81..f8c4256 100644 --- a/bootstrap.d/13-kernel.sh +++ b/bootstrap.d/13-kernel.sh @@ -8,12 +8,12 @@ # Fetch and build latest raspberry kernel if [ "$BUILD_KERNEL" = true ] ; then # Setup source directory - mkdir -p "${R}/usr/src" + mkdir -p "${R}/usr/src/linux" # Copy existing kernel sources into chroot directory if [ -n "$KERNELSRC_DIR" ] && [ -d "$KERNELSRC_DIR" ] ; then # Copy kernel sources - cp -r "${KERNELSRC_DIR}" "${R}/usr/src" + cp -r "${KERNELSRC_DIR}/*" "${R}/usr/src/linux" # Clean the kernel sources if [ "$KERNELSRC_CLEAN" = true ] && [ "$KERNELSRC_PREBUILT" = false ] ; then @@ -25,13 +25,13 @@ if [ "$BUILD_KERNEL" = true ] ; then # Fetch current RPi2/3 kernel sources if [ -z "${KERNEL_BRANCH}" ] ; then - as_nobody -u nobody git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" + as_nobody -u nobody git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" linux else - as_nobody -u nobody git -C "${temp_dir}" clone --depth=1 --branch "${KERNEL_BRANCH}" "${KERNEL_URL}" + as_nobody -u nobody git -C "${temp_dir}" clone --depth=1 --branch "${KERNEL_BRANCH}" "${KERNEL_URL}" linux fi # Copy downloaded kernel sources - mv "${temp_dir}/linux" "${R}/usr/src/" + mv "${temp_dir}/linux/*" "${R}/usr/src/linux/" # Remove temporary directory for kernel sources rm -fr "${temp_dir}"