uml: clean up the kernel config and add squashfs+ext4/f2fs support

Replaces plain ext4 images

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2016-11-22 17:53:36 +01:00
parent 4081333084
commit 426e4d93bb
5 changed files with 23 additions and 20 deletions

View file

@ -252,7 +252,7 @@ menu "Target Images"
config TARGET_ROOTFS_PARTSIZE config TARGET_ROOTFS_PARTSIZE
int "Root filesystem partition size (in MB)" int "Root filesystem partition size (in MB)"
depends on GRUB_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532 || TARGET_mvebu depends on GRUB_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532 || TARGET_mvebu || TARGET_uml
default 2048 if TARGET_x86 default 2048 if TARGET_x86
default 256 if ! TARGET_x86 default 256 if ! TARGET_x86
help help

View file

@ -20,7 +20,7 @@ ARCH:=$(shell uname -m | sed \
) )
BOARD:=uml BOARD:=uml
BOARDNAME:=User Mode Linux BOARDNAME:=User Mode Linux
FEATURES:=ext4 audio FEATURES:=squashfs ext4 audio
MAINTAINER:=Florian Fainelli <florian@openwrt.org> MAINTAINER:=Florian Fainelli <florian@openwrt.org>
KERNEL_PATCHVER:=4.4 KERNEL_PATCHVER:=4.4
@ -35,7 +35,7 @@ endef
LINUX_TARGET_CONFIG:=$(CURDIR)/config/$(ARCH) LINUX_TARGET_CONFIG:=$(CURDIR)/config/$(ARCH)
DEFAULT_PACKAGES += wpad-mini kmod-mac80211-hwsim DEFAULT_PACKAGES += wpad-mini kmod-mac80211-hwsim mkf2fs e2fsprogs
endif endif

View file

@ -7,6 +7,7 @@ CONFIG_ARCH_HAS_SC_SIGNALS=y
CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=y CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=y
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
CONFIG_BLK_DEV_COW_COMMON=y CONFIG_BLK_DEV_COW_COMMON=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_UBD=y CONFIG_BLK_DEV_UBD=y
CONFIG_BLK_DEV_UBD_SYNC=y CONFIG_BLK_DEV_UBD_SYNC=y
CONFIG_CLONE_BACKWARDS=y CONFIG_CLONE_BACKWARDS=y
@ -18,7 +19,6 @@ CONFIG_CPU_SUP_CYRIX_32=y
CONFIG_CPU_SUP_INTEL=y CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_TRANSMETA_32=y CONFIG_CPU_SUP_TRANSMETA_32=y
CONFIG_CPU_SUP_UMC_32=y CONFIG_CPU_SUP_UMC_32=y
CONFIG_CRAMFS=y
# CONFIG_CRASHLOG is not set # CONFIG_CRASHLOG is not set
CONFIG_CRC16=y CONFIG_CRC16=y
CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_CRC32C=y
@ -37,6 +37,11 @@ CONFIG_DNOTIFY=y
# CONFIG_EARLY_PRINTK is not set # CONFIG_EARLY_PRINTK is not set
# CONFIG_EMBEDDED is not set # CONFIG_EMBEDDED is not set
CONFIG_EXT4_FS=y CONFIG_EXT4_FS=y
# CONFIG_F2FS_CHECK_FS is not set
CONFIG_F2FS_FS=y
# CONFIG_F2FS_FS_SECURITY is not set
CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_STAT_FS=y
CONFIG_FS_MBCACHE=y CONFIG_FS_MBCACHE=y
CONFIG_GENERIC_BUG=y CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS=y
@ -62,6 +67,8 @@ CONFIG_IOSCHED_CFQ=y
CONFIG_IRQ_WORK=y CONFIG_IRQ_WORK=y
CONFIG_ISO9660_FS=y CONFIG_ISO9660_FS=y
CONFIG_JBD2=y CONFIG_JBD2=y
# CONFIG_JFFS2_CMODE_PRIORITY is not set
# CONFIG_JFFS2_FS is not set
CONFIG_KALLSYMS=y CONFIG_KALLSYMS=y
CONFIG_KERNEL_STACK_ORDER=2 CONFIG_KERNEL_STACK_ORDER=2
CONFIG_LD_SCRIPT_STATIC=y CONFIG_LD_SCRIPT_STATIC=y
@ -115,12 +122,6 @@ CONFIG_PRINT_QUOTA_WARNING=y
# CONFIG_PROCESSOR_SELECT is not set # CONFIG_PROCESSOR_SELECT is not set
CONFIG_PROC_PAGE_MONITOR=y CONFIG_PROC_PAGE_MONITOR=y
CONFIG_PTY_CHAN=y CONFIG_PTY_CHAN=y
CONFIG_QFMT_V1=y
CONFIG_QFMT_V2=y
CONFIG_QUOTA=y
CONFIG_QUOTACTL=y
# CONFIG_QUOTA_NETLINK_INTERFACE is not set
CONFIG_QUOTA_TREE=y
# CONFIG_RCU_STALL_COMMON is not set # CONFIG_RCU_STALL_COMMON is not set
CONFIG_RD_BZIP2=y CONFIG_RD_BZIP2=y
CONFIG_RD_GZIP=y CONFIG_RD_GZIP=y
@ -140,7 +141,6 @@ CONFIG_SSL_CHAN="pty"
CONFIG_STACKTRACE=y CONFIG_STACKTRACE=y
CONFIG_STATIC_LINK=y CONFIG_STATIC_LINK=y
CONFIG_STDERR_CONSOLE=y CONFIG_STDERR_CONSOLE=y
# CONFIG_SUNXI_SRAM is not set
CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_TRACE_IRQFLAGS_SUPPORT is not set # CONFIG_TRACE_IRQFLAGS_SUPPORT is not set
CONFIG_TTY_CHAN=y CONFIG_TTY_CHAN=y

