summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2019-06-11 18:40:02 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2019-06-11 18:41:56 +0200
commit3fa96f28bb30643cac3b8a49d3abd7c976acb704 (patch)
tree544246ae49115aae052c64f11558f52090c6266b
parent3443bf397e0fb71488f8f26dc8cc1e4c9baaa6ff (diff)
libusbgx: rework g1.schema handlingApalis-iMX8_Console-Image_3.0b1.40-20190612
Add the product name at compile time so that we do not need to provide slightly different copies of the file. While at it set package arch to machine arch. The packages created are machine specific due to the g1.schema file. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r--recipes-support/libusbgx/files/colibri-imx6/g1.schema64
-rw-r--r--recipes-support/libusbgx/files/colibri-vf/g1.schema64
-rw-r--r--recipes-support/libusbgx/files/g1.schema1
-rw-r--r--recipes-support/libusbgx/files/g1.schema.in (renamed from recipes-support/libusbgx/files/apalis-imx6/g1.schema)2
-rw-r--r--recipes-support/libusbgx/files/mx6ull/g1.schema64
-rw-r--r--recipes-support/libusbgx/files/mx7/g1.schema64
-rw-r--r--recipes-support/libusbgx/libusbgx_git.bb8
7 files changed, 8 insertions, 259 deletions
diff --git a/recipes-support/libusbgx/files/colibri-imx6/g1.schema b/recipes-support/libusbgx/files/colibri-imx6/g1.schema
deleted file mode 100644
index 300dcd2..0000000
--- a/recipes-support/libusbgx/files/colibri-imx6/g1.schema
+++ /dev/null
@@ -1,64 +0,0 @@
-attrs :
-{
- bcdUSB = 0x200;
- bDeviceClass = 0x2;
- bDeviceSubClass = 0x0;
- bDeviceProtocol = 0x0;
- bMaxPacketSize0 = 0x40;
- idVendor = 0x1b67;
- bcdDevice = 0x401;
-};
-os_descs :
-{
- config_id = 1;
- use = 1;
- qw_sign = "MSFT100";
- b_vendor_code = 0xcd;
-};
-strings = (
- {
- lang = 0x409;
- manufacturer = "Toradex";
- product = "Toradex Colibri iMX6";
- serialnumber = "00000000";
- } );
-functions :
-{
- rndis_usb0 :
- {
- instance = "usb0";
- type = "rndis";
- attrs :
- {
- dev_addr = "00:14:2d:ff:ff:ff";
- host_addr = "00:14:2d:ff:ff:fe";
- qmult = 5;
- };
- os_descs = (
- {
- interface = "rndis";
- compatible_id = "RNDIS";
- sub_compatible_id = "5162001";
- } );
- };
-};
-configs = (
- {
- id = 1;
- name = "c";
- attrs :
- {
- bmAttributes = 0xC0;
- bMaxPower = 0x1;
- };
- strings = (
- {
- lang = 0x409;
- configuration = "RNDIS";
- } );
- functions = (
- {
- name = "rndis.usb0";
- function = "rndis_usb0";
- } );
- } );
diff --git a/recipes-support/libusbgx/files/colibri-vf/g1.schema b/recipes-support/libusbgx/files/colibri-vf/g1.schema
deleted file mode 100644
index 4f3a1d8..0000000
--- a/recipes-support/libusbgx/files/colibri-vf/g1.schema
+++ /dev/null
@@ -1,64 +0,0 @@
-attrs :
-{
- bcdUSB = 0x200;
- bDeviceClass = 0x2;
- bDeviceSubClass = 0x0;
- bDeviceProtocol = 0x0;
- bMaxPacketSize0 = 0x40;
- idVendor = 0x1b67;
- bcdDevice = 0x401;
-};
-os_descs :
-{
- config_id = 1;
- use = 1;
- qw_sign = "MSFT100";
- b_vendor_code = 0xcd;
-};
-strings = (
- {
- lang = 0x409;
- manufacturer = "Toradex";
- product = "Toradex Colibri VF50/VF61";
- serialnumber = "00000000";
- } );
-functions :
-{
- rndis_usb0 :
- {
- instance = "usb0";
- type = "rndis";
- attrs :
- {
- dev_addr = "00:14:2d:ff:ff:ff";
- host_addr = "00:14:2d:ff:ff:fe";
- qmult = 5;
- };
- os_descs = (
- {
- interface = "rndis";
- compatible_id = "RNDIS";
- sub_compatible_id = "5162001";
- } );
- };
-};
-configs = (
- {
- id = 1;
- name = "c";
- attrs :
- {
- bmAttributes = 0xC0;
- bMaxPower = 0x1;
- };
- strings = (
- {
- lang = 0x409;
- configuration = "RNDIS";
- } );
- functions = (
- {
- name = "rndis.usb0";
- function = "rndis_usb0";
- } );
- } );
diff --git a/recipes-support/libusbgx/files/g1.schema b/recipes-support/libusbgx/files/g1.schema
deleted file mode 100644
index 6b1b583..0000000
--- a/recipes-support/libusbgx/files/g1.schema
+++ /dev/null
@@ -1 +0,0 @@
-# empty placeholder to allow bitbake to find a file for machines which do not provide a schema
diff --git a/recipes-support/libusbgx/files/apalis-imx6/g1.schema b/recipes-support/libusbgx/files/g1.schema.in
index 5d6dab2..7bfaf70 100644
--- a/recipes-support/libusbgx/files/apalis-imx6/g1.schema
+++ b/recipes-support/libusbgx/files/g1.schema.in
@@ -19,7 +19,7 @@ strings = (
{
lang = 0x409;
manufacturer = "Toradex";
- product = "Toradex Apalis iMX6";
+ product = "@@PRODUCT_NAME@@";
serialnumber = "00000000";
} );
functions :
diff --git a/recipes-support/libusbgx/files/mx6ull/g1.schema b/recipes-support/libusbgx/files/mx6ull/g1.schema
deleted file mode 100644
index 1050225..0000000
--- a/recipes-support/libusbgx/files/mx6ull/g1.schema
+++ /dev/null
@@ -1,64 +0,0 @@
-attrs :
-{
- bcdUSB = 0x200;
- bDeviceClass = 0x2;
- bDeviceSubClass = 0x0;
- bDeviceProtocol = 0x0;
- bMaxPacketSize0 = 0x40;
- idVendor = 0x1b67;
- bcdDevice = 0x401;
-};
-os_descs :
-{
- config_id = 1;
- use = 1;
- qw_sign = "MSFT100";
- b_vendor_code = 0xcd;
-};
-strings = (
- {
- lang = 0x409;
- manufacturer = "Toradex";
- product = "Toradex Colibri iMX6ULL";
- serialnumber = "00000000";
- } );
-functions :
-{
- rndis_usb0 :
- {
- instance = "usb0";
- type = "rndis";
- attrs :
- {
- dev_addr = "00:14:2d:ff:ff:ff";
- host_addr = "00:14:2d:ff:ff:fe";
- qmult = 5;
- };
- os_descs = (
- {
- interface = "rndis";
- compatible_id = "RNDIS";
- sub_compatible_id = "5162001";
- } );
- };
-};
-configs = (
- {
- id = 1;
- name = "c";
- attrs :
- {
- bmAttributes = 0xC0;
- bMaxPower = 0x1;
- };
- strings = (
- {
- lang = 0x409;
- configuration = "RNDIS";
- } );
- functions = (
- {
- name = "rndis.usb0";
- function = "rndis_usb0";
- } );
- } );
diff --git a/recipes-support/libusbgx/files/mx7/g1.schema b/recipes-support/libusbgx/files/mx7/g1.schema
deleted file mode 100644
index 79b8882..0000000
--- a/recipes-support/libusbgx/files/mx7/g1.schema
+++ /dev/null
@@ -1,64 +0,0 @@
-attrs :
-{
- bcdUSB = 0x200;
- bDeviceClass = 0x2;
- bDeviceSubClass = 0x0;
- bDeviceProtocol = 0x0;
- bMaxPacketSize0 = 0x40;
- idVendor = 0x1b67;
- bcdDevice = 0x401;
-};
-os_descs :
-{
- config_id = 1;
- use = 1;
- qw_sign = "MSFT100";
- b_vendor_code = 0xcd;
-};
-strings = (
- {
- lang = 0x409;
- manufacturer = "Toradex";
- product = "Toradex Colibri iMX7";
- serialnumber = "00000000";
- } );
-functions :
-{
- rndis_usb0 :
- {
- instance = "usb0";
- type = "rndis";
- attrs :
- {
- dev_addr = "00:14:2d:ff:ff:ff";
- host_addr = "00:14:2d:ff:ff:fe";
- qmult = 5;
- };
- os_descs = (
- {
- interface = "rndis";
- compatible_id = "RNDIS";
- sub_compatible_id = "5162001";
- } );
- };
-};
-configs = (
- {
- id = 1;
- name = "c";
- attrs :
- {
- bmAttributes = 0xC0;
- bMaxPower = 0x1;
- };
- strings = (
- {
- lang = 0x409;
- configuration = "RNDIS";
- } );
- functions = (
- {
- name = "rndis.usb0";
- function = "rndis_usb0";
- } );
- } );
diff --git a/recipes-support/libusbgx/libusbgx_git.bb b/recipes-support/libusbgx/libusbgx_git.bb
index 17707ee..2cd9e21 100644
--- a/recipes-support/libusbgx/libusbgx_git.bb
+++ b/recipes-support/libusbgx/libusbgx_git.bb
@@ -16,11 +16,16 @@ SRCBRANCH = "master"
SRC_URI = " \
git://github.com/libusbgx/libusbgx.git;branch=${SRCBRANCH} \
file://usbg.service \
- file://g1.schema \
+ file://g1.schema.in \
"
S = "${WORKDIR}/git"
+MACHINE_NAME ?= "${MACHINE}"
+do_compile_append () {
+ sed -e "s:@@PRODUCT_NAME@@:${MACHINE_NAME}:" ${WORKDIR}/g1.schema.in > ${WORKDIR}/g1.schema
+}
+
do_install_append () {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_unitdir}/system/
@@ -36,6 +41,7 @@ SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "usbg.service"
PACKAGES =+ "${PN}-examples"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
FILES_${PN}-examples = " \
${bindir}/gadget-* \