summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/most
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/most')
-rw-r--r--recipes-kernel/most/files/0001-aim-network-3.10.31-ltsi-backport.patch45
-rw-r--r--recipes-kernel/most/files/0001-aim-sound-3.10.31-ltsi-backport.patch29
-rw-r--r--recipes-kernel/most/most.bb32
3 files changed, 106 insertions, 0 deletions
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 <christian.gromm@microchip.com>
+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 <christian.gromm@microchip.com>
+---
+ 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 <christian.gromm@microchip.com>
+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 <christian.gromm@microchip.com>
+---
+ 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
+}