60 Commits

Author SHA1 Message Date
Dariusz Iwanoczko
f4bcc46d1f iop: remove bcom toolchain download function
The download_extract_bcm() function, used for downloading and extracting
BCM toolchains, has been removed. This code is no longer needed after
simplifying the download and extraction flow as part of host package.
2025-11-28 12:42:53 +01:00
Andreas Gnau
9dfa7abce5 iop: Add libtool needed for BCM compilation
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-11-27 00:23:01 +01:00
Andreas Gnau
6a1fa7adb8 iop: Do not install recommended packages
Do not install recommended packages, they just add unnecessary bloat. In
case any recommended package is needed, it can be specified explicitly.

Add ssh which is recommended by git and needed to clone over ssh (for
developers).

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-11-26 18:33:49 +01:00
Olga Kitaina
4a895ff413 iop: scripts: Add openwrt add-remote function
The function allows developers to add openWRT upstream remotes for
feeds that have them, as follows:

```
$ ./iop openwrt add-remote -f base
INFO:root:Adding openwrt remote for feed base
remote: Enumerating objects: 182540, done.
remote: Counting objects: 100% (176637/176637), done.
remote: Compressing objects: 100% (54915/54915), done.
remote: Total 162499 (delta 114492), reused 145733 (delta 101010), pack-reused 0
Receiving objects: 100% (162499/162499), 42.84 MiB | 7.54 MiB/s, done.
Resolving deltas: 100% (114492/114492), completed with 6055 local objects.
From https://git.openwrt.org/openwrt/openwrt
[...]
 * [new tag]               v24.10.4      -> v24.10.4
```

Without any arguments, it will attempt to add remotes for:
 luci base packages routing telephony video

Note that this utility does not support adding OpenWRT remotes
to arbitrary feeds: the script needs to know the upstream URL
for the project it'll be adding remotes for.
2025-10-25 07:45:42 +00:00
Andreas Gnau
c35184b053 iop: Remove host GCC version change code
Remove code for changing host GCC to GCC 4.8. This code has not been in
use since at least IOPSYS 3.7. Remove also the code restoring the gcc
symlinks to the default GCC if /usr/bin/gcc is set to GCC 4.8. This code
has been active all the time, but this was not noticed because it is
very uncommon to set /usr/bin/gcc to 4.8 these days (instead of changing
$CC or other means).

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-10-23 11:06:51 +02:00
Andreas Gnau
0851216e76 iop: return 0 when running --help
When running ./iop --help or ./iop, return 0 instead of 255. Running
--help is and displaying it successfully is not an error. Displaying
help on running without arguments can be considered intended behaviour
not justifying any error code.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-10-16 08:31:22 +00:00
Andreas Gnau
fcac1bd7fa iop: Return 1 instead of 255 on non-existing cmd
Exit codes are usually 8 bit unsigned integers, so returning -1 will
return 255. Use 1 instead of -1 (255) when the subcommand given to iop
does not exist.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-10-04 12:41:17 +02:00
Andreas Gnau
51e7b32fdd iop: Propagate exit code
When a iop subcommand fails, its return code should be propagated to the
caller rather than returning success using exit 0.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-10-04 12:38:26 +02:00
Dariusz Iwanoczko
348e296a2d Dockerfile: Switch docker image base to debian trixie 2025-10-01 19:23:14 +02:00
Dariusz Iwanoczko
281c748f13 Dockerfile: Switch docker base image to Debian bookworm-slim
Ubuntu delete snapshots after some time what could cause a problems with
use packages with specific versions.

This commit move and adapt the Dockerfile to Debian bookworm-slim.
Advantage of Debian over Ubuntu is that that all package versions are
archived via snapshots.debian.org (which we might move to in a later
commit). Ubuntu has a similar service, but does not retain all versions.

Move coccinelle from Debian archives because the version from Debian
works equally well and is even the same version 1.1.1 in bookworm.

Compile python2.7 from source, because it is no longer supplied in the
repos because it has been EOL for a very long time.

Issue: #17329
2025-10-01 19:19:56 +02:00
Piotr Kubik
79e07cc2f3 iop: Sort help commands 2024-09-24 11:01:42 +02:00
Piotr Kubik
8896604cfb iop: genconfig : Source script at top repo 2024-09-24 09:40:56 +02:00
Piotr Kubik
0c6b28ece4 iop: ssh_upgrade: Source script at top repo 2024-09-23 15:16:58 +02:00
Andreas Gnau
244ca5cbed iop: bootstrap: Support no feed/profiles
It is supported to have profiles in both profiles and feeds/profiles. Do
not error if feeds/profiles is not defined in feeds.conf.io and thus
does not exist.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-08-22 17:01:25 +02:00
Arne Jonsson
fba56645c3 iop: Use iop_feed.yml as source for iopsys-feed 2024-04-29 15:00:16 +02:00
Vivek Kumar Dutta
4950f92add iop: Added python3-jsonschema for datamodel validation 2024-04-15 13:18:34 +00:00
Andreas Gnau
ca235173cd iop: set-feed-rev: Add cmd for setting feed revisions
Add script that, given one or more feeds and optional git commit
reference for each feed, updates feeds.conf.io and yml-profiles in
profiles.

By default, a commit with auto-generated commit message is created.
Options are available to push the resulting commit directly or as a
GitLab MR.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-02-15 15:17:27 +00:00
Piotr Kubik
e34e14893e iop: Fix add feeds_update for compatibility
Register new 'feeds_update' at the end to override old 'feeds_update'
registration.
2024-01-26 01:48:17 +01:00
Piotr Kubik
7d670f1e7e iop: Add feeds_update for compatibility"
Feeds are updated by gen_config.py now.
Call bootstrap to update feeds/iopsys for transition
in old/new genconfig state.
2024-01-24 14:18:28 +01:00
Piotr Kubik
e6d4825bac iop: Switch to OpenWrt's profiles - fixes for iop bootstrap
- parse iop.yml to get iopsys feeds rev
- put the result in feeds.conf to make iop happy
- add updating profiles feed
2024-01-24 12:28:04 +01:00
Roman Azarenko
6cf1776bd8 iop: add "libelf-dev" build dependency
Resolves an issue where some packages are unable to build with an error message similar to the one below:

make[9]: *** No rule to make target '/home/dev/iopsyswrt/build_dir/target-x86_64_musl/linux-x86_64/xtables-addons-3.21/extensions/ACCOUNT/xt_ACCOUNT.o', needed by '/home/dev/iopsyswrt/build_dir/target-x86_64_musl/linux-x86_64/xtables-addons-3.21/extensions/ACCOUNT/xt_ACCOUNT.mod'.  Stop.

In particular, this should fix the x86 Docker image build.

src: https://forum.openwrt.org/t/solved-problem-compiling-22-03-4/157221
2023-08-30 09:58:20 +02:00
Andreas Gnau
0361c17435 iop: Run apt-get update before install and exit on error
This prevents failures on outdated or missing package indices.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-05-29 11:49:15 +02:00
Andreas Gnau
f2331101a6 iop: Only download feeds/iopsys
This prevents hard failures in case one does not have access to one of
the other feeds. The other feeds will be cloned by ./iop feeds_update
later.

Fixes: eba2b69adc (iop: bootstrap: return 1 on failure, 2021-05-18)
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-05-24 18:32:17 +00:00
Erik Karlsson
eba2b69adc iop: bootstrap: return 1 on failure
Handle failures correctly so that CI for example will terminate.
2023-05-23 14:51:42 +00:00
arne.jonsson
3a2f99de34 iop: remove legacy toolchains 2023-02-23 13:54:11 +00:00
Andreas Gnau
a1389713cb iop: setup_host: Make /usr/bin/python Python 2
Make /usr/bin/python point to Python 2 as it has been before
aacc789c8b ("iop: setup_host: Add python3-distutils"). This fixes
Broadcom WiFi driver compilation. For now, fix it by adding the package
back. Installing python installs python-is-python2, but by installing
python-is-python2 we avoid repeated prompts because python is not
installed (virtual package).

In the future, we may investigate compiling Broadcom SDK with Python 3
only or with the Python 2 shipped with the toolchain they provide.

Fixes: aacc789c8b ("iop: setup_host: Add python3-distutils")
2022-06-27 13:02:20 +02:00
Andreas Gnau
aacc789c8b iop: setup_host: Add python3-distutils
Add python3-distutils which is required by meson and newer U-Boot
versions. Also explicitly specify python2 in order to prevent repeated
prompts to install it due to python being a virtual package these days.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2022-06-27 07:27:25 +00:00
Piotr Kubik
c3ddae85e2 iop: Restore gcc-9.2 toolchain
crosstool-arm-gcc-9.2 is still needed for wifi.
Commit to be removed once 9.2 is not needed.
2022-05-16 20:03:36 +02:00
Piotr Kubik
004b4fd1a2 iop: Add new BCM toolchain, remove old ones
Add new BCM toolchain needed for BCM SDK 5.04L04 to iop setup_host.
Remove old toolchains.
Add toolchain prefix dir to tar command
since tarballs does not have  it now.
2022-05-16 20:03:36 +02:00
Andreas Gnau
ac354771f5 iop: Install BCM bcawlan-fw-build-post-process-tools 2022-03-11 10:29:13 +00:00
Roman Azarenko
83df785703 iop: add python3-cryptography dependency
Used for root filesystem encryption in userspace.
2021-10-29 11:37:02 +02:00
Roman Azarenko
ffe82083cc iop: add "jq" dependency 2021-09-27 17:16:20 +02:00
Roman Azarenko
8113947140 iop: add "device-tree-compiler" pkg needed for econet 2021-08-05 09:47:07 +02:00
Suru Dissanaike
bc36d99aec removed nodejs and npm
(cherry picked from commit eabeebeca2)
2021-06-03 18:15:31 +00:00
Roman Azarenko
78fcceb663 iop: bump Node.js to v14
(cherry picked from commit af8543ebed)
2021-05-12 13:23:04 +00:00
Kenneth Johansson
ae625136e9 Revert "setup_host: libubox needs libjsoncpp-dev on host to compile."
The problem came back so this was not the reason json.h could not be found.
Never change more than one thing at a time.

This reverts commit ce0dc9c02c.
2021-05-03 12:04:18 +02:00
Kenneth Johansson
ce0dc9c02c setup_host: libubox needs libjsoncpp-dev on host to compile. 2021-05-01 23:49:45 +02:00
Sukru Senli
1df08c699c iop: add libcap-dev to dependency list
required for crun
2021-02-20 11:28:46 +01:00
Sukru Senli
7ed0beca87 iop: install missing dependencies
to be able to compile crun
2021-02-16 14:53:59 +01:00
Andreas Gnau
20f7b8626a iop: Add cryptsetup
Cryptsetup is needed from setting up dm-crypt and dm-verity on BCM
targets. Add it to the host dependencies installed by iop.
2021-02-12 16:18:42 +01:00
Kenneth Johansson
598c32a1c1 iop: fix use of uninitialized variable.
bash got a syntax error in

    if [ $install_arm -eq 1 -o $install_aarch64 -eq 1 -o $install_eabi -eq 1 ]; then

since the variable was not declared.
2021-01-11 15:02:41 +01:00
Janusz Dziedzic
598dd67480 iop: add cmake and quilt
Add cmake and quilt packages.
2020-12-17 14:04:50 +00:00
Roman Azarenko
a1ef0436a2 Revert "iop: bump Node.js to v14"
This reverts commit af8543ebed.
2020-11-04 16:56:41 +01:00
Roman Azarenko
4d3cd2946c iop: add "cpio" dependency 2020-11-04 15:34:37 +01:00
Roman Azarenko
af8543ebed iop: bump Node.js to v14 2020-11-04 13:53:08 +01:00
Roman Azarenko
261024050f iop: manually symlink yarn, since npm is not doing it 2020-11-04 09:55:27 +01:00
Jani Juvan
e615771bb4 adding eabi toolkit to toolchains 2020-10-27 13:33:23 +01:00
Andreas Gnau
1c8eaa496a iop: Add new BCM toolchain, remove old ones
Add new BCM toolchain needed for BCM SDK 5.04 to iop setup_host.
Remove old toolchains since BCM SDK 5.04 is the only supported SDK in
IOPSYSWRT 6.0.
2020-09-21 11:15:45 +02:00
Roman Azarenko
6902333324 docker: upgrade to Ubuntu 20.04 2020-09-11 14:19:48 +02:00
Andreas Gnau
27bd3550d8 iop: Add sgdisk to install script
Add sgdisk utility which is required by BCM SDK 5.04.
2020-09-10 17:46:47 +02:00