View file

@ -7,6 +7,7 @@ CONFIG_ARCH_DEFCONFIG="arch/um/configs/x86_64_defconfig"
# CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA is not set # CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA is not set
CONFIG_BINFMT_MISC=m CONFIG_BINFMT_MISC=m
CONFIG_BLK_DEV_COW_COMMON=y CONFIG_BLK_DEV_COW_COMMON=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_UBD=y CONFIG_BLK_DEV_UBD=y
CONFIG_BLK_DEV_UBD_SYNC=y CONFIG_BLK_DEV_UBD_SYNC=y
CONFIG_CON_CHAN="xterm" CONFIG_CON_CHAN="xterm"
@ -14,7 +15,6 @@ CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
CONFIG_CPU_SUP_AMD=y CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_CENTAUR=y CONFIG_CPU_SUP_CENTAUR=y
CONFIG_CPU_SUP_INTEL=y CONFIG_CPU_SUP_INTEL=y
CONFIG_CRAMFS=y
# CONFIG_CRASHLOG is not set # CONFIG_CRASHLOG is not set
CONFIG_CRC16=y CONFIG_CRC16=y
# CONFIG_CRYPTO_AES_X86_64 is not set # CONFIG_CRYPTO_AES_X86_64 is not set
@ -37,6 +37,11 @@ CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_DNOTIFY=y CONFIG_DNOTIFY=y
# CONFIG_EARLY_PRINTK is not set # CONFIG_EARLY_PRINTK is not set
CONFIG_EXT4_FS=y CONFIG_EXT4_FS=y
# CONFIG_F2FS_CHECK_FS is not set
CONFIG_F2FS_FS=y
# CONFIG_F2FS_FS_SECURITY is not set
CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_STAT_FS=y
CONFIG_FS_MBCACHE=y CONFIG_FS_MBCACHE=y
CONFIG_GENERIC_BUG=y CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS=y
@ -63,6 +68,7 @@ CONFIG_IOSCHED_CFQ=y
CONFIG_IRQ_WORK=y CONFIG_IRQ_WORK=y
CONFIG_ISO9660_FS=y CONFIG_ISO9660_FS=y
CONFIG_JBD2=y CONFIG_JBD2=y
# CONFIG_JFFS2_FS is not set
CONFIG_KALLSYMS=y CONFIG_KALLSYMS=y
CONFIG_KERNEL_STACK_ORDER=2 CONFIG_KERNEL_STACK_ORDER=2
CONFIG_LD_SCRIPT_STATIC=y CONFIG_LD_SCRIPT_STATIC=y
@ -89,16 +95,9 @@ CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_PORT_CHAN=y CONFIG_PORT_CHAN=y
CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y CONFIG_POSIX_MQUEUE_SYSCTL=y
# CONFIG_PRINT_QUOTA_WARNING is not set
# CONFIG_PROCESSOR_SELECT is not set # CONFIG_PROCESSOR_SELECT is not set
CONFIG_PROC_PAGE_MONITOR=y CONFIG_PROC_PAGE_MONITOR=y
CONFIG_PTY_CHAN=y CONFIG_PTY_CHAN=y
CONFIG_QFMT_V1=y
CONFIG_QFMT_V2=y
CONFIG_QUOTA=y
CONFIG_QUOTACTL=y
# CONFIG_QUOTA_NETLINK_INTERFACE is not set
CONFIG_QUOTA_TREE=y
# CONFIG_RCU_STALL_COMMON is not set # CONFIG_RCU_STALL_COMMON is not set
CONFIG_RD_BZIP2=y CONFIG_RD_BZIP2=y
CONFIG_RD_GZIP=y CONFIG_RD_GZIP=y
@ -118,7 +117,6 @@ CONFIG_SSL_CHAN="pty"
CONFIG_STACKTRACE=y CONFIG_STACKTRACE=y
CONFIG_STATIC_LINK=y CONFIG_STATIC_LINK=y
CONFIG_STDERR_CONSOLE=y CONFIG_STDERR_CONSOLE=y
# CONFIG_SUNXI_SRAM is not set
CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_TRACE_IRQFLAGS_SUPPORT is not set # CONFIG_TRACE_IRQFLAGS_SUPPORT is not set
CONFIG_TTY_CHAN=y CONFIG_TTY_CHAN=y

View file

@ -11,7 +11,12 @@ define Image/Prepare
cp $(LINUX_DIR)/linux $(KDIR)/vmlinux.elf cp $(LINUX_DIR)/linux $(KDIR)/vmlinux.elf
endef endef
define Image/Build/squashfs
dd if=/dev/zero of=$(KDIR)/root.squashfs bs=1024k count=0 seek=$(CONFIG_TARGET_ROOTFS_PARTSIZE)
endef
define Image/Build define Image/Build
$(call Image/Build/$(1))
cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).img cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux
endef endef