remove adding all kernel modules by default
PATCH 1/1 remove adding all kernel modules by default
A BSP layer shouldn't be deciding to include all kernel modules. That's more of a distro decision, or for local.conf at a minimum. Modules that are required for the basic functioning of a board are fine, but doing a blanket "install all" is overreach and inflates images unnecessarily (~45MB, by one measurement).
I expect patches will probably roll in after this one to add back necessary modules, but it will be easier to figure out which ones when starting with having none of them included by default.
--- conf/machine/include/rock-pi-4.inc | 2 -- conf/machine/nanopi-m4b.conf | 2 -- conf/machine/nanopi-r2s.conf | 1 - conf/machine/nanopi-r4s.conf | 2 -- conf/machine/rock-5a.conf | 1 - conf/machine/rock-5b.conf | 1 - conf/machine/rock-pi-e.conf | 1 - conf/machine/rock-pi-s.conf | 1 - 8 files changed, 11 deletions(-)
conf/machine/include/rock-pi-4.inc +0 -2
@@ -2,5 +2,3 @@ MACHINEOVERRIDES =. "rock-pi-4:" require conf/machine/include/rk3399.inc - -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
conf/machine/nanopi-m4b.conf +0 -2
@@ -5,7 +5,5 @@ require conf/machine/include/rk3399.inc -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" - KERNEL_DEVICETREE = "rockchip/rk3399-nanopi-m4b.dtb" UBOOT_MACHINE = "nanopi-m4b-rk3399_defconfig"
conf/machine/nanopi-r2s.conf +0 -1
@@ -6,6 +6,5 @@ require conf/machine/include/rk3328.inc KERNEL_DEVICETREE = "rockchip/rk3328-nanopi-r2s.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" UBOOT_MACHINE = "nanopi-r2s-rk3328_defconfig"
conf/machine/nanopi-r4s.conf +0 -2
@@ -5,7 +5,5 @@ require conf/machine/include/rk3399.inc -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" - KERNEL_DEVICETREE = "rockchip/rk3399-nanopi-r4s.dtb" UBOOT_MACHINE = "nanopi-r4s-rk3399_defconfig"
conf/machine/rock-5a.conf +0 -1
@@ -7,6 +7,5 @@ require conf/machine/include/rk3588s.inc PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev" KERNEL_DEVICETREE = "rockchip/rk3588s-rock-5a.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" UBOOT_MACHINE = "rock5a-rk3588s_defconfig"
conf/machine/rock-5b.conf +0 -1
@@ -7,6 +7,5 @@ require conf/machine/include/rk3588.inc PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev" KERNEL_DEVICETREE = "rockchip/rk3588-rock-5b.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" UBOOT_MACHINE = "rock5b-rk3588_defconfig"
conf/machine/rock-pi-e.conf +0 -1
@@ -6,6 +6,5 @@ require conf/machine/include/rk3328.inc KERNEL_DEVICETREE = "rockchip/rk3328-rock-pi-e.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" UBOOT_MACHINE = "rock-pi-e-rk3328_defconfig"
conf/machine/rock-pi-s.conf +0 -1
@@ -6,6 +6,5 @@ require conf/machine/include/rk3308.inc KERNEL_DEVICETREE = "rockchip/rk3308-rock-pi-s.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" UBOOT_MACHINE = "rock-pi-s-rk3308_defconfig"
Signature · 1 line
2.43.0.76.g1a87c842ece3
Hi Trevor,
Quoted 6 lines · Trevor Woerner
A BSP layer shouldn't be deciding to include all kernel modules. That's more of a distro decision, or for local.conf at a minimum. Modules that are required for the basic functioning of a board are fine, but doing a blanket "install all" is overreach and inflates images unnecessarily (~45MB, by one measurement).
It's only a RRECOMMENDS, so I'd say this is fine as is? This allows to have a working system without spending too much time figuring out what's exactly needed. If someone needs to have a smaller image, they can then play with kernel defconfig or kernel-modules- in packages to install.
Up to you though :)
Cheers,
Quentin
Quoted 105 lines
I expect patches will probably roll in after this one to add back necessary modules, but it will be easier to figure out which ones when starting with having none of them included by default.
Signed-off-by Trevor Woerner <[email protected]>---
conf/machine/include/rock-pi-4.inc | 2 -- conf/machine/nanopi-m4b.conf | 2 -- conf/machine/nanopi-r2s.conf | 1 - conf/machine/nanopi-r4s.conf | 2 -- conf/machine/rock-5a.conf | 1 - conf/machine/rock-5b.conf | 1 - conf/machine/rock-pi-e.conf | 1 - conf/machine/rock-pi-s.conf | 1 - 8 files changed, 11 deletions(-)conf/machine/include/rock-pi-4.inc +0
-0@@ -2,5 +2,3 @@MACHINEOVERRIDES =. "rock-pi-4:"
require conf/machine/include/rk3399.inc
conf/machine/include/rock-pi-4.inc +0
-2- -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"conf/machine/nanopi-m4b.conf +0
-0@@ -5,7 +5,5 @@require conf/machine/include/rk3399.inc
conf/machine/nanopi-m4b.conf +0
-2-MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" -
KERNEL_DEVICETREE= "rockchip/rk3399-nanopi-m4b.dtb"UBOOT_MACHINE= "nanopi-m4b-rk3399_defconfig"conf/machine/nanopi-r2s.conf +0
-0@@ -6,6 +6,5 @@require conf/machine/include/rk3328.inc
KERNEL_DEVICETREE= "rockchip/rk3328-nanopi-r2s.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
UBOOT_MACHINE= "nanopi-r2s-rk3328_defconfig"conf/machine/nanopi-r4s.conf +0
-0@@ -5,7 +5,5 @@require conf/machine/include/rk3399.inc
conf/machine/nanopi-r4s.conf +0
-2-MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" -
KERNEL_DEVICETREE= "rockchip/rk3399-nanopi-r4s.dtb"UBOOT_MACHINE= "nanopi-r4s-rk3399_defconfig"conf/machine/rock-5a.conf +0
-0@@ -7,6 +7,5 @@ require conf/machine/include/rk3588s.incPREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev"
KERNEL_DEVICETREE= "rockchip/rk3588s-rock-5a.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
UBOOT_MACHINE= "rock5a-rk3588s_defconfig"conf/machine/rock-5b.conf +0
-0@@ -7,6 +7,5 @@ require conf/machine/include/rk3588.incPREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev"
KERNEL_DEVICETREE= "rockchip/rk3588-rock-5b.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
UBOOT_MACHINE= "rock5b-rk3588_defconfig"conf/machine/rock-pi-e.conf +0
-0@@ -6,6 +6,5 @@require conf/machine/include/rk3328.inc
KERNEL_DEVICETREE= "rockchip/rk3328-rock-pi-e.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
UBOOT_MACHINE= "rock-pi-e-rk3328_defconfig"conf/machine/rock-pi-s.conf +0
-0@@ -6,6 +6,5 @@require conf/machine/include/rk3308.inc
KERNEL_DEVICETREE= "rockchip/rk3308-rock-pi-s.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
UBOOT_MACHINE= "rock-pi-s-rk3308_defconfig"
Quoted 4 lines · Quentin Schulz
Hi Trevor,
On January 14, 2024 3:46:18 PM GMT+01:00, Trevor Woerner <[email protected]> wrote:
Quoted 9 lines
Quoted 6 lines
A BSP layer shouldn't be deciding to include all kernel modules. That's more of a distro decision, or for local.conf at a minimum. Modules that are required for the basic functioning of a board are fine, but doing a blanket "install all" is overreach and inflates images unnecessarily (~45MB, by one measurement).
It's only a RRECOMMENDS, so I'd say this is fine as is? This allows to have a working system without spending too much time figuring out what's exactly needed. If someone needs to have a smaller image, they can then play with kernel defconfig or kernel-modules- in packages to install.
Yeah on one thought, BSP users may not be well versed in OE speak and this adds to their bad starting experience but it also has a bad effect where the images are bloated. So IMO if it is well documented how to enable/disable it easily could be useful. I don't have strong leanings
on which way you want to go w.r.t defaults.
Quoted 120 lines
Up to you though :)
Cheers,
QuentinQuoted 101 lines
I expect patches will probably roll in after this one to add back necessary modules, but it will be easier to figure out which ones when starting with having none of them included by default.
Signed-off-by Trevor Woerner <[email protected]>---
conf/machine/include/rock-pi-4.inc | 2 -- conf/machine/nanopi-m4b.conf | 2 -- conf/machine/nanopi-r2s.conf | 1 - conf/machine/nanopi-r4s.conf | 2 -- conf/machine/rock-5a.conf | 1 - conf/machine/rock-5b.conf | 1 - conf/machine/rock-pi-e.conf | 1 - conf/machine/rock-pi-s.conf | 1 - 8 files changed, 11 deletions(-)conf/machine/include/rock-pi-4.inc +0
-0@@ -2,5 +2,3 @@MACHINEOVERRIDES =. "rock-pi-4:"
require conf/machine/include/rk3399.inc
conf/machine/include/rock-pi-4.inc +0
-2- -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"conf/machine/nanopi-m4b.conf +0
-0@@ -5,7 +5,5 @@require conf/machine/include/rk3399.inc
conf/machine/nanopi-m4b.conf +0
-2-MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" -
KERNEL_DEVICETREE= "rockchip/rk3399-nanopi-m4b.dtb"UBOOT_MACHINE= "nanopi-m4b-rk3399_defconfig"conf/machine/nanopi-r2s.conf +0
-0@@ -6,6 +6,5 @@require conf/machine/include/rk3328.inc
KERNEL_DEVICETREE= "rockchip/rk3328-nanopi-r2s.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
UBOOT_MACHINE= "nanopi-r2s-rk3328_defconfig"conf/machine/nanopi-r4s.conf +0
-0@@ -5,7 +5,5 @@require conf/machine/include/rk3399.inc
conf/machine/nanopi-r4s.conf +0
-2-MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" -
KERNEL_DEVICETREE= "rockchip/rk3399-nanopi-r4s.dtb"UBOOT_MACHINE= "nanopi-r4s-rk3399_defconfig"conf/machine/rock-5a.conf +0
-0@@ -7,6 +7,5 @@ require conf/machine/include/rk3588s.incPREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev"
KERNEL_DEVICETREE= "rockchip/rk3588s-rock-5a.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
UBOOT_MACHINE= "rock5a-rk3588s_defconfig"conf/machine/rock-5b.conf +0
-0@@ -7,6 +7,5 @@ require conf/machine/include/rk3588.incPREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev"
KERNEL_DEVICETREE= "rockchip/rk3588-rock-5b.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
UBOOT_MACHINE= "rock5b-rk3588_defconfig"conf/machine/rock-pi-e.conf +0
-0@@ -6,6 +6,5 @@require conf/machine/include/rk3328.inc
KERNEL_DEVICETREE= "rockchip/rk3328-rock-pi-e.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
UBOOT_MACHINE= "rock-pi-e-rk3328_defconfig"conf/machine/rock-pi-s.conf +0
-0@@ -6,6 +6,5 @@require conf/machine/include/rk3308.inc
Quoted 4 lines
KERNEL_DEVICETREE= "rockchip/rk3308-rock-pi-s.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
UBOOT_MACHINE= "rock-pi-s-rk3308_defconfig"-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
You automatically follow any topics you start or reply to. View/Reply Online (#62145): https://lists.yoctoproject.org/g/yocto/message/62145
Mute This Topic: https://lists.yoctoproject.org/mt/103719387/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-