#!/bin/bash #* Copyright (c) 2020-2022 Intel Corporation SPDX-License-Identifier: BSD-3-Clause # postinst script for acrn-hypervisor # please NOTE !!! scenario_info/board_info changed by python scripts, so do not add content there!!! # please NOTE !!! scenario_info/board_info please add in release.json if needed !!! set -e #Build info Start SCENARIO=(shared) BOARD=(nuc11tnbi5) #Build info End #ACRN parameters Start GENERATED_PARAMS=(cpu_perf_policy=Performance) #ACRN parameters End ACRNBIN="/boot/acrn.${SCENARIO}.${BOARD}.bin" type=$(findmnt / |awk '$1 == "/" {print $2}') pattern='^/dev/.* UUID="([^"]+)".* PARTUUID="([^"]+)"' while IFS= read -r line; do if [[ $line =~ $pattern ]]; then uuid="${BASH_REMATCH[1]}" partuuid="${BASH_REMATCH[2]}" fi done < <(blkid |grep ${type}) filename="/etc/grub.d/40_custom" if ls /boot/vmlinuz*acrn-service-vm* 1> /dev/null 2>&1;then service_vm_kernel=$(ls -tr /boot/vmlinuz-*acrn-service-vm* | tail -1) else service_vm_kernel=$(ls /boot/vmlinuz-* | tail -1) fi kernelimg="module2 $service_vm_kernel Linux_bzImage" if [ $SCENARIO == hybrid ];then echo -e "\E[32m Please put zephyr64.elf in the /boot/ directory" tput sgr0 cat>"${filename}"<"${filename}"<"${filename}"<"${filename}"<