Skip to content

Commit 0fd652d

Browse files
committed
Extract kernel version from generated deb package
Currently kernel version is being extracted from the avaliable files present in the rootfs. vmlinuz-6.17.0-00001-g7b3ecb1fbc38 vmlinuz-6.17.0-5-generic kernel_ver=\$(ls /boot/vmlinuz-* | sed 's|.*/vmlinuz-||' | sort -V | tail -n1) With 6.17 kernel version being generated is kernel-6.17.0-00001-g7b3ecb1fbc38, and the above condition is failing and returning the generic kernel version 6.17.0-5-generic To fix this use the kernel version from the kernel debian package that is generated from the build. Signed-off-by: Salendarsingh Gaud <[email protected]>
1 parent 47be43d commit 0fd652d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rootfs/scripts/build-ubuntu-rootfs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ echo '[CHROOT] Installing manifest packages (if any)...'
395395
/install_manifest_pkgs.sh || true
396396
397397
echo '[CHROOT] Detecting installed kernel version...'
398-
kernel_ver=\$(ls /boot/vmlinuz-* | sed 's|.*/vmlinuz-||' | sort -V | tail -n1)
398+
kernel_ver=\$(echo "$KERNEL_DEB" | sed -n 's/linux-kernel-\(.*\)-arm64\.deb/\1/p')
399399
crd_dtb_path=\"/lib/firmware/\$kernel_ver/device-tree/x1e80100-crd.dtb\"
400400
401401
echo '[CHROOT] Writing GRUB configuration...'

0 commit comments

Comments
 (0)