@@ -69,6 +69,11 if [ "$ENABLE_UBOOT" = true ] ; then | |||||
69 | # Set mkfile to use the correct dtb file |
|
69 | # Set mkfile to use the correct dtb file | |
70 | sed -i "s/^\(setenv dtbfile \).*/\1${DTB_FILE}/" "${BOOT_DIR}/uboot.mkimage" |
|
70 | sed -i "s/^\(setenv dtbfile \).*/\1${DTB_FILE}/" "${BOOT_DIR}/uboot.mkimage" | |
71 |
|
71 | |||
|
72 | # Set mkfile to use the correct mach id | |||
|
73 | if [ "$ENABLE_QEMU" = true ] ; then | |||
|
74 | sed -i "s/^\(setenv machid \).*/\10x000008e0/" "${BOOT_DIR}/uboot.mkimage" | |||
|
75 | fi | |||
|
76 | ||||
72 | # Set mkfile to use kernel image |
|
77 | # Set mkfile to use kernel image | |
73 | sed -i "s/^\(fatload mmc 0:1 \${kernel_addr_r} \).*/\1${KERNEL_IMAGE}/" "${BOOT_DIR}/uboot.mkimage" |
|
78 | sed -i "s/^\(fatload mmc 0:1 \${kernel_addr_r} \).*/\1${KERNEL_IMAGE}/" "${BOOT_DIR}/uboot.mkimage" | |
74 |
|
79 |
@@ -255,32 +255,31 set +x | |||||
255 |
|
255 | |||
256 | # Set Raspberry Pi model specific configuration |
|
256 | # Set Raspberry Pi model specific configuration | |
257 | if [ "$RPI_MODEL" = 0 ] ; then |
|
257 | if [ "$RPI_MODEL" = 0 ] ; then | |
258 |
DTB_FILE=${RPI |
|
258 | DTB_FILE=${RPI0_DTB_FILE} | |
259 |
UBOOT_CONFIG=${RPI |
|
259 | UBOOT_CONFIG=${RPI0_UBOOT_CONFIG} | |
260 | elif [ "$RPI_MODEL" = 1 ] ; then |
|
260 | elif [ "$RPI_MODEL" = 1 ] ; then | |
261 |
DTB_FILE=${RPI |
|
261 | DTB_FILE=${RPI1_DTB_FILE} | |
262 |
UBOOT_CONFIG=${RPI |
|
262 | UBOOT_CONFIG=${RPI1_UBOOT_CONFIG} | |
263 | elif [ "$RPI_MODEL" = 1P ] ; then |
|
263 | elif [ "$RPI_MODEL" = 1P ] ; then | |
264 |
DTB_FILE=${RPI |
|
264 | DTB_FILE=${RPI1P_DTB_FILE} | |
265 |
UBOOT_CONFIG=${RPI |
|
265 | UBOOT_CONFIG=${RPI1P_UBOOT_CONFIG} | |
266 | elif [ "$RPI_MODEL" = 2 ] ; then |
|
266 | elif [ "$RPI_MODEL" = 2 ] ; then | |
267 | DTB_FILE=${RPI2_DTB_FILE} |
|
267 | DTB_FILE=${RPI2_DTB_FILE} | |
268 | UBOOT_CONFIG=${RPI2_UBOOT_CONFIG} |
|
268 | UBOOT_CONFIG=${RPI2_UBOOT_CONFIG} | |
269 | elif [ "$RPI_MODEL" = 3 ] ; then |
|
269 | elif [ "$RPI_MODEL" = 3 ] ; then | |
270 | DTB_FILE=${RPI3_DTB_FILE} |
|
270 | DTB_FILE=${RPI3_DTB_FILE} | |
271 | UBOOT_CONFIG=${RPI3_UBOOT_CONFIG} |
|
271 | UBOOT_CONFIG=${RPI3_UBOOT_CONFIG} | |
272 | BUILD_KERNEL=true |
|
|||
273 | elif [ "$RPI_MODEL" = 3P ] ; then |
|
272 | elif [ "$RPI_MODEL" = 3P ] ; then | |
274 | DTB_FILE=${RPI3P_DTB_FILE} |
|
273 | DTB_FILE=${RPI3P_DTB_FILE} | |
275 | UBOOT_CONFIG=${RPI3P_UBOOT_CONFIG} |
|
274 | UBOOT_CONFIG=${RPI3P_UBOOT_CONFIG} | |
276 | BUILD_KERNEL=true |
|
|||
277 | else |
|
275 | else | |
278 | echo "error: Raspberry Pi model ${RPI_MODEL} is not supported!" |
|
276 | echo "error: Raspberry Pi model ${RPI_MODEL} is not supported!" | |
279 | exit 1 |
|
277 | exit 1 | |
280 | fi |
|
278 | fi | |
281 |
|
279 | |||
282 | # Check if the internal wireless interface is supported by the RPi model |
|
280 | # Check if the internal wireless interface is supported by the RPi model | |
283 | if [ "$ENABLE_WIRELESS" = true ] && [ "$RPI_MODEL" = 2 ]; then |
|
281 | if [ "$ENABLE_WIRELESS" = true ] && ([ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] || [ "$RPI_MODEL" = 2 ]); then | |
|
282 | ||||
284 | echo "error: The selected Raspberry Pi model has no internal wireless interface" |
|
283 | echo "error: The selected Raspberry Pi model has no internal wireless interface" | |
285 | exit 1 |
|
284 | exit 1 | |
286 | fi |
|
285 | fi | |
@@ -301,9 +300,15 fi | |||||
301 | # Add packages required for kernel cross compilation |
|
300 | # Add packages required for kernel cross compilation | |
302 | if [ "$BUILD_KERNEL" = true ] ; then |
|
301 | if [ "$BUILD_KERNEL" = true ] ; then | |
303 | if [ "$KERNEL_ARCH" = "arm" ] ; then |
|
302 | if [ "$KERNEL_ARCH" = "arm" ] ; then | |
304 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armhf" |
|
303 | if [ "$RELEASE_ARCH" = "armel" ]; then | |
305 | else |
|
304 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armel" | |
306 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-arm64" |
|
305 | fi | |
|
306 | if [ "$RELEASE_ARCH" = "armhf" ]; then | |||
|
307 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armhf" | |||
|
308 | fi | |||
|
309 | if [ "$RELEASE_ARCH" = "arm64" ]; then | |||
|
310 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-arm64" | |||
|
311 | fi | |||
307 | fi |
|
312 | fi | |
308 | fi |
|
313 | fi | |
309 |
|
314 | |||
@@ -336,7 +341,7 fi | |||||
336 |
|
341 | |||
337 | # Add device-tree-compiler required for building the U-Boot bootloader |
|
342 | # Add device-tree-compiler required for building the U-Boot bootloader | |
338 | if [ "$ENABLE_UBOOT" = true ] ; then |
|
343 | if [ "$ENABLE_UBOOT" = true ] ; then | |
339 | APT_INCLUDES="${APT_INCLUDES},device-tree-compiler" |
|
344 | APT_INCLUDES="${APT_INCLUDES},device-tree-compiler,bison,flex" | |
340 | fi |
|
345 | fi | |
341 |
|
346 | |||
342 | # Check if root SSH (v2) public key file exists |
|
347 | # Check if root SSH (v2) public key file exists | |
@@ -525,6 +530,8 fi | |||||
525 |
|
530 | |||
526 | # Configure qemu compatible kernel |
|
531 | # Configure qemu compatible kernel | |
527 | if [ "$ENABLE_QEMU" = true ] ; then |
|
532 | if [ "$ENABLE_QEMU" = true ] ; then | |
|
533 | DTB_FILE=vexpress-v2p-ca15_a7.dtb | |||
|
534 | UBOOT_CONFIG=vexpress_ca15_tc2_defconfig | |||
528 | KERNEL_DEFCONFIG="vexpress_defconfig" |
|
535 | KERNEL_DEFCONFIG="vexpress_defconfig" | |
529 | if [ "$KERNEL_MENUCONFIG" = false ] ; then |
|
536 | if [ "$KERNEL_MENUCONFIG" = false ] ; then | |
530 | KERNEL_OLDDEFCONFIG=true |
|
537 | KERNEL_OLDDEFCONFIG=true | |
@@ -626,6 +633,19 if [ "$ENABLE_QEMU" = true ] ; then | |||||
626 | done |
|
633 | done | |
627 | fi |
|
634 | fi | |
628 |
|
635 | |||
|
636 | # Copy u-boot files to QEMU directory | |||
|
637 | if [ "$ENABLE_UBOOT" = true ] ; then | |||
|
638 | if [ -f "${BOOT_DIR}/u-boot.bin" ] ; then | |||
|
639 | install_readonly "${BOOT_DIR}/u-boot.bin" "${BASEDIR}/qemu/u-boot.bin" | |||
|
640 | fi | |||
|
641 | if [ -f "${BOOT_DIR}/uboot.mkimage" ] ; then | |||
|
642 | install_readonly "${BOOT_DIR}/uboot.mkimage" "${BASEDIR}/qemu/uboot.mkimage" | |||
|
643 | fi | |||
|
644 | if [ -f "${BOOT_DIR}/boot.scr" ] ; then | |||
|
645 | install_readonly "${BOOT_DIR}/boot.scr" "${BASEDIR}/qemu/boot.scr" | |||
|
646 | fi | |||
|
647 | fi | |||
|
648 | ||||
629 | # Copy initramfs to QEMU directory |
|
649 | # Copy initramfs to QEMU directory | |
630 | if [ -f "${BOOT_DIR}/initramfs-${KERNEL_VERSION}" ] ; then |
|
650 | if [ -f "${BOOT_DIR}/initramfs-${KERNEL_VERSION}" ] ; then | |
631 | install_readonly "${BOOT_DIR}/initramfs-${KERNEL_VERSION}" "${BASEDIR}/qemu/initramfs-${KERNEL_VERSION}" |
|
651 | install_readonly "${BOOT_DIR}/initramfs-${KERNEL_VERSION}" "${BASEDIR}/qemu/initramfs-${KERNEL_VERSION}" |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant