[isar-cip-core][RFC PATCH] customizations: Add FW and tools required for wifi testing


Lad Prabhakar
 

Add firmware and tools required for testing wifin on hihope-rzg2m.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
Hi All,

Sending an RFC as I am not sure if this is the right place to add
this. I wanted to add the debian package depends in machine.conf
file but didnt find any variables.

Is this the right place for adding this, if not could you please point
me to the right direction.

** Do not merge this patch **

Cheers,
Prabhakar
---
recipes-core/customizations/customizations.bb | 3 +++
1 file changed, 3 insertions(+)

diff --git a/recipes-core/customizations/customizations.bb b/recipes-core/customizations/customizations.bb
index 932b11c..c508fd4 100644
--- a/recipes-core/customizations/customizations.bb
+++ b/recipes-core/customizations/customizations.bb
@@ -23,6 +23,9 @@ DEPENDS += "sshd-regen-keys"
DEBIAN_DEPENDS = " \
ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys"

+DEBIAN_DEPENDS_hihope-rzg2m += " \
+ ,firmware-ti-connectivity, iw, wireless-regdb, wireless-tools"
+
do_install() {
install -v -d ${D}/etc/network/interfaces.d
install -v -m 644 ${WORKDIR}/ethernet ${D}/etc/network/interfaces.d/
--
2.17.1


Jan Kiszka
 

On 22.11.21 12:19, Lad Prabhakar wrote:
Add firmware and tools required for testing wifin on hihope-rzg2m.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
Hi All,

Sending an RFC as I am not sure if this is the right place to add
this. I wanted to add the debian package depends in machine.conf
file but didnt find any variables.
IMAGE_INSTALL_append would work there, see eg.
https://github.com/siemens/jailhouse-images/blob/master/conf/machine/rpi4.conf.

Whether we want to "hard-code" the installation wireless firmware in the
machine conf here is a different question. Maybe customizations is not
that a bad place.


Is this the right place for adding this, if not could you please point
me to the right direction.

** Do not merge this patch **

Cheers,
Prabhakar
---
recipes-core/customizations/customizations.bb | 3 +++
1 file changed, 3 insertions(+)

diff --git a/recipes-core/customizations/customizations.bb b/recipes-core/customizations/customizations.bb
index 932b11c..c508fd4 100644
--- a/recipes-core/customizations/customizations.bb
+++ b/recipes-core/customizations/customizations.bb
@@ -23,6 +23,9 @@ DEPENDS += "sshd-regen-keys"
DEBIAN_DEPENDS = " \
ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys"

+DEBIAN_DEPENDS_hihope-rzg2m += " \
+ ,firmware-ti-connectivity, iw, wireless-regdb, wireless-tools"
+
Let's already prepare for other targets requesting the generic wireless
tools as well: Put them into a reusable variable and then add that
variable here.

Jan

do_install() {
install -v -d ${D}/etc/network/interfaces.d
install -v -m 644 ${WORKDIR}/ethernet ${D}/etc/network/interfaces.d/
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


Lad Prabhakar
 

Hi Jan,

Thank you for the quick response.

-----Original Message-----
From: Jan Kiszka <jan.kiszka@siemens.com>
Sent: 22 November 2021 11:28
To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>; cip-dev@lists.cip-project.org;
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek <pavel@denx.de>
Subject: Re: [cip-dev][isar-cip-core][RFC PATCH] customizations: Add FW and tools required for wifi
testing

On 22.11.21 12:19, Lad Prabhakar wrote:
Add firmware and tools required for testing wifin on hihope-rzg2m.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
Hi All,

Sending an RFC as I am not sure if this is the right place to add
this. I wanted to add the debian package depends in machine.conf file
but didnt find any variables.
IMAGE_INSTALL_append would work there, see eg.
https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsiemens%2Fjailhouse-
images%2Fblob%2Fmaster%2Fconf%2Fmachine%2Frpi4.conf&amp;data=04%7C01%7Cprabhakar.mahadev-
lad.rj%40bp.renesas.com%7Cae2601f49f5b4725b1ab08d9adab1943%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%
7C637731772644808211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXV
CI6Mn0%3D%7C3000&amp;sdata=mqp0wknGyxKyY82YvgHJXl72aTu4DWSuUOHcaZPo8xA%3D&amp;reserved=0.
Adding IMAGE_INSTALL/IMAGE_PREINSTALL machine.conf didn’t help for me, I was seeing below issues:

| ERROR: Nothing PROVIDES 'wireless-regdb' (but /repo/recipes-core/images/cip-core-image.bb DEPENDS on or otherwise requires it)
| ERROR: Required build target 'cip-core-image' has no buildable providers.
| Missing or unbuildable dependency chain was: ['cip-core-image', 'wireless-regdb']

| ERROR: Nothing PROVIDES 'wireless-tools' (but /repo/recipes-core/images/cip-core-image.bb DEPENDS on or otherwise requires it)
| ERROR: Required build target 'cip-core-image' has no buildable providers.
| Missing or unbuildable dependency chain was: ['cip-core-image', 'wireless-tools']

| ERROR: Nothing PROVIDES 'firmware-ti-connectivity' (but /repo/recipes-core/images/cip-core-image.bb DEPENDS on or otherwise requires it)
| ERROR: Required build target 'cip-core-image' has no buildable providers.
| Missing or unbuildable dependency chain was: ['cip-core-image', 'firmware-ti-connectivity']

| ERROR: Nothing PROVIDES 'iw' (but /repo/recipes-core/images/cip-core-image.bb DEPENDS on or otherwise requires it)
| ERROR: Required build target 'cip-core-image' has no buildable providers.
| Missing or unbuildable dependency chain was: ['cip-core-image', 'iw']

As above didn’t work and customizations.bb is the only place were I was able to grep for DEBIAN_DEPENDS variable I went this approach 😉.
(Note also adding DEBIAN_DEPENDS in machine.conf didn’t work.)

Is there something which I am missing that would make it work with IMAGE_INSTALL_append variable?


Whether we want to "hard-code" the installation wireless firmware in the machine conf here is a
different question. Maybe customizations is not that a bad place.
If adding IMAGE_INSTALL_append works in machine.conf, will go with this approach, as that would not disturb other platform builds.


Is this the right place for adding this, if not could you please point
me to the right direction.

** Do not merge this patch **

Cheers,
Prabhakar
---
recipes-core/customizations/customizations.bb | 3 +++
1 file changed, 3 insertions(+)

diff --git a/recipes-core/customizations/customizations.bb
b/recipes-core/customizations/customizations.bb
index 932b11c..c508fd4 100644
--- a/recipes-core/customizations/customizations.bb
+++ b/recipes-core/customizations/customizations.bb
@@ -23,6 +23,9 @@ DEPENDS += "sshd-regen-keys"
DEBIAN_DEPENDS = " \
ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys"

+DEBIAN_DEPENDS_hihope-rzg2m += " \
+ ,firmware-ti-connectivity, iw, wireless-regdb, wireless-tools"
+
Let's already prepare for other targets requesting the generic wireless tools as well: Put them into a
reusable variable and then add that variable here.
So just appending DEBIAN_DEPENDS above here in this file should be OK for all the platforms?

Cheers,
Prabhakar

Jan

do_install() {
install -v -d ${D}/etc/network/interfaces.d
install -v -m 644 ${WORKDIR}/ethernet ${D}/etc/network/interfaces.d/
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


Jan Kiszka
 

On 22.11.21 18:37, Prabhakar Mahadev Lad wrote:
Hi Jan,

Thank you for the quick response.

-----Original Message-----
From: Jan Kiszka <jan.kiszka@siemens.com>
Sent: 22 November 2021 11:28
To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>; cip-dev@lists.cip-project.org;
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek <pavel@denx.de>
Subject: Re: [cip-dev][isar-cip-core][RFC PATCH] customizations: Add FW and tools required for wifi
testing

On 22.11.21 12:19, Lad Prabhakar wrote:
Add firmware and tools required for testing wifin on hihope-rzg2m.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
Hi All,

Sending an RFC as I am not sure if this is the right place to add
this. I wanted to add the debian package depends in machine.conf file
but didnt find any variables.
IMAGE_INSTALL_append would work there, see eg.
https://github.com/siemens/jailhouse-
images%2Fblob%2Fmaster%2Fconf%2Fmachine%2Frpi4.conf&amp;data=04%7C01%7Cprabhakar.mahadev-
lad.rj%40bp.renesas.com%7Cae2601f49f5b4725b1ab08d9adab1943%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%
7C637731772644808211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXV
CI6Mn0%3D%7C3000&amp;sdata=mqp0wknGyxKyY82YvgHJXl72aTu4DWSuUOHcaZPo8xA%3D&amp;reserved=0.
Adding IMAGE_INSTALL/IMAGE_PREINSTALL machine.conf didn’t help for me, I was seeing below issues:

| ERROR: Nothing PROVIDES 'wireless-regdb' (but /repo/recipes-core/images/cip-core-image.bb DEPENDS on or otherwise requires it)
| ERROR: Required build target 'cip-core-image' has no buildable providers.
| Missing or unbuildable dependency chain was: ['cip-core-image', 'wireless-regdb']

| ERROR: Nothing PROVIDES 'wireless-tools' (but /repo/recipes-core/images/cip-core-image.bb DEPENDS on or otherwise requires it)
| ERROR: Required build target 'cip-core-image' has no buildable providers.
| Missing or unbuildable dependency chain was: ['cip-core-image', 'wireless-tools']

| ERROR: Nothing PROVIDES 'firmware-ti-connectivity' (but /repo/recipes-core/images/cip-core-image.bb DEPENDS on or otherwise requires it)
| ERROR: Required build target 'cip-core-image' has no buildable providers.
| Missing or unbuildable dependency chain was: ['cip-core-image', 'firmware-ti-connectivity']

| ERROR: Nothing PROVIDES 'iw' (but /repo/recipes-core/images/cip-core-image.bb DEPENDS on or otherwise requires it)
| ERROR: Required build target 'cip-core-image' has no buildable providers.
| Missing or unbuildable dependency chain was: ['cip-core-image', 'iw']

As above didn’t work and customizations.bb is the only place were I was able to grep for DEBIAN_DEPENDS variable I went this approach 😉.
(Note also adding DEBIAN_DEPENDS in machine.conf didn’t work.)

Is there something which I am missing that would make it work with IMAGE_INSTALL_append variable?
DEBIAN_DEPENDS is the wrong variable to touch at global configuration
level. As in the references example, you need to extend the
IMAGE_PREINSTALL (for Debian packages; IMAGE_INSTALL would be for
self-built ones):

diff --git a/conf/machine/hihope-rzg2m.conf b/conf/machine/hihope-rzg2m.conf
index a2ae03d..4c611ae 100644
--- a/conf/machine/hihope-rzg2m.conf
+++ b/conf/machine/hihope-rzg2m.conf
@@ -17,3 +17,5 @@ KERNEL_DEFCONFIG = "cip-kernel-config/4.19.y-cip/arm64/renesas_defconfig"
USE_CIP_KERNEL_CONFIG = "1"
DTB_FILES = "r8a774a1-hihope-rzg2m-ex.dtb"
IMAGE_BOOT_FILES = "${KERNEL_IMAGE} ${DTB_FILES}"
+
+IMAGE_PREINSTALL_append = " firmware-ti-connectivity"


Whether we want to "hard-code" the installation wireless firmware in the machine conf here is a
different question. Maybe customizations is not that a bad place.
If adding IMAGE_INSTALL_append works in machine.conf, will go with this approach, as that would not disturb other platform builds.
You would still have to add/request the generic wireless tools
somewhere. For that, you either need to touch the customization package
(DEBIAN_DEPENDS) or directly expand the IMAGE_PREINSTALL list in
cip-core-image.bb. How about this pattern?

diff --git a/conf/machine/hihope-rzg2m.conf b/conf/machine/hihope-rzg2m.conf
index a2ae03d..4f4ee81 100644
--- a/conf/machine/hihope-rzg2m.conf
+++ b/conf/machine/hihope-rzg2m.conf
@@ -17,3 +17,6 @@ KERNEL_DEFCONFIG = "cip-kernel-config/4.19.y-cip/arm64/renesas_defconfig"
USE_CIP_KERNEL_CONFIG = "1"
DTB_FILES = "r8a774a1-hihope-rzg2m-ex.dtb"
IMAGE_BOOT_FILES = "${KERNEL_IMAGE} ${DTB_FILES}"
+
+WIRELESS_FIRMWARE_PACKAGE = "firmware-ti-connectivity"
+INSTALL_WIRELESS_TOOLS ?= "1"
diff --git a/recipes-core/customizations/customizations.bb b/recipes-core/customizations/customizations.bb
index 932b11c..1c2a125 100644
--- a/recipes-core/customizations/customizations.bb
+++ b/recipes-core/customizations/customizations.bb
@@ -18,10 +18,15 @@ SRC_URI = " \
file://ethernet \
file://99-silent-printk.conf"

+WIRELESS_FIRMWARE_PACKAGE ?= ""
+INSTALL_WIRELESS_TOOLS ??= "0"
+
DEPENDS += "sshd-regen-keys"

DEBIAN_DEPENDS = " \
- ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys"
+ ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys, \
+ ${@('iw, wireless-regdb, wireless-tools, ' + d.getVar('WIRELESS_FIRMWARE_PACKAGE')) \
+ if d.getVar('INSTALL_WIRELESS_TOOLS') == '1' else ''}"

do_install() {
install -v -d ${D}/etc/network/interfaces.d

Avoids enforcing wireless installation when using the machine conf, only
when using our customization package, something that downstream layers
usually don't do.

Jan

--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


Lad Prabhakar
 

Hi Jan,

-----Original Message-----
From: Jan Kiszka <jan.kiszka@siemens.com>
Sent: 23 November 2021 06:29
To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>; cip-dev@lists.cip-project.org;
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek <pavel@denx.de>
Subject: Re: [cip-dev][isar-cip-core][RFC PATCH] customizations: Add FW and tools required for wifi
testing

On 22.11.21 18:37, Prabhakar Mahadev Lad wrote:
Hi Jan,

Thank you for the quick response.

-----Original Message-----
From: Jan Kiszka <jan.kiszka@siemens.com>
Sent: 22 November 2021 11:28
To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>;
cip-dev@lists.cip-project.org; Nobuhiro Iwamatsu
<nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek <pavel@denx.de>
Subject: Re: [cip-dev][isar-cip-core][RFC PATCH] customizations: Add
FW and tools required for wifi testing

On 22.11.21 12:19, Lad Prabhakar wrote:
Add firmware and tools required for testing wifin on hihope-rzg2m.

Signed-off-by: Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com>
---
Hi All,

Sending an RFC as I am not sure if this is the right place to add
this. I wanted to add the debian package depends in machine.conf
file but didnt find any variables.
IMAGE_INSTALL_append would work there, see eg.
https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
hub.com%2Fsiemens%2Fjailhouse-&amp;data=04%7C01%7Cprabhakar.mahadev-l
ad.rj%40bp.renesas.com%7Cc8bfbda5acc14fe86de508d9ae4a87a7%7C53d82571d
a1947e49cb4625a166a4a2a%7C0%7C0%7C637732457394597401%7CUnknown%7CTWFp
bGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6M
n0%3D%7C3000&amp;sdata=BgbTnmZaikF28kM69DHDJHQO%2B1zLX9tRFrsgFOUVztI%
3D&amp;reserved=0
images%2Fblob%2Fmaster%2Fconf%2Fmachine%2Frpi4.conf&amp;data=04%7C01%
7Cprabhakar.mahadev-
lad.rj%40bp.renesas.com%7Cae2601f49f5b4725b1ab08d9adab1943%7C53d82571
da1947e49cb4625a166a4a2a%7C0%7C0%
7C637731772644808211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQ
IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXV
CI6Mn0%3D%7C3000&amp;sdata=mqp0wknGyxKyY82YvgHJXl72aTu4DWSuUOHcaZPo8xA%3D&amp;reserved=0.
Adding IMAGE_INSTALL/IMAGE_PREINSTALL machine.conf didn’t help for me, I was seeing below issues:

| ERROR: Nothing PROVIDES 'wireless-regdb' (but
| /repo/recipes-core/images/cip-core-image.bb DEPENDS on or otherwise
| requires it)
| ERROR: Required build target 'cip-core-image' has no buildable providers.
| Missing or unbuildable dependency chain was: ['cip-core-image',
| 'wireless-regdb']

| ERROR: Nothing PROVIDES 'wireless-tools' (but
| /repo/recipes-core/images/cip-core-image.bb DEPENDS on or otherwise
| requires it)
| ERROR: Required build target 'cip-core-image' has no buildable providers.
| Missing or unbuildable dependency chain was: ['cip-core-image',
| 'wireless-tools']

| ERROR: Nothing PROVIDES 'firmware-ti-connectivity' (but
| /repo/recipes-core/images/cip-core-image.bb DEPENDS on or otherwise
| requires it)
| ERROR: Required build target 'cip-core-image' has no buildable providers.
| Missing or unbuildable dependency chain was: ['cip-core-image',
| 'firmware-ti-connectivity']

| ERROR: Nothing PROVIDES 'iw' (but
| /repo/recipes-core/images/cip-core-image.bb DEPENDS on or otherwise
| requires it)
| ERROR: Required build target 'cip-core-image' has no buildable providers.
| Missing or unbuildable dependency chain was: ['cip-core-image',
| 'iw']

As above didn’t work and customizations.bb is the only place were I was able to grep for
DEBIAN_DEPENDS variable I went this approach 😉.
(Note also adding DEBIAN_DEPENDS in machine.conf didn’t work.)

Is there something which I am missing that would make it work with IMAGE_INSTALL_append variable?
DEBIAN_DEPENDS is the wrong variable to touch at global configuration level. As in the references
example, you need to extend the IMAGE_PREINSTALL (for Debian packages; IMAGE_INSTALL would be for
self-built ones):
Aha I missed that, thanks for the pointer.

diff --git a/conf/machine/hihope-rzg2m.conf b/conf/machine/hihope-rzg2m.conf index a2ae03d..4c611ae
100644
--- a/conf/machine/hihope-rzg2m.conf
+++ b/conf/machine/hihope-rzg2m.conf
@@ -17,3 +17,5 @@ KERNEL_DEFCONFIG = "cip-kernel-config/4.19.y-cip/arm64/renesas_defconfig"
USE_CIP_KERNEL_CONFIG = "1"
DTB_FILES = "r8a774a1-hihope-rzg2m-ex.dtb"
IMAGE_BOOT_FILES = "${KERNEL_IMAGE} ${DTB_FILES}"
+
+IMAGE_PREINSTALL_append = " firmware-ti-connectivity"


Whether we want to "hard-code" the installation wireless firmware in
the machine conf here is a different question. Maybe customizations is not that a bad place.
If adding IMAGE_INSTALL_append works in machine.conf, will go with this approach, as that would not
disturb other platform builds.
You would still have to add/request the generic wireless tools somewhere. For that, you either need to
touch the customization package
(DEBIAN_DEPENDS) or directly expand the IMAGE_PREINSTALL list in cip-core-image.bb. How about this
pattern?
+1

diff --git a/conf/machine/hihope-rzg2m.conf b/conf/machine/hihope-rzg2m.conf index a2ae03d..4f4ee81
100644
--- a/conf/machine/hihope-rzg2m.conf
+++ b/conf/machine/hihope-rzg2m.conf
@@ -17,3 +17,6 @@ KERNEL_DEFCONFIG = "cip-kernel-config/4.19.y-cip/arm64/renesas_defconfig"
USE_CIP_KERNEL_CONFIG = "1"
DTB_FILES = "r8a774a1-hihope-rzg2m-ex.dtb"
IMAGE_BOOT_FILES = "${KERNEL_IMAGE} ${DTB_FILES}"
+
+WIRELESS_FIRMWARE_PACKAGE = "firmware-ti-connectivity"
+INSTALL_WIRELESS_TOOLS ?= "1"
diff --git a/recipes-core/customizations/customizations.bb b/recipes-
core/customizations/customizations.bb
index 932b11c..1c2a125 100644
--- a/recipes-core/customizations/customizations.bb
+++ b/recipes-core/customizations/customizations.bb
@@ -18,10 +18,15 @@ SRC_URI = " \
file://ethernet \
file://99-silent-printk.conf"

+WIRELESS_FIRMWARE_PACKAGE ?= ""
+INSTALL_WIRELESS_TOOLS ??= "0"
+
DEPENDS += "sshd-regen-keys"

DEBIAN_DEPENDS = " \
- ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys"
+ ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys, \
+ ${@('iw, wireless-regdb, wireless-tools, ' + d.getVar('WIRELESS_FIRMWARE_PACKAGE')) \
+ if d.getVar('INSTALL_WIRELESS_TOOLS') == '1' else ''}"

do_install() {
install -v -d ${D}/etc/network/interfaces.d

Avoids enforcing wireless installation when using the machine conf, only when using our customization
package, something that downstream layers usually don't do.
Agreed, will follow the same.

Cheers,
Prabhakar

Jan

--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux