diff mbox series

[meta-rockchip,v2] user-selectable wic compression

Message ID 20240611181742.1408-1-twoerner@gmail.com
State New
Headers show
Series [meta-rockchip,v2] user-selectable wic compression | expand

Commit Message

Trevor Woerner June 11, 2024, 6:17 p.m. UTC
For boards which build and boot wic images, the user can optionally specify
a compression using the WIC_COMPRESSION_EXTENSION variable. By default "wic"
images are built, but if the user would prefer, say "wic.xz" images, simply
specify:

	WIC_COMPRESSION_EXTENSION = ".xz"

in the configuration (e.g. conf/local.conf).

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
v2 changes:
- change subject to specify "compression" not "format"
- add information in the README
- improve the commit message
- realize, thanks to Quentin's feedback, that this feature is used to help a
  user select a wic compression, not whether or not to use wic; as such, rename
  the variable and how it is used to emphasize this fact
---
 README                                | 11 +++++++++++
 conf/machine/include/rockchip-wic.inc |  5 ++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

Comments

Quentin Schulz June 12, 2024, 8:36 a.m. UTC | #1
Hi Trevor,

On 6/11/24 8:17 PM, Trevor Woerner via lists.yoctoproject.org wrote:
> For boards which build and boot wic images, the user can optionally specify
> a compression using the WIC_COMPRESSION_EXTENSION variable. By default "wic"
> images are built, but if the user would prefer, say "wic.xz" images, simply
> specify:
> 
> 	WIC_COMPRESSION_EXTENSION = ".xz"
> 
> in the configuration (e.g. conf/local.conf).
> 
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>

Thanks!
Quentin
Trevor Woerner June 12, 2024, 1:20 p.m. UTC | #2
On Wed 2024-06-12 @ 10:36:11 AM, Quentin Schulz via lists.yoctoproject.org wrote:
> Hi Trevor,
> 
> On 6/11/24 8:17 PM, Trevor Woerner via lists.yoctoproject.org wrote:
> > For boards which build and boot wic images, the user can optionally specify
> > a compression using the WIC_COMPRESSION_EXTENSION variable. By default "wic"
> > images are built, but if the user would prefer, say "wic.xz" images, simply
> > specify:
> > 
> > 	WIC_COMPRESSION_EXTENSION = ".xz"
> > 
> > in the configuration (e.g. conf/local.conf).
> > 
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> 
> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>

Applied to meta-rockchip, master branch.
diff mbox series

Patch

diff --git a/README b/README
index 605773d4ecd3..b21e92360dcc 100644
--- a/README
+++ b/README
@@ -47,6 +47,7 @@  Status of supported boards:
 
 Notes:
 -----
+  rk3308 rkbin:
 	The latest ddr initializer for the rk3308 platform does not output
 	diagnostic messages to uart0. This causes a bunch of gibberish to
 	be printed to the console window which only becomes legible once
@@ -67,6 +68,16 @@  Notes:
 	
 	in the configuration (e.g. conf/local.conf).
 
+  wic compression:
+	For boards which build and boot wic images, the user can optionally specify
+	a compression using the WIC_COMPRESSION_EXTENSION variable. By default "wic"
+	images are built, but if the user would prefer, say "wic.xz" images, simply
+	specify:
+
+		WIC_COMPRESSION_EXTENSION = ".xz"
+
+	in the configuration (e.g. conf/local.conf).
+
 U-Boot Environment:
 ------------------
 	In order to configure U-Boot to be able to store its environment into the
diff --git a/conf/machine/include/rockchip-wic.inc b/conf/machine/include/rockchip-wic.inc
index dab61d83ed2c..ebfc0cb96507 100644
--- a/conf/machine/include/rockchip-wic.inc
+++ b/conf/machine/include/rockchip-wic.inc
@@ -5,7 +5,10 @@  require conf/machine/include/rockchip-rk-u-boot-env.inc
 
 SPL_BINARY ?= "idbloader.img"
 
-IMAGE_FSTYPES += "wic wic.bmap"
+# if you use the following variable, make sure to add the '.' e.g.
+# WIC_COMPRESSION_EXTENSION = ".xz"
+WIC_COMPRESSION_EXTENSION ?= ""
+IMAGE_FSTYPES += "wic${WIC_COMPRESSION_EXTENSION} wic.bmap"
 WKS_FILE ?= "rockchip.wks"
 WKS_FILE_DEPENDS ?= " \
 	e2fsprogs-native \