istoreos: supports ventoy boot

This commit is contained in:
Liangbin Lian 2023-04-25 14:02:01 +08:00
parent 3b8ac77937
commit 36cab6ec54
3 changed files with 21 additions and 3 deletions

View File

@ -241,6 +241,13 @@ export_partdevice() {
if [ -b "/dev/$part" ]; then
export "$var=$part"
return 0
else
# ventoy
local devpath="`readlink /sys/dev/block/$BOOTDEV_MAJOR:$(($BOOTDEV_MINOR + $offset))`"
[ -n "$devpath" ] && {
export "$var=${devpath##*/}"
return 0
}
fi
fi

View File

@ -208,10 +208,15 @@ $(eval $(call KernelPackage,block2mtd))
define KernelPackage/dax
SUBMENU:=$(BLOCK_MENU)
TITLE:=DAX: direct access to differentiated memory
KCONFIG:=CONFIG_DAX
KCONFIG:=CONFIG_DAX=y
FILES:=$(LINUX_DIR)/drivers/dax/dax.ko
endef
define KernelPackage/dax/install
$(INSTALL_DIR) $(1)/lib/modules/!ventoy
echo "DUMMY" >$(1)/lib/modules/!ventoy/dax.ko
endef
$(eval $(call KernelPackage,dax))
@ -234,7 +239,8 @@ define KernelPackage/dm
CONFIG_DM_SNAPSHOT=n \
CONFIG_DM_LOG_USERSPACE=n \
CONFIG_MD=y \
CONFIG_BLK_DEV_DM \
CONFIG_BLK_DEV_DM=y \
CONFIG_DM_INIT=y \
CONFIG_DM_CRYPT \
CONFIG_DM_MIRROR
FILES:= \
@ -250,6 +256,11 @@ define KernelPackage/dm/description
Kernel module necessary for LVM2 support
endef
define KernelPackage/dm/install
$(INSTALL_DIR) $(1)/lib/modules/!ventoy
echo "DUMMY" >$(1)/lib/modules/!ventoy/dm-mod.ko
endef
$(eval $(call KernelPackage,dm))
define KernelPackage/dm-raid

View File

@ -2,7 +2,7 @@
# 1. keep overlay partition when upgrade
# 2. reset rom uuid in ext_overlay (aka sandbox mode) when upgrade (stage2:istoreos_pre_upgrade)
RAMFS_COPY_BIN='grub-bios-setup'
RAMFS_COPY_BIN='grub-bios-setup readlink'
platform_check_image() {
local diskdev partdev diff