move most of the x86 image generation options to the main file

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 39206
master
Imre Kaloz 11 years ago
parent 481c01136e
commit cc49f7c6e9
  1. 81
      config/Config-images.in
  2. 81
      target/linux/x86/image/Config.in
  3. 18
      target/linux/x86/image/Makefile

@ -133,17 +133,96 @@ menu "Target Images"
prompt "journal size" if TARGET_ROOTFS_UBIFS prompt "journal size" if TARGET_ROOTFS_UBIFS
default "" default ""
config GRUB_IMAGES
bool "Build GRUB images (Linux x86 or x86_64 host only)"
depends on TARGET_x86 && !(TARGET_x86_olpc || TARGET_x86_rdc)
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
select PACKAGE_grub2
default y
config GRUB_CONSOLE
bool "Use Console Terminal (in addition to Serial)"
depends on GRUB_IMAGES
default n if (TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501 || TARGET_x86_geos || TARGET_x86_alix2)
default y
config GRUB_SERIAL
string "Serial port device"
depends on GRUB_IMAGES
default "hvc0" if TARGET_x86_xen_domu
default "ttyS0" if ! TARGET_x86_xen_domu
config GRUB_BAUDRATE
int "Serial port baud rate"
depends on GRUB_IMAGES
default 19200 if TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501
default 38400 if TARGET_x86_alix2
default 115200 if TARGET_x86_geos || TARGET_x86_kvm_guest
default 38400
config GRUB_BOOTOPTS
string "Extra kernel boot options"
depends on GRUB_IMAGES
default "xencons=hvc" if TARGET_x86_xen_domu
help
If you don't know, just leave it blank.
config GRUB_TIMEOUT
string "Seconds to wait before booting the default entry"
depends on GRUB_IMAGES
default "5"
help
If you don't know, 5 seconds is a reasonable default.
config VDI_IMAGES
bool "Build VirtualBox image files (VDI)"
depends on TARGET_x86
select GRUB_IMAGES
select TARGET_ROOTFS_EXT4FS
select PACKAGE_kmod-pcnet32
config VMDK_IMAGES
bool "Build VMware image files (VMDK)"
depends on TARGET_x86
select GRUB_IMAGES
select TARGET_ROOTFS_EXT4FS
select PACKAGE_kmod-e1000
config TARGET_IMAGES_PAD
bool "Pad images to filesystem size (for JFFS2)"
depends on OLPC_BOOTSCRIPT_IMAGES || GRUB_IMAGES
config TARGET_IMAGES_GZIP
bool "GZip images"
depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS
default y
comment "Image Options" comment "Image Options"
source "target/linux/*/image/Config.in" source "target/linux/*/image/Config.in"
config TARGET_KERNEL_PARTSIZE
int "Kernel partition size (in MB)"
depends on OLPC_BOOTSCRIPT_IMAGES || GRUB_IMAGES
default 4
config TARGET_ROOTFS_PARTSIZE config TARGET_ROOTFS_PARTSIZE
int "Root filesystem partition size (in MB)" int "Root filesystem partition size (in MB)"
depends on X86_GRUB_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532 depends on GRUB_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532
default 48 default 48
help help
Allows you to change the root filesystem partition size Allows you to change the root filesystem partition size
config TARGET_ROOTFS_PARTNAME
string "Root partition on target device"
depends on OLPC_BOOTSCRIPT_IMAGES || GRUB_IMAGES
default "/dev/vda2" if TARGET_x86_kvm_guest
default "/dev/xvda2" if TARGET_x86_xen_domu
default "/dev/sda2" if ! (TARGET_x86_kvm_guest || TARGET_x86_xen_domu)
help
The root partition on the final device. If you don't know,
you probably want the default (/dev/sda2).
config TARGET_ROOTFS_MAXINODE config TARGET_ROOTFS_MAXINODE
int "Maximum number of inodes in root filesystem" int "Maximum number of inodes in root filesystem"
depends on TARGET_ROOTFS_EXT4FS depends on TARGET_ROOTFS_EXT4FS

