diff --git a/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-board-descriptor/0001-license-key.patch b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-board-descriptor/0001-license-key.patch new file mode 100644 index 0000000..da15dc7 --- /dev/null +++ b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-board-descriptor/0001-license-key.patch @@ -0,0 +1,60 @@ +diff --git a/license_info.c b/license_info.c +index 5e56753..d88d590 100644 +--- a/license_info.c ++++ b/license_info.c +@@ -32,8 +32,53 @@ + #include "license_info.h" + #include "bigdigits.h" + +-#include +-#include ++#ifndef _LICENSE_KEY_H ++#define _LICENSE_KEY_H ++ ++#define HMAC_KEY_SIZE 20 ++#define SHA1_DIGEST_SIZE 20 ++#define MOD_LENGTH 1536 ++ ++/* RSA public key */ ++ ++static ++unsigned char rsa1536E[MOD_LENGTH/8] = ++{ ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, ++} ; ++ ++static ++unsigned char rsa1536N[MOD_LENGTH/8] = ++{ ++ 0xA1, 0xFD, 0x5A, 0xC5, 0x77, 0xB8, 0xCC, 0x20, 0xFC, 0x80, 0xC2, 0xF0, 0xBD, 0x6F, 0x6F, 0x4A, ++ 0xEC, 0x70, 0xEE, 0x18, 0xBD, 0x6C, 0x07, 0xBB, 0xD6, 0x57, 0xE2, 0xE7, 0x3F, 0x2D, 0x51, 0x6D, ++ 0x9B, 0x76, 0xD7, 0x93, 0xCC, 0x1B, 0x7B, 0x38, 0x2F, 0x10, 0xEC, 0xAD, 0x3A, 0x79, 0x0C, 0xC6, ++ 0x74, 0x76, 0x93, 0x13, 0x6A, 0x20, 0xD9, 0xEB, 0x5B, 0x3C, 0x47, 0xB7, 0xCA, 0xAA, 0xFF, 0x7B, ++ 0x7F, 0x5A, 0x7D, 0xEE, 0xA3, 0x0B, 0xA0, 0x57, 0xB4, 0xB8, 0x77, 0xE9, 0xAD, 0x6D, 0xE8, 0xF7, ++ 0xF8, 0x2F, 0xE7, 0x49, 0xE5, 0x17, 0xBB, 0x7D, 0x5A, 0x6D, 0xF2, 0xD8, 0x1B, 0x01, 0x51, 0xB1, ++ 0x63, 0x48, 0xC1, 0x9E, 0x74, 0xE6, 0x64, 0xB1, 0x9C, 0xC9, 0xFC, 0x75, 0x73, 0x9F, 0x61, 0x89, ++ 0xE1, 0x10, 0x88, 0xFF, 0x90, 0x53, 0xE6, 0x4A, 0x41, 0x63, 0x01, 0x60, 0x2F, 0x85, 0x93, 0xAC, ++ 0x1A, 0x68, 0xAA, 0x8D, 0xBD, 0x31, 0x70, 0xF7, 0x48, 0x5B, 0xFF, 0x44, 0xC9, 0x63, 0xDC, 0xE4, ++ 0x25, 0x5E, 0xBA, 0xD5, 0x3E, 0x11, 0x55, 0xF4, 0x41, 0x58, 0xCF, 0xB3, 0x8A, 0x7A, 0x2B, 0xC3, ++ 0xA7, 0x07, 0x47, 0xAA, 0x88, 0x44, 0x18, 0x5C, 0x8B, 0x88, 0x64, 0x39, 0x07, 0xC4, 0xD1, 0x82, ++ 0x62, 0xA7, 0xDB, 0x9A, 0x53, 0x4D, 0xB9, 0x36, 0x69, 0x72, 0x01, 0x75, 0x88, 0x40, 0xD5, 0xF5, ++} ; ++ ++static char checksumKey[HMAC_KEY_SIZE] = {0x17, 0x5e, 0x73, 0x42, 0xb9, 0xae, 0x11, 0xcd, 0x91, 0xa3, ++ 0x9a, 0xf4, 0x8c, 0xa1, 0x7b, 0x4f, 0x63, 0xf1, 0x75, 0xd3}; ++ ++#endif + + /*--- defines ----------------------------------------------------------------*/ + diff --git a/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-board-descriptor_git.bb b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-board-descriptor_git.bb new file mode 100644 index 0000000..54f85b9 --- /dev/null +++ b/layers/meta-netmodule-legacy-bsp/recipes-bsp/drivers/kernel-module-board-descriptor_git.bb @@ -0,0 +1,27 @@ +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/board-descriptor.git;protocol=ssh;user=gitea;branch=master \ + file://0001-license-key.patch \ + " + +PV = "1.0+git${SRCPV}" +SRCREV="75b608d47b1c98cb66caf9a5d5a82b27990d8bbf" + +S = "${WORKDIR}/git" + +DEPENDS = "virtual/kernel" + +inherit module + +do_install:append() { + install -d ${D}/usr/include/board-descriptor/linux/ + install -m 0755 ${S}/board_descriptor.h ${D}/usr/include/board-descriptor/linux/ + install -m 0755 ${S}/bdparser.h ${D}/usr/include/board-descriptor/linux/ +} + +EXTRA_OEMAKE:append:task-install = " -C ${STAGING_KERNEL_DIR} M=${S}" + +KERNEL_MODULE_AUTOLOAD += " board-descriptor " + 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 c3c72f1..470c1bf 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 @@ -16,6 +16,7 @@ NO_RECOMMENDATIONS = "1" IMAGE_INSTALL:append = " \ coreutils \ ncurses-terminfo-base \ + kernel-module-board-descriptor \ \ networkmanager-nmcli \ systemd-conf \