diff --git a/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-pcie/temporary-src-tree-fix-pcie.patch b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-pcie/temporary-src-tree-fix-pcie.patch new file mode 100644 index 0000000..f09c5d4 --- /dev/null +++ b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-pcie/temporary-src-tree-fix-pcie.patch @@ -0,0 +1,38 @@ +diff --git a/netbox_pcie.c b/netbox_pcie.c +index 934368e..d982b78 100644 +--- a/netbox_pcie.c ++++ b/netbox_pcie.c +@@ -36,7 +36,6 @@ + #include + #include + +-#include + #include + #include + +@@ -806,7 +805,6 @@ static int nm_pcie_probe(struct platform_device *pdev) + pcie_slot_count = 0; + hwver = hwrel = -1; + +-#ifdef NBSW_TARGET_netbolt_arm + if (NBHW == 14) { + for (i = 0; i < 6; i++) { + ps = pcie_add_slot(i, PCIE_MAIN); +@@ -850,8 +848,7 @@ static int nm_pcie_probe(struct platform_device *pdev) + if (ret) + goto error; + } +-#elif defined(NBSW_TARGET_netbird_arm) +- if (NBHW == 16) { ++ } else if (NBHW == 16) { + ps = pcie_add_slot(0, PCIE_MAIN); + if (IS_ERR(ps)) { + ret = PTR_ERR(ps); +@@ -1116,7 +1113,6 @@ static int nm_pcie_probe(struct platform_device *pdev) + ret = pcie_init_slot(ps); + if (ret) + goto error; +-#endif + } else { + printk("Unknwon NBHW: %d\n", NBHW); + ret = -EINVAL; diff --git a/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-pcie_git.bb b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-pcie_git.bb new file mode 100644 index 0000000..7c72f48 --- /dev/null +++ b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-pcie_git.bb @@ -0,0 +1,23 @@ +HOMEPAGE = "http://www.netmodule.com" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "git://git.netmodule.intranet/NRSW/netbox_pcie.git;protocol=ssh;user=gitea;branch=master \ + file://temporary-src-tree-fix-pcie.patch \ + " + +PV = "1.0+git${SRCPV}" +SRCREV="6467938980a2829539419a94edfe1324025bbdfb" + +S = "${WORKDIR}/git" + +DEPENDS = "virtual/kernel kernel-module-board-descriptor" + +inherit module + +KERNEL_CC:append = " -I${STAGING_DIR_TARGET}/usr/include/board-descriptor" + +EXTRA_OEMAKE:append:task-install = " -C ${STAGING_KERNEL_DIR} M=${S}" + +KERNEL_MODULE_AUTOLOAD += " pcie " + diff --git a/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-system-info/0001-dummy-version-info-and-bd-key.patch b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-system-info/0001-dummy-version-info-and-bd-key.patch new file mode 100644 index 0000000..1c1da38 --- /dev/null +++ b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-system-info/0001-dummy-version-info-and-bd-key.patch @@ -0,0 +1,35 @@ +diff --git a/netbox_system_info.c b/netbox_system_info.c +index e6bf81e..823479b 100644 +--- a/netbox_system_info.c ++++ b/netbox_system_info.c +@@ -26,7 +26,11 @@ + #include + #include + #include +-#include ++#define NBSW_VERSION_MAJOR 0 ++#define NBSW_VERSION_MINOR 0 ++#define NBSW_VERSION_PATCH 0 ++#define NBSW_VERSION_BUILD 0 ++#define NBSW_VERSION_DATE "20230101000000" + #include + #include + #include +diff --git a/netmodule_system_init.c b/netmodule_system_init.c +index dbf3c8b..1fa531b 100755 +--- a/netmodule_system_init.c ++++ b/netmodule_system_init.c +@@ -14,7 +14,12 @@ + #include + #include + #include +-#include ++#ifndef _BD_KEY_H ++#define _BD_KEY_H ++ ++static const unsigned char BD_KEY[] = { 0xa1, 0x73, 0x17, 0x9a, 0x5e, 0xf4, 0x42, 0xb9, 0xae, 0x8c, ++ 0xa3, 0xcd, 0x75, 0x63, 0xd3, 0x91, 0x4f, 0x11, 0xf1, 0x7b}; ++#endif + + #include + #include "netbox_system_info.h" diff --git a/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-system-info/temporary-src-tree-fix-system-info.patch b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-system-info/temporary-src-tree-fix-system-info.patch new file mode 100644 index 0000000..c39af8f --- /dev/null +++ b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-system-info/temporary-src-tree-fix-system-info.patch @@ -0,0 +1,514 @@ +diff --git a/netbox-sim.c b/netbox-sim.c +index 3c4eefd..2eb34ee 100644 +--- a/netbox-sim.c ++++ b/netbox-sim.c +@@ -579,7 +579,6 @@ int netbox_sim_init (void) + major = 235; + + switch (NBHW) { +-#ifdef NBSW_TARGET_netbolt_arm + case 14 : + hwops = &netbox_sim14_ops; + break; +@@ -589,7 +588,6 @@ int netbox_sim_init (void) + case 18 : + hwops = &netbox_sim17_ops; + break; +-#elif defined(NBSW_TARGET_netbird_arm) + case 16 : + hwops = &netbox_sim16_ops; + break; +@@ -605,7 +603,6 @@ int netbox_sim_init (void) + case 26 : + hwops = &netbox_sim26_ops; + break; +-#endif + default : + SIM_LOG(KERN_ERR, "netbox_sim_init: Hardware not supported"); + return -1; +diff --git a/netbox-sim.h b/netbox-sim.h +index 336234f..2585ec8 100644 +--- a/netbox-sim.h ++++ b/netbox-sim.h +@@ -11,8 +11,6 @@ + #ifndef _NETBOX_SIM_H + #define _NETBOX_SIM_H + +-#include +- + #define SIM_LOG(level, format, arg...) printk(level "sim: " format "\n", ##arg) + + #define MAX_SIMS 14 +@@ -54,18 +52,13 @@ extern int netbox_sim_init (void); + extern void netbox_sim_uninit (void); + extern void netbox_sim_changed (int dindex, int inserted); + +-#ifdef NBSW_TARGET_netbolt_arm + extern struct sim_ops netbox_sim14_ops; + extern struct sim_ops netbox_sim17_ops; +-#endif +- +-#ifdef NBSW_TARGET_netbird_arm + extern struct sim_ops netbox_sim16_ops; + extern struct sim_ops netbox_sim20_ops; + extern struct sim_ops netbox_sim24_ops; + extern struct sim_ops netbox_sim25_ops; + extern struct sim_ops netbox_sim26_ops; +-#endif + + #endif /* _NETBOX_SIM_H */ + +diff --git a/netbox-sim14.c b/netbox-sim14.c +index b00d010..e8c0f03 100644 +--- a/netbox-sim14.c ++++ b/netbox-sim14.c +@@ -17,22 +17,17 @@ + #include + #include + #include +-#include + #include + #include "netbox-sim.h" + #include "netbox_system_info.h" + +-#if defined(NBSW_TARGET_netbolt_arm) +- + /**********************************************************************/ + + #include + +-#if defined(NBSW_TARGET_netbolt_arm) + #define FPGA_BASE_ADDRESS 0xFD000000 + #define EXT_IRQ_PIN 24 + #include +-#endif + #define FPGA_BASE_SIZE 131072 + + #define FPGA_IDENTIFICATION 0x0000 +@@ -486,4 +481,3 @@ struct sim_ops netbox_sim14_ops = { + }; + EXPORT_SYMBOL(netbox_sim14_ops); + +-#endif +diff --git a/netbox-sim16.c b/netbox-sim16.c +index 9120e9a..d40eb94 100644 +--- a/netbox-sim16.c ++++ b/netbox-sim16.c +@@ -16,8 +16,6 @@ + #include + #include "netbox-sim.h" + +-#ifdef NBSW_TARGET_netbird_arm +- + #define DEBUG 0 + + /**********************************************************************/ +@@ -108,4 +106,3 @@ struct sim_ops netbox_sim16_ops = { + }; + EXPORT_SYMBOL(netbox_sim16_ops); + +-#endif /* NBSW_TARGET_netbird_arm */ +diff --git a/netbox-sim17.c b/netbox-sim17.c +index 8711390..5e70391 100644 +--- a/netbox-sim17.c ++++ b/netbox-sim17.c +@@ -17,12 +17,9 @@ + #include + #include + #include +-#include + #include + #include "netbox-sim.h" + +-#if defined(NBSW_TARGET_netbolt_arm) +- + /**********************************************************************/ + + #include +@@ -325,4 +322,3 @@ struct sim_ops netbox_sim17_ops = { + }; + EXPORT_SYMBOL(netbox_sim17_ops); + +-#endif +diff --git a/netbox-sim20.c b/netbox-sim20.c +index d0c4ea3..4e52197 100644 +--- a/netbox-sim20.c ++++ b/netbox-sim20.c +@@ -16,8 +16,6 @@ + #include + #include "netbox-sim.h" + +-#ifdef NBSW_TARGET_netbird_arm +- + #define DEBUG 0 + + /**********************************************************************/ +@@ -138,4 +136,3 @@ struct sim_ops netbox_sim20_ops = { + }; + EXPORT_SYMBOL(netbox_sim20_ops); + +-#endif /* NBSW_TARGET_netbird_arm */ +diff --git a/netbox-sim24.c b/netbox-sim24.c +index f5e20bf..1601a9f 100644 +--- a/netbox-sim24.c ++++ b/netbox-sim24.c +@@ -16,8 +16,6 @@ + #include + #include "netbox-sim.h" + +-#ifdef NBSW_TARGET_netbird_arm +- + #define DEBUG 0 + + /**********************************************************************/ +@@ -139,4 +137,3 @@ struct sim_ops netbox_sim24_ops = { + }; + EXPORT_SYMBOL(netbox_sim24_ops); + +-#endif /* NBSW_TARGET_netbird_arm */ +diff --git a/netbox-sim25.c b/netbox-sim25.c +index 05370f8..5b16de5 100644 +--- a/netbox-sim25.c ++++ b/netbox-sim25.c +@@ -16,8 +16,6 @@ + #include + #include "netbox-sim.h" + +-#ifdef NBSW_TARGET_netbird_arm +- + #define DEBUG 0 + + /**********************************************************************/ +@@ -139,4 +137,3 @@ struct sim_ops netbox_sim25_ops = { + }; + EXPORT_SYMBOL(netbox_sim25_ops); + +-#endif /* NBSW_TARGET_netbird_arm */ +diff --git a/netbox-sim26.c b/netbox-sim26.c +index 050c8e5..cd53d45 100644 +--- a/netbox-sim26.c ++++ b/netbox-sim26.c +@@ -16,8 +16,6 @@ + #include + #include "netbox-sim.h" + +-#ifdef NBSW_TARGET_netbird_arm +- + #define DEBUG 0 + + /**********************************************************************/ +@@ -140,4 +138,3 @@ struct sim_ops netbox_sim26_ops = { + }; + EXPORT_SYMBOL(netbox_sim26_ops); + +-#endif /* NBSW_TARGET_netbird_arm */ +diff --git a/netbox_system_info.c b/netbox_system_info.c +index e6bf81e..1f7ee01 100644 +--- a/netbox_system_info.c ++++ b/netbox_system_info.c +@@ -35,7 +35,7 @@ + #include "netbox-sim.h" + #include "../../../drivers/net/wireless/ath/ath9k/ath9k.h" + +-#if defined(NBSW_TARGET_netbolt_arm) ++#if defined(CONFIG_ARCH_MVEBU) + extern int mvebu_get_soc_id(u32 *dev, u32 *rev); + #endif + +@@ -1197,7 +1197,6 @@ static netbox_dev_t netbox_c_can_dev = { + .gnss_type = 0 + }; + +-#if defined(NBSW_TARGET_netbird_arm) + static netbox_dev_t netbox_uart_gnss_dev = { + /* c_can (CAN) */ + .idVendor = 0x00, +@@ -1230,7 +1229,6 @@ static netbox_dev_t netbox_uart_gnss_hw22_dev = { + .gnss_type = GNSS_TYPE_GPS | GNSS_TYPE_GLONASS | GNSS_TYPE_GALILEO | + GNSS_TYPE_QZSS + }; +-#endif + + static netbox_dev_t * netbox_lookup_dev (uint16_t idVendor, uint16_t idProduct, + const char *product, const char *serial) +@@ -1334,7 +1332,7 @@ static int starts_with (const char* usb_id, const char* prefix) + + /*-------------------------------------------------------------------------*/ + +-#if defined(NBSW_TARGET_netbird_arm) ++#if defined(CONFIG_SOC_AM33XX) + static int nr_usb_controllers (void) + { + static int nr = 0; +@@ -1359,7 +1357,7 @@ static int nr_usb_controllers (void) + int pcie_slot_number_from_usb_id (const char* usb_id) + { + switch (NBHW) { +-#if defined(NBSW_TARGET_netbolt_arm) ++#if defined(CONFIG_SOC_AM33XX) + case 14 : + if ((NBMCver<5) || ((NBMCver==5) && (NBMCrel<=1))) { + /* MC board < 5.2 */ +@@ -1427,9 +1425,9 @@ int pcie_slot_number_from_usb_id (const char* usb_id) + } else if (starts_with(usb_id, "1-1.4")) { + return 4; + } +- + break; +-#elif defined(NBSW_TARGET_netbird_arm) ++#endif /* CONFIG_ARCH_MVEBU */ ++#if defined(CONFIG_SOC_AM33XX) + case 16 : + if (nr_usb_controllers() == 2) { + /* modems are connected to 2nd USB controller if present */ +@@ -1452,7 +1450,7 @@ int pcie_slot_number_from_usb_id (const char* usb_id) + case 26 : + if (starts_with(usb_id, "2-1")) return 0; + break; +-#endif ++#endif /* CONFIG_SOC_AM33XX */ + default : + break; + } +@@ -1460,7 +1458,7 @@ int pcie_slot_number_from_usb_id (const char* usb_id) + } + EXPORT_SYMBOL(pcie_slot_number_from_usb_id); + +-#if defined(NBSW_TARGET_netbolt_arm) ++#if defined(CONFIG_ARCH_MVEBU) + + static int get_pex2_slot(void) { + /* Determine based on the FPGA PCIe mux config to which slot PEX2 is routed */ +@@ -1494,7 +1492,7 @@ int pcie_slot_number_from_pdev (struct pci_dev *pdev) + + if (!pdev) return -1; + +-#if defined(NBSW_TARGET_netbolt_arm) ++#if defined(CONFIG_ARCH_MVEBU) + switch (NBHW) { + case 14 : + if (NBMCver >= 4) { +@@ -1525,7 +1523,7 @@ int pcie_slot_number_from_pdev (struct pci_dev *pdev) + default: + break; + } +-#endif ++#endif /* CONFIG_ARCH_MVEBU */ + + return slot; + } +@@ -1789,7 +1787,7 @@ static void free_usb_devices (void) + + /*-------------------------------------------------------------------------*/ + +-#if defined(NBSW_TARGET_netbolt_arm) ++#if defined(CONFIG_ARCH_MVEBU) + + static int add_pci_device (struct pci_dev * pdev, void * user_data) + { +@@ -1816,7 +1814,9 @@ static void find_pci_devices (void) + pci_probed = 1; + } + +-#else ++#endif ++ ++#if defined(CONFIG_SOC_AM33XX) + + static void find_pci_devices (void) + { +@@ -1836,7 +1836,7 @@ int sdio_slot_number_from_func (struct sdio_func *func) + { + int slot = -1; + +-#ifdef NBSW_TARGET_netbird_arm ++#if defined(CONFIG_SOC_AM33XX) + switch (NBHW) { + case 16: + case 20: +@@ -1852,7 +1852,7 @@ int sdio_slot_number_from_func (struct sdio_func *func) + return slot; + } + +-#if defined(NBSW_TARGET_netbird_arm) ++#if defined(CONFIG_SOC_AM33XX) + static int add_sdio_device (struct sdio_func *func) + { + return add_device_list(&sdio_devices, func->vendor, func->device, sdio_slot_number_from_func(func), NULL); +@@ -2682,7 +2682,7 @@ static void check_buses (void) + netbox_dev_t *nbdev; + tmpdev_t *d; + +-#if defined(NBSW_TARGET_netbird_arm) ++#if defined(CONFIG_SOC_AM33XX) + uint16_t shield; + int res; + #endif +@@ -2780,7 +2780,7 @@ static void check_buses (void) + add_can_interface(nbdev, d->slot, d->bus, d->hwinfo); + } + +-#if defined(NBSW_TARGET_netbird_arm) ++#if defined(CONFIG_SOC_AM33XX) + if ((NBHW==20) || /* NBHW20 has a built in GNSS on slot 2 */ + (NBHW==22) || /* NBHW22 has a built in GNSS on slot 0 */ + (NBHW==24) || /* NBHW24 has a built in GNSS on slot 2 */ +@@ -2842,7 +2842,7 @@ unlock: + #define BLMAGIC_START 0x424C5354 + #define BLMAGIC_END 0x424C454E + +-#if defined(NBSW_TARGET_netbolt_arm) ++#if defined(CONFIG_ARCH_MVEBU) + static int read_uboot_version_from_part(const char* path) + { + struct file *f; +@@ -2917,7 +2917,7 @@ static int armada_read_mmc_uboot_version (void) + return rc; + } + +-#elif defined(NBSW_TARGET_netbird_arm) ++#elif defined(CONFIG_SOC_AM33XX) + + static const char* get_sitara_boot_device(void) + { +@@ -5047,7 +5047,13 @@ static const struct proc_ops proc_release_version_fops = { + + static int proc_nbsw_profile_show (struct seq_file *seq, void *v) + { +- seq_printf(seq, "%s\n", NBSW_PROFILE); ++#if defined(CONFIG_ARCH_MVEBU) ++ seq_printf(seq, "%s\n", "NETBOLT"); ++#elif defined(CONFIG_SOC_AM33XX) ++ seq_printf(seq, "%s\n", "NETBIRD"); ++#else ++#error "unknown target" ++#endif + return 0; + } + +@@ -5104,7 +5110,7 @@ static const struct proc_ops proc_release_date_fops = { + + /*-------------------------------------------------------------------------*/ + +-#ifdef NBSW_TARGET_netbird_arm ++#if defined(CONFIG_SOC_AM33XX) + + static int sitara_read_spl_version_from_location(const int location, char* version, int version_length) + { +@@ -5168,10 +5174,6 @@ static int proc_spl_version_show (struct seq_file *seq, void *v) + return 0; + } + +-#endif +- +-#if defined(NBSW_TARGET_netbird_arm) +- + static int proc_spl_version_open (struct inode *inode, struct file *file) + { + return single_open(file, proc_spl_version_show, PDE_DATA(inode)); +@@ -5193,15 +5195,15 @@ static const struct proc_ops proc_spl_version_fops = { + .proc_release = single_release, + }; + #endif +-#endif /* NBSW_TARGET_netbird_arm */ ++#endif /* CONFIG_SOC_AM33XX */ + + /*-------------------------------------------------------------------------*/ + + static int proc_uboot_version_show (struct seq_file *seq, void *v) + { +-#if defined(NBSW_TARGET_netbolt_arm) ++#if defined(CONFIG_ARCH_MVEBU) + armada_read_mmc_uboot_version(); +-#elif defined(NBSW_TARGET_netbird_arm) ++#elif defined(CONFIG_SOC_AM33XX) + sitara_read_mmc_uboot_version(); + #endif + if (uboot_version != 0xFFFFFFFF) { +@@ -5241,7 +5243,7 @@ static const struct proc_ops proc_uboot_version_fops = { + + static int proc_cpuinfo_show (struct seq_file *seq, void *v) + { +-#if defined(NBSW_TARGET_netbolt_arm) ++#if defined(CONFIG_ARCH_MVEBU) + { + u32 dev, rev; + char* rev_str; +@@ -5266,7 +5268,7 @@ static int proc_cpuinfo_show (struct seq_file *seq, void *v) + } + seq_printf(seq, "MV%4.4X Rev %s (0x%2.2x)\n", dev, rev_str, rev); + } +-#elif defined(NBSW_TARGET_netbird_arm) ++#elif defined(CONFIG_SOC_AM33XX) + { + void* iomap; + unsigned int device_id, rev, part, mfgr; +@@ -5509,7 +5511,7 @@ static void usbport_probe (struct usb_device *hdev, int port) + if (usbports_probed) return; + + switch (NBHW) { +-#ifdef NBSW_TARGET_netbolt_arm ++#if defined(CONFIG_ARCH_MVEBU) + case 14 : + if (NBMCver == 0) { + /* happens early, check if MC version has been provided on cmdline */ +@@ -5566,7 +5568,8 @@ static void usbport_probe (struct usb_device *hdev, int port) + if (usbports[0]) probed++; + } + break; +-#elif defined(NBSW_TARGET_netbird_arm) ++#endif /* CONFIG_ARCH_MVEBU */ ++#if defined(CONFIG_SOC_AM33XX) + case 16 : + case 24 : + case 25 : +@@ -5586,7 +5589,7 @@ static void usbport_probe (struct usb_device *hdev, int port) + if (usbports[0]) probed = MAX_NUMBER_OF_USBPORTS; + } + break; +-#endif ++#endif /* CONFIG_SOC_AM33XX */ + default: + break; + } +@@ -5898,7 +5901,6 @@ int netbox_system_info_prepare (void) + + if (NRSW_SYSTEM_INFO_DIR) return 0; + +-#ifdef NBSW_TARGET_netbolt_arm + switch (NBHW) { + case 14 : + MAX_NUMBER_OF_WWAN_INTERFACES = 6; +@@ -5929,11 +5931,6 @@ int netbox_system_info_prepare (void) + MAX_NUMBER_OF_CAN_INTERFACES = 4; + MAX_NUMBER_OF_UART_INTERFACES = 2; + break; +- default : +- break; +- } +-#elif defined(NBSW_TARGET_netbird_arm) +- switch (NBHW) { + case 16 : + MAX_NUMBER_OF_WWAN_INTERFACES = 1; + MAX_NUMBER_OF_WLAN_INTERFACES = 1; +@@ -5988,7 +5985,7 @@ int netbox_system_info_prepare (void) + default : + break; + } +-#endif ++ + NRSW_SYSTEM_INFO_DIR = proc_mkdir("sysinfo", NULL); + if (!NRSW_SYSTEM_INFO_DIR) return -1; + +@@ -6104,9 +6101,9 @@ int netbox_system_info_prepare (void) + proc_create_data(SI_RELEASE_VERSION, S_IRUGO, dir, &proc_release_version_fops, (void *) 0); + proc_create_data(SI_NBSW_PROFILE, S_IRUGO, dir, &proc_nbsw_profile_fops, (void *) 0); + proc_create_data(SI_RELEASE_DATE, S_IRUGO, dir, &proc_release_date_fops, (void *) 0); +-#if defined(NBSW_TARGET_netbird_arm) ++#if defined(CONFIG_SOC_AM33XX) + proc_create_data(SI_SPL_VERSION, S_IRUGO, dir, &proc_spl_version_fops, (void *) 0); +-#endif /* NBSW_TARGET_netbird_arm */ ++#endif /* CONFIG_SOC_AM33XX */ + proc_create_data(SI_UBOOT_VERSION, S_IRUGO, dir, &proc_uboot_version_fops, (void *) 0); + proc_create_data(SI_CPU_INFO, S_IRUGO, dir, &proc_cpuinfo_fops, (void *) 0); + proc_create_data(SI_MODULES_PROBED, S_IRUGO, dir, &proc_modules_probed_fops, (void *) 0); diff --git a/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-system-info_git.bb b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-system-info_git.bb new file mode 100644 index 0000000..107d475 --- /dev/null +++ b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-system-info_git.bb @@ -0,0 +1,29 @@ +HOMEPAGE = "http://www.netmodule.com" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "git://git.netmodule.intranet/NRSW/system-info.git;protocol=ssh;user=gitea;branch=master \ + file://temporary-src-tree-fix-system-info.patch \ + file://0001-dummy-version-info-and-bd-key.patch \ + " + +PV = "1.0+git${SRCPV}" +SRCREV="80ad948bc6fd9a7520a76e01df2ba3c1439a0774" + +S = "${WORKDIR}/git" + +DEPENDS = "virtual/kernel kernel-module-board-descriptor kernel-module-pcie" + +inherit module + +KERNEL_CC:append = " -I${STAGING_DIR_TARGET}/usr/include/board-descriptor" + +do_install:append() { + install -d ${D}/usr/include/system-info/linux/ + install -m 0755 ${S}/netbox_system_info.h ${D}/usr/include/system-info/linux/ +} + +EXTRA_OEMAKE:append:task-install = " -C ${STAGING_KERNEL_DIR} M=${S}" + +KERNEL_MODULE_AUTOLOAD += " system-info " + diff --git a/layers/meta-nwl-distro/recipes-core/images/nwl-ramdisk-minimal.bb b/layers/meta-nwl-distro/recipes-core/images/nwl-ramdisk-minimal.bb index 470c1bf..cd2088f 100644 --- a/layers/meta-nwl-distro/recipes-core/images/nwl-ramdisk-minimal.bb +++ b/layers/meta-nwl-distro/recipes-core/images/nwl-ramdisk-minimal.bb @@ -17,6 +17,8 @@ IMAGE_INSTALL:append = " \ coreutils \ ncurses-terminfo-base \ kernel-module-board-descriptor \ + kernel-module-system-info \ + kernel-module-pcie \ \ networkmanager-nmcli \ systemd-conf \