From a1c41475a01e2e782d8cf93d1224dc7ce1e8fab4 Mon Sep 17 00:00:00 2001 From: "henrique.garcia" Date: Fri, 30 Sep 2022 17:56:20 -0300 Subject: Add tdx-info recipe tdx-info is a shell script that makes it easy to get information from Toradex's module (and potentially, any machine). The script is capable of showing the following information: bootloader (version, vendor, some variables), kernel (version, command line arguments), distro, hostname, related to Toradex's hardware (module's full name and version, serial number, Toradex's Product ID and Revision), device tree (device trees available, device tree loaded, device tree overlays available, device tree overlays enabled), devices in /dev, kernel modules loaded. tdx-info requires read access (write access as well when stated) to the following files/folders: /proc/cmdline, /etc/os-release, /etc/issue, /etc/hostname, /proc/device-tree/model, /proc/device-tree/serial-number, /proc/device-tree/toradex,product-id, /proc/device-tree/toradex,board-rev, /proc/device-tree/chosen/u-boot,version, /boot, /boot/overlays, /boot/overlays.txt, /dev, write access to the home of the current user (/home/) . Examples of tdx-info usage on a Verdin iMX8M Plus running Reference Minimal Image from Toradex's BSP 5.7 Software summary ------------------------------------------------------------ Bootloader: U-Boot Kernel version: 5.4.193-5.7.0+git.f78299297185 #1 SMP PREEMPT Mon Jul 11 14:42:03 UTC 2022 Kernel command line: root=PARTUUID=a406e573-02 ro rootwait console=tty1 console=ttymxc2,115200 consoleblank=0 earlycon Distro name: NAME="TDX Wayland with XWayland" Distro version: VERSION_ID=5.7.0-build.20 Hostname: verdin-imx8mp-06849036 ----------------------------------------------------------- For more details see https://github.com/toradex/tdx-info/blob/master/README.md Signed-off-by: Henrique Garcia (cherry picked from commit 042bdd4004a3cd21422104324077a3ce34594bc9) --- recipes-support/tdx-info/tdx-info_0.1.1.bb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 recipes-support/tdx-info/tdx-info_0.1.1.bb (limited to 'recipes-support/tdx-info') diff --git a/recipes-support/tdx-info/tdx-info_0.1.1.bb b/recipes-support/tdx-info/tdx-info_0.1.1.bb new file mode 100644 index 0000000..61ee751 --- /dev/null +++ b/recipes-support/tdx-info/tdx-info_0.1.1.bb @@ -0,0 +1,16 @@ +SUMMARY = "Script to get useful information about Toradex Hardware." +DESCRIPTION = "This script can be used by Toradex customers in userspace to grab information from the module and share it with Toradex Support Team" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c38c9404df9658111a87d5090719fb44" + +SRC_URI = "git://github.com/toradex/tdx-info;protocol=https;branch=v${PV}" +SRCREV = "80840350f00965e9862a354a1bd870954f8af18e" + +S = "${WORKDIR}/git" + +inherit allarch + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/tdx-info ${D}${bindir} +} -- cgit v1.2.3