From 2db48b4f7f00051c17f61f7c7b01844190ed6882 Mon Sep 17 00:00:00 2001 From: David P Date: Wed, 23 Oct 2019 00:15:16 -0300 Subject: updpkg: kernels/linux-libre-xtreme 5.3.7_gnu-1 Signed-off-by: David P --- ...RM-atags-add-support-for-Marvell-s-u-boot.patch | 6 +- ...ctl-and-CONFIG-to-disallow-unprivileged-C.patch | 132 ++ ...to-disallow-unprivileged-CLONE_NEWUSER-by.patch | 101 -- ...dt-retrieve-MAC-addresses-from-Marvell-bo.patch | 4 +- ...idp-Fix-assumptions-on-the-return-value-o.patch | 63 + .../0003-SMILE-Plug-device-tree-file.patch | 8 +- .../0004-fix-mvsdio-eMMC-timing.patch | 10 +- ...x-Allow-mac-address-to-be-set-as-a-parame.patch | 12 +- .../0006-set-default-cubietruck-led-triggers.patch | 4 +- ...odroid-set-higher-minimum-buck2-regulator.patch | 8 +- .../0008-ARM-dove-enable-ethernet-on-D3Plug.patch | 4 +- .../0009-USB-Armory-MkII-support.patch | 555 +++++++++ ...fc-fix-incorrect-bus-assignment-in-virtua.patch | 38 - kernels/linux-libre-xtreme/60-linux.hook | 1 - kernels/linux-libre-xtreme/PKGBUILD | 140 ++- kernels/linux-libre-xtreme/config.armv7h | 1160 +++++++++++++----- kernels/linux-libre-xtreme/config.i686 | 1230 ++++++++++++++----- kernels/linux-libre-xtreme/config.x86_64 | 1282 ++++++++++++++------ 18 files changed, 3572 insertions(+), 1186 deletions(-) create mode 100644 kernels/linux-libre-xtreme/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch delete mode 100644 kernels/linux-libre-xtreme/0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch create mode 100644 kernels/linux-libre-xtreme/0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-o.patch create mode 100644 kernels/linux-libre-xtreme/0009-USB-Armory-MkII-support.patch delete mode 100644 kernels/linux-libre-xtreme/0009-media-s5p-mfc-fix-incorrect-bus-assignment-in-virtua.patch (limited to 'kernels/linux-libre-xtreme') diff --git a/kernels/linux-libre-xtreme/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch b/kernels/linux-libre-xtreme/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch index d53a28a8f..5aa8ac6da 100644 --- a/kernels/linux-libre-xtreme/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch +++ b/kernels/linux-libre-xtreme/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch @@ -1,4 +1,4 @@ -From aec38a2b1453395a62290dda38a5a33706d4d13d Mon Sep 17 00:00:00 2001 +From 7e6e05267a620ba306a999982e685de549316c1d Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 2 Dec 2012 19:59:28 +0100 Subject: [PATCH 1/9] ARM: atags: add support for Marvell's u-boot @@ -12,7 +12,7 @@ Signed-off-by: Willy Tarreau 1 file changed, 17 insertions(+) diff --git a/arch/arm/include/uapi/asm/setup.h b/arch/arm/include/uapi/asm/setup.h -index 6b335a9ff8c8..614150b53643 100644 +index 25ceda63b284..83578c54975b 100644 --- a/arch/arm/include/uapi/asm/setup.h +++ b/arch/arm/include/uapi/asm/setup.h @@ -144,6 +144,18 @@ struct tag_memclk { @@ -47,5 +47,5 @@ index 6b335a9ff8c8..614150b53643 100644 }; -- -2.19.2 +2.22.0 diff --git a/kernels/linux-libre-xtreme/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/kernels/linux-libre-xtreme/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch new file mode 100644 index 000000000..4f5e8626a --- /dev/null +++ b/kernels/linux-libre-xtreme/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch @@ -0,0 +1,132 @@ +From 9927eac296fb506ef31e1c926dfbfc1ceeb44852 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Mon, 16 Sep 2019 04:53:20 +0200 +Subject: [PATCH 1/2] ZEN: Add sysctl and CONFIG to disallow unprivileged + CLONE_NEWUSER + +Our default behavior continues to match the vanilla kernel. +--- + init/Kconfig | 16 ++++++++++++++++ + kernel/fork.c | 15 +++++++++++++++ + kernel/sysctl.c | 12 ++++++++++++ + kernel/user_namespace.c | 7 +++++++ + 4 files changed, 50 insertions(+) + +diff --git a/init/Kconfig b/init/Kconfig +index bd7d650d4a99..658f9c052151 100644 +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -1091,6 +1091,22 @@ config USER_NS + + If unsure, say N. + ++config USER_NS_UNPRIVILEGED ++ bool "Allow unprivileged users to create namespaces" ++ default y ++ depends on USER_NS ++ help ++ When disabled, unprivileged users will not be able to create ++ new namespaces. Allowing users to create their own namespaces ++ has been part of several recent local privilege escalation ++ exploits, so if you need user namespaces but are ++ paranoid^Wsecurity-conscious you want to disable this. ++ ++ This setting can be overridden at runtime via the ++ kernel.unprivileged_userns_clone sysctl. ++ ++ If unsure, say Y. ++ + config PID_NS + bool "PID Namespaces" + default y +diff --git a/kernel/fork.c b/kernel/fork.c +index 3647097e6783..f092d7be6847 100644 +--- a/kernel/fork.c ++++ b/kernel/fork.c +@@ -106,6 +106,11 @@ + + #define CREATE_TRACE_POINTS + #include ++#ifdef CONFIG_USER_NS ++extern int unprivileged_userns_clone; ++#else ++#define unprivileged_userns_clone 0 ++#endif + + /* + * Minimum number of threads to boot the kernel +@@ -1788,6 +1793,10 @@ static __latent_entropy struct task_struct *copy_process( + if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS)) + return ERR_PTR(-EINVAL); + ++ if ((clone_flags & CLONE_NEWUSER) && !unprivileged_userns_clone) ++ if (!capable(CAP_SYS_ADMIN)) ++ return ERR_PTR(-EPERM); ++ + /* + * Thread groups must share signals as well, and detached threads + * can only be started up within the thread group. +@@ -2819,6 +2828,12 @@ int ksys_unshare(unsigned long unshare_flags) + if (unshare_flags & CLONE_NEWNS) + unshare_flags |= CLONE_FS; + ++ if ((unshare_flags & CLONE_NEWUSER) && !unprivileged_userns_clone) { ++ err = -EPERM; ++ if (!capable(CAP_SYS_ADMIN)) ++ goto bad_unshare_out; ++ } ++ + err = check_unshare_flags(unshare_flags); + if (err) + goto bad_unshare_out; +diff --git a/kernel/sysctl.c b/kernel/sysctl.c +index 078950d9605b..baead3605bbe 100644 +--- a/kernel/sysctl.c ++++ b/kernel/sysctl.c +@@ -110,6 +110,9 @@ extern int core_uses_pid; + extern char core_pattern[]; + extern unsigned int core_pipe_limit; + #endif ++#ifdef CONFIG_USER_NS ++extern int unprivileged_userns_clone; ++#endif + extern int pid_max; + extern int pid_max_min, pid_max_max; + extern int percpu_pagelist_fraction; +@@ -545,6 +548,15 @@ static struct ctl_table kern_table[] = { + .proc_handler = proc_dointvec, + }, + #endif ++#ifdef CONFIG_USER_NS ++ { ++ .procname = "unprivileged_userns_clone", ++ .data = &unprivileged_userns_clone, ++ .maxlen = sizeof(int), ++ .mode = 0644, ++ .proc_handler = proc_dointvec, ++ }, ++#endif + #ifdef CONFIG_PROC_SYSCTL + { + .procname = "tainted", +diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c +index 8eadadc478f9..c36ecd19562c 100644 +--- a/kernel/user_namespace.c ++++ b/kernel/user_namespace.c +@@ -21,6 +21,13 @@ + #include + #include + ++/* sysctl */ ++#ifdef CONFIG_USER_NS_UNPRIVILEGED ++int unprivileged_userns_clone = 1; ++#else ++int unprivileged_userns_clone; ++#endif ++ + static struct kmem_cache *user_ns_cachep __read_mostly; + static DEFINE_MUTEX(userns_state_mutex); + +-- +2.23.0 + diff --git a/kernels/linux-libre-xtreme/0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch b/kernels/linux-libre-xtreme/0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch deleted file mode 100644 index fced98119..000000000 --- a/kernels/linux-libre-xtreme/0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 4272e4eff36395bf7e89550111219bede31013e2 Mon Sep 17 00:00:00 2001 -From: Serge Hallyn -Date: Fri, 31 May 2013 19:12:12 +0100 -Subject: [PATCH] add sysctl to disallow unprivileged CLONE_NEWUSER by default - -Signed-off-by: Serge Hallyn -[bwh: Remove unneeded binary sysctl bits] -Signed-off-by: Daniel Micay ---- - kernel/fork.c | 15 +++++++++++++++ - kernel/sysctl.c | 12 ++++++++++++ - kernel/user_namespace.c | 3 +++ - 3 files changed, 30 insertions(+) - -diff --git a/kernel/fork.c b/kernel/fork.c -index b69248e6f0e0..3b1cd11dc6dc 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -104,6 +104,11 @@ - - #define CREATE_TRACE_POINTS - #include -+#ifdef CONFIG_USER_NS -+extern int unprivileged_userns_clone; -+#else -+#define unprivileged_userns_clone 0 -+#endif - - /* - * Minimum number of threads to boot the kernel -@@ -1695,6 +1700,10 @@ static __latent_entropy struct task_struct *copy_process( - if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS)) - return ERR_PTR(-EINVAL); - -+ if ((clone_flags & CLONE_NEWUSER) && !unprivileged_userns_clone) -+ if (!capable(CAP_SYS_ADMIN)) -+ return ERR_PTR(-EPERM); -+ - /* - * Thread groups must share signals as well, and detached threads - * can only be started up within the thread group. -@@ -2528,6 +2537,12 @@ int ksys_unshare(unsigned long unshare_flags) - if (unshare_flags & CLONE_NEWNS) - unshare_flags |= CLONE_FS; - -+ if ((unshare_flags & CLONE_NEWUSER) && !unprivileged_userns_clone) { -+ err = -EPERM; -+ if (!capable(CAP_SYS_ADMIN)) -+ goto bad_unshare_out; -+ } -+ - err = check_unshare_flags(unshare_flags); - if (err) - goto bad_unshare_out; -diff --git a/kernel/sysctl.c b/kernel/sysctl.c -index d80bee8ff12e..ce7a1a5794a5 100644 ---- a/kernel/sysctl.c -+++ b/kernel/sysctl.c -@@ -106,6 +106,9 @@ extern int core_uses_pid; - extern char core_pattern[]; - extern unsigned int core_pipe_limit; - #endif -+#ifdef CONFIG_USER_NS -+extern int unprivileged_userns_clone; -+#endif - extern int pid_max; - extern int pid_max_min, pid_max_max; - extern int percpu_pagelist_fraction; -@@ -515,6 +518,15 @@ static struct ctl_table kern_table[] = { - .proc_handler = proc_dointvec, - }, - #endif -+#ifdef CONFIG_USER_NS -+ { -+ .procname = "unprivileged_userns_clone", -+ .data = &unprivileged_userns_clone, -+ .maxlen = sizeof(int), -+ .mode = 0644, -+ .proc_handler = proc_dointvec, -+ }, -+#endif - #ifdef CONFIG_PROC_SYSCTL - { - .procname = "tainted", -diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c -index 923414a246e9..6b9dbc257e34 100644 ---- a/kernel/user_namespace.c -+++ b/kernel/user_namespace.c -@@ -26,6 +26,9 @@ - #include - #include - -+/* sysctl */ -+int unprivileged_userns_clone; -+ - static struct kmem_cache *user_ns_cachep __read_mostly; - static DEFINE_MUTEX(userns_state_mutex); - --- -2.21.0 - diff --git a/kernels/linux-libre-xtreme/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch b/kernels/linux-libre-xtreme/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch index 2f149dafb..cb71b2f2f 100644 --- a/kernels/linux-libre-xtreme/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch +++ b/kernels/linux-libre-xtreme/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch @@ -1,4 +1,4 @@ -From 500fa72f9dd68904807d9effd7011586e153ba6c Mon Sep 17 00:00:00 2001 +From b59d7aa4ef5ee2411cb65395dac623ed598095b6 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 2 Dec 2012 19:56:58 +0100 Subject: [PATCH 2/9] ARM: atags/fdt: retrieve MAC addresses from Marvell boot @@ -43,5 +43,5 @@ index 330cd3c2eae5..82f3802ff695 100644 } -- -2.19.2 +2.22.0 diff --git a/kernels/linux-libre-xtreme/0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-o.patch b/kernels/linux-libre-xtreme/0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-o.patch new file mode 100644 index 000000000..aaefa37bb --- /dev/null +++ b/kernels/linux-libre-xtreme/0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-o.patch @@ -0,0 +1,63 @@ +From 0bee55974a73eed4a9b9c9e87000df34117e7f69 Mon Sep 17 00:00:00 2001 +From: Dan Elkouby +Date: Fri, 6 Sep 2019 14:06:44 +0300 +Subject: [PATCH 2/2] Bluetooth: hidp: Fix assumptions on the return value of + hidp_send_message + +hidp_send_message was changed to return non-zero values on success, +which some other bits did not expect. This caused spurious errors to be +propagated through the stack, breaking some drivers, such as hid-sony +for the Dualshock 4 in Bluetooth mode. + +As pointed out by Dan Carpenter, hid-microsoft directly relied on that +assumption as well. + +Fixes: 48d9cc9d85dd ("Bluetooth: hidp: Let hidp_send_message return number of queued bytes") + +Signed-off-by: Dan Elkouby +Reviewed-by: Dan Carpenter +Reviewed-by: Jiri Kosina +Signed-off-by: Marcel Holtmann +--- + drivers/hid/hid-microsoft.c | 2 +- + net/bluetooth/hidp/core.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c +index 8b3a922bdad3..2cf83856f2e4 100644 +--- a/drivers/hid/hid-microsoft.c ++++ b/drivers/hid/hid-microsoft.c +@@ -303,7 +303,7 @@ static void ms_ff_worker(struct work_struct *work) + r->magnitude[MAGNITUDE_WEAK] = ms->weak; /* right actuator */ + + ret = hid_hw_output_report(hdev, (__u8 *)r, sizeof(*r)); +- if (ret) ++ if (ret < 0) + hid_warn(hdev, "failed to send FF report\n"); + } + +diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c +index 8d889969ae7e..bef84b95e2c4 100644 +--- a/net/bluetooth/hidp/core.c ++++ b/net/bluetooth/hidp/core.c +@@ -267,7 +267,7 @@ static int hidp_get_raw_report(struct hid_device *hid, + set_bit(HIDP_WAITING_FOR_RETURN, &session->flags); + data[0] = report_number; + ret = hidp_send_ctrl_message(session, report_type, data, 1); +- if (ret) ++ if (ret < 0) + goto err; + + /* Wait for the return of the report. The returned report +@@ -343,7 +343,7 @@ static int hidp_set_raw_report(struct hid_device *hid, unsigned char reportnum, + data[0] = reportnum; + set_bit(HIDP_WAITING_FOR_SEND_ACK, &session->flags); + ret = hidp_send_ctrl_message(session, report_type, data, count); +- if (ret) ++ if (ret < 0) + goto err; + + /* Wait for the ACK from the device. */ +-- +2.23.0 + diff --git a/kernels/linux-libre-xtreme/0003-SMILE-Plug-device-tree-file.patch b/kernels/linux-libre-xtreme/0003-SMILE-Plug-device-tree-file.patch index 4196538bf..8ab6b76b8 100644 --- a/kernels/linux-libre-xtreme/0003-SMILE-Plug-device-tree-file.patch +++ b/kernels/linux-libre-xtreme/0003-SMILE-Plug-device-tree-file.patch @@ -1,4 +1,4 @@ -From 25481e75ce7ac18b05d357c95e29f8f959cbe333 Mon Sep 17 00:00:00 2001 +From 0d1cf24a03256d2a666e720babcd174ae97bfddb Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 5 Sep 2014 15:41:19 -0600 Subject: [PATCH 3/9] SMILE Plug device tree file @@ -14,10 +14,10 @@ Signed-off-by: Kevin Mihelich create mode 100644 arch/arm/boot/dts/armada-370-smileplug.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index bd40148a15b2..97593ea828eb 100644 +index 9159fa2cea90..b73aca44d87a 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -1175,6 +1175,7 @@ dtb-$(CONFIG_MACH_ARMADA_370) += \ +@@ -1206,6 +1206,7 @@ dtb-$(CONFIG_MACH_ARMADA_370) += \ armada-370-db.dtb \ armada-370-dlink-dns327l.dtb \ armada-370-mirabox.dtb \ @@ -205,5 +205,5 @@ index 000000000000..d01308ab848b + }; +}; -- -2.19.2 +2.22.0 diff --git a/kernels/linux-libre-xtreme/0004-fix-mvsdio-eMMC-timing.patch b/kernels/linux-libre-xtreme/0004-fix-mvsdio-eMMC-timing.patch index bdba72e3c..a114fabb3 100644 --- a/kernels/linux-libre-xtreme/0004-fix-mvsdio-eMMC-timing.patch +++ b/kernels/linux-libre-xtreme/0004-fix-mvsdio-eMMC-timing.patch @@ -1,4 +1,4 @@ -From faed79b3f326e7111770a260dc9790f36e36a152 Mon Sep 17 00:00:00 2001 +From a3c359493c03401d2f40c6536d7715260d83d50b Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 5 Sep 2014 15:43:56 -0600 Subject: [PATCH 4/9] fix mvsdio eMMC timing @@ -12,10 +12,10 @@ Signed-off-by: Kevin Mihelich 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c -index e22bbff89c8d..6b30c850ce07 100644 +index 74a0a7fbbf7f..92eadb116762 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c -@@ -93,7 +93,7 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data) +@@ -90,7 +90,7 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data) tmout_index = fls(tmout - 1) - 12; if (tmout_index < 0) tmout_index = 0; @@ -24,7 +24,7 @@ index e22bbff89c8d..6b30c850ce07 100644 tmout_index = MVSD_HOST_CTRL_TMOUT_MAX; dev_dbg(host->dev, "data %s at 0x%08x: blocks=%d blksz=%d tmout=%u (%d)\n", -@@ -616,6 +616,8 @@ static void mvsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) +@@ -613,6 +613,8 @@ static void mvsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) u32 m = DIV_ROUND_UP(host->base_clock, ios->clock) - 1; if (m > MVSD_BASE_DIV_MAX) m = MVSD_BASE_DIV_MAX; @@ -34,5 +34,5 @@ index e22bbff89c8d..6b30c850ce07 100644 host->clock = ios->clock; host->ns_per_clk = 1000000000 / (host->base_clock / (m+1)); -- -2.19.2 +2.22.0 diff --git a/kernels/linux-libre-xtreme/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch b/kernels/linux-libre-xtreme/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch index 189793152..b3b0bedc4 100644 --- a/kernels/linux-libre-xtreme/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch +++ b/kernels/linux-libre-xtreme/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch @@ -1,4 +1,4 @@ -From fe27576a0c9c3e49af29b32695dbf820c5664cb3 Mon Sep 17 00:00:00 2001 +From 244e51135d32faaa70f40a083be88bf8e6f184dd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Feb 2014 01:43:50 -0300 Subject: [PATCH 5/9] net/smsc95xx: Allow mac address to be set as a parameter @@ -8,10 +8,10 @@ Subject: [PATCH 5/9] net/smsc95xx: Allow mac address to be set as a parameter 1 file changed, 56 insertions(+) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index e3d08626828e..2eaae00b4033 100644 +index 355be77f4241..c94a7193e0b9 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c -@@ -60,6 +60,7 @@ +@@ -48,6 +48,7 @@ #define SUSPEND_SUSPEND3 (0x08) #define SUSPEND_ALLMODES (SUSPEND_SUSPEND0 | SUSPEND_SUSPEND1 | \ SUSPEND_SUSPEND2 | SUSPEND_SUSPEND3) @@ -19,7 +19,7 @@ index e3d08626828e..2eaae00b4033 100644 #define CARRIER_CHECK_DELAY (2 * HZ) -@@ -82,6 +83,10 @@ static bool turbo_mode = true; +@@ -70,6 +71,10 @@ static bool turbo_mode = true; module_param(turbo_mode, bool, 0644); MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction"); @@ -30,7 +30,7 @@ index e3d08626828e..2eaae00b4033 100644 static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index, u32 *data, int in_pm) { -@@ -911,8 +916,59 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) +@@ -899,8 +904,59 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); } @@ -91,5 +91,5 @@ index e3d08626828e..2eaae00b4033 100644 /* maybe the boot loader passed the MAC address in devicetree */ -- -2.19.2 +2.22.0 diff --git a/kernels/linux-libre-xtreme/0006-set-default-cubietruck-led-triggers.patch b/kernels/linux-libre-xtreme/0006-set-default-cubietruck-led-triggers.patch index d7941575b..4fb0e57ae 100644 --- a/kernels/linux-libre-xtreme/0006-set-default-cubietruck-led-triggers.patch +++ b/kernels/linux-libre-xtreme/0006-set-default-cubietruck-led-triggers.patch @@ -1,4 +1,4 @@ -From a6e2f2d8098639d0ba04591a392617bcdbd03ab6 Mon Sep 17 00:00:00 2001 +From 146490c16460ae11321acaafc6bff5b99c7e9392 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sat, 14 Feb 2015 12:32:27 +0100 Subject: [PATCH 6/9] set default cubietruck led triggers @@ -29,5 +29,5 @@ index 99f531b8d2a7..534392a72621 100644 }; -- -2.19.2 +2.22.0 diff --git a/kernels/linux-libre-xtreme/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch b/kernels/linux-libre-xtreme/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch index dae931653..664e54e21 100644 --- a/kernels/linux-libre-xtreme/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch +++ b/kernels/linux-libre-xtreme/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch @@ -1,4 +1,4 @@ -From 3cb9a065486a4e9fc5fa0e83cd91fb86c65078c8 Mon Sep 17 00:00:00 2001 +From 4d87a361938887b04909018827f861a51b0f4dc4 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Thu, 11 Aug 2016 00:42:37 -0600 Subject: [PATCH 7/9] exynos4412-odroid: set higher minimum buck2 regulator @@ -13,10 +13,10 @@ Signed-off-by: Kevin Mihelich 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi -index 3a9eb1e91c45..e990fb483905 100644 +index ea55f377d17c..a7bfc58bbc79 100644 --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi -@@ -427,7 +427,7 @@ +@@ -430,7 +430,7 @@ buck2_reg: BUCK2 { regulator-name = "vdd_arm"; @@ -26,5 +26,5 @@ index 3a9eb1e91c45..e990fb483905 100644 regulator-always-on; regulator-boot-on; -- -2.19.2 +2.22.0 diff --git a/kernels/linux-libre-xtreme/0008-ARM-dove-enable-ethernet-on-D3Plug.patch b/kernels/linux-libre-xtreme/0008-ARM-dove-enable-ethernet-on-D3Plug.patch index 42c78d513..6a48dd41b 100644 --- a/kernels/linux-libre-xtreme/0008-ARM-dove-enable-ethernet-on-D3Plug.patch +++ b/kernels/linux-libre-xtreme/0008-ARM-dove-enable-ethernet-on-D3Plug.patch @@ -1,4 +1,4 @@ -From 67be64e425bf44f5fa496833cfb32b60bc74f917 Mon Sep 17 00:00:00 2001 +From 7e2691572ccf30a35c91f1c79b6e85f1c0817c68 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sun, 7 May 2017 13:32:25 -0600 Subject: [PATCH 8/9] ARM: dove: enable ethernet on D3Plug @@ -27,5 +27,5 @@ index 826026c28f90..a4c9963e1261 100644 /* Samsung M8G2F eMMC */ &sdio0 { -- -2.19.2 +2.22.0 diff --git a/kernels/linux-libre-xtreme/0009-USB-Armory-MkII-support.patch b/kernels/linux-libre-xtreme/0009-USB-Armory-MkII-support.patch new file mode 100644 index 000000000..d6bdea885 --- /dev/null +++ b/kernels/linux-libre-xtreme/0009-USB-Armory-MkII-support.patch @@ -0,0 +1,555 @@ +From c4035052543c9d990ea439a1a1b4cc28c335196a Mon Sep 17 00:00:00 2001 +From: Kevin Mihelich +Date: Sun, 11 Aug 2019 12:34:17 -0600 +Subject: [PATCH 9/9] USB Armory MkII support + +--- + arch/arm/boot/dts/Makefile | 2 + + arch/arm/boot/dts/imx6ul-usbarmory.dts | 255 +++++++++++++++++++++++ + arch/arm/boot/dts/imx6ull-usbarmory.dts | 256 ++++++++++++++++++++++++ + 3 files changed, 513 insertions(+) + create mode 100644 arch/arm/boot/dts/imx6ul-usbarmory.dts + create mode 100644 arch/arm/boot/dts/imx6ull-usbarmory.dts + +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +index b73aca44d87a..f45a644a2e9e 100644 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -577,9 +577,11 @@ dtb-$(CONFIG_SOC_IMX6UL) += \ + imx6ul-tx6ul-0010.dtb \ + imx6ul-tx6ul-0011.dtb \ + imx6ul-tx6ul-mainboard.dtb \ ++ imx6ul-usbarmory.dtb \ + imx6ull-14x14-evk.dtb \ + imx6ull-colibri-eval-v3.dtb \ + imx6ull-colibri-wifi-eval-v3.dtb \ ++ imx6ull-usbarmory.dtb \ + imx6ulz-14x14-evk.dtb + dtb-$(CONFIG_SOC_IMX7D) += \ + imx7d-cl-som-imx7.dtb \ +diff --git a/arch/arm/boot/dts/imx6ul-usbarmory.dts b/arch/arm/boot/dts/imx6ul-usbarmory.dts +new file mode 100644 +index 000000000000..3936ef8a64f1 +--- /dev/null ++++ b/arch/arm/boot/dts/imx6ul-usbarmory.dts +@@ -0,0 +1,255 @@ ++/* ++ * USB armory Mk II device tree file ++ * https://inversepath.com/usbarmory ++ * ++ * Copyright (C) 2019, F-Secure Corporation ++ * Andrej Rosano ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * Or, alternatively, ++ * ++ * b) Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use, ++ * copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following ++ * conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++/dts-v1/; ++ ++#include "imx6ul.dtsi" ++ ++/ { ++ model = "F-Secure USB armory Mk II"; ++ compatible = "inversepath,imx6ul-usbarmory-mkII", "fsl,imx6ul"; ++ ++ chosen { ++ stdout-path = &uart2; ++ }; ++ ++ memory { ++ reg = <0x80000000 0x20000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_led>; ++ ++ led-white { ++ label = "LED_WHITE"; ++ gpios = <&gpio4 21 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "heartbeat"; ++ }; ++ ++ led-blue { ++ label = "LED_BLUE"; ++ gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ regulators { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ reg_sd1_vmmc: sd1_regulator { ++ compatible = "regulator-fixed"; ++ regulator-name = "VSD_3V3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++ }; ++}; ++ ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_bluetooth>; ++ uart-has-rtscts; ++ status = "okay"; ++}; ++ ++&uart2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart2>; ++ status = "okay"; ++}; ++ ++&usdhc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usdhc1>; ++ no-1-8-v; ++ keep-power-in-suspend; ++ wakeup-source; ++ status = "okay"; ++}; ++ ++&usdhc2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usdhc2>; ++ non-removable; ++ status = "okay"; ++}; ++ ++&i2c1 { ++ pinctrl-0 = <&pinctrl_i2c1>; ++ status = "okay"; ++}; ++ ++&iomuxc { ++ pinctrl_uart2: uart2grp { ++ fsl,pins = < ++ MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX 0x1b0b1 ++ MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX 0x1b0b1 ++ >; ++ }; ++ ++ pinctrl_bluetooth: uart1grp { ++ fsl,pins = < ++ MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b0 /* BT_UART_TX */ ++ MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b0 /* BT_UART_RX */ ++ MX6UL_PAD_UART1_CTS_B__UART1_DCE_CTS 0x1b0b0 /* BT_UART_CTS */ ++ MX6UL_PAD_GPIO1_IO07__UART1_DCE_RTS 0x130b0 /* BT_UART_RTS */ ++ MX6UL_PAD_UART3_TX_DATA__GPIO1_IO24 0x1f020 /* BT_UART_DSR */ ++ MX6UL_PAD_UART3_RX_DATA__GPIO1_IO25 0x10020 /* BT_UART_DTR */ ++ MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0x1f020 /* BT_SWDCLK */ ++ MX6UL_PAD_GPIO1_IO05__GPIO1_IO05 0x1f020 /* BT_SWDIO */ ++ MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x1f020 /* BT_RESET */ ++ MX6UL_PAD_UART3_RTS_B__GPIO1_IO27 0x1f020 /* BT_SWITCH_1 */ ++ MX6UL_PAD_UART3_CTS_B__GPIO1_IO26 0x1f020 /* BT_SWITCH_2 */ ++ >; ++ }; ++ ++ pinctrl_i2c1: i2c1grp { ++ fsl,pins = < ++ MX6UL_PAD_GPIO1_IO02__I2C1_SCL 0x4001b8b0 ++ MX6UL_PAD_GPIO1_IO03__I2C1_SDA 0x4001b8b0 ++ >; ++ }; ++ ++ pinctrl_led: ledgrp { ++ fsl,pins = < ++ MX6UL_PAD_CSI_DATA06__GPIO4_IO27 0x1f020 ++ MX6UL_PAD_CSI_DATA07__GPIO4_IO28 0x1f020 ++ >; ++ }; ++ ++ pinctrl_usdhc1: usdhc1grp { ++ fsl,pins = < ++ MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x1f019 ++ MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x1f019 ++ MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x1f019 ++ MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x1f019 ++ MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x1f019 ++ MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x1f019 ++ >; ++ }; ++ ++ pinctrl_usdhc2: usdhc2grp { ++ fsl,pins = < ++ MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x10071 ++ MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x17059 ++ MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059 ++ MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059 ++ MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059 ++ MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059 ++ MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x17059 ++ MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x17059 ++ MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x17059 ++ MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x17059 ++ >; ++ }; ++}; ++ ++&aips2 { ++ crypto: caam@2140000 { ++ compatible = "fsl,imx6ul-caam", "fsl,sec-v4.0"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ reg = <0x2140000 0x3c000>; ++ ranges = <0 0x2140000 0x3c000>; ++ interrupts = ; ++ clocks = <&clks IMX6UL_CLK_CAAM_IPG>, <&clks IMX6UL_CLK_CAAM_ACLK>, ++ <&clks IMX6UL_CLK_CAAM_MEM>; ++ clock-names = "ipg", "aclk", "mem"; ++ ++ sec_jr0: jr0@1000 { ++ compatible = "fsl,sec-v4.0-job-ring"; ++ reg = <0x1000 0x1000>; ++ interrupts = ; ++ }; ++ ++ sec_jr1: jr1@2000 { ++ compatible = "fsl,sec-v4.0-job-ring"; ++ reg = <0x2000 0x1000>; ++ interrupts = ; ++ }; ++ sec_jr2: jr2@3000 { ++ compatible = "fsl,sec-v4.0-job-ring"; ++ reg = <0x3000 0x1000>; ++ interrupts = ; ++ }; ++ }; ++}; ++ ++/ { ++ soc { ++ caam_sm: caam-sm@00100000 { ++ compatible = "fsl,imx7d-caam-sm", "fsl,imx6q-caam-sm"; ++ reg = <0x00100000 0x3fff>; ++ }; ++ ++ irq_sec_vio: caam_secvio { ++ compatible = "fsl,imx7d-caam-secvio", "fsl,imx6q-caam-secvio"; ++ interrupts = ; ++ }; ++ }; ++ ++ caam_keyblob: caam-keyblob { ++ compatible = "fsl,sec-v4.0-keyblob"; ++ status = "okay"; ++ }; ++}; ++ ++&usbotg1 { ++ dr_mode = "otg"; ++ disable-over-current; ++ tpl-support; ++ status = "okay"; ++}; ++ ++&usbotg2 { ++ dr_mode = "host"; ++ disable-over-current; ++ tpl-support; ++ status = "okay"; ++}; +diff --git a/arch/arm/boot/dts/imx6ull-usbarmory.dts b/arch/arm/boot/dts/imx6ull-usbarmory.dts +new file mode 100644 +index 000000000000..85cf30bff527 +--- /dev/null ++++ b/arch/arm/boot/dts/imx6ull-usbarmory.dts +@@ -0,0 +1,256 @@ ++/* ++ * USB armory Mk II device tree file ++ * https://inversepath.com/usbarmory ++ * ++ * Copyright (C) 2019, F-Secure Corporation ++ * Andrej Rosano ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * Or, alternatively, ++ * ++ * b) Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use, ++ * copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following ++ * conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++/dts-v1/; ++ ++#include "imx6ul.dtsi" ++ ++/ { ++ model = "F-Secure USB armory Mk II"; ++ compatible = "inversepath,imx6ull-usbarmory-mkII", "fsl,imx6ull"; ++ ++ chosen { ++ stdout-path = &uart2; ++ }; ++ ++ memory { ++ reg = <0x80000000 0x20000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_led>; ++ ++ led-white { ++ label = "LED_WHITE"; ++ gpios = <&gpio4 21 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "heartbeat"; ++ }; ++ ++ led-blue { ++ label = "LED_BLUE"; ++ gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ regulators { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ reg_sd1_vmmc: sd1_regulator { ++ compatible = "regulator-fixed"; ++ regulator-name = "VSD_3V3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++ }; ++}; ++ ++/* Delete CAAM node in AIPS-2 (i.MX6UL specific) */ ++/delete-node/ &crypto; ++ ++&cpu0 { ++ operating-points = < ++ /* kHz uV */ ++ 900000 1275000 ++ 792000 1225000 ++ 528000 1175000 ++ 396000 1025000 ++ 198000 950000 ++ >; ++ fsl,soc-operating-points = < ++ /* KHz uV */ ++ 900000 1250000 ++ 792000 1175000 ++ 528000 1175000 ++ 396000 1175000 ++ 198000 1175000 ++ >; ++}; ++ ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_bluetooth>; ++ uart-has-rtscts; ++ status = "okay"; ++}; ++ ++&uart2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart2>; ++ status = "okay"; ++}; ++ ++&usdhc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usdhc1>; ++ no-1-8-v; ++ keep-power-in-suspend; ++ wakeup-source; ++ status = "okay"; ++}; ++ ++&usdhc2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usdhc2>; ++ non-removable; ++ status = "okay"; ++}; ++ ++&i2c1 { ++ pinctrl-0 = <&pinctrl_i2c1>; ++ status = "okay"; ++}; ++ ++&iomuxc { ++ pinctrl_uart2: uart2grp { ++ fsl,pins = < ++ MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX 0x1b0b1 ++ MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX 0x1b0b1 ++ >; ++ }; ++ ++ pinctrl_bluetooth: uart1grp { ++ fsl,pins = < ++ MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b0 /* BT_UART_TX */ ++ MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b0 /* BT_UART_RX */ ++ MX6UL_PAD_UART1_CTS_B__UART1_DCE_CTS 0x1b0b0 /* BT_UART_CTS */ ++ MX6UL_PAD_GPIO1_IO07__UART1_DCE_RTS 0x130b0 /* BT_UART_RTS */ ++ MX6UL_PAD_UART3_TX_DATA__GPIO1_IO24 0x1f020 /* BT_UART_DSR */ ++ MX6UL_PAD_UART3_RX_DATA__GPIO1_IO25 0x10020 /* BT_UART_DTR */ ++ MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0x1f020 /* BT_SWDCLK */ ++ MX6UL_PAD_GPIO1_IO05__GPIO1_IO05 0x1f020 /* BT_SWDIO */ ++ MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x1f020 /* BT_RESET */ ++ MX6UL_PAD_UART3_RTS_B__GPIO1_IO27 0x1f020 /* BT_SWITCH_1 */ ++ MX6UL_PAD_UART3_CTS_B__GPIO1_IO26 0x1f020 /* BT_SWITCH_2 */ ++ >; ++ }; ++ ++ pinctrl_i2c1: i2c1grp { ++ fsl,pins = < ++ MX6UL_PAD_GPIO1_IO02__I2C1_SCL 0x4001b8b0 ++ MX6UL_PAD_GPIO1_IO03__I2C1_SDA 0x4001b8b0 ++ >; ++ }; ++ ++ pinctrl_led: ledgrp { ++ fsl,pins = < ++ MX6UL_PAD_CSI_DATA06__GPIO4_IO27 0x1f020 ++ MX6UL_PAD_CSI_DATA07__GPIO4_IO28 0x1f020 ++ >; ++ }; ++ ++ pinctrl_usdhc1: usdhc1grp { ++ fsl,pins = < ++ MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x1f019 ++ MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x1f019 ++ MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x1f019 ++ MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x1f019 ++ MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x1f019 ++ MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x1f019 ++ >; ++ }; ++ ++ pinctrl_usdhc2: usdhc2grp { ++ fsl,pins = < ++ MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x10071 ++ MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x17059 ++ MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059 ++ MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059 ++ MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059 ++ MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059 ++ MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x17059 ++ MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x17059 ++ MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x17059 ++ MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x17059 ++ >; ++ }; ++}; ++ ++/ { ++ soc { ++ aips3: aips-bus@02200000 { ++ compatible = "fsl,aips-bus", "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ reg = <0x02200000 0x100000>; ++ ranges; ++ ++ dcp: dcp@02280000 { ++ compatible = "fsl,imx6ull-dcp", "fsl,imx6sl-dcp", "fsl,imx28-dcp"; ++ reg = <0x02280000 0x4000>; ++ interrupts = , ++ , ++ ; ++ clocks = <&clks IMX6ULL_CLK_DCP_CLK>; ++ clock-names = "dcp"; ++ }; ++ ++ rngb: rngb@02284000 { ++ compatible = "fsl,imx6sl-rng", "fsl,imx25-rngb", "fsl,imx-rng", "imx-rng"; ++ reg = <0x02284000 0x4000>; ++ interrupts = ; ++ clocks = <&clks IMX6UL_CLK_DUMMY>; ++ }; ++ }; ++ }; ++}; ++ ++&usbotg1 { ++ dr_mode = "peripheral"; ++ disable-over-current; ++ tpl-support; ++ status = "okay"; ++}; ++ ++&usbotg2 { ++ dr_mode = "host"; ++ disable-over-current; ++ tpl-support; ++ status = "okay"; ++}; +-- +2.22.0 + diff --git a/kernels/linux-libre-xtreme/0009-media-s5p-mfc-fix-incorrect-bus-assignment-in-virtua.patch b/kernels/linux-libre-xtreme/0009-media-s5p-mfc-fix-incorrect-bus-assignment-in-virtua.patch deleted file mode 100644 index 0deda34bf..000000000 --- a/kernels/linux-libre-xtreme/0009-media-s5p-mfc-fix-incorrect-bus-assignment-in-virtua.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 5d3a19c0fd89f6721a01c882d37a6f114337edb7 Mon Sep 17 00:00:00 2001 -From: Marek Szyprowski -Date: Mon, 7 Jan 2019 13:04:14 +0100 -Subject: [PATCH 9/9] media: s5p-mfc: fix incorrect bus assignment in virtual - child device -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Virtual MFC codec's child devices must not be assigned to platform bus, -because they are allocated as raw 'struct device' and don't have the -corresponding 'platform' part. This fixes NULL pointer access revealed -recently by commit a66d972465d1 ("devres: Align data[] to -ARCH_KMALLOC_MINALIGN"). - -Reported-by: Paweł Chmiel -Fixes: c79667dd93b0 ("media: s5p-mfc: replace custom reserved memory handling code with generic one") -Signed-off-by: Marek Szyprowski -Tested-by: Paweł Chmiel ---- - drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c -index 8a5ba3bec3af..0a9f59d89185 100644 ---- a/drivers/media/platform/s5p-mfc/s5p_mfc.c -+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c -@@ -1089,7 +1089,6 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev, - device_initialize(child); - dev_set_name(child, "%s:%s", dev_name(dev), name); - child->parent = dev; -- child->bus = dev->bus; - child->coherent_dma_mask = dev->coherent_dma_mask; - child->dma_mask = dev->dma_mask; - child->release = s5p_mfc_memdev_release; --- -2.19.2 - diff --git a/kernels/linux-libre-xtreme/60-linux.hook b/kernels/linux-libre-xtreme/60-linux.hook index b33873c85..584ce3537 100644 --- a/kernels/linux-libre-xtreme/60-linux.hook +++ b/kernels/linux-libre-xtreme/60-linux.hook @@ -4,7 +4,6 @@ Operation = Install Operation = Upgrade Operation = Remove Target = usr/lib/modules/%KERNVER%/* -Target = usr/lib/modules/%EXTRAMODULES%/* [Action] Description = Updating %PKGBASE% module dependencies... diff --git a/kernels/linux-libre-xtreme/PKGBUILD b/kernels/linux-libre-xtreme/PKGBUILD index 8c13b9c26..e180d4a4c 100644 --- a/kernels/linux-libre-xtreme/PKGBUILD +++ b/kernels/linux-libre-xtreme/PKGBUILD @@ -5,8 +5,8 @@ # Based on linux package pkgbase=linux-libre-xtreme -_srcbasever=5.0-gnu -_srcver=5.0.6-gnu +_srcbasever=5.3-gnu +_srcver=5.3.7-gnu _hardenedver=a _replacesarchkernel=('linux%') # '%' gets replaced with _kernelname @@ -17,12 +17,21 @@ _srcname=linux-${_srcbasever%-*} _archpkgver=${_srcver%-*} pkgver=${_srcver//-/_} pkgrel=1 -rcnrel=armv7-x8 +rcnver=5.3.6 +rcnrel=armv7-x12 arch=(i686 x86_64 armv7h) url='https://wiki.parabola.nu/Xtreme' license=(GPL2) -makedepends=(xmlto kmod inetutils bc libelf python-sphinx graphviz) +makedepends=( + xmlto kmod inetutils bc libelf python-sphinx python-sphinx_rtd_theme + graphviz imagemagick +) options=('!strip') +_archpatches=( + # Arch's custom linux patches, here for loop patching + 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch + 0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-o.patch +) source=( "https://linux-libre.fsfla.org/pub/linux-libre/releases/$_srcbasever/linux-libre-$_srcbasever.tar.xz"{,.sign} "https://linux-libre.fsfla.org/pub/linux-libre/releases/$_srcver/patch-$_srcbasever-$_srcver.xz"{,.sign} @@ -32,13 +41,26 @@ source=( 60-linux.hook # pacman hook for depmod 90-linux.hook # pacman hook for initramfs regeneration linux.preset # standard config files for mkinitcpio ramdisk + + # maintain the TTY over USB disconnects + # http://www.coreboot.org/EHCI_Gadget_Debug 0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch + # fix Atmel maXTouch touchscreen support + # https://labs.parabola.nu/issues/877 + # http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html 0002-fix-Atmel-maXTouch-touchscreen-support.patch - 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch + ${_archpatches[@]} ) source_armv7h=( - # for rcn-libre patch, see https://gitlab.com/libreforks/rcn-libre/wikis/debblobing-a-patch - "https://repo.parabola.nu/other/rcn-libre/patches/${_srcver%-*}/rcn-libre-${_srcver%-*}-$rcnrel.patch"{,.sig} + # armv7h patches, put in the source_armv7h variable just for a more comfortable loop patching + + # RCN patch (CM3 firmware deblobbed and AUFS/WireGuard removed) + # Note: For stability reasons, AUFS has been removed in the RCN patch. + # We are supporting AUFS in linux-libre-pck through PCK patch. + # See https://wiki.parabola.nu/PCK for further details. + "https://repo.parabola.nu/other/rcn-libre/patches/${rcnver}/rcn-libre-${rcnver}-$rcnrel.patch"{,.sig} + + # Arch Linux ARM patches 0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch 0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch 0003-SMILE-Plug-device-tree-file.patch @@ -47,7 +69,7 @@ source_armv7h=( 0006-set-default-cubietruck-led-triggers.patch 0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch 0008-ARM-dove-enable-ethernet-on-D3Plug.patch - 0009-media-s5p-mfc-fix-incorrect-bus-assignment-in-virtua.patch + 0009-USB-Armory-MkII-support.patch ) validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva @@ -55,11 +77,11 @@ validpgpkeys=( '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. 'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak ) -sha512sums=('56b8e77eb445c92c3e0ec0dc45fa5fb09641cad18003b79991652b83cf1d96cc1651750dfa9eec15652108a1b8aff1781c4f8ec5f92784b8542e59e0605922d9' +sha512sums=('85d83c973ef96ab414354414da70ab3e1c3df19c3088458498cec1594952878b7967a8988bd9e36d4e728cc573a36e6eac056dbcab2f9aa742f18cbb4fb3164f' 'SKIP' - 'c015da00812cfc9cb16e408807338d2e09270e3b33deb85c5cab36e9c2e6155dbc2a3653d744de272032d524bbb59b428984debf1369e42b788b51caf4591526' + '22064d7cf6da426eff98b3fd72a52e6dc1349f1c5f53755041b487335fa8ff61fc1083440af38ef631056301d30d827c5c203566d1f720b9a65505e9c2cd3ee8' 'SKIP' - 'e6f82b082418f5f408713ba85de74a9ec44f5daaab6060a6690b00ab9ee2730e4b4049becc8287efea2c468b213369bdc75ae6e3c167cc3c892529ba13233f62' + '821d851394863022ee5ed84c4737d319284bf95eb04dc7e05020a3f528daebac65712bb263f55e7933c89b3ffe43a467397c62bbdab566b874778f239a81b72d' 'SKIP' '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' 'SKIP' @@ -67,26 +89,27 @@ sha512sums=('56b8e77eb445c92c3e0ec0dc45fa5fb09641cad18003b79991652b83cf1d96cc165 'SKIP' '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' 'SKIP' - '8812e418ad9a9a4c8794d8c0f3a61a2628fd7577061c8daa70d3cd89e5eec9a0ec648e61a6949880de3e238a579e05b95fdd113b1fa2b87a18d448a57990fbd6' - '9f22876c3727581cdb3c4976244f5654c50864ca0236405c63e367d47f420bb42efc653bc61af1b1df0be0b8a81ab762c3e3b538497a47148e548217b73985b0' - 'b2f09a48df3f6911cbffdd0e376e4583240b085e585a23ffe942e7a3af804d38fbf6b2325613ce99839d9340ae6342c6d9719707f3df22c32bb989ca6002d1f4' - '7ad5be75ee422dda3b80edd2eb614d8a9181e2c8228cd68b3881e2fb95953bf2dea6cbe7900ce1013c9de89b2802574b7b24869fc5d7a95d3cc3112c4d27063a' + 'e8faa7fd50830a6ea7f3a6e193b7c51beb92fc5ffd4fc4813b48cb09e12c11a2d9f13aeb8533eb44de04fb65ae25e89b18aa2883191bd0a8f518797416765cac' + '924523b003144ada1cd783242d637b765acc0c591bebd42762522a36c2900e923659e8f360801c9d559bd96495e9987e190fa0a1d020198a621dce15d4a03797' + 'e95afb5fad75b8d2fe31dc042c07b3b784f36e678cdb91ad7a5df79660c94cd74ad42ffd7ba5747db829eb5647fb56afa89bfda6022025e6c26b0dc0ebd5c4a0' + '6b57a66b870b2f525e2dedd8f224b89474fd4ec6ea18484b0a67a1a2b9a4fc95d025cac181504406ea42a35d6c1b184c0d4e38c92815022935fc55746c69c7c1' '2718b58dbbb15063bacb2bde6489e5b3c59afac4c0e0435b97fe720d42c711b6bcba926f67a8687878bd51373c9cf3adb1915a11666d79ccb220bf36e0788ab7' '2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf' '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' - '7748427819372a27b5aa9b3ce8cc8c75397bc3a76ac4fddd06f497ce5a1b34c2e15b6301e764e6e007ad66a49bb3f9c49e906c179875e115d213d2682ddb2576') -sha512sums_armv7h=('4f185601aa569db7ee2033d6360f284aede970ea02093fdbfe25e2a3bc7463b55180678192974ce38e425ea3ecb8193a58cb7442c9390429c1dabd13afc9be8e' + '5c48b0092ab6a31453e27e6345347fd2d066e1c306c4c8a9144260bf37d0d13879b5cfe688906a06627d39a40a37e229e5300a479b2c9159e93e05ea7adc6b0a' + 'b07d84cac1c784f5652a4681efd54ef89ce9cb0778bd2a633709b7150f9fb59db978dc290b92bcb69b8d211471c22a0be2a81a129318cd7efff601a3c591483c') +sha512sums_armv7h=('078f8dfaabccb2a51c3440ed67a438bad1a83d35ccbcf06cb2d6f7d3c7e140b96c116926a0c503ffc31f849834bc22350467c1f0a48f60815c0d2882e9e01b93' 'SKIP' - '6e2eed5e047d95a825241bf30bd09e3edad7787f1f742ca5cf3cf53f4f1383ca7ede306f12cf522fa1175930b3dde550994ef085bf6d93761babfe976dc94ca2' - '32a185f7d8b93e8cb70bee0d32eb6876ac0a976abe550ec83de1fc57963b0879872831c671f4aa5281b4def9bf81660c92809047eda9a9ada939bdf5b7d32dbc' - 'b523cc0978f6426162d8ef82dc44763fca7ca57c8bf3b2b27549d7ed7d873389ba3acf00dfe5576ceef991d31ba39613c3203195cb5a91900330c997c9b0efff' - 'd85f97025f21c26b438afb599af13939bae3ff769c1d1055bdcf9130a1449703a26ecf04ce715390570c14d6b91b693e7b220e7cff0576f9775990ee2fe75113' - 'a3b846c5a79afdfc5233ba5020cb8fc91bad0864bd811204f29191f8b2e7dd76cb19d8fa38cac55ad3adbbd4126f3b2102b03016fe9423bd7d0d252ed1b4c460' - 'd547f6ef7f876690092622c7b7de6995b972e46f25b34fac92b301d90ad7b04f993341346bbc54284e5338e5bbf76ccdfa42485842ed0a0b4a8414cf8a16412a' - 'b3cc320e6414c6a9a287df405cc6768cbc204bd859189c4c3f6902e55fd425ad7f05743ea6db3996c99a49f6b3a175d83c8fb05fd4314c2b1a3df52e8b1b16f3' - 'bed58fede674b139e470a2593c3d07f61f7f771d86ce137a5cf7e1b5cc53a8c2127439f7ef2bee9daaf554555f6cb9bb80cf35bbe6a6adf10a04cb5a93d0cc8f' - '17b09c80b0c235a5395c350c2b1acfda1c549c5bb6017f6a7056a84686fe23d7983a40f416cfc1da075523ad87d39ff4ff7b4057a275705679830db15b621991') + '9724026836feefa67acb9644acf3ee89d465734af50b6637b8232b705c6259035d485cd1a1f0f08d189921eb75ad095b3e1f7f7e5e0e52302352c453f03ac820' + '41f9f7d58bb29311e09dd58105d173fb2e2a955c0e7d632bc8788c2f0a803a45281dfd2be1712d6ec93b58b9f440f3f8398f234bd7ded1c49b1c33b328478203' + '9d29a3d22aae6533d048280f3a1bf1cc325e1c1304268b6d129a29e1d74c105c55077306e6350105a9445e2a1de621cb6759b71177badbaa0e384e9800427acf' + 'c7b99f64d148b7ef140d3621b3d3fa922739f2a393ce99038d0dd539d0bb8e2e3ffe92ccbc3fe9d8dea5f3f4ddc433eb6ddd9d46939f04f38cd82ee32f5d53ec' + '618d84d26338dfeb15c88fc6d9d7c68d0151f50e000032b2d21d30d05ec62f2d36ef5a50d3671e4e9777a2db6c40d71878a9fcc89420fbe9f59e7e30406c9064' + '464d1622fd79d7f6811799bd27e16204979db3c372e03aae8285fbff584d39928d7ddb5da8139f4ce535c70406fcf73cc20dd44ffe83fd7cda36ca915fb0b931' + '114067bfafa63bbb3aef73d05909b520355a757d15aa2ce07c6bfeae200192282782980b3d8963c0d984cf0c410d2613639444dffe21007ae6a7359be6a5ff76' + 'c1191d35ef8ce8ffaa817e952916dfe5fff45758c13394bb3fc7eba7376fd2cdc94ef32a2a54d431d8258da10fa7ce2284b092b6871e9b357b71ac0144a655b8' + 'e8e73026ac02645b5914ac97bfada4c94f48e490331a28960ee5939feb18dc5630831748cdd210b27d91590322cf564d3265feee9a8246a373cc117cd520c10d') _kernelname=${pkgbase#linux-libre} _replacesarchkernel=("${_replacesarchkernel[@]/\%/${_kernelname}}") @@ -116,10 +139,6 @@ prepare() { echo "$_kernelname" > localversion.20-pkgname if [ "$CARCH" = "armv7h" ]; then - # RCN patch (CM3 firmware deblobbed and AUFS/WireGuard removed) - # Note: For stability reasons, AUFS has been removed in the RCN patch. - # We are supporting AUFS in linux-libre-pck through PCK patch. - # See https://wiki.parabola.nu/PCK for further details. local src_armv7h for src_armv7h in "${source_armv7h[@]}"; do src_armv7h="${src_armv7h%%::*}" @@ -131,32 +150,30 @@ prepare() { fi if [ "$CARCH" = "x86_64" ]; then - patch -p1 -i ../linux-hardened-${_srcver%-*}.${_hardenedver}.patch + patch -Np1 < ../linux-hardened-${_srcver%-*}.${_hardenedver}.patch else - patch -p1 -i ../0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch + local src + for src in "${_archpatches[@]}"; do + src="${src%%::*}" + src="${src##*/}" + [[ $src = *.patch ]] || continue + msg2 "Applying patch $src..." + patch -Np1 < "../$src" + done fi - # maintain the TTY over USB disconnects - # http://www.coreboot.org/EHCI_Gadget_Debug - patch -p1 -i ../0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch - - # fix Atmel maXTouch touchscreen support - # https://labs.parabola.nu/issues/877 - # http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html - patch -p1 -i ../0002-fix-Atmel-maXTouch-touchscreen-support.patch - msg2 "Setting config..." cp ../config.$CARCH .config make olddefconfig - make -s kernelrelease > ../version - msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)" + make -s kernelrelease > version + msg2 "Prepared %s version %s" "$pkgbase" "$(