Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
comment "targetcli-fb needs Python, a glibc toolchain, gcc >= 4.9, host gcc >= 8"
depends on !BR2_PACKAGE_PYTHON3
depends on BR2_USE_MMU
depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS
depends on !BR2_HOST_GCC_AT_LEAST_8 || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
!BR2_TOOLCHAIN_USES_GLIBC
config BR2_PACKAGE_TARGETCLI_FB
bool "targetcli-fb"
depends on BR2_PACKAGE_PYTHON3 # python-configshell-fb
depends on BR2_USE_MMU # python-gobject -> gobject-introspection
depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS # python-gobject -> gobject-introspection
depends on BR2_HOST_GCC_AT_LEAST_8 # python-gobject -> gobject-introspection
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # python-gobject -> gobject-introspection
depends on BR2_TOOLCHAIN_USES_GLIBC # python-gobject -> gobject-introspection
select BR2_PACKAGE_PYTHON_CONFIGSHELL_FB
select BR2_PACKAGE_PYTHON_RTSLIB_FB
select BR2_PACKAGE_PYTHON_SIX
select BR2_PACKAGE_PYTHON_GOBJECT
help
targetcli-fb is a command-line interface for configuring the
LIO generic SCSI target, present in 3.x Linux kernel
versions.
https://github.com/open-iscsi/targetcli-fb

View File

@@ -0,0 +1,46 @@
#!/bin/sh
#
# Restore / clear the Linux "SCSI target" driver configuration with `targetctl`
#
start() {
local ret
printf "Restoring target configuration: "
/usr/bin/targetctl restore >/dev/null 2>&1
ret=$?
echo "done"
return $ret
}
stop() {
local ret
printf "Clearing target configuration: "
/usr/bin/targetctl clear >/dev/null 2>&1
ret=$?
echo "done"
return $ret
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

View File

@@ -0,0 +1,14 @@
[Unit]
Description=Restore LIO kernel target configuration
Requires=sys-kernel-config.mount
After=sys-kernel-config.mount network.target local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/targetctl restore
ExecStop=/usr/bin/targetctl clear
SyslogIdentifier=target
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,3 @@
# locally computed
sha256 605f4e4e4e7189d6a03f11a4f55e7ddb4671002d542c2f684f87dd68391dcdc2 targetcli-fb-2.1.58.tar.gz
sha256 5df2a0d87d6c562f0ea11c688ac52532aa28d744cabc7994ff0537f64b3b3320 COPYING

View File

@@ -0,0 +1,39 @@
################################################################################
#
# targetcli-fb
#
################################################################################
# When upgrading the version, be sure to also upgrade python-rtslib-fb
# and python-configshell-fb at the same time.
TARGETCLI_FB_VERSION = 2.1.58
TARGETCLI_FB_SITE = $(call github,open-iscsi,targetcli-fb,v$(TARGETCLI_FB_VERSION))
TARGETCLI_FB_LICENSE = Apache-2.0
TARGETCLI_FB_LICENSE_FILES = COPYING
TARGETCLI_FB_CPE_ID_VALID = YES
TARGETCLI_FB_SETUP_TYPE = setuptools
TARGETCLI_FB_DEPENDENCIES = \
python-configshell-fb \
python-gobject \
python-rtslib-fb \
python-six
define TARGETCLI_FB_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/targetcli-fb/S50target \
$(TARGET_DIR)/etc/init.d/S50target
endef
define TARGETCLI_FB_INSTALL_INIT_SYSTEMD
$(INSTALL) -m 0644 -D package/targetcli-fb/target.service \
$(TARGET_DIR)/usr/lib/systemd/system/target.service
endef
# Targetcli stores its configuration in /etc/target/saveconfig.json
# and complains if the /etc/target/ directory does not exist.
define TARGETCLI_FB_INSTALL_CONF_DIR
$(INSTALL) -m 0755 -d $(TARGET_DIR)/etc/target
endef
TARGETCLI_FB_POST_INSTALL_TARGET_HOOKS += TARGETCLI_FB_INSTALL_CONF_DIR
$(eval $(python-package))