Initial Commit
- initial default booting image
This commit is contained in:
11
package/i2c-tools/Config.in
Normal file
11
package/i2c-tools/Config.in
Normal file
@@ -0,0 +1,11 @@
|
||||
config BR2_PACKAGE_I2C_TOOLS
|
||||
bool "i2c-tools"
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
help
|
||||
Heterogeneous set of I2C tools for Linux
|
||||
|
||||
This package contains a heterogeneous set of I2C tools for
|
||||
Linux: a bus probing tool, a chip dumper, register-level
|
||||
access helpers, EEPROM decoding scripts, and more.
|
||||
|
||||
https://i2c.wiki.kernel.org/index.php/I2C_Tools
|
||||
7
package/i2c-tools/i2c-tools.hash
Normal file
7
package/i2c-tools/i2c-tools.hash
Normal file
@@ -0,0 +1,7 @@
|
||||
# From https://www.kernel.org/pub/software/utils/i2c-tools/sha256sums.asc
|
||||
sha256 8b15f0a880ab87280c40cfd7235cfff28134bf14d5646c07518b1ff6642a2473 i2c-tools-4.4.tar.xz
|
||||
|
||||
# License files
|
||||
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LGPL
|
||||
sha256 adcc60d0fdf7b4e2ad22fe8a29d65c260ad3fc619b3105439b70914df5f6b5a8 README
|
||||
68
package/i2c-tools/i2c-tools.mk
Normal file
68
package/i2c-tools/i2c-tools.mk
Normal file
@@ -0,0 +1,68 @@
|
||||
################################################################################
|
||||
#
|
||||
# i2c-tools
|
||||
#
|
||||
################################################################################
|
||||
|
||||
I2C_TOOLS_VERSION = 4.4
|
||||
I2C_TOOLS_SOURCE = i2c-tools-$(I2C_TOOLS_VERSION).tar.xz
|
||||
I2C_TOOLS_SITE = https://www.kernel.org/pub/software/utils/i2c-tools
|
||||
I2C_TOOLS_LICENSE = GPL-2.0+, GPL-2.0 (py-smbus), LGPL-2.1+ (libi2c)
|
||||
I2C_TOOLS_LICENSE_FILES = COPYING COPYING.LGPL README
|
||||
I2C_TOOLS_CPE_ID_VALID = YES
|
||||
I2C_TOOLS_MAKE_OPTS = EXTRA=eeprog
|
||||
I2C_TOOLS_INSTALL_STAGING = YES
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
||||
I2C_TOOLS_DEPENDENCIES += host-python-setuptools python3
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
I2C_TOOLS_MAKE_OPTS += BUILD_DYNAMIC_LIB=0 USE_STATIC_LIB=1
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_SHARED_LIBS),y)
|
||||
I2C_TOOLS_MAKE_OPTS += BUILD_STATIC_LIB=0
|
||||
endif
|
||||
|
||||
# Build/install steps mirror the distutil python package type in the python package
|
||||
# infrastructure
|
||||
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
||||
# BASE_ENV taken from PKG_PYTHON_SETUPTOOLS_ENV in package/pkg-python.mk
|
||||
I2C_TOOLS_PYTHON_BASE_ENV = \
|
||||
$(PKG_PYTHON_SETUPTOOLS_ENV) \
|
||||
CFLAGS="$(TARGET_CFLAGS) -I../include"
|
||||
|
||||
define I2C_TOOLS_BUILD_PYSMBUS
|
||||
(cd $(@D)/py-smbus; \
|
||||
$(I2C_TOOLS_PYTHON_BASE_ENV) \
|
||||
$(HOST_DIR)/bin/python setup.py build)
|
||||
endef
|
||||
|
||||
define I2C_TOOLS_INSTALL_PYSMBUS
|
||||
(cd $(@D)/py-smbus; \
|
||||
$(I2C_TOOLS_PYTHON_BASE_ENV) \
|
||||
$(HOST_DIR)/bin/python setup.py install \
|
||||
$(PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS) \
|
||||
--root=$(TARGET_DIR))
|
||||
endef
|
||||
|
||||
endif # BR2_PACKAGE_PYTHON3
|
||||
|
||||
define I2C_TOOLS_BUILD_CMDS
|
||||
$(MAKE) $(TARGET_CONFIGURE_OPTS) $(I2C_TOOLS_MAKE_OPTS) -C $(@D)
|
||||
$(I2C_TOOLS_BUILD_PYSMBUS)
|
||||
endef
|
||||
|
||||
define I2C_TOOLS_INSTALL_TARGET_CMDS
|
||||
$(MAKE) $(TARGET_CONFIGURE_OPTS) $(I2C_TOOLS_MAKE_OPTS) \
|
||||
DESTDIR="$(TARGET_DIR)" PREFIX=/usr -C $(@D) install
|
||||
$(I2C_TOOLS_INSTALL_PYSMBUS)
|
||||
endef
|
||||
|
||||
define I2C_TOOLS_INSTALL_STAGING_CMDS
|
||||
$(MAKE) $(TARGET_CONFIGURE_OPTS) $(I2C_TOOLS_MAKE_OPTS) \
|
||||
DESTDIR="$(STAGING_DIR)" PREFIX=/usr -C $(@D) install
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user