@@ -12,6 +12,7 if [ -z "$APT_PROXY" ] ; then | |||
|
12 | 12 | fi |
|
13 | 13 | |
|
14 | 14 | if [ "$BUILD_KERNEL" = false ] ; then |
|
15 | if [ RPI_MODEL = 2 ] ; then | |
|
15 | 16 | # Install APT pinning configuration for flash-kernel package |
|
16 | 17 | install_readonly files/apt/flash-kernel "${ETC_DIR}/apt/preferences.d/flash-kernel" |
|
17 | 18 | |
@@ -22,6 +23,11 if [ "$BUILD_KERNEL" = false ] ; then | |||
|
22 | 23 | # Upgrade collabora package index and install collabora keyring |
|
23 | 24 | chroot_exec apt-get -qq -y update |
|
24 | 25 | chroot_exec apt-get -qq -y --allow-unauthenticated install collabora-obs-archive-keyring |
|
26 | # if RPI_MODEL = [0] || [1] || [1P] | |
|
27 | else | |
|
28 | # insert apt configuration for precompiled kernel repository for RPI 0,1,1P | |
|
29 | fi | |
|
30 | ||
|
25 | 31 | else # BUILD_KERNEL=true |
|
26 | 32 | # Install APT sources.list |
|
27 | 33 | install_readonly files/apt/sources.list "${ETC_DIR}/apt/sources.list" |
@@ -233,21 +233,34 if [ "$BUILD_KERNEL" = true ] ; then | |||
|
233 | 233 | chroot_exec ln -sf /usr/src/linux "/lib/modules/${KERNEL_VERSION}/source" |
|
234 | 234 | fi |
|
235 | 235 | fi |
|
236 | ||
|
237 | else # BUILD_KERNEL=false | |
|
238 | # Kernel installation | |
|
239 | chroot_exec apt-get -qq -y --no-install-recommends install linux-image-"${COLLABORA_KERNEL}" raspberrypi-bootloader-nokernel | |
|
240 | ||
|
241 | # Install flash-kernel last so it doesn't try (and fail) to detect the platform in the chroot | |
|
242 | chroot_exec apt-get -qq -y install flash-kernel | |
|
243 | ||
|
244 | # Check if kernel installation was successful | |
|
245 | VMLINUZ="$(ls -1 ${R}/boot/vmlinuz-* | sort | tail -n 1)" | |
|
246 | if [ -z "$VMLINUZ" ] ; then | |
|
247 | echo "error: kernel installation failed! (/boot/vmlinuz-* not found)" | |
|
248 | cleanup | |
|
249 | exit 1 | |
|
236 | elif [ BUILD_KERNEL = false ] | |
|
237 | # Collabora states this kernel is just for RPI 2 so better implement a check. | |
|
238 | #From https://repositories.collabora.co.uk/debian/dists/jessie/rpi2/binary-armhf/Packages | |
|
239 | #"The Linux kernel "${COLLABORA_KERNEL}" and modules for use on ARMv7 kernel for Raspberry pi 2 model B+" | |
|
240 | # nested if to be easily extended for more precompiled kernels | |
|
241 | if [ "$SET_ARCH" = 32 ] ; then | |
|
242 | if [ RPI_MODEL = 2 ] ; then | |
|
243 | # Kernel installation | |
|
244 | chroot_exec apt-get -qq -y --no-install-recommends install linux-image-"${COLLABORA_KERNEL}" raspberrypi-bootloader-nokernel | |
|
245 | ||
|
246 | # Install flash-kernel last so it doesn't try (and fail) to detect the platform in the chroot | |
|
247 | chroot_exec apt-get -qq -y install flash-kernel | |
|
248 | ||
|
249 | # Check if kernel installation was successful | |
|
250 | VMLINUZ="$(ls -1 ${R}/boot/vmlinuz-* | sort | tail -n 1)" | |
|
251 | if [ -z "$VMLINUZ" ] ; then | |
|
252 | echo "error: kernel installation failed! (/boot/vmlinuz-* not found)" | |
|
253 | cleanup | |
|
254 | exit 1 | |
|
255 | fi | |
|
256 | # Copy vmlinuz kernel to the boot directory | |
|
257 | install_readonly "${VMLINUZ}" "${BOOT_DIR}/${KERNEL_IMAGE}" | |
|
258 | fi | |
|
259 | if [ RPI_MODEL = 0 ] || [ RPI_MODEL = 1 ] || [ RPI_MODEL = 1P ] ; then | |
|
260 | # insert precompiled Kernel here | |
|
261 | fi | |
|
262 | #if [ "$SET_ARCH" = 64 ] | |
|
263 | else | |
|
264 | # inset precompiled 64 bit kernel here | |
|
250 | 265 | fi |
|
251 | # Copy vmlinuz kernel to the boot directory | |
|
252 | install_readonly "${VMLINUZ}" "${BOOT_DIR}/${KERNEL_IMAGE}" | |
|
253 | 266 | fi |
@@ -112,7 +112,7 install_readonly files/modules/rpi2.conf "${R}/lib/modules-load.d/rpi2.conf" | |||
|
112 | 112 | |
|
113 | 113 | # Load hardware random module at boot |
|
114 | 114 | if [ "$ENABLE_HWRANDOM" = true ] && [ "$BUILD_KERNEL" = false ] ; then |
|
115 | sed -i "s/^# bcm2708_rng/bcm2708_rng/" "${R}/lib/modules-load.d/rpi2.conf" | |
|
115 | sed -i "s/^# bcm2708_rng/bcm2708_rng/" "${R}/lib/modules-load.d/rpi2.conf" | |
|
116 | 116 | fi |
|
117 | 117 | |
|
118 | 118 | # Load sound module at boot |
@@ -58,9 +58,9 if [ "$ENABLE_UBOOT" = true ] ; then | |||
|
58 | 58 | sed -i '/.*initramfs.*/d' "${BOOT_DIR}/uboot.mkimage" |
|
59 | 59 | |
|
60 | 60 | if [ "$BUILD_KERNEL" = false ] ; then |
|
61 | # Remove dtbfile from U-Boot mkfile | |
|
62 | sed -i '/.*dtbfile.*/d' "${BOOT_DIR}/uboot.mkimage" | |
|
63 | printf "\nbootz \${kernel_addr_r}" >> "${BOOT_DIR}/uboot.mkimage" | |
|
61 | # Remove dtbfile from U-Boot mkfile | |
|
62 | sed -i '/.*dtbfile.*/d' "${BOOT_DIR}/uboot.mkimage" | |
|
63 | printf "\nbootz \${kernel_addr_r}" >> "${BOOT_DIR}/uboot.mkimage" | |
|
64 | 64 | else |
|
65 | 65 | printf "\nbootz \${kernel_addr_r} - \${fdt_addr_r}" >> "${BOOT_DIR}/uboot.mkimage" |
|
66 | 66 | fi |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant