Add hack to consume configs from custom-devices in a separate feed
custom-devices, but only in that feed and not in other feeds. There is
no value in implementing a generic solution, because the whole genconfig
system will be replaced with something else.
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Move feed-devices generation earlier, before target installation to
ensure that generated files are correct earlier.
Fixes: 3472f88614 ("iop: feeds_update: Generate list of feed-devices dirs")
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
During feeds_update, generate a list of directories that contain
additional device profiles. Via some includes in the target image
Makefiles, any <BOARD/image/<SUBTARGET>.mk inside those directories will
get included, thus allowing to extend the list of devices from an
external feed. Motivation for this is that the external feed might have
a different access permission than the target-definition.
This code should probably live in the Perl script scripts/feeds in the
future, but for now, while we are experimenting with the feature, the
existing approach in feeds_update is considered good enough.
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
A recent change broke genconfig for targets with hyphens. Fix this.
Fixes: a22898c92b ("iop: genconfig: Get subtarget using data from OpenWrt")
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Determine the subtarget for a given device using data generated from the
OpenWrt build system instead of parsing the image makefiles directly.
This provides correct results even when fancy tricks like includes
inside the Makefiles are used, which is the case for an upcoming feature
where additional devices can be defined in external feeds.
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
OpenWrt normalises the version number in the image name to lowercase.
For consistency set the version already in lowercase in the config so
that there is not inconsistency between the version stored in
/etc/os-release and the image name.
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Use a new version format:
* More strict regex for filtering tags for determining version which
prevents OpenWrt and hopefully other tags from becoming the IOWRT
version
* version follows standard git-describe format with -dirty
* customerconfigs are appended to the version
Example-versions:
* 7.1.0BETA1
* 7.1.0BETA1-29-g1292f9102e-dirty
* 7.1.0BETA1-29-g1292f9102e-secureboot
* 7.1.0BETA1-29-g1292f9102e-securebooteval
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
The tempfile has been deprecated for a long time and is no longer
available on RHEL and Fedora, use mktemp instead.
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Use SSH with a pipe to transfer the file and invoke sysupgrade in one
go. Using SSH instead of SCP gives a higher throughput (not very
noticable for small files like the ones we use for sysupgrade, though),
but using only one command invocation saves a significant overhead of
TCP and SSH connection setup.
The main reason for this change is though that OpenSSH 9.0 and later
use SFTP instead of the scp protocol when using the scp command in an
effort of deprecating the very clunky legacy SCP protocol. One can use
scp -O to continue using scp, but switching to ssh only has other
benefits outlined above.
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
iopu has been removed in IOWRT 6 and has never really been supported.
Remove any support for it in the ssh_upgrade helper script.
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Adapt genconfig to generate the correct config after the change to the
target-subtarget-device in target iopsys_brcm63xx_arm in feeds/targets.
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Workaround a bug in the OpenWrt build system that was introduced when
the installed target path had been moved to target/linux/feeds.
Config.in and Makefile from installed targets are not properly included
from the new location. This hack is to be removed once the issues are
fixed.
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
The file was indented with a mix of spaces and tabs. Unify formating by
running shfmt on the file.
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Similarly to 986fc5ea (Make dev-check check for SSH instead of non-HTTP,
2020-06-23), check for SSH instead of whether the repo was cloned via
HTTP. Developers might have other remotes such as OpenWrt's configured.
Remove CONFIG_TARGET_MULTI_PROFILE=y and
CONFIG_TARGET_PER_DEVICE_ROOTFS=y that were hardcoded in genconfig and
genconfig_min. Since feeds/targets commit 295d1566 (treewide: Add
MULTI_PROFILE and PER_DEVICE_ROOTFS config, 2021-08-05), the options are
added in feeds/targets.
Also bring the unmaintainable copy-paste of genconfig that is
genconfig_min in sync with genconfig with regards target-specific config
options.
Unify the iop-subcommands install_key and ssh_install_key to one script.
In addition:
* Support new key types such as ssh-ed25519 which is supported by
Dropbear nowadays. Also add unsupported ones to make them work
automatically in the future.
* For the install_key command, do not re-add keys already added
* Read keys loaded into SSH Agent as well, which is useful when working
with agent forwarding on a remote host or in a Docker container.
* For the ssh_install_key command also add keys added manually to the
build dir.