@ -13,89 +13,8 @@ config X86_ETHERBOOT_BOOTOPTS
help help
Kernel arguments to pass to the kernel eg. NFS root location etc. Kernel arguments to pass to the kernel eg. NFS root location etc.
config X86_GRUB_IMAGES
bool "Build GRUB images (Linux x86 or x86_64 host only)"
depends on TARGET_x86 && !(TARGET_x86_olpc || TARGET_x86_rdc)
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
select PACKAGE_grub2
default y
config X86_GRUB_CONSOLE
bool "Use Console Terminal (in addition to Serial)"
depends on X86_GRUB_IMAGES
default n if (TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501 || TARGET_x86_geos || TARGET_x86_alix2)
default y
config X86_GRUB_SERIAL
string "Serial port device"
depends on X86_GRUB_IMAGES
default "hvc0" if TARGET_x86_xen_domu
default "ttyS0" if ! TARGET_x86_xen_domu
config X86_GRUB_BAUDRATE
int "Serial port baud rate"
depends on X86_GRUB_IMAGES
default 19200 if TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501
default 38400 if TARGET_x86_alix2
default 115200 if TARGET_x86_geos || TARGET_x86_kvm_guest
default 38400
config X86_GRUB_BOOTOPTS
string "Extra kernel boot options"
depends on X86_GRUB_IMAGES
default "xencons=hvc" if TARGET_x86_xen_domu
help
If you don't know, just leave it blank.
config X86_GRUB_TIMEOUT
string "Seconds to wait before booting the default entry"
depends on X86_GRUB_IMAGES
default "5"
help
If you don't know, 5 seconds is a reasonable default.
config X86_VDI_IMAGES
bool "Build VirtualBox image files (VDI)"
depends on TARGET_x86
select X86_GRUB_IMAGES
select TARGET_ROOTFS_EXT4FS
select PACKAGE_kmod-pcnet32
config X86_VMDK_IMAGES
bool "Build VMware image files (VMDK)"
depends on TARGET_x86
select X86_GRUB_IMAGES
select TARGET_ROOTFS_EXT4FS
select PACKAGE_kmod-e1000
config OLPC_BOOTSCRIPT_IMAGES config OLPC_BOOTSCRIPT_IMAGES
bool "Build images with bootscript" bool "Build images with bootscript"
depends on TARGET_x86_olpc depends on TARGET_x86_olpc
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
default TARGET_x86_olpc default TARGET_x86_olpc
config TARGET_IMAGES_PAD
bool "Pad images to filesystem size (for JFFS2)"
depends on OLPC_BOOTSCRIPT_IMAGES || X86_GRUB_IMAGES
config TARGET_IMAGES_GZIP
bool "GZip images"
depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS
default y
config TARGET_KERNEL_PARTSIZE
int "Kernel partition size (in MB)"
depends on OLPC_BOOTSCRIPT_IMAGES || X86_GRUB_IMAGES
default 4
config TARGET_ROOTFS_PARTNAME
string "Root partition on target device"
depends on OLPC_BOOTSCRIPT_IMAGES || X86_GRUB_IMAGES
default "/dev/vda2" if TARGET_x86_kvm_guest
default "/dev/xvda2" if TARGET_x86_xen_domu
default "/dev/sda2" if ! (TARGET_x86_kvm_guest || TARGET_x86_xen_domu)
help
The root partition on the final device. If you don't know,
you probably want the default (/dev/sda2).

@ -23,16 +23,16 @@ ifneq ($(strip $(foreach subtarget,$(USE_ATKBD),$(CONFIG_TARGET_x86_$(subtarget)
GRUB2_MODULES_ISO += at_keyboard GRUB2_MODULES_ISO += at_keyboard
endif endif
ifneq ($(CONFIG_X86_GRUB_CONSOLE),) ifneq ($(CONFIG_GRUB_CONSOLE),)
GRUB_CONSOLE_CMDLINE += console=tty0 GRUB_CONSOLE_CMDLINE += console=tty0
GRUB_TERMINALS += console GRUB_TERMINALS += console
endif endif
GRUB_SERIAL:=$(call qstrip,$(CONFIG_X86_GRUB_SERIAL)) GRUB_SERIAL:=$(call qstrip,$(CONFIG_GRUB_SERIAL))
ifneq ($(GRUB_SERIAL),) ifneq ($(GRUB_SERIAL),)
GRUB_CONSOLE_CMDLINE += console=$(GRUB_SERIAL),$(CONFIG_X86_GRUB_BAUDRATE)n8 GRUB_CONSOLE_CMDLINE += console=$(GRUB_SERIAL),$(CONFIG_GRUB_BAUDRATE)n8
GRUB_SERIAL_CONFIG := serial --unit=0 --speed=$(CONFIG_X86_GRUB_BAUDRATE) --word=8 --parity=no --stop=1 GRUB_SERIAL_CONFIG := serial --unit=0 --speed=$(CONFIG_GRUB_BAUDRATE) --word=8 --parity=no --stop=1
GRUB_TERMINALS += serial GRUB_TERMINALS += serial
endif endif
@ -42,11 +42,11 @@ endif
ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME)) ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME))
GRUB_TIMEOUT:=$(call qstrip,$(CONFIG_X86_GRUB_TIMEOUT)) GRUB_TIMEOUT:=$(call qstrip,$(CONFIG_GRUB_TIMEOUT))
ifneq ($(CONFIG_X86_GRUB_IMAGES),) ifneq ($(CONFIG_GRUB_IMAGES),)
BOOTOPTS:=$(call qstrip,$(CONFIG_X86_GRUB_BOOTOPTS)) BOOTOPTS:=$(call qstrip,$(CONFIG_GRUB_BOOTOPTS))
define Image/cmdline/ext4 define Image/cmdline/ext4
root=$(ROOTPART) rootfstype=ext4 rootwait root=$(ROOTPART) rootfstype=ext4 rootwait
@ -158,7 +158,7 @@ define Image/Build/iso
-o $(KDIR)/root.iso $(KDIR)/root.grub $(TARGET_DIR) -o $(KDIR)/root.iso $(KDIR)/root.grub $(TARGET_DIR)
endef endef
ifneq ($(CONFIG_X86_VDI_IMAGES),) ifneq ($(CONFIG_VDI_IMAGES),)
define Image/Build/vdi define Image/Build/vdi
# left here because the image builder doesnt need these # left here because the image builder doesnt need these
ifeq ($(1),ext4) ifeq ($(1),ext4)
@ -172,7 +172,7 @@ ifneq ($(CONFIG_X86_VDI_IMAGES),)
endef endef
endif endif
ifneq ($(CONFIG_X86_VMDK_IMAGES),) ifneq ($(CONFIG_VMDK_IMAGES),)
define Image/Build/vmdk define Image/Build/vmdk
# left here because the image builder doesnt need these # left here because the image builder doesnt need these
ifeq ($(1),ext4) ifeq ($(1),ext4)

Loading…
Cancel
Save