Re: [OpenWrt-Devel] [PATCH 2/6] x86: switch image generation to new code

2020-03-24 Thread Petr Štetiar
Jeffery To  [2020-03-23 21:53:48]:

> On Fri, Mar 20, 2020 at 6:37 PM Paul Spooren  wrote:
> 
> > This commit introduces few related changes which need to be done in
> > single commit to keep images buildable between git revisions. In result
> > it retains all previous image creation possibilities with slight name
> > change of generated images. Brief summary of the commit:
> 
> Would it be possible to restore the building of a separate kernel and
> rootfs? It's much easier to resize a rootfs than a disk image.

+1 as having separate kernel/rootfs images is handy for quick testing in QEMU

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/6] x86: switch image generation to new code

2020-03-23 Thread Jeffery To
On Fri, Mar 20, 2020 at 6:37 PM Paul Spooren  wrote:

> This commit introduces few related changes which need to be done in
> single commit to keep images buildable between git revisions. In result
> it retains all previous image creation possibilities with slight name
> change of generated images. Brief summary of the commit:
>

Would it be possible to restore the building of a separate kernel and
rootfs? It's much easier to resize a rootfs than a disk image.

(Or alternatively, an easy way to enlarge disk images would be welcome.)

Thanks,
Jeff
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/6] x86: switch image generation to new code

2020-03-20 Thread Paul Spooren
This commit introduces few related changes which need to be done in
single commit to keep images buildable between git revisions. In result
it retains all previous image creation possibilities with slight name
change of generated images. Brief summary of the commit:

* Split up image generation recipe to smaller chunks to make it more
  generic and reusable.

* Make iso images x86 specific and drop their definition as root
  filesystem.

* Convert image creation process to generic code specified in image.mk.

* Make geode subtarget inherit features from the main target instead of
  redefining them.

* For subtargets create device definitions with basic packages set.

Signed-off-by: Tomasz Maciej Nowak 
[rebased]
Signed-off-by: Paul Spooren 
---
 config/Config-images.in   |  18 +-
 include/image.mk  |   1 -
 target/linux/x86/Makefile |   4 +-
 target/linux/x86/geode/target.mk  |   2 +-
 target/linux/x86/image/64.mk  |   5 +
 target/linux/x86/image/Makefile   | 179 --
 target/linux/x86/image/generic.mk |   8 +
 target/linux/x86/image/geode.mk   |  16 ++
 target/linux/x86/image/grub-iso.cfg   |   2 +-
 .../linux/x86/image/{grub.cfg => grub-pc.cfg} |   4 +-
 target/linux/x86/image/legacy.mk  |   8 +
 11 files changed, 126 insertions(+), 121 deletions(-)
 create mode 100644 target/linux/x86/image/64.mk
 create mode 100644 target/linux/x86/image/generic.mk
 create mode 100644 target/linux/x86/image/geode.mk
 rename target/linux/x86/image/{grub.cfg => grub-pc.cfg} (57%)
 create mode 100644 target/linux/x86/image/legacy.mk

diff --git a/config/Config-images.in b/config/Config-images.in
index a32de19826..e4db0482ce 100644
--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -120,13 +120,6 @@ menu "Target Images"
help
  Create an ext4 filesystem with a journal.
 
-   config TARGET_ROOTFS_ISO
-   bool "iso"
-   default n
-   depends on TARGET_x86_generic
-   help
- Create a bootable ISO image.
-
config TARGET_ROOTFS_JFFS2
bool "jffs2"
depends on USES_JFFS2
@@ -191,7 +184,7 @@ menu "Target Images"
config GRUB_IMAGES
bool "Build GRUB images (Linux x86 or x86_64 host only)"
depends on TARGET_x86
-   depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || 
TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
+   depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || 
TARGET_ROOTFS_SQUASHFS
select PACKAGE_grub2
default y
 
@@ -237,6 +230,11 @@ menu "Target Images"
  This is the title of the GRUB menu entry.
  If unspecified, it defaults to OpenWrt.
 
+   config ISO_IMAGES
+   bool "Build LiveCD image (ISO)"
+   depends on TARGET_x86
+   select GRUB_IMAGES
+
config VDI_IMAGES
bool "Build VirtualBox image files (VDI)"
depends on TARGET_x86
@@ -260,14 +258,14 @@ menu "Target Images"
 
config TARGET_KERNEL_PARTSIZE
int "Kernel partition size (in MB)"
-   depends on GRUB_IMAGES || USES_BOOT_PART
+   depends on USES_BOOT_PART
default 8 if TARGET_apm821xx_sata
default 64 if TARGET_bcm27xx
default 16
 
config TARGET_ROOTFS_PARTSIZE
int "Root filesystem partition size (in MB)"
-   depends on GRUB_IMAGES || USES_ROOTFS_PART || 
TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_rb532 || TARGET_sunxi || 
TARGET_uml
+   depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || 
TARGET_omap || TARGET_rb532 || TARGET_sunxi || TARGET_uml
default 104
help
  Select the root filesystem partition size.
diff --git a/include/image.mk b/include/image.mk
index d1c63bba29..c72b8506f2 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -93,7 +93,6 @@ fs-types-$(CONFIG_TARGET_ROOTFS_SQUASHFS) += squashfs
 fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addprefix 
jffs2-,$(JFFS2_BLOCKSIZE))
 fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2_NAND) += $(addprefix 
jffs2-nand-,$(NAND_BLOCKSIZE))
 fs-types-$(CONFIG_TARGET_ROOTFS_EXT4FS) += ext4
-fs-types-$(CONFIG_TARGET_ROOTFS_ISO) += iso
 fs-types-$(CONFIG_TARGET_ROOTFS_UBIFS) += ubifs
 fs-subtypes-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addsuffix -raw,$(addprefix 
jffs2-,$(JFFS2_BLOCKSIZE)))
 
diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile
index a646e6e8a7..045d043e4d 100644
--- a/target/linux/x86/Makefile
+++ b/target/linux/x86/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 ARCH:=i386
 BOARD:=x86
 BOARDNAME:=x86
-FEATURES:=squashfs ext4 vdi vmdk pcmcia targz fpu
+FEATURES:=squashfs