Re: [yocto] [meta-raspberrypi][PATCH] wic: add swap partition and set /root and /swap size

2019-11-15 Thread Andrei Gherzan

Hi,

On 14/11/2019 11:11, Paul Barker wrote:

On Thu, 14 Nov 2019, at 06:04, Hongxu Jia wrote:

- Add swap partition to workaround memory limitation

- Support to set /root and /swap size, 4G /root and 1G /swap by default

Signed-off-by: Hongxu Jia 


These settings feel distro-specific to me. They're not required for how many of 
us use the Raspberry Pi so it's best not to force them on everyone.


I tend to agree with Paul. The final SD card configuration is generally 
a per project decision (more or less). The BSP provides a bootable 
reference and from there sky is the limit.


--
Andrei Gherzan
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH] wic: add swap partition and set /root and /swap size

2019-11-14 Thread Paul Barker
On Thu, 14 Nov 2019, at 06:04, Hongxu Jia wrote:
> - Add swap partition to workaround memory limitation
> 
> - Support to set /root and /swap size, 4G /root and 1G /swap by default
> 
> Signed-off-by: Hongxu Jia 

These settings feel distro-specific to me. They're not required for how many of 
us use the Raspberry Pi so it's best not to force them on everyone.

Thanks,

-- 
Paul Barker
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH] wic: add swap partition and set /root and /swap size

2019-11-13 Thread Hongxu Jia

On 11/14/19 2:30 PM, Khem Raj wrote:

On Thu, 2019-11-14 at 06:04 +, Hongxu Jia wrote:

- Add swap partition to workaround memory limitation

- Support to set /root and /swap size, 4G /root and 1G /swap by
default

Signed-off-by: Hongxu Jia 
---
  conf/machine/include/rpi-base.inc   | 5
-
  wic/{sdimage-raspberrypi.wks => sdimage-raspberrypi.wks.in} | 3 ++-
  2 files changed, 6 insertions(+), 2 deletions(-)
  rename wic/{sdimage-raspberrypi.wks => sdimage-raspberrypi.wks.in}
(75%)

diff --git a/conf/machine/include/rpi-base.inc
b/conf/machine/include/rpi-base.inc
index 36a8daf..de2f366 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -6,7 +6,10 @@ SOC_FAMILY = "rpi"
  include conf/machine/include/soc-family.inc
  
  IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"

-WKS_FILE ?= "sdimage-raspberrypi.wks"
+
+PI_WKS_ROOT_SIZE ?= "--size=4096M --overhead-factor 1"

this means we need minimum 4G cards.


+PI_WKS_SWAP_SIZE ?= "--size=1024M --overhead-factor 1"

I think these options should be not set here. if someone wants they
should be injected by local config.


OK, I will comments them out as a example

//Hongxu


+WKS_FILE ?= "sdimage-raspberrypi.wks.in"
  
  XSERVER = " \

  xserver-xorg \
diff --git a/wic/sdimage-raspberrypi.wks b/wic/sdimage-
raspberrypi.wks.in
similarity index 75%
rename from wic/sdimage-raspberrypi.wks
rename to wic/sdimage-raspberrypi.wks.in
index 01fbaea..81707c7 100644
--- a/wic/sdimage-raspberrypi.wks
+++ b/wic/sdimage-raspberrypi.wks.in
@@ -3,4 +3,5 @@
  # Raspberry Pi. Boot files are located in the first vfat partition.
  
  part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat

--label boot --active --align 4096 --size 20
-part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root
--align 4096
+part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root
--align 4096 ${PI_WKS_ROOT_SIZE}
+part swap --ondisk mmcblk0 --size 44 --label swap --fstype=swap
${PI_WKS_SWAP_SIZE}

its using --size 44, perhaps thats default if its not set via
PI_WKS_SWAP_SIZE


--
2.17.1





--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH] wic: add swap partition and set /root and /swap size

2019-11-13 Thread Khem Raj
On Thu, 2019-11-14 at 06:04 +, Hongxu Jia wrote:
> - Add swap partition to workaround memory limitation
> 
> - Support to set /root and /swap size, 4G /root and 1G /swap by
> default
> 
> Signed-off-by: Hongxu Jia 
> ---
>  conf/machine/include/rpi-base.inc   | 5
> -
>  wic/{sdimage-raspberrypi.wks => sdimage-raspberrypi.wks.in} | 3 ++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
>  rename wic/{sdimage-raspberrypi.wks => sdimage-raspberrypi.wks.in}
> (75%)
> 
> diff --git a/conf/machine/include/rpi-base.inc
> b/conf/machine/include/rpi-base.inc
> index 36a8daf..de2f366 100644
> --- a/conf/machine/include/rpi-base.inc
> +++ b/conf/machine/include/rpi-base.inc
> @@ -6,7 +6,10 @@ SOC_FAMILY = "rpi"
>  include conf/machine/include/soc-family.inc
>  
>  IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
> -WKS_FILE ?= "sdimage-raspberrypi.wks"
> +
> +PI_WKS_ROOT_SIZE ?= "--size=4096M --overhead-factor 1"

this means we need minimum 4G cards.

> +PI_WKS_SWAP_SIZE ?= "--size=1024M --overhead-factor 1"

I think these options should be not set here. if someone wants they
should be injected by local config.

> +WKS_FILE ?= "sdimage-raspberrypi.wks.in"
>  
>  XSERVER = " \
>  xserver-xorg \
> diff --git a/wic/sdimage-raspberrypi.wks b/wic/sdimage-
> raspberrypi.wks.in
> similarity index 75%
> rename from wic/sdimage-raspberrypi.wks
> rename to wic/sdimage-raspberrypi.wks.in
> index 01fbaea..81707c7 100644
> --- a/wic/sdimage-raspberrypi.wks
> +++ b/wic/sdimage-raspberrypi.wks.in
> @@ -3,4 +3,5 @@
>  # Raspberry Pi. Boot files are located in the first vfat partition.
>  
>  part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat 
> --label boot --active --align 4096 --size 20
> -part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root
> --align 4096
> +part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root
> --align 4096 ${PI_WKS_ROOT_SIZE}
> +part swap --ondisk mmcblk0 --size 44 --label swap --fstype=swap
> ${PI_WKS_SWAP_SIZE}

its using --size 44, perhaps thats default if its not set via
PI_WKS_SWAP_SIZE

> -- 
> 2.17.1
> 

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto