Commit Graph

2272 Commits

Author SHA1 Message Date
Vincent Li
31af08151a pwru: ebpf pwru tool addon for network diagnosis
pwru is ebpf based kernel tracing tool for network
issue diagnosis. pwru build issue on loongfire [0]

to prepare to run pwru on loongfire:

mount -t debugfs none /sys/kernel/debug
echo 0 > /proc/sys/kernel/kptr_restrict

[0]: https://github.com/cilium/pwru/issues/559#issuecomment-2949507451

Signed-off-by: Vinent Li <vincent.mc.li@gmail.com>
2025-06-09 09:00:18 -07:00
Vincent Li
fb79d84593 ply: add ply addon for tracing
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-04 17:57:52 -07:00
Vincent Li
52604d1d8f libbpf-bootstrap: add ebpf tracing program
Similar to xdp-tools to add ebpf network program.
we can use libbpf-bootstrap as facility to add ebpf
tracing program.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-19 08:38:25 -07:00
Vincent Li
8c8be5e746 bcc: add bcc libbcc for bpftrace
bpftrace depends on libbcc, so add bcc in build.
bcc build depends on zip, but loongfire does not
have zip

workaround:

copy loongson host Fedora zip command to chroot build
cp /usr/bin/zip to build_loongarch64/usr/bin

Fedora zip depends on libbz2.so.1, libbz2 is from bzip2
addon that loongfire already has, so make symbolic link

cd build_loongarch64/lib64; ln -s libbz2.so.1.0.8 libbz2.so.1

we should build zip addon for loongfire but zip has build error
need to resolve zip build error as long term solution

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-17 17:31:27 -07:00
Vincent Li
01b6865f4b Perl: Add Net ISP load balancer
Perl Net-ISP-Balance can be used for ISP Internet connection
load balancing [0], it depends on Net-Netmask module.

[0]: https://lstein.github.io/Net-ISP-Balance/

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-16 14:06:08 -07:00
Vincent Li
04a4907087 loxicmd: add loxicmd for loongarch64
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-01-29 08:36:00 -08:00
Vincent Li
beb7cdabf7 loxilb: add loxilb 0.9.8 addon for loongarch64
loxilb ebpf program relies on libbpf 0.8
which does not have loongarch64 support.
backported libbpf 1.2.3 loongarch support
to libbpf 0.8

loxilb 0.9.8 now load ebpf program through
libbpf, no external ntc command required, so
remove ntc

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-01-28 19:09:10 -08:00
Vincent Li
c0a92ea299 packages: add loongarch64 directory
add loongarch64 directory similar to riscv
with samba. missing loongarch64 directory and
a package under it will result package build
error:

ERROR: No such file or directory: BASEDIR/README.md

fix: https://github.com/vincentmli/BPFire/issues/71

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-01-14 12:14:55 -08:00
Vincent Li
ba2e5b4323 make.sh: add build_package to build packages
sometime we only want to build package so we can
just ./make.sh build_package and skip other build
processes.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-01-13 18:36:51 -08:00
Vincent Li
cfefb2a884 xdp-tools: add xdp-tools
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-22 11:28:31 -08:00
Vincent Li
708556b443 libbpf: add libbpf
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-21 17:56:33 -08:00
Vincent Li
379faf9f47 suricata: enable compile and install suricata
add rust back and enable compile and install suricata

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-21 15:50:47 -08:00
Vincent Li
1c3c9da5cf llvm-project: add llvm/clang to compile BPF program
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-21 10:20:12 -08:00
Vincent Li
2e5f7966ac yt6801: add yt6801 driver for loongson NUC
yt6801 ethernet driver is out of kernel tree
add lfs/yt6801 to build yt6801 driver

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-20 14:05:08 -08:00
Vincent Li
ae6af66e21 pahole: add pahole for kernel BTF generation
CONFIG_DEBUG_INFO_BTF=y requires pahole installed

steps to prepare pahole:

git clone --recurse-submodules  https://kernel.googlesource.com/pub/scm/devel/pahole/pahole.git
cd pahole
git checkout -b v1.28 v1.28
cd ..
mv pahole pahole-1.28
tar czvf pahole-1.28.tar.gz pahole-1.28
b2sum pahole-1.28.tar.gz

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-20 08:06:59 -08:00
Vincent Li
5a8bacb23d linux: upgrade kernel to 6.12.5
upgrade kernel to 6.12.5 with Loongson ethernet
controller driver support.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-19 11:54:06 -08:00
Vincent Li
23ae73dde4 loongarch64: major changes for flash image and iso
Initial list of changes required to build iso
and flash image successfully:

1 softwares require config.guess and config.stub
  update with loongarch support

2 no rust build and no suricata which depends on rust

3 comment out python 3.10 lib-dynload and config-3.10-xxxMACHINExxx-linux-gnu

4 lfs/cdrom lfs/Config loongarch seems requiring capital EFI boot image name
  to boot properly

5 comment out a few softwares that are not needed for now

iso can be installed to loongarch PC hard drive, but
fail to boot.

flash image can be dd to USB drive, then boot loongarch
PC from USB drive, then dd from USB drive to loongarch
PC hard drive

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-19 11:42:59 -08:00
Vincent Li
8a0ca16bae Loongarch64: initial change for tool chain build
1. add loongarch64 in make.sh

2. updated many source tar balls with config.guss
   and config.sub with loongarch64 support

3. remove rust and surricata for now

4. workaround binary env dynamic linker missing
   by symbolic link tools_loongarch64/lib to lib64
   when ./make.sh build

   cd build_loongarch64; ln -s tools_loongarch64/lib lib64

./make.sh toolchain to build tool chain
./make clean to start fresh
./make.sh gettoolchain to extract tool chaina from cache
./make.sh build to build software and image

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-15 09:09:28 -08:00
Michael Tremer
40571258e8 make.sh: Check for changes in logs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-10-16 16:40:50 +00:00
Michael Tremer
60b5c6c2bd make.sh: Avoid finding non-existant rootfiles
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-10-14 09:03:23 +00:00
Michael Tremer
32ec5667d9 make.sh: Show rootfiles that contain some architecture
Previously, make.sh just failed but did not explain why it was unhappy.

This patch adds a message which rootfiles contain which architecture.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-10-12 09:38:25 +00:00
Adolf Belka
1af2530c07 lcdproc: removal as discussed in Conf call 7th Oct
- removal of lfs, rootfile and config files
- backup includes file is also removed, althouigh it was an empty file, so not backing
   anything up.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-10-09 18:25:56 +00:00
Adolf Belka
5fd4ca19a8 mpfire: removal as discussed in Conf call 7th Oct
- removal of lfs, rootfile, backup, paks, misc-progs, mpfire perl, language file
   content, mpfire.cgi, mpfire menu references and files, mpfire specific image,
   web-user-interface references and references in manualpages.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-10-09 18:25:53 +00:00
Adolf Belka
c2cd03024f miniupnpc: Required for build of transmission to replace bundled version
- miniupnpc is required for the build of transmiossion but the bundled version was not
   working properly with version 4.0.6 and we prefer to not use bundled versions.
- Only used for the build so rootfile is 100% commented out. No miniupnpc installed
   on IPFire.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-24 10:03:22 +00:00
Michael Tremer
6ca5fb74ab Merge branch 'master' into next 2024-09-24 08:54:50 +00:00
Michael Tremer
aab8f48aae make.sh: Flag rootfiles that have lines starting with + or -
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-23 19:35:24 +00:00
Adolf Belka
49cebd0a20 make.sh: Fixes bug13640 - removal of perl modules that are now core modules
- Removed
	perl-Archive-Tar
	perl-Compress-Zlib
	perl-Digest
	perl-Digest-HMAC
	perl-Digest-SHA1
	perl-JSON
	perl-MIME-Base64
- Tested out on a vm system and no issues identified.

Fixes: bug13640
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-16 17:06:02 +00:00
Michael Tremer
9e44d2ccf4 Start Core Update 190
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-16 17:01:55 +00:00
Michael Tremer
2b0ecf4df5 make.sh: Use devtmpfs to initialize /dev
If we set up our /dev manually, we fail to deal with dynmically allocated loop
devices which are more common on modern distributions.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-12 09:17:05 +00:00
Michael Tremer
7a4ae74547 Revert "make.sh: Bind-mount all loop devices"
This reverts commit 7ad12edfb0.

This patch does not fix the original problem and still leaves the build
environment without usable loop devices.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-12 09:07:02 +00:00
Michael Tremer
7ad12edfb0 make.sh: Bind-mount all loop devices
There seems to be a different way how to create loop devices. On my
Debian system, the first loop device is a block device with major=7 and
minor=0, the second device is major=7 and minor=1, and so on.

On a system running Grml, the second loop device has major=7 and
minor=32, and all following ones are increasing their minor by 32
as well instead of one.

Since I don't have an easy way to detect this, we will simply bind-mount
all available loop devices in to the build environment.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-11 09:31:43 +00:00
Michael Tremer
07f6a51a20 make.sh: Copy the proxy configuration whenever we enable networking
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-10 16:30:31 +00:00
Michael Tremer
656e3b79ca make.sh: Silence an error when we have low space in a fresh environment
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-05 09:50:59 +00:00
Adolf Belka
82c9e495d5 dtc: update to version 1.7.1 and move to before qemu build
- Update from version 1.6.1 to 1.7.1
- Move to before qemu build as it now requires a system libfdt for build as the bundled
   version has been removed.
- Change HOME= to HOME=/usr so that the include files are placed in /usr/include which
   is where qemu is looking for them when it checks that libfdt is available.
