From a22fe6936f2256b4e8f23d6f7e2494b8e6ac7a65 Mon Sep 17 00:00:00 2001 From: Christian Gromm Date: Fri, 9 Jun 2017 11:27:04 +0200 Subject: fix MOST driver dependency issues This patch adds a new "most" receipe for building the MOST driver. The receipe replaces the old ones, as it builds all modules at once. Hence, the receipes aim*, hdm* and mostcore are removed. Additionally, the *.bb file for the demo platform is modified to reflect these changes. This patch is needed to avoid dependency issues among the modules of the driver stack. Although, the problem has been reported with SPEC 438 and a patch set to fix it has been introduced with Change #8447, it is still present on RaspberryPi. Change-Id: Id6104ee6d9bf1b7d9744761a6529461176fdd8b2 Signed-off-by: Christian Gromm --- recipes-kernel/aim-cdev/aim-cdev.bb | 24 ------------ recipes-kernel/aim-network/aim-network.bb | 25 ------------ ...m-network-backport-patch-for-3.10.31-ltsi.patch | 45 ---------------------- recipes-kernel/aim-sound/aim-sound.bb | 25 ------------ .../0001-aim-sound-3.10.31-ltsi-backport.patch | 29 -------------- recipes-kernel/aim-v4l2/aim-v4l2.bb | 24 ------------ recipes-kernel/hdm-dim2/hdm-dim2.bb | 24 ------------ recipes-kernel/hdm-i2c/hdm-i2c.bb | 24 ------------ recipes-kernel/hdm-usb/hdm-usb.bb | 24 ------------ .../0001-aim-network-3.10.31-ltsi-backport.patch | 45 ++++++++++++++++++++++ .../0001-aim-sound-3.10.31-ltsi-backport.patch | 29 ++++++++++++++ recipes-kernel/most/most.bb | 32 +++++++++++++++ recipes-kernel/mostcore/mostcore.bb | 23 ----------- .../packagegroup-agl-demo-platform.bb | 9 +---- 14 files changed, 107 insertions(+), 275 deletions(-) delete mode 100644 recipes-kernel/aim-cdev/aim-cdev.bb delete mode 100644 recipes-kernel/aim-network/aim-network.bb delete mode 100644 recipes-kernel/aim-network/files/0001-aim-network-backport-patch-for-3.10.31-ltsi.patch delete mode 100644 recipes-kernel/aim-sound/aim-sound.bb delete mode 100644 recipes-kernel/aim-sound/files/0001-aim-sound-3.10.31-ltsi-backport.patch delete mode 100644 recipes-kernel/aim-v4l2/aim-v4l2.bb delete mode 100644 recipes-kernel/hdm-dim2/hdm-dim2.bb delete mode 100644 recipes-kernel/hdm-i2c/hdm-i2c.bb delete mode 100644 recipes-kernel/hdm-usb/hdm-usb.bb create mode 100644 recipes-kernel/most/files/0001-aim-network-3.10.31-ltsi-backport.patch create mode 100644 recipes-kernel/most/files/0001-aim-sound-3.10.31-ltsi-backport.patch create mode 100644 recipes-kernel/most/most.bb delete mode 100644 recipes-kernel/mostcore/mostcore.bb diff --git a/recipes-kernel/aim-cdev/aim-cdev.bb b/recipes-kernel/aim-cdev/aim-cdev.bb deleted file mode 100644 index e8c101e9..00000000 --- a/recipes-kernel/aim-cdev/aim-cdev.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "Build character device driver for MOST" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -DEPENDS = " mostcore" - -inherit module - -PV = "0.1" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/most;protocol=https" - -S = "${WORKDIR}/git/driver/${PN}" -SRCREV = "${AUTOREV}" - -# The inherit of module.bbclass will automatically name module packages with -# "kernel-module-" prefix as required by the oe-core build environment. - -do_install_append () { - # modprobe automatically at boot - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${sysconfdir}/modules-load.d - echo "aim_cdev" > ${D}${sysconfdir}/modules-load.d/aim_cdev.conf - fi -} diff --git a/recipes-kernel/aim-network/aim-network.bb b/recipes-kernel/aim-network/aim-network.bb deleted file mode 100644 index 7ef192ce..00000000 --- a/recipes-kernel/aim-network/aim-network.bb +++ /dev/null @@ -1,25 +0,0 @@ -DESCRIPTION = "Build networking driver for MOST" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -DEPENDS = " mostcore" - -inherit module - -PV = "0.1" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/most;protocol=https" -SRC_URI_append_porter = " file://0001-aim-network-backport-patch-for-3.10.31-ltsi.patch" - -S = "${WORKDIR}/git/driver/${PN}" -SRCREV = "${AUTOREV}" - -# The inherit of module.bbclass will automatically name module packages with -# "kernel-module-" prefix as required by the oe-core build environment. - -do_install_append () { - # modprobe automatically at boot - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${sysconfdir}/modules-load.d - echo "aim_network" > ${D}${sysconfdir}/modules-load.d/aim_network.conf - fi -} diff --git a/recipes-kernel/aim-network/files/0001-aim-network-backport-patch-for-3.10.31-ltsi.patch b/recipes-kernel/aim-network/files/0001-aim-network-backport-patch-for-3.10.31-ltsi.patch deleted file mode 100644 index 41728c2d..00000000 --- a/recipes-kernel/aim-network/files/0001-aim-network-backport-patch-for-3.10.31-ltsi.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 4c49b7ad9e3c1e64e4e6042e6fee357b5d9b3df2 Mon Sep 17 00:00:00 2001 -From: Christian Gromm -Date: Mon, 23 Jan 2017 14:57:55 +0100 -Subject: [PATCH] aim-network: create backport patch for 3.10.31-ltsi - -Signed-off-by: Christian Gromm ---- - aim-network/networking.c | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/networking.c b/aim-network/networking.c -index ce1764c..e04b523 100644 ---- a/networking.c -+++ b/networking.c -@@ -362,8 +362,7 @@ static int aim_probe_channel(struct most_interface *iface, int channel_idx, - - if (nd->tx.linked || nd->rx.linked) { - struct net_device *dev = -- alloc_netdev(0, "meth%d", NET_NAME_UNKNOWN, -- most_nd_setup); -+ alloc_netdev(0, "meth%d", most_nd_setup); - - if (!dev) { - pr_err("no memory for net_device\n"); -@@ -483,7 +482,7 @@ static int aim_rx_data(struct mbo *mbo) - - if (nd->is_mamac) { - /* dest */ -- ether_addr_copy(skb_put(skb, ETH_ALEN), dev->dev_addr); -+ memcpy(skb_put(skb, ETH_ALEN), dev->dev_addr, ETH_ALEN); - - /* src */ - memcpy(skb_put(skb, 4), &zero, 4); -@@ -577,7 +576,7 @@ void most_deliver_netinfo(struct most_interface *iface, - if (!is_valid_ether_addr(dev->dev_addr)) { - netdev_info(dev, "set mac %02x-%02x-%02x-%02x-%02x-%02x\n", - m[0], m[1], m[2], m[3], m[4], m[5]); -- ether_addr_copy(dev->dev_addr, m); -+ memcpy(dev->dev_addr, m, ETH_ALEN); - complete(&nd->mac_compl); - } else if (!ether_addr_equal(dev->dev_addr, m)) { - netdev_warn(dev, "reject mac %02x-%02x-%02x-%02x-%02x-%02x\n", --- -2.11.0 - diff --git a/recipes-kernel/aim-sound/aim-sound.bb b/recipes-kernel/aim-sound/aim-sound.bb deleted file mode 100644 index cb2b9836..00000000 --- a/recipes-kernel/aim-sound/aim-sound.bb +++ /dev/null @@ -1,25 +0,0 @@ -DESCRIPTION = "Build ALSA driver for MOST" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -DEPENDS = " mostcore" - -inherit module - -PV = "0.1" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/most;protocol=https" -SRC_URI_append_porter = " file://0001-aim-sound-3.10.31-ltsi-backport.patch" - -S = "${WORKDIR}/git/driver/${PN}" -SRCREV = "${AUTOREV}" - -# The inherit of module.bbclass will automatically name module packages with -# "kernel-module-" prefix as required by the oe-core build environment. - -do_install_append () { - # modprobe automatically at boot - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${sysconfdir}/modules-load.d - echo "aim_sound" > ${D}${sysconfdir}/modules-load.d/aim_sound.conf - fi -} diff --git a/recipes-kernel/aim-sound/files/0001-aim-sound-3.10.31-ltsi-backport.patch b/recipes-kernel/aim-sound/files/0001-aim-sound-3.10.31-ltsi-backport.patch deleted file mode 100644 index b999b0d6..00000000 --- a/recipes-kernel/aim-sound/files/0001-aim-sound-3.10.31-ltsi-backport.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 686130266ff7968edc863d398fba82bd0f78bf29 Mon Sep 17 00:00:00 2001 -From: Christian Gromm -Date: Wed, 28 Sep 2016 13:43:36 +0200 -Subject: [PATCH 1/4] backport module - -This patch replaces function snd_card_new() with snd_card_create() to match -AGL/Renesas kernel API. - -Signed-off-by: Christian Gromm ---- - aim-sound/sound.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sound.c b/aim-sound/sound.c -index 3dc625c..af0af2d 100644 ---- a/sound.c -+++ b/sound.c -@@ -595,7 +595,7 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id, - return ret; - } - -- ret = snd_card_new(NULL, -1, card_name, THIS_MODULE, -+ ret = snd_card_create(-1, card_name, THIS_MODULE, - sizeof(*channel), &card); - if (ret < 0) - return ret; --- -1.7.9.5 - diff --git a/recipes-kernel/aim-v4l2/aim-v4l2.bb b/recipes-kernel/aim-v4l2/aim-v4l2.bb deleted file mode 100644 index 5233eed9..00000000 --- a/recipes-kernel/aim-v4l2/aim-v4l2.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "Build V4L2 driver for MOST" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -DEPENDS = " mostcore" - -inherit module - -PV = "0.1" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/most;protocol=https" - -S = "${WORKDIR}/git/driver/${PN}" -SRCREV = "${AUTOREV}" - -# The inherit of module.bbclass will automatically name module packages with -# "kernel-module-" prefix as required by the oe-core build environment. - -do_install_append () { - # modprobe automatically at boot - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${sysconfdir}/modules-load.d - echo "aim_v4l2" > ${D}${sysconfdir}/modules-load.d/aim_v4l2.conf - fi -} diff --git a/recipes-kernel/hdm-dim2/hdm-dim2.bb b/recipes-kernel/hdm-dim2/hdm-dim2.bb deleted file mode 100644 index a9179299..00000000 --- a/recipes-kernel/hdm-dim2/hdm-dim2.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "Build DIM2 adapter driver for MOST" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -DEPENDS = " mostcore" - -inherit module - -PV = "0.1" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/most;protocol=https" - -S = "${WORKDIR}/git/driver/${PN}" -SRCREV = "${AUTOREV}" - -# The inherit of module.bbclass will automatically name module packages with -# "kernel-module-" prefix as required by the oe-core build environment. - -do_install_append () { - # modprobe automatically at boot - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${sysconfdir}/modules-load.d - echo "hdm_dim2" > ${D}${sysconfdir}/modules-load.d/hdm_dim2.conf - fi -} diff --git a/recipes-kernel/hdm-i2c/hdm-i2c.bb b/recipes-kernel/hdm-i2c/hdm-i2c.bb deleted file mode 100644 index 90216ec2..00000000 --- a/recipes-kernel/hdm-i2c/hdm-i2c.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "Build I2C adapter driver for MOST" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -DEPENDS = " mostcore" - -inherit module - -PV = "0.1" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/most;protocol=https" - -S = "${WORKDIR}/git/driver/${PN}" -SRCREV = "${AUTOREV}" - -# The inherit of module.bbclass will automatically name module packages with -# "kernel-module-" prefix as required by the oe-core build environment. - -do_install_append () { - # modprobe automatically at boot - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${sysconfdir}/modules-load.d - echo "hdm_i2c" > ${D}${sysconfdir}/modules-load.d/hdm_i2c.conf - fi -} diff --git a/recipes-kernel/hdm-usb/hdm-usb.bb b/recipes-kernel/hdm-usb/hdm-usb.bb deleted file mode 100644 index df45e370..00000000 --- a/recipes-kernel/hdm-usb/hdm-usb.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "Build USB adapter driver for MOST" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -DEPENDS = " mostcore" - -inherit module - -PV = "0.1" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/most;protocol=https" - -S = "${WORKDIR}/git/driver/${PN}" -SRCREV = "${AUTOREV}" - -# The inherit of module.bbclass will automatically name module packages with -# "kernel-module-" prefix as required by the oe-core build environment. - -do_install_append () { - # modprobe automatically at boot - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${sysconfdir}/modules-load.d - echo "hdm_usb" > ${D}${sysconfdir}/modules-load.d/hdm_usb.conf - fi -} diff --git a/recipes-kernel/most/files/0001-aim-network-3.10.31-ltsi-backport.patch b/recipes-kernel/most/files/0001-aim-network-3.10.31-ltsi-backport.patch new file mode 100644 index 00000000..d0bbd72e --- /dev/null +++ b/recipes-kernel/most/files/0001-aim-network-3.10.31-ltsi-backport.patch @@ -0,0 +1,45 @@ +From 4c49b7ad9e3c1e64e4e6042e6fee357b5d9b3df2 Mon Sep 17 00:00:00 2001 +From: Christian Gromm +Date: Mon, 23 Jan 2017 14:57:55 +0100 +Subject: [PATCH] aim-network: create backport patch for 3.10.31-ltsi + +Signed-off-by: Christian Gromm +--- + aim-network/networking.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/aim-network/networking.c b/aim-network/networking.c +index ce1764c..e04b523 100644 +--- a/aim-network/networking.c ++++ b/aim-network/networking.c +@@ -362,8 +362,7 @@ static int aim_probe_channel(struct most_interface *iface, int channel_idx, + + if (nd->tx.linked || nd->rx.linked) { + struct net_device *dev = +- alloc_netdev(0, "meth%d", NET_NAME_UNKNOWN, +- most_nd_setup); ++ alloc_netdev(0, "meth%d", most_nd_setup); + + if (!dev) { + pr_err("no memory for net_device\n"); +@@ -483,7 +482,7 @@ static int aim_rx_data(struct mbo *mbo) + + if (nd->is_mamac) { + /* dest */ +- ether_addr_copy(skb_put(skb, ETH_ALEN), dev->dev_addr); ++ memcpy(skb_put(skb, ETH_ALEN), dev->dev_addr, ETH_ALEN); + + /* src */ + memcpy(skb_put(skb, 4), &zero, 4); +@@ -577,7 +576,7 @@ void most_deliver_netinfo(struct most_interface *iface, + if (!is_valid_ether_addr(dev->dev_addr)) { + netdev_info(dev, "set mac %02x-%02x-%02x-%02x-%02x-%02x\n", + m[0], m[1], m[2], m[3], m[4], m[5]); +- ether_addr_copy(dev->dev_addr, m); ++ memcpy(dev->dev_addr, m, ETH_ALEN); + complete(&nd->mac_compl); + } else if (!ether_addr_equal(dev->dev_addr, m)) { + netdev_warn(dev, "reject mac %02x-%02x-%02x-%02x-%02x-%02x\n", +-- +2.11.0 + diff --git a/recipes-kernel/most/files/0001-aim-sound-3.10.31-ltsi-backport.patch b/recipes-kernel/most/files/0001-aim-sound-3.10.31-ltsi-backport.patch new file mode 100644 index 00000000..31e9400d --- /dev/null +++ b/recipes-kernel/most/files/0001-aim-sound-3.10.31-ltsi-backport.patch @@ -0,0 +1,29 @@ +From 686130266ff7968edc863d398fba82bd0f78bf29 Mon Sep 17 00:00:00 2001 +From: Christian Gromm +Date: Wed, 28 Sep 2016 13:43:36 +0200 +Subject: [PATCH 1/4] backport module + +This patch replaces function snd_card_new() with snd_card_create() to match +AGL/Renesas kernel API. + +Signed-off-by: Christian Gromm +--- + aim-sound/sound.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/aim-sound/sound.c b/aim-sound/sound.c +index 3dc625c..af0af2d 100644 +--- a/aim-sound/sound.c ++++ b/aim-sound/sound.c +@@ -595,7 +595,7 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id, + return ret; + } + +- ret = snd_card_new(NULL, -1, card_name, THIS_MODULE, ++ ret = snd_card_create(-1, card_name, THIS_MODULE, + sizeof(*channel), &card); + if (ret < 0) + return ret; +-- +1.7.9.5 + diff --git a/recipes-kernel/most/most.bb b/recipes-kernel/most/most.bb new file mode 100644 index 00000000..512610af --- /dev/null +++ b/recipes-kernel/most/most.bb @@ -0,0 +1,32 @@ +DESCRIPTION = "Build MOST driver" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +inherit module + +PV = "0.1" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/most;protocol=https" +SRC_URI_append_porter = " file://0001-aim-network-3.10.31-ltsi-backport.patch \ + file://0001-aim-sound-3.10.31-ltsi-backport.patch \ + " +S = "${WORKDIR}/git/driver" +SRCREV = "${AUTOREV}" + +# The inherit of module.bbclass will automatically name module packages with +# "kernel-module-" prefix as required by the oe-core build environment. + +do_install_append () { + # modprobe automatically at boot + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${sysconfdir}/modules-load.d + echo "aim_cdev" > ${D}${sysconfdir}/modules-load.d/aim_cdev.conf + echo "aim_sound" > ${D}${sysconfdir}/modules-load.d/aim_sound.conf + echo "aim_network" > ${D}${sysconfdir}/modules-load.d/aim_network.conf + echo "aim_v4l2" > ${D}${sysconfdir}/modules-load.d/aim_v4l2.conf + echo "hdm_i2c" > ${D}${sysconfdir}/modules-load.d/hdm_i2c.conf + echo "hdm_dim2" > ${D}${sysconfdir}/modules-load.d/hdm_dim2.conf + echo "hdm_usb" > ${D}${sysconfdir}/modules-load.d/hdm_usb.conf + echo "mostcore" > ${D}${sysconfdir}/modules-load.d/mostcore.conf + fi +} diff --git a/recipes-kernel/mostcore/mostcore.bb b/recipes-kernel/mostcore/mostcore.bb deleted file mode 100644 index 35865ce4..00000000 --- a/recipes-kernel/mostcore/mostcore.bb +++ /dev/null @@ -1,23 +0,0 @@ -DESCRIPTION = "Build MOST core driver" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" - -inherit module - -PV = "0.1" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/most;protocol=https" - -S = "${WORKDIR}/git/driver/${PN}" -SRCREV = "${AUTOREV}" - -# The inherit of module.bbclass will automatically name module packages with -# "kernel-module-" prefix as required by the oe-core build environment. - -do_install_append () { - # modprobe automatically at boot - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${sysconfdir}/modules-load.d - echo "mostcore" > ${D}${sysconfdir}/modules-load.d/mostcore.conf - fi -} diff --git a/recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb b/recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb index 1ad6f2c8..1df09f03 100755 --- a/recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb +++ b/recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb @@ -21,15 +21,8 @@ RDEPENDS_${PN} += "\ MOST_DRIVERS = " " MOST_DRIVERS_append = " \ - aim-cdev \ - aim-network \ - aim-sound \ - aim-v4l2 \ - hdm-dim2 \ - hdm-i2c \ - hdm-usb \ mocca-usb \ - mostcore \ + most \ " # HVAC dependencies depend on drivers above -- cgit 1.2.3-korg