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