- Update disable_Werror patch to take account of differences in the source tarball
- Update of architectures from only aarch64 to all.
- Move rootfile from common/aarch64 to common/
- The previous fdt python files were commented out, hence not used at runtime and are
   not needed at buildtime. From 9.0.1 onwards they require swig and python to be built
   but as they are not needed there was no point to move swig to before dtc
- Changelog
    1.7.1
	 * dtc
	   * Fix -Oasm output on PA-RISC by avoiding ';' separators
	   * Put symbolic label references in -Odts output when possible
	   * Add label relative path references
	   * Don't incorrectly attempt to create fixups for reference to path
	     in overlays
	   * Warning rather than hard error if integer expression results are
	     truncated due to cell size
	 * libfdt
	   * Add fdt_get_property_by_offset_w() function
	 * pylibfdt
	   * Fixed to work with Python 3.10
	   * A number of extra methods
	   * Fix out of tree build
	 * fdtget
	   * Add raw bytes output mode
	 * General
	   * Fixes for mixed-signedness comparison warnings
	   * Assorted other warning fixes
	   * Assorted updates to checks
	   * Assorted bugfixes
	   * Fix scripts to work with dash as well as bash
	   * Allow static builds
	   * Formalize Signed-off-by usage

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-04 21:48:22 +00:00
Michael Tremer
a54da99100 make.sh: Require at least 8 GiB of space for the build
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-03 18:42:41 +00:00
Michael Tremer
a50bd44c44 make.sh: Subtract any used space for the space check
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-03 18:42:25 +00:00
Adolf Belka
a04f94ff7a libxxhash: New install, required by borgbackup version 1.4.0
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-30 15:44:23 +00:00
Michael Tremer
faccfa7075 make.sh: Don't try to create a time NS on older kernels
This is not supported on kernels < 5.6.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-28 15:41:55 +00:00
Michael Tremer
5e8730eb9a make.sh: Bind-mount /proc as a workaround for unshare
unshare seems to want to change the mount propagation for /proc
before it has been mounted. In order to workaround that problem,
we bind-mount /proc to itself before.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-28 15:28:42 +00:00
Michael Tremer
36c9bf685e make.sh: Bump the toolchain version
This is because of the recent update of binutils.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-27 10:22:22 +00:00
Adolf Belka
9d58c441e2 bind: Update to version 9.20.1
- Update from version 9.16.50 to 9.20.1
- Update of rootfile
- The use of liburcu has replaced isc_qsbr in 9.19.4 and therefore the position of
   liburcu in make.sh had to be changed.
- --enable-threads, --with-libtool, --without-python & --disable-linux-caps are no longer
   reconised configure options (it looks like not recognised for a while.
   --without-python is explicitly mentioned as being removed in version 9.15.7
   The others are not mentioned in the changelog notes.
- The lib/bind9 and lib/irs directories in the source tarball have been removed. The
   The comtents of lib/bind9 have been moved to lib/isc and lib/isccfg and the contents
   of lib/irs have been moved to dns.
- The order of the make instructions had to be changed as lib/isccfg required the results
   of lib/dns and the build failed without it. Changing the order solved the build problem.
- A large number of CVE fixes have been applied between the new and old version.
	5	9.20.0
	2	9.19.21
	3	9.19.20
	1	9.19.17
	1	9.19.14
	3	9.19.9
	5	9.19.5
	1	9.19.1
	4	9.19.0
	1	9.17.19
	1	9.17.17
	2	9.17.12
	5	9.17.4
	4	9.17.2
- Changelog is too long to include here - around 5000 lines. For details see the NEWS file
   in the source tarball.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-26 08:13:25 +00:00
Michael Tremer
fb0aac9beb Start Core Update 189
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-23 09:53:22 +00:00
Michael Tremer
d1f7d501c1 Merge remote-tracking branch 'ms/toolchain-2024-08-02' into next 2024-08-23 09:51:19 +00:00
Michael Tremer
5be3501e7c make.sh: Integrate the rootfile consistency check
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-23 09:50:39 +00:00
Michael Tremer
deb9501433 make.sh: Refactor the broken rootfile check
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-23 09:33:31 +00:00
Michael Tremer
787d9428af make.sh: Fix printing the total build time
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-23 09:19:49 +00:00
Michael Tremer
2b4d457c2f Revert "make.sh: Swap mount propagation"
This reverts commit f3c360cd6e.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-21 14:36:11 +00:00
Michael Tremer
9a07118b71 make.sh: Remove the brackets from build options
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-21 14:29:58 +00:00
Michael Tremer
048d2be91a make.sh: Remove all traces of KCFG
This variable is no longer been used and has been abused way too much in
the past. May it rest in pieces.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-20 16:08:32 +00:00
Michael Tremer
0a110703ca Revert "make.sh: Fix build with kernels < 6.0.0"
This reverts commit 8ea702f3f8.

This commit seems to introduce many more regressions when building
packages which I cannot easily reproduce.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-20 08:39:24 +00:00