From aed9b64b710c85cb99d06549abaebbd4f534b49c Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Sat, 17 Jun 2023 04:02:05 +0300 Subject: [PATCH] Make a package for nvme-cli and include it into the waveshare image. Also move there kmod-nvme. --- .buildbot/openwrt/build.sh | 7 ++--- feed/nvme-cli/Makefile | 53 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 feed/nvme-cli/Makefile diff --git a/.buildbot/openwrt/build.sh b/.buildbot/openwrt/build.sh index 3e0f8db..4d6461c 100755 --- a/.buildbot/openwrt/build.sh +++ b/.buildbot/openwrt/build.sh @@ -31,6 +31,7 @@ echo "CONFIG_PACKAGE_COLLECTD_ENCRYPTED_NETWORK=y" >> .config make package/kmod-nvme/compile make package/kmod-i2c-mux-pinctrl/compile make package/kmod-rtc-pcf85063/compile +make package/nvme-cli/compile make package/asterisk-chan-quectel/compile make package/collectd/compile @@ -57,7 +58,7 @@ echo "CONFIG_TARGET_ROOTFS_PARTSIZE=308" >> .config echo "CONFIG_TARGET_ROOTFS_EXT4FS=n" >> .config PACKAGES="kmod-i2c-bcm2835 kmod-i2c-mux kmod-i2c-mux-pinctrl \ - kmod-nf-nathelper-extra kmod-nvme \ + kmod-nf-nathelper-extra \ kmod-rtc-ds1307 kmod-rtc-pcf8563 kmod-rtc-pcf85063 \ kmod-usb-audio kmod-usb-net-rtl8152 \ alsa-lib pciutils usbutils \ @@ -131,8 +132,8 @@ sed -i "s|,i2c_csi_dsi||g" ${BOOTSOURCE}/current.txt make image PROFILE=${PROFILE} \ PACKAGES=" \ - ${PACKAGES} kmod-ata-ahci smartmontools hdparm fdisk parted \ - kmod-hwmon-drivetemp btrfs-progs kmod-fs-btrfs cryptsetup" \ + ${PACKAGES} cryptsetup kmod-ata-ahci smartmontools hdparm fdisk parted \ + kmod-hwmon-drivetemp btrfs-progs kmod-fs-btrfs kmod-nvme nvme-cli" \ DISABLED_SERVICES="dropbear" FILES="files" || exit 1 mv ${IMAGE_PATH}-squashfs-factory.img.gz ${IMAGE_PATH}-squashfs-factory-waveshare.img.gz diff --git a/feed/nvme-cli/Makefile b/feed/nvme-cli/Makefile new file mode 100644 index 0000000..1d74e23 --- /dev/null +++ b/feed/nvme-cli/Makefile @@ -0,0 +1,53 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=nvme-cli +PKG_VERSION:=2.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=v$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/linux-nvme/nvme-cli/archive/refs/tags/ +PKG_HASH:=7f80102a933e3bf46f4f2089cad119c827a363478235f66b89ddaad9ca57d019 +PKG_MAINTAINER:=Lee Miller +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/meson.mk + +define Package/$(PKG_NAME) + SECTION:=utils + CATEGORY:=Utilities + URL:=https://nvmexpress.org/ + TITLE:=NVMe management command line interface + DEPENDS += +libopenssl +endef + +define Package/$(PKG_NAME)/description + NVM-Express user space tooling for Linux. +endef + +MESON_ARGS += --force-fallback-for=libnvme + +define Package/$(PKG_NAME)/conffiles + /etc/nvme/discovery.conf +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nvme $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/json-c $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/nvme $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libnvme*.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{nvme,nvme-mi}.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/etc/nvme + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/etc/nvme/discovery.conf \ + $(1)/etc/nvme + $(INSTALL_DIR) $(1)/lib/udev/rules.d + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/udev/rules.d/*.rules \ + $(1)/lib/udev/rules.d +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) -- 2.45.1