All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm-autonomy/n1sdp-image-customization: boot partition size variables
@ 2020-11-23 10:51 Nathan Dunne
  2020-11-23 14:26 ` [meta-arm] " Jon Mason
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Dunne @ 2020-11-23 10:51 UTC (permalink / raw)
  To: meta-arm; +Cc: nd

Added variables BOOT_PART_SIZE and BOOT_PART_SIZE_UNIT to allow the
boot partition to be configured in conf files.

Issue-Id: SCM-1686
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Iaa76d4abdcccc693b3c38708ca452295ff8ee66e
---
 .../documentation/n1sdp-image-customization.md        | 11 ++++++++---
 .../conf/machine/n1sdp-extra-settings.inc             |  4 ++++
 .../wic/arm-autonomy-n1sdp-efidisk.wks.in             |  2 +-
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/meta-arm-autonomy/documentation/n1sdp-image-customization.md b/meta-arm-autonomy/documentation/n1sdp-image-customization.md
index 9e4186c..80c11cb 100644
--- a/meta-arm-autonomy/documentation/n1sdp-image-customization.md
+++ b/meta-arm-autonomy/documentation/n1sdp-image-customization.md
@@ -11,12 +11,17 @@ perform a couple of customizations in the generated wic image:
    1 MiB per physical volume, hence it needs to be taken into account when
    setting GUEST_PART_SIZE.
 
-2. The wic image partition layout and contents with a custom wks file via
+2. Set the boot partition size (default: 100M) via `BOOT_PART_SIZE` and
+   `BOOT_PART_SIZE_UNIT` (M or G) variables in any conf file. The default
+   bootimg is ~44M so 100M leaves just over 50M of free space.
+
+3. The wic image partition layout and contents with a custom wks file via
    `ARM_AUTONOMY_WKS_FILE` variable (default:
    arm-autonomy-n1sdp-efidisk.wks.in which is affected by GUEST_PART_SIZE,
-   GUEST_PART_SIZE_UNIT and GRUB_CFG_FILE variables).
+   GUEST_PART_SIZE_UNIT, BOOT_PART_SIZE, BOOT_PART_SIZE_UNIT and
+   GRUB_CFG_FILE variables).
 
-3. Custom grub.cfg file via `GRUB_CFG_FILE` (default:
+4. Custom grub.cfg file via `GRUB_CFG_FILE` (default:
    arm-autonomy-n1sdp-grub.cfg) variable to be set in any conf file. The full
    path or relative to `ARM_AUTONOMY_WKS_FILE` should be set.
 
diff --git a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
index a675239..977efc5 100644
--- a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
+++ b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
@@ -14,6 +14,10 @@ WKS_FILE = "${ARM_AUTONOMY_WKS_FILE}"
 GUEST_PART_SIZE ?= "4097"
 GUEST_PART_SIZE_UNIT ?= "M"
 
+# Set default boot partition size and unit
+BOOT_PART_SIZE ?= "100"
+BOOT_PART_SIZE_UNIT ?= "M"
+
 # The GRUB_CFG_FILE affects arm-autonomy-n1sdp-efidisk.wks.in file
 #
 # When alternate-kernel DISTRO_FEATURE is present we set the
diff --git a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-n1sdp-efidisk.wks.in b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-n1sdp-efidisk.wks.in
index d91d568..ded628c 100644
--- a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-n1sdp-efidisk.wks.in
+++ b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-n1sdp-efidisk.wks.in
@@ -3,7 +3,7 @@
 # can directly dd to boot media. Uses a custom grub.cfg file to configure the boot.
 
 # First boot partition normally populated as /dev/sda1
-part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
+part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --size="${BOOT_PART_SIZE}${BOOT_PART_SIZE_UNIT}" --label msdos --active --align 1024
 
 # Second rootfs partition normally populated as /dev/sda2
 part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [meta-arm] [PATCH] arm-autonomy/n1sdp-image-customization: boot partition size variables
  2020-11-23 10:51 [PATCH] arm-autonomy/n1sdp-image-customization: boot partition size variables Nathan Dunne
@ 2020-11-23 14:26 ` Jon Mason
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Mason @ 2020-11-23 14:26 UTC (permalink / raw)
  To: Nathan Dunne; +Cc: meta-arm, nd

