linksys-jamaica: new device (MR 4589)

[ci:skip-build]: Already built successfully in CI.
This commit is contained in:
Karl Chan 2023-12-03 18:43:01 +08:00 committed by Clayton Craft
parent f0023dcf5e
commit fe4141c113
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A
13 changed files with 7068 additions and 0 deletions

View file

@ -0,0 +1,101 @@
From 3020e3a81b63e05891ef5d40f3acfbd00040ba17 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers@google.com>
Date: Mon, 4 Nov 2019 19:31:45 +0100
Subject: [PATCH] ARM: 8933/1: replace Sun/Solaris style flag on section
directive
It looks like a section directive was using "Solaris style" to declare
the section flags. Replace this with the GNU style so that Clang's
integrated assembler can assemble this directive.
The modified instances were identified via:
$ ag \.section | grep #
Link: https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html#SEC119
Link: https://github.com/ClangBuiltLinux/linux/issues/744
Link: https://bugs.llvm.org/show_bug.cgi?id=43759
Link: https://reviews.llvm.org/D69296
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Fangrui Song <maskray@google.com>
Suggested-by: Jian Cai <jiancai@google.com>
Suggested-by: Peter Smith <peter.smith@linaro.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
[ partial backport to 5.4 ]
---
arch/arm/boot/bootp/init.S | 2 +-
arch/arm/boot/compressed/big-endian.S | 2 +-
arch/arm/boot/compressed/head.S | 2 +-
arch/arm/boot/compressed/piggy.lzma.S | 2 +-
arch/arm/mm/proc-v7.S | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boot/bootp/init.S b/arch/arm/boot/bootp/init.S
index 78b508075161..868eeeaaa46e 100644
--- a/arch/arm/boot/bootp/init.S
+++ b/arch/arm/boot/bootp/init.S
@@ -16,7 +16,7 @@
* size immediately following the kernel, we could build this into
* a binary blob, and concatenate the zImage using the cat command.
*/
- .section .start,#alloc,#execinstr
+ .section .start, "ax"
.type _start, #function
.globl _start
diff --git a/arch/arm/boot/compressed/big-endian.S b/arch/arm/boot/compressed/big-endian.S
index 25ab26f1c6f0..f22428e275f8 100644
--- a/arch/arm/boot/compressed/big-endian.S
+++ b/arch/arm/boot/compressed/big-endian.S
@@ -5,7 +5,7 @@
* Author: Nicolas Pitre
*/
- .section ".start", #alloc, #execinstr
+ .section ".start", "ax"
mrc p15, 0, r0, c1, c0, 0 @ read control reg
orr r0, r0, #(1 << 7) @ enable big endian mode
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 77a716bdf4d3..b70606652d21 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -113,7 +113,7 @@
#endif
.endm
- .section ".start", #alloc, #execinstr
+ .section ".start", "ax"
/*
* sort out different calling conventions
*/
diff --git a/arch/arm/boot/compressed/piggy.S b/arch/arm/boot/compressed/piggy.S
index 0284f84dcf3804..27577644ee721a 100644
--- a/arch/arm/boot/compressed/piggy.S
+++ b/arch/arm/boot/compressed/piggy.S
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
- .section .piggydata,#alloc
+ .section .piggydata, "a"
.globl input_data
input_data:
.incbin "arch/arm/boot/compressed/piggy_data"
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index c4e8006a1a8cdd..48e0ef6f0dccfe 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -644,7 +644,7 @@ __v7_setup_stack:
string cpu_elf_name, "v7"
.align
- .section ".proc.info.init", #alloc
+ .section ".proc.info.init", "a"
/*
* Standard v7 proc info content
--
2.30.2

View file

@ -0,0 +1,45 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-linksys-jamaica
pkgdesc="Linksys EA9350 V3"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
dtc
linux-linksys-jamaica
postmarketos-base
u-boot-tools
"
makedepends="devicepkg-dev"
source="
boot-image.its
initfs-hook.sh
deviceinfo
"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
mkdir -p "$pkgdir/usr/share/u-boot/jamaica"
install -D -m644 "$srcdir/boot-image.its" \
"$pkgdir/usr/share/u-boot/jamaica"
}
nonfree_firmware() {
pkgdesc="Linksys EA9350 firmware"
depends="firmware-linksys-jamaica"
mkdir "$subpkgdir"
}
sha512sums="
c5c0f00a3da2e75b3670444e47ff6893597e7afb3ebc24abf90debc608e72d6cd1071c9435ffc7d64e44ec574c35862286662d882150ddaa33c6ea65181385ad boot-image.its
a172a3d613fd55b95f54b891f58a3f4f6289873a861f3c21186bcc5d85166a124960e578f475f419188c5ae7b084a16a7b8a1176e1f150c5ba65f1f554d29227 deviceinfo
401f734389592e11fc9e6bb215f8fd708d27028a68bb770ddd5697a65df38552dd57c94a1edd95e0954e5458a80291895f1aa47dd21fe3e558dfb16aa49d21f8 initfs-hook.sh
"

View file

@ -0,0 +1,45 @@
/dts-v1/;
/ {
description = "a";
#address-cells = <1>;
images {
kernel {
description = "Kernel";
data = /incbin/("vmlinuz");
type = "kernel";
arch = "arm";
os = "linux";
compression = "none";
load = <0x41208000>;
entry = <0x41208000>;
};
fdt {
description = "DTB";
data = /incbin/("/boot/dtbs/ipq5018-linksys-jamaica.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
};
initrd {
description = "Initramfs image";
data = /incbin/("initramfs");
type = "ramdisk";
arch = "arm";
os = "linux";
};
};
configurations {
default = "standard";
standard {
description = "Standard Boot";
kernel = "kernel";
fdt = "fdt";
ramdisk = "initrd";
};
};
};

View file

@ -0,0 +1,22 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Linksys EA9350 V3"
deviceinfo_manufacturer="Linksys"
deviceinfo_codename="linksys-jamaica"
deviceinfo_year="2019"
deviceinfo_arch="armv7"
deviceinfo_dtb="ipq5018-linksys-jamaica"
deviceinfo_uboot_boardname="jamaica"
# Device related
deviceinfo_chassis="embedded"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_gpu_accelerated="false"
# Bootloader related
deviceinfo_kernel_cmdline="bootopt=64S3,32N2,32N2"
deviceinfo_generate_uboot_fit_images="true"
deviceinfo_boot_filesystem="fat32"

View file

@ -0,0 +1,8 @@
#!/bin/sh
# Enable USB Power
echo 482 > /sys/class/gpio/export
echo "out" >/sys/class/gpio/gpio482/direction
echo 0 > /sys/class/gpio/gpio482/value
# Wait 5 seconds to let the kernel detect the usb stick
sleep 5

View file

@ -0,0 +1,24 @@
pkgname=firmware-linksys-jamaica
pkgver=1
pkgrel=0
pkgdesc="Firmware for Linksys EA9350 V3"
url="https://gitlab.com/exkc/ea9350v3-firmware/"
arch="armv7"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
_repository="ea9350v3-firmware"
_commit="1cfb1036e46c31fb0d5d98e5514f2fecc46827ed"
source="$url/-/archive/$_commit/$_repository-$_commit.tar.gz"
package() {
install -Dm644 "$srcdir"/$_repository-$_commit/firmware/*.bin \
-t "$pkgdir"/lib/firmware/postmarketos
install -Dm644 "$srcdir"/$_repository-$_commit/firmware/IPQ5018/* \
-t "$pkgdir"/lib/firmware/postmarketos/IPQ5018
install -Dm644 "$srcdir"/$_repository-$_commit/firmware/qcn9000/* \
-t "$pkgdir"/lib/firmware/postmarketos/qcn9000
}
sha512sums="
b64251c64c7b85dcec30154b203a5c8591782d4ebfa5b3b025d49a34ed61a9a0301db889a625fc39564ae4bb32caae00891b2ca9d3f097646002bb18b58eb943 ea9350v3-firmware-1cfb1036e46c31fb0d5d98e5514f2fecc46827ed.tar.gz
"

View file

@ -0,0 +1,73 @@
Fix build
---
arch/arm/kernel/vmlinux.lds.S | 2 +-
drivers/soc/qcom/ctx-save.c | 4 ++--
net/ipv6/ip6mr.c | 2 +-
init/do_mounts.c | 2 ++
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 406f2f1ed..5198ce351 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -73,7 +73,7 @@ SECTIONS
. = ALIGN(4);
__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
__start___ex_table = .;
- ARM_MMU_KEEP(*(__ex_table))
+ KEEP(*(__ex_table))
__stop___ex_table = .;
}
diff --git a/drivers/soc/qcom/ctx-save.c b/drivers/soc/qcom/ctx-save.c
index 3c1248297..e1fa9a0b6 100644
--- a/drivers/soc/qcom/ctx-save.c
+++ b/drivers/soc/qcom/ctx-save.c
@@ -1508,8 +1508,8 @@ static int ctx_save_probe(struct platform_device *pdev)
#ifdef CONFIG_QCA_MINIDUMP
ret = register_module_notifier(&wlan_module_exit_nb);
- if (ret)
- dev_err(&pdev->dev, "Failed to register WLAN module exit notifier\n");
+ if (ret)
+ dev_err(&pdev->dev, "Failed to register WLAN module exit notifier\n");
ret = atomic_notifier_chain_register(&panic_notifier_list,
&wlan_panic_nb);
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 45dcd1fd7..8d9328190 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -105,7 +105,7 @@ static ip6mr_mfc_event_offload_callback_t __rcu
#ifdef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES
#define ip6mr_for_each_table(mrt, net) \
- list_for_each_entry_rcu(mrt, &net->ipv6.mr_tables, list)
+ list_for_each_entry_rcu(mrt, &net->ipv6.mr6_tables, list)
static struct mr_table *ip6mr_mr_table_iter(struct net *net,
struct mr_table *mrt)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 1cb0a9571..1de990b03 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -461,6 +461,7 @@ void __init mount_block_root(char *name, int flags)
put_page(page);
}
+#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
static int __init mount_ubi_rootfs(void)
{
int flags = MS_SILENT;
@@ -481,6 +482,7 @@ static int __init mount_ubi_rootfs(void)
return -EINVAL;
}
+#endif
#ifdef CONFIG_ROOT_NFS
--
2.43.0

View file

@ -0,0 +1,57 @@
#it is a patch from linksys.It is needed for the light up the led.This patch was made for qsdk kernel (Qualcomm's downsteam kernel) 4.4.60 but it has been ported to 5.4(expect for the hackly code that for controling the color of led).
Index: linux-4.4/drivers/pinctrl/qcom/pinctrl-ipq5018.c
===================================================================
--- linux-4.4-old/drivers/pinctrl/qcom/pinctrl-ipq5018.c 2020-12-25 11:09:09.328382586 +0800
+++ linux-4.4/drivers/pinctrl/qcom/pinctrl-ipq5018.c 2020-12-25 11:09:56.097125434 +0800
@@ -613,7 +613,7 @@ static const char * const qdss_tracectl_
"gpio40",
};
static const char * const pwm0_groups[] = {
- "gpio42",
+ "gpio42", "gpio46",
};
static const char * const qdss_cti_trig_out_b0_groups[] = {
"gpio42",
@@ -625,7 +625,7 @@ static const char * const xfem4_groups[]
"gpio42",
};
static const char * const pwm1_groups[] = {
- "gpio43",
+ "gpio43", "gpio1",
};
static const char * const qdss_cti_trig_in_b0_groups[] = {
"gpio43",
@@ -649,7 +649,7 @@ static const char * const xfem6_groups[]
"gpio44",
};
static const char * const pwm3_groups[] = {
- "gpio45",
+ "gpio45", "gpio30",
};
static const char * const qdss_cti_trig_in_b1_groups[] = {
"gpio45",
@@ -804,7 +804,7 @@ static const struct msm_function ipq5018
static const struct msm_pingroup ipq5018_groups[] = {
PINGROUP(0, atest_char, _, qdss_cti_trig_out_a0, wci_txd, wci_rxd, xfem, _, _, _),
- PINGROUP(1, atest_char, _, qdss_cti_trig_in_a0, wci_txd, wci_rxd, xfem, _, _, _),
+ PINGROUP(1, atest_char, pwm1, qdss_cti_trig_in_a0, wci_txd, wci_rxd, xfem, _, _, _),
PINGROUP(2, atest_char, _, qdss_cti_trig_out_a1, wci_txd, wci_rxd, xfem, _, _, _),
PINGROUP(3, atest_char, _, qdss_cti_trig_in_a1, wci_txd, wci_rxd, xfem, _, _, _),
PINGROUP(4, sdc1_data, qspi_data, blsp1_spi1, btss, dbg_out, qdss_traceclk_a, _, bu rn0, _),
PINGROUP(5, sdc1_data, qspi_data, cxc_clk, blsp1_spi1, blsp1_i2c1, btss, _, qdss_tr acectl_a, _),
@@ -860,7 +860,7 @@ static const struct msm_pingroup ipq5018
PINGROUP(27, audio_txmclk, wsa_swrm, audio_txmclk, blsp2_spi, btss, _, qdss_traceda ta_b, _, _),
PINGROUP(28, audio_txbclk, wsa_swrm, blsp0_uart1, btss, qdss_tracedata_b, _, _, _, _),
PINGROUP(29, audio_txfsync, _, blsp0_uart1, _, qdss_tracedata_b, _, _, _, _),
- PINGROUP(30, audio_txd, led2, led0, _, _, _, _, _, _),
+ PINGROUP(30, audio_txd, led2, led0, pwm3, _, _, _, _, _),
PINGROUP(31, blsp2_spi0, blsp1_uart1, _, qdss_tracedata_b, eud_gpio, _, _, _, _),
PINGROUP(32, blsp2_spi0, blsp1_uart1, _, qdss_tracedata_b, eud_gpio, _, _, _, _),
PINGROUP(33, blsp2_i2c0, blsp2_spi0, blsp1_uart1, _, qdss_tracedata_b, eud_gpio, _, _, _),
@@ -886,7 +886,7 @@ static const struct msm_pingroup ipq5018
PINGROUP(43, pwm1, qdss_cti_trig_in_b0, wci_txd, wci_rxd, xfem, _, _, _, _),
PINGROUP(44, pwm2, qdss_cti_trig_out_b1, wci_txd, wci_rxd, xfem, _, _, _, _),
PINGROUP(45, pwm3, qdss_cti_trig_in_b1, wci_txd, wci_rxd, xfem, _, _, _, _),
- PINGROUP(46, led0, _, _, _, _, _, _, _, _),
+ PINGROUP(46, led0, pwm0, _, _, _, _, _, _, _),
};

View file

@ -0,0 +1,29 @@
From 8e93b67188de59d2b87f9f8dfa576d36de85fe2c Mon Sep 17 00:00:00 2001
From: hzy <hzyitc@outlook.com>
Date: Tue, 23 May 2023 21:24:04 +0000
Subject: [PATCH] netfilter: br_netfilter: Don't invoke iptables by default
---
net/bridge/br_netfilter_hooks.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c
index fb360da..1286c96 100644
--- a/net/bridge/br_netfilter_hooks.c
+++ b/net/bridge/br_netfilter_hooks.c
@@ -1105,9 +1105,9 @@ static struct ctl_table brnf_table[] = {
static inline void br_netfilter_sysctl_default(struct brnf_net *brnf)
{
- brnf->call_iptables = 1;
- brnf->call_ip6tables = 1;
- brnf->call_arptables = 1;
+ brnf->call_iptables = 0;
+ brnf->call_ip6tables = 0;
+ brnf->call_arptables = 0;
brnf->call_ebtables = 0;
brnf->call_custom = 0;
brnf->filter_vlan_tagged = 0;
--
2.25.1

View file

@ -0,0 +1,81 @@
# Reference: <https://postmarketos.org/vendorkernel>
pkgname=linux-linksys-jamaica
pkgver=5.4.164
pkgrel=0
pkgdesc="Linksys EA9350 V3 kernel fork"
arch="armv7"
_carch="arm"
_flavor="linksys-jamaica"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="
bash
bc
bison
devicepkg-dev
dtbtool-exynos
flex
openssl-dev
perl
linux-headers
xz
gcc6
"
# Compiler: GCC 6 (cant be compiled with newer versions)
if [ "${CC:0:5}" != "gcc6-" ]; then
CC="gcc6-$CC"
HOSTCC="gcc6-gcc"
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
fi
# Source
_commit="d5fcb18e5420670c8734c6a659873e73adab6dac"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://git.codelinaro.org/clo/qsdk/oss/kernel/linux-ipq-5.4/-/archive/$_commit/linux-$_commit.tar.gz
$_config
linux5.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
001-fix-build.patch
601-netfilter-br_netfilter-Don-t-invoke-iptables-by-defa.patch
412_ipq5018-pwm-leds.patch
add-linksys-jamaica-support.patch
"
builddir="$srcdir/linux-ipq-5.4-$_commit"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$arch" .config
}
build() {
unset LDFLAGS
# V=1: workaround for pma#1990
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor" V=1
}
package() {
install -Dm644 "$builddir/arch/$_carch/boot/zImage" \
"$pkgdir/boot/vmlinuz"
make modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_PATH="$pkgdir"/boot/ \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_MOD_STRIP=1 \
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
}
sha512sums="
a3040cd9c89fe1704957acf1da7d986810b60d2a337baaa4307fc434c9dfd8821a714c4b6aa0ba1c5f7ed10374806418558323532d65df3e1c403592c9813511 linux-linksys-jamaica-d5fcb18e5420670c8734c6a659873e73adab6dac.tar.gz
df3fb2f10df0d1fc25e708e2c8d8518d71310939357de1882ecb269fff7c3f0a3612c7192a9535632e4b9dfb87741d09d146555c4c37523a4b0f07d47f6b668d config-linksys-jamaica.armv7
ee80928d83189a6b71f853c97551326e3ac74167dee3bda0ae85a034278ca69403bbfbbd9dfaf9f77426e46d7260e4fda8e8900649f1b6355bac62a8cda83776 linux5.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
f4fcc19216ac758ba0ba10f3c003d0d06270501d7294f1cf8bf2d7dea1341de9d7b5b7151660399049cbce9648d0ae4c14ece624866f9dd4c2b42cff4227fe14 001-fix-build.patch
0343e7791d9b58d96d40314f73adce0e47ce15439ed383e757a7e3d565a04dd75785ccdb49621584a21f23f94edf96b725ec9814a37763b45c533e08a2226ebf 601-netfilter-br_netfilter-Don-t-invoke-iptables-by-defa.patch
7083d8573872ce2c0111b7ebddedb27890a0e98d4565c64c036fd3756aaf8a832315c626b793d7f9f94ac93384f52526a2dc3e2fac713557136e873fdbff9dcc 412_ipq5018-pwm-leds.patch
3c3cf15abcb135aa2faceaf813c1a2e6dd5f836ae52cfd54a6ac99dc5c745ac91138a8e08234c91e6a4f5362c9d2e3301b0e997848c8a6f8f4c757c897133d86 add-linksys-jamaica-support.patch
"

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
../../.shared-patches/linux/linux5.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch