Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
54
package/utils/usbgadget/Makefile
Normal file
54
package/utils/usbgadget/Makefile
Normal file
@@ -0,0 +1,54 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=usbgadget
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=BSD-2-Clause
|
||||
|
||||
PKG_MAINTAINER:=Chuanhong Guo <gch981213@gmail.com>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=@USB_GADGET_SUPPORT +kmod-usb-gadget +kmod-usb-lib-composite
|
||||
TITLE:=init script to create USB gadgets
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
|
||||
$(INSTALL_CONF) ./files/usbgadget.conf $(1)/etc/config/usbgadget
|
||||
$(INSTALL_BIN) ./files/usbgadget.init $(1)/etc/init.d/usbgadget
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
# 1: short name
|
||||
# 2: description
|
||||
# 3: dependencies on other packages
|
||||
define GadgetPreset
|
||||
define Package/$(PKG_NAME)-$(1)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE+= $(2) gadget preset
|
||||
DEPENDS+= $(3)
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)-$(1)/description
|
||||
This package contains the USB gadget preset for $(3).
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)-$(1)/install
|
||||
$(INSTALL_DIR) $$(1)/usr/share/usbgadget
|
||||
$(INSTALL_CONF) ./files/presets/$(1) $$(1)/usr/share/usbgadget
|
||||
endef
|
||||
|
||||
$$(eval $$(call BuildPackage,$(PKG_NAME)-$(1)))
|
||||
endef
|
||||
|
||||
$(eval $(call GadgetPreset,ncm,CDC-NCM,+kmod-usb-gadget-ncm))
|
||||
$(eval $(call GadgetPreset,acm,CDC-ACM,+kmod-usb-gadget-serial))
|
||||
Reference in New Issue
Block a user