On Mon, Nov 23, 2020 at 10:51:16AM +0000, Nathan Dunne wrote:
> Added variables BOOT_PART_SIZE and BOOT_PART_SIZE_UNIT to allow the
> boot partition to be configured in conf files.
> 
> Issue-Id: SCM-1686
> Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
> Change-Id: Iaa76d4abdcccc693b3c38708ca452295ff8ee66e

Pushed to master.

Thanks,
Jon

> ---
>  .../documentation/n1sdp-image-customization.md        | 11 ++++++++---
>  .../conf/machine/n1sdp-extra-settings.inc             |  4 ++++
>  .../wic/arm-autonomy-n1sdp-efidisk.wks.in             |  2 +-
>  3 files changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/meta-arm-autonomy/documentation/n1sdp-image-customization.md b/meta-arm-autonomy/documentation/n1sdp-image-customization.md
> index 9e4186c..80c11cb 100644
> --- a/meta-arm-autonomy/documentation/n1sdp-image-customization.md
> +++ b/meta-arm-autonomy/documentation/n1sdp-image-customization.md
> @@ -11,12 +11,17 @@ perform a couple of customizations in the generated wic image:
>     1 MiB per physical volume, hence it needs to be taken into account when
>     setting GUEST_PART_SIZE.
>  
> -2. The wic image partition layout and contents with a custom wks file via
> +2. Set the boot partition size (default: 100M) via `BOOT_PART_SIZE` and
> +   `BOOT_PART_SIZE_UNIT` (M or G) variables in any conf file. The default
> +   bootimg is ~44M so 100M leaves just over 50M of free space.
> +
> +3. The wic image partition layout and contents with a custom wks file via
>     `ARM_AUTONOMY_WKS_FILE` variable (default:
>     arm-autonomy-n1sdp-efidisk.wks.in which is affected by GUEST_PART_SIZE,
> -   GUEST_PART_SIZE_UNIT and GRUB_CFG_FILE variables).
> +   GUEST_PART_SIZE_UNIT, BOOT_PART_SIZE, BOOT_PART_SIZE_UNIT and
> +   GRUB_CFG_FILE variables).
>  
> -3. Custom grub.cfg file via `GRUB_CFG_FILE` (default:
> +4. Custom grub.cfg file via `GRUB_CFG_FILE` (default:
>     arm-autonomy-n1sdp-grub.cfg) variable to be set in any conf file. The full
>     path or relative to `ARM_AUTONOMY_WKS_FILE` should be set.
>  
> diff --git a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
> index a675239..977efc5 100644
> --- a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
> +++ b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
> @@ -14,6 +14,10 @@ WKS_FILE = "${ARM_AUTONOMY_WKS_FILE}"
>  GUEST_PART_SIZE ?= "4097"
>  GUEST_PART_SIZE_UNIT ?= "M"
>  
> +# Set default boot partition size and unit
> +BOOT_PART_SIZE ?= "100"
> +BOOT_PART_SIZE_UNIT ?= "M"
> +
>  # The GRUB_CFG_FILE affects arm-autonomy-n1sdp-efidisk.wks.in file
>  #
>  # When alternate-kernel DISTRO_FEATURE is present we set the
> diff --git a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-n1sdp-efidisk.wks.in b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-n1sdp-efidisk.wks.in
> index d91d568..ded628c 100644
> --- a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-n1sdp-efidisk.wks.in
> +++ b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-n1sdp-efidisk.wks.in
> @@ -3,7 +3,7 @@
>  # can directly dd to boot media. Uses a custom grub.cfg file to configure the boot.
>  
>  # First boot partition normally populated as /dev/sda1
> -part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
> +part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --size="${BOOT_PART_SIZE}${BOOT_PART_SIZE_UNIT}" --label msdos --active --align 1024
>  
>  # Second rootfs partition normally populated as /dev/sda2
>  part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
> -- 
> 2.17.1
> 

> 
> 
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-23 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 10:51 [PATCH] arm-autonomy/n1sdp-image-customization: boot partition size variables Nathan Dunne
2020-11-23 14:26 ` [meta-arm] " Jon Mason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.