Re: [PATCH] misc: deb: Fix the ServiceVM kernel line in ACRN grub entry


Calvin Zhang <calvinzhang.cool@...>
 

Ping...

On Mon, May 02, 2022 at 10:14:28AM +0800, Calvin Zhang via lists.projectacrn.org wrote:
After replacing partitioned ACRN deb with shared deb, the stale
multiboot module for ACPI1.bin was left in ACRN grub entry because it
was taken as kernel image.

Tracked-On: #7400
Signed-off-by: Calvin Zhang <calvinzhang.cool@...>
---
misc/packaging/acrn-hypervisor.postinst | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/misc/packaging/acrn-hypervisor.postinst b/misc/packaging/acrn-hypervisor.postinst
index 0a18595dd..bc7d4ba3d 100644
--- a/misc/packaging/acrn-hypervisor.postinst
+++ b/misc/packaging/acrn-hypervisor.postinst
@@ -26,7 +26,12 @@ done < <(blkid |grep ext4 |grep ${type})

filename="/etc/grub.d/40_custom"

-kernelimg=$(grep module ${filename} | tail -1 || true)
+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 == shared ];then
cat>"${filename}"<<EOF
--
2.30.2





Join acrn-dev@lists.projectacrn.org to automatically receive all group messages.