mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
removed core/linux-kirkwood-dt
This commit is contained in:
parent
2979d95351
commit
091a8ebb50
11 changed files with 0 additions and 7969 deletions
|
@ -1,25 +0,0 @@
|
|||
From 2f0bdfe57ff0bc0f3eee7b97bdf397087e023421 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 31 Aug 2014 08:45:13 -0600
|
||||
Subject: [PATCH 1/6] disable mv643xx_eth TSO
|
||||
|
||||
---
|
||||
drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
|
||||
index 90e6111ce534..0d5a19e34efc 100644
|
||||
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
|
||||
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
|
||||
@@ -3183,7 +3183,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
|
||||
dev->watchdog_timeo = 2 * HZ;
|
||||
dev->base_addr = 0;
|
||||
|
||||
- dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO;
|
||||
+ dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
|
||||
dev->vlan_features = dev->features;
|
||||
|
||||
dev->features |= NETIF_F_RXCSUM;
|
||||
--
|
||||
2.30.1
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
From 1e0df3e89c00d5d393b7ff2eac8954042e707725 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 25 Feb 2018 16:32:06 -0700
|
||||
Subject: [PATCH 2/6] leds: trigger: Introduce a SATA trigger
|
||||
|
||||
Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
---
|
||||
drivers/leds/trigger/Kconfig | 6 ++++
|
||||
drivers/leds/trigger/Makefile | 1 +
|
||||
drivers/leds/trigger/ledtrig-sata.c | 43 +++++++++++++++++++++++++++++
|
||||
include/linux/leds.h | 6 ++++
|
||||
4 files changed, 56 insertions(+)
|
||||
create mode 100644 drivers/leds/trigger/ledtrig-sata.c
|
||||
|
||||
diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig
|
||||
index ce9429ca6dde..143075d13bd1 100644
|
||||
--- a/drivers/leds/trigger/Kconfig
|
||||
+++ b/drivers/leds/trigger/Kconfig
|
||||
@@ -39,6 +39,12 @@ config LEDS_TRIGGER_DISK
|
||||
This allows LEDs to be controlled by disk activity.
|
||||
If unsure, say Y.
|
||||
|
||||
+config LEDS_TRIGGER_SATA
|
||||
+ bool "LED SATA Disk Trigger for Kirkwood SOC"
|
||||
+ depends on LEDS_TRIGGERS
|
||||
+ help
|
||||
+ This allows LEDs to be controlled by IDE disk activity.
|
||||
+
|
||||
config LEDS_TRIGGER_MTD
|
||||
bool "LED MTD (NAND/NOR) Trigger"
|
||||
depends on MTD
|
||||
diff --git a/drivers/leds/trigger/Makefile b/drivers/leds/trigger/Makefile
|
||||
index 733a83e2a718..023b9221202b 100644
|
||||
--- a/drivers/leds/trigger/Makefile
|
||||
+++ b/drivers/leds/trigger/Makefile
|
||||
@@ -2,6 +2,7 @@
|
||||
obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
|
||||
obj-$(CONFIG_LEDS_TRIGGER_ONESHOT) += ledtrig-oneshot.o
|
||||
obj-$(CONFIG_LEDS_TRIGGER_DISK) += ledtrig-disk.o
|
||||
+obj-$(CONFIG_LEDS_TRIGGER_SATA) += ledtrig-sata.o
|
||||
obj-$(CONFIG_LEDS_TRIGGER_MTD) += ledtrig-mtd.o
|
||||
obj-$(CONFIG_LEDS_TRIGGER_HEARTBEAT) += ledtrig-heartbeat.o
|
||||
obj-$(CONFIG_LEDS_TRIGGER_BACKLIGHT) += ledtrig-backlight.o
|
||||
diff --git a/drivers/leds/trigger/ledtrig-sata.c b/drivers/leds/trigger/ledtrig-sata.c
|
||||
new file mode 100644
|
||||
index 000000000000..f1798f43666f
|
||||
--- /dev/null
|
||||
+++ b/drivers/leds/trigger/ledtrig-sata.c
|
||||
@@ -0,0 +1,43 @@
|
||||
+/*
|
||||
+ * LED SATA-Disk Activity Trigger
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/leds.h>
|
||||
+
|
||||
+#define BLINK_DELAY 30
|
||||
+
|
||||
+DEFINE_LED_TRIGGER(ledtrig_sata1);
|
||||
+DEFINE_LED_TRIGGER(ledtrig_sata2);
|
||||
+
|
||||
+void ledtrig_sata_activity(int port_number)
|
||||
+{
|
||||
+ unsigned long sata_blink_delay = BLINK_DELAY;
|
||||
+
|
||||
+ switch (port_number) {
|
||||
+ case 0:
|
||||
+ led_trigger_blink_oneshot(ledtrig_sata1, &sata_blink_delay, &sata_blink_delay, 0);
|
||||
+ break;
|
||||
+ case 1:
|
||||
+ led_trigger_blink_oneshot(ledtrig_sata2, &sata_blink_delay, &sata_blink_delay, 0);
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+EXPORT_SYMBOL(ledtrig_sata_activity);
|
||||
+
|
||||
+static int __init ledtrig_sata_init(void)
|
||||
+{
|
||||
+ led_trigger_register_simple("sata-disk1", &ledtrig_sata1);
|
||||
+ led_trigger_register_simple("sata-disk2", &ledtrig_sata2);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+device_initcall(ledtrig_sata_init);
|
||||
diff --git a/include/linux/leds.h b/include/linux/leds.h
|
||||
index 6a8d6409c993..c6d8a49dc52c 100644
|
||||
--- a/include/linux/leds.h
|
||||
+++ b/include/linux/leds.h
|
||||
@@ -467,6 +467,12 @@ void ledtrig_disk_activity(bool write);
|
||||
static inline void ledtrig_disk_activity(bool write) {}
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_LEDS_TRIGGER_SATA
|
||||
+void ledtrig_sata_activity(int port_number);
|
||||
+#else
|
||||
+static inline void ledtrig_sata_activity(int port_number) {}
|
||||
+#endif
|
||||
+
|
||||
#ifdef CONFIG_LEDS_TRIGGER_MTD
|
||||
void ledtrig_mtd_activity(void);
|
||||
#else
|
||||
--
|
||||
2.30.1
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
From 531d67c63671a638464b7081afe9f917bc314552 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 25 Feb 2018 16:34:33 -0700
|
||||
Subject: [PATCH 3/6] ata: sata_mv: Add SATA activity LED trigger support
|
||||
|
||||
Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
---
|
||||
drivers/ata/sata_mv.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
|
||||
index 664ef658a955..ca920c7ce0e5 100644
|
||||
--- a/drivers/ata/sata_mv.c
|
||||
+++ b/drivers/ata/sata_mv.c
|
||||
@@ -59,6 +59,7 @@
|
||||
#include <scsi/scsi_cmnd.h>
|
||||
#include <scsi/scsi_device.h>
|
||||
#include <linux/libata.h>
|
||||
+#include <linux/leds.h>
|
||||
|
||||
#define DRV_NAME "sata_mv"
|
||||
#define DRV_VERSION "1.28"
|
||||
@@ -1162,6 +1163,8 @@ static void mv_start_edma(struct ata_port *ap, void __iomem *port_mmio,
|
||||
{
|
||||
int want_ncq = (protocol == ATA_PROT_NCQ);
|
||||
|
||||
+ ledtrig_sata_activity(ap->port_no);
|
||||
+
|
||||
if (pp->pp_flags & MV_PP_FLAG_EDMA_EN) {
|
||||
int using_ncq = ((pp->pp_flags & MV_PP_FLAG_NCQ_EN) != 0);
|
||||
if (want_ncq != using_ncq)
|
||||
--
|
||||
2.30.1
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
From e289837add6b4c5b1493f6dcfbdcdaecfe382145 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 25 Feb 2018 16:37:08 -0700
|
||||
Subject: [PATCH 4/6] ARM: dts: kirkwood-pogo_e02: Set health LED to default-on
|
||||
|
||||
Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
---
|
||||
arch/arm/boot/dts/kirkwood-pogo_e02.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/kirkwood-pogo_e02.dts b/arch/arm/boot/dts/kirkwood-pogo_e02.dts
|
||||
index f9e95e55f36d..a3ee0ad3c1b4 100644
|
||||
--- a/arch/arm/boot/dts/kirkwood-pogo_e02.dts
|
||||
+++ b/arch/arm/boot/dts/kirkwood-pogo_e02.dts
|
||||
@@ -36,7 +36,7 @@ gpio-leds {
|
||||
health {
|
||||
label = "pogo_e02:green:health";
|
||||
gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
|
||||
- default-state = "keep";
|
||||
+ default-state = "default-on";
|
||||
};
|
||||
fault {
|
||||
label = "pogo_e02:orange:fault";
|
||||
--
|
||||
2.30.1
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
From a169d7ddf4ae45e6a44baccd99b6fc957fe8083e Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 25 Feb 2018 16:38:04 -0700
|
||||
Subject: [PATCH 5/6] Fix mvsdio SD card detection
|
||||
|
||||
Helps SD card detection on PPv4.
|
||||
|
||||
Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
---
|
||||
drivers/mmc/core/core.c | 2 +-
|
||||
drivers/mmc/core/sd.c | 9 +++++++++
|
||||
drivers/mmc/host/mvsdio.c | 2 ++
|
||||
3 files changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
|
||||
index 19f1ee57fb34..b1b92c52c89c 100644
|
||||
--- a/drivers/mmc/core/core.c
|
||||
+++ b/drivers/mmc/core/core.c
|
||||
@@ -695,7 +695,7 @@ void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card)
|
||||
*/
|
||||
limit_us = 3000000;
|
||||
else
|
||||
- limit_us = 100000;
|
||||
+ limit_us = 200000;
|
||||
|
||||
/*
|
||||
* SDHC cards always use these fixed values.
|
||||
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
|
||||
index 6f054c449d46..1ca7d8593e5c 100644
|
||||
--- a/drivers/mmc/core/sd.c
|
||||
+++ b/drivers/mmc/core/sd.c
|
||||
@@ -376,6 +376,15 @@ int mmc_sd_switch_hs(struct mmc_card *card)
|
||||
if (!status)
|
||||
return -ENOMEM;
|
||||
|
||||
+ /*
|
||||
+ * Some SDHC cards, notably those with a Sandisk SD controller
|
||||
+ * (also found in Kingston products) need a bit of slack
|
||||
+ * before successfully handling the SWITCH command. So far,
|
||||
+ * cards identifying themselves as "SD04G" and "SD08G" are
|
||||
+ * affected
|
||||
+ */
|
||||
+ udelay(100);
|
||||
+
|
||||
err = mmc_sd_switch(card, 1, 0, HIGH_SPEED_BUS_SPEED, status);
|
||||
if (err)
|
||||
goto out;
|
||||
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
|
||||
index 629efbe639c4..bc342d88d2d1 100644
|
||||
--- a/drivers/mmc/host/mvsdio.c
|
||||
+++ b/drivers/mmc/host/mvsdio.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/mmc/host.h>
|
||||
#include <linux/mmc/slot-gpio.h>
|
||||
+#include <linux/mmc/sd.h>
|
||||
|
||||
#include <linux/sizes.h>
|
||||
#include <asm/unaligned.h>
|
||||
@@ -147,6 +148,7 @@ static void mvsd_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
||||
|
||||
dev_dbg(host->dev, "cmd %d (hw state 0x%04x)\n",
|
||||
cmd->opcode, mvsd_read(MVSD_HW_STATE));
|
||||
+ if (cmd->opcode == SD_SWITCH) mdelay(1); /* Voodoo */
|
||||
|
||||
cmdreg = MVSD_CMD_INDEX(cmd->opcode);
|
||||
|
||||
--
|
||||
2.30.1
|
||||
|
|
@ -1,160 +0,0 @@
|
|||
From 8eddfd84be47cb414c1574b01cf0222053dad592 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 25 Feb 2018 16:42:40 -0700
|
||||
Subject: [PATCH 6/6] ARM: dts: kirkwood: Initial support for GoFlex Home
|
||||
|
||||
Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/kirkwood-goflexhome.dts | 127 ++++++++++++++++++++++
|
||||
2 files changed, 128 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/kirkwood-goflexhome.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 3d1ea0b25168..979846648d0f 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -278,6 +278,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
|
||||
kirkwood-ds411.dtb \
|
||||
kirkwood-ds411j.dtb \
|
||||
kirkwood-ds411slim.dtb \
|
||||
+ kirkwood-goflexhome.dtb \
|
||||
kirkwood-goflexnet.dtb \
|
||||
kirkwood-guruplug-server-plus.dtb \
|
||||
kirkwood-ib62x0.dtb \
|
||||
diff --git a/arch/arm/boot/dts/kirkwood-goflexhome.dts b/arch/arm/boot/dts/kirkwood-goflexhome.dts
|
||||
new file mode 100644
|
||||
index 000000000000..554716fbf367
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/kirkwood-goflexhome.dts
|
||||
@@ -0,0 +1,127 @@
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "kirkwood.dtsi"
|
||||
+#include "kirkwood-6281.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Seagate GoFlex Home";
|
||||
+ compatible = "seagate,goflexhome", "marvell,kirkwood-88f6281", "marvell,kirkwood";
|
||||
+
|
||||
+ memory {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x00000000 0x8000000>;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200n8 earlyprintk root=/dev/sda1 rootdelay=10";
|
||||
+ stdout-path = &uart0;
|
||||
+ };
|
||||
+
|
||||
+ ocp@f1000000 {
|
||||
+ pinctrl: pin-controller@10000 {
|
||||
+ pmx_usb_power_enable: pmx-usb-power-enable {
|
||||
+ marvell,pins = "mpp29";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ pmx_led_white: pmx-led_white {
|
||||
+ marvell,pins = "mpp40";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ pmx_led_green: pmx-led_green {
|
||||
+ marvell,pins = "mpp46";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ pmx_led_orange: pmx-led_orange {
|
||||
+ marvell,pins = "mpp47";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ };
|
||||
+ serial@12000 {
|
||||
+ status = "ok";
|
||||
+ };
|
||||
+
|
||||
+ sata@80000 {
|
||||
+ status = "okay";
|
||||
+ nr-ports = <1>;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-0 = < &pmx_led_orange
|
||||
+ &pmx_led_green
|
||||
+ &pmx_led_white
|
||||
+ >;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ health {
|
||||
+ label = "status:green:health";
|
||||
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "keep";
|
||||
+ };
|
||||
+ fault {
|
||||
+ label = "status:orange:fault";
|
||||
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ misc {
|
||||
+ label = "status:white:misc";
|
||||
+ gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "sata-disk1";
|
||||
+ };
|
||||
+ };
|
||||
+ regulators {
|
||||
+ compatible = "simple-bus";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-0 = <&pmx_usb_power_enable>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ usb_power: regulator@1 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ reg = <1>;
|
||||
+ regulator-name = "USB Power";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ enable-active-high;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&nand {
|
||||
+ chip-delay = <40>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "u-boot";
|
||||
+ reg = <0x0000000 0x100000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "uImage";
|
||||
+ reg = <0x0100000 0x0600000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@0600000 {
|
||||
+ label = "root";
|
||||
+ reg = <0x0600000 0xd800000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mdio {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ethphy0: ethernet-phy@0 {
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð0 {
|
||||
+ status = "okay";
|
||||
+ ethernet0-port@0 {
|
||||
+ phy-handle = <ðphy0>;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
2.30.1
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[Trigger]
|
||||
Type = File
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Target = boot/zImage
|
||||
Target = usr/lib/initcpio/*
|
||||
|
||||
[Action]
|
||||
Description = Updating %PKGBASE% initcpios
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/mkinitcpio -p %PKGBASE%
|
|
@ -1,225 +0,0 @@
|
|||
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# Maintainer: Oleg Rakhmanov <oleg@archlinuxarm.org>
|
||||
|
||||
buildarch=2
|
||||
|
||||
pkgbase=linux-kirkwood-dt
|
||||
_srcname=linux-5.16
|
||||
_kernelname=${pkgbase#linux}
|
||||
_desc="Marvell Kirkwood DT"
|
||||
pkgver=5.16.1
|
||||
pkgrel=1
|
||||
arch=('arm')
|
||||
url="http://www.kernel.org/"
|
||||
license=('GPL2')
|
||||
makedepends=('xmlto' 'docbook-xsl' 'uboot-mkimage' 'kmod' 'inetutils' 'bc' 'git')
|
||||
options=('!strip')
|
||||
source=("http://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.xz"
|
||||
"http://www.kernel.org/pub/linux/kernel/v5.x/patch-${pkgver}.xz"
|
||||
'0001-disable-mv643xx_eth-TSO.patch'
|
||||
'0002-leds-trigger-Introduce-a-SATA-trigger.patch'
|
||||
'0003-ata-sata_mv-Add-SATA-activity-LED-trigger-support.patch'
|
||||
'0004-ARM-dts-kirkwood-pogo_e02-Set-health-LED-to-default-.patch'
|
||||
'0005-Fix-mvsdio-SD-card-detection.patch'
|
||||
'0006-ARM-dts-kirkwood-Initial-support-for-GoFlex-Home.patch'
|
||||
'config'
|
||||
'linux.preset'
|
||||
'99-linux.hook')
|
||||
md5sums=('e6680ce7c989a3efe58b51e3f3f0bf93'
|
||||
'd571392436365678b420e4dece216514'
|
||||
'15d7106fe978f6628b807b234c0401ee'
|
||||
'e2a9495034dfcd8a76995da975346cff'
|
||||
'324ce8e7e98425ddcd18137e2f6f77fd'
|
||||
'399e93a1cfc75407eef72b5875c79fd1'
|
||||
'f245537b6a2b5ad413b77d6c0f1605c3'
|
||||
'7dd641b40fd7409e11a070a64c0c5413'
|
||||
'655dbc9e5981f89f8300e2d2586fe382'
|
||||
'959e49540dac4c5e689ad9037150a360'
|
||||
'79fa396e3f9a09a85156d6d7c2d34b58')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
# add upstream patch
|
||||
git apply --whitespace=nowarn "${srcdir}/patch-${pkgver}"
|
||||
|
||||
# ALARM patches
|
||||
git apply ../0001-disable-mv643xx_eth-TSO.patch
|
||||
git apply ../0002-leds-trigger-Introduce-a-SATA-trigger.patch
|
||||
git apply ../0003-ata-sata_mv-Add-SATA-activity-LED-trigger-support.patch
|
||||
git apply ../0004-ARM-dts-kirkwood-pogo_e02-Set-health-LED-to-default-.patch
|
||||
git apply ../0005-Fix-mvsdio-SD-card-detection.patch
|
||||
git apply ../0006-ARM-dts-kirkwood-Initial-support-for-GoFlex-Home.patch
|
||||
|
||||
cat "${srcdir}/config" > ./.config
|
||||
|
||||
# add pkgrel to extraversion
|
||||
sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile
|
||||
|
||||
# don't run depmod on 'make install'. We'll do this ourselves in packaging
|
||||
sed -i '2iexit 0' scripts/depmod.sh
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
# get kernel version
|
||||
make prepare
|
||||
|
||||
# load configuration
|
||||
# Configure the kernel. Replace the line below with one of your choice.
|
||||
#make menuconfig # CLI menu for configuration
|
||||
#make nconfig # new CLI menu for configuration
|
||||
#make xconfig # X-based configuration
|
||||
#make oldconfig # using old config from previous kernel version
|
||||
# ... or manually edit .config
|
||||
|
||||
# Copy back our configuration (use with new kernel version)
|
||||
#cp ./.config ../${pkgbase}.config
|
||||
|
||||
####################
|
||||
# stop here
|
||||
# this is useful to configure the kernel
|
||||
#msg "Stopping build"
|
||||
#return 1
|
||||
####################
|
||||
|
||||
#yes "" | make config
|
||||
|
||||
msg "Building!"
|
||||
make ${MAKEFLAGS} zImage modules dtbs
|
||||
}
|
||||
|
||||
_package() {
|
||||
pkgdesc="The Linux Kernel and modules - ${_desc}"
|
||||
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
|
||||
optdepends=('crda: to set the correct wireless channels of your country')
|
||||
provides=("linux=${pkgver}" "WIREGUARD-MODULE")
|
||||
conflicts=('linux-kirkwood' 'linux' 'linux-olinuxino')
|
||||
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
||||
install=${pkgname}.install
|
||||
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
KARCH=arm
|
||||
|
||||
# get kernel version
|
||||
_kernver="$(make kernelrelease)"
|
||||
#_basekernel=${_kernver%%-*}
|
||||
#_basekernel=${_basekernel%.*}
|
||||
_basekernel=${pkgver}
|
||||
|
||||
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware}
|
||||
make INSTALL_MOD_PATH="${pkgdir}" modules_install
|
||||
make INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs" dtbs_install
|
||||
cp arch/$KARCH/boot/zImage "${pkgdir}/boot/zImage"
|
||||
|
||||
# set correct depmod command for install
|
||||
sed \
|
||||
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
|
||||
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
|
||||
-i "${startdir}/${pkgname}.install"
|
||||
|
||||
# install mkinitcpio preset file for kernel
|
||||
install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||
sed \
|
||||
-e "1s|'linux.*'|'${pkgbase}'|" \
|
||||
-e "s|ALL_kver=.*|ALL_kver=\"${_kernver}\"|" \
|
||||
-i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||
|
||||
# install pacman hook for initramfs regeneration
|
||||
sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/99-linux.hook" |
|
||||
install -D -m644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/99-${pkgbase}.hook"
|
||||
|
||||
# remove build and source links
|
||||
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
|
||||
# remove the firmware
|
||||
rm -rf "${pkgdir}/lib/firmware"
|
||||
# make room for external modules
|
||||
ln -s "../extramodules-${_basekernel}${_kernelname:--ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
|
||||
# add real version for building modules and running depmod from post_install/upgrade
|
||||
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}"
|
||||
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
|
||||
|
||||
# Now we call depmod...
|
||||
depmod -b "$pkgdir" -F System.map "$_kernver"
|
||||
|
||||
# move module tree /lib -> /usr/lib
|
||||
mkdir -p "${pkgdir}/usr"
|
||||
mv "$pkgdir/lib" "$pkgdir/usr"
|
||||
}
|
||||
|
||||
_package-headers() {
|
||||
pkgdesc="Header files and scripts for building modules for linux kernel - ${_desc}"
|
||||
provides=('linux-headers=${pkgver}')
|
||||
conflicts=('linux-kirkwood-headers' 'linux-headers' 'linux-headers-olinuxino')
|
||||
replaces=('linux-headers-kirkwood-dt')
|
||||
cd ${_srcname}
|
||||
local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||
|
||||
install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
|
||||
install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
|
||||
|
||||
mkdir "${_builddir}/.tmp_versions"
|
||||
|
||||
cp -t "${_builddir}" -a include scripts
|
||||
|
||||
install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
|
||||
install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s
|
||||
|
||||
cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include
|
||||
mkdir -p "${_builddir}/arch/${KARCH}/plat-orion"
|
||||
cp -t "${_builddir}/arch/${KARCH}/plat-orion" -a arch/$KARCH/plat-orion/include
|
||||
|
||||
install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
|
||||
install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
|
||||
|
||||
# http://bugs.archlinux.org/task/13146
|
||||
install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
||||
|
||||
# http://bugs.archlinux.org/task/20402
|
||||
install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
|
||||
install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
|
||||
install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h
|
||||
|
||||
# add xfs and shmem for aufs building
|
||||
mkdir -p "${_builddir}"/{fs/xfs,mm}
|
||||
|
||||
# copy in Kconfig files
|
||||
find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
|
||||
|
||||
# remove unneeded architectures
|
||||
local _arch
|
||||
for _arch in "${_builddir}"/arch/*/; do
|
||||
[[ ${_arch} == */${KARCH}/ ]] && continue
|
||||
rm -r "${_arch}"
|
||||
done
|
||||
|
||||
# remove files already in linux-docs package
|
||||
rm -r "${_builddir}/Documentation"
|
||||
|
||||
# remove now broken symlinks
|
||||
find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete
|
||||
|
||||
# Fix permissions
|
||||
chmod -R u=rwX,go=rX "${_builddir}"
|
||||
|
||||
# strip scripts directory
|
||||
local _binary _strip
|
||||
while read -rd '' _binary; do
|
||||
case "$(file -bi "${_binary}")" in
|
||||
*application/x-sharedlib*) _strip="${STRIP_SHARED}" ;; # Libraries (.so)
|
||||
*application/x-archive*) _strip="${STRIP_STATIC}" ;; # Libraries (.a)
|
||||
*application/x-executable*) _strip="${STRIP_BINARIES}" ;; # Binaries
|
||||
*) continue ;;
|
||||
esac
|
||||
/usr/bin/strip ${_strip} "${_binary}"
|
||||
done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null)
|
||||
}
|
||||
|
||||
pkgname=("${pkgbase}" "${pkgbase}-headers")
|
||||
for _p in ${pkgname[@]}; do
|
||||
eval "package_${_p}() {
|
||||
_package${_p#${pkgbase}}
|
||||
}"
|
||||
done
|
File diff suppressed because it is too large
Load diff
|
@ -1,46 +0,0 @@
|
|||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
|
||||
KERNEL_NAME=-kirkwood-dt
|
||||
KERNEL_VERSION=5.12.9-1-ARCH
|
||||
|
||||
post_install () {
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod ${KERNEL_VERSION}
|
||||
|
||||
echo "**********************************************************************"
|
||||
echo "WARNING! This kernel package will NOT boot without user intervention."
|
||||
echo ""
|
||||
echo " A Kirkwood Flattened Device Tree supporting zImage is"
|
||||
echo " placed in /boot and all mainline supported .dtb and .dts"
|
||||
echo " files are in /boot/dtb for you to prep as appropriate."
|
||||
echo ""
|
||||
echo " Depending on your particular device, you may need to upgrade"
|
||||
echo " your installed U-Boot version, and/or modify your boot env."
|
||||
echo " Some platforms may need to append the appropriate .dtb to the"
|
||||
echo " end of the zImage and make a uImage from the resulting blob."
|
||||
echo ""
|
||||
echo " If you are not familiar with the care and feeding of a DT"
|
||||
echo " enabled kernel for your device, uninstall this package and"
|
||||
echo " continue to use linux-kirkwood for now."
|
||||
echo "**********************************************************************"
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then
|
||||
if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then
|
||||
echo "WARNING: /boot appears to be a separate partition but is not mounted."
|
||||
echo " You probably just broke your system. Congratulations."
|
||||
fi
|
||||
fi
|
||||
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod ${KERNEL_VERSION}
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
# also remove the compat symlinks
|
||||
rm -f /boot/initramfs-linux.img
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
# mkinitcpio preset file for the 'linux-kirkwood-dt' package
|
||||
|
||||
ALL_config="/etc/mkinitcpio.conf"
|
||||
ALL_kver="4.3.0-1-ARCH"
|
||||
|
||||
PRESETS=('default')
|
||||
|
||||
#default_config="/etc/mkinitcpio.conf"
|
||||
default_image="/boot/initramfs-linux.img"
|
||||
#default_options=""
|
Loading…
Reference in a new issue