mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-14 12:18:06 +08:00
update 2026-10-20 17:03:51
This commit is contained in:
1 parent
ab408c1971
commit
57c1b033cd
278 files changed
+109653
-35
No files matched your search
+21
-22
@@ -24,31 +24,14 @@ jobs:
|
||||
name: Prepare version and matrix
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release_tag: ${{ steps.meta.outputs.release_tag }}
|
||||
release_name: ${{ steps.meta.outputs.release_name }}
|
||||
release_tag: ${{ steps.matrix.outputs.release_tag }}
|
||||
release_name: ${{ steps.matrix.outputs.release_name }}
|
||||
sdks: ${{ steps.matrix.outputs.sdks }}
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Generate version metadata
|
||||
id: meta
|
||||
shell: bash
|
||||
run: |
|
||||
pkg_release=$(grep '^PKG_RELEASE:=' Makefile | head -n 1 | cut -d= -f2 | tr -d '[:space:]')
|
||||
date_tag=$(date +'%Y%m%d')
|
||||
short_sha=$(git rev-parse --short HEAD)
|
||||
|
||||
release_tag="vmlinux-btf_r${pkg_release}_${date_tag}_${short_sha}"
|
||||
release_name="vmlinux-btf r${pkg_release} (${date_tag})"
|
||||
|
||||
echo "release_tag=${release_tag}" >> "$GITHUB_OUTPUT"
|
||||
echo "release_name=${release_name}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
echo "Release tag: ${release_tag}"
|
||||
echo "Release name: ${release_name}"
|
||||
|
||||
- name: Resolve latest SDK releases
|
||||
- name: Resolve latest SDK releases and metadata
|
||||
id: matrix
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -86,6 +69,22 @@ jobs:
|
||||
|
||||
echo "sdks=$(jq -nc --args '$ARGS.positional' -- "${sdks[@]}")" >> "$GITHUB_OUTPUT"
|
||||
|
||||
pkg_release=$(grep '^PKG_RELEASE:=' Makefile | head -n 1 | cut -d= -f2 | tr -d '[:space:]')
|
||||
date_tag=$(date +'%Y%m%d')
|
||||
short_sha=$(git rev-parse --short HEAD)
|
||||
|
||||
target_vers=$(IFS=, ; echo "${sdks[*]}")
|
||||
target_vers_tag=$(IFS=_ ; echo "${sdks[*]}")
|
||||
|
||||
release_name="vmlinux-btf r${pkg_release} for OpenWrt ${target_vers} (${date_tag})"
|
||||
release_tag="vmlinux-btf_r${pkg_release}_openwrt-${target_vers_tag}_${date_tag}_${short_sha}"
|
||||
|
||||
echo "release_name=${release_name}" >> "$GITHUB_OUTPUT"
|
||||
echo "release_tag=${release_tag}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
echo "Release name: ${release_name}"
|
||||
echo "Release tag: ${release_tag}"
|
||||
|
||||
build:
|
||||
name: Build ${{ matrix.arch }}-openwrt-${{ matrix.sdk }}
|
||||
runs-on: ubuntu-latest
|
||||
@@ -178,7 +177,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
echo "=== Built package files ==="
|
||||
find artifacts -type f | grep -E '\.(ipk|apk)$' || true
|
||||
find artifacts -type f \( -name "vmlinux-btf*.ipk" -o -name "vmlinux-btf*.apk" \) || true
|
||||
echo "==========================="
|
||||
|
||||
- name: Prepare renamed artifacts
|
||||
@@ -201,7 +200,7 @@ jobs:
|
||||
fi
|
||||
|
||||
cp "$f" "dist/${new_name}"
|
||||
done < <(find artifacts -type f \( -name "*.ipk" -o -name "*.apk" \) 2>/dev/null)
|
||||
done < <(find artifacts -type f \( -name "vmlinux-btf*.ipk" -o -name "vmlinux-btf*.apk" \) 2>/dev/null)
|
||||
|
||||
if [ "$found" -eq 0 ]; then
|
||||
echo "::error::No package files found in artifacts"
|
||||
|
||||
@@ -35,6 +35,7 @@ define Package/vmlinux-btf/prerm
|
||||
#!/bin/sh
|
||||
[ -n "$${IPKG_INSTROOT}" ] || rm -f /usr/lib/debug/boot/vmlinux-$$(uname -r)
|
||||
endef
|
||||
|
||||
BTF_CC ?= $(if $(TARGET_CC_NOCACHE),$(TARGET_CC_NOCACHE),$(TARGET_CROSS)gcc)
|
||||
BTF_PAHOLE ?= $(firstword \
|
||||
$(wildcard $(STAGING_DIR_HOST)/bin/pahole /usr/bin/pahole /usr/local/bin/pahole) \
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
#if __has_include(<net/netdev_rx_queue.h>)
|
||||
#include <net/netdev_rx_queue.h>
|
||||
BTF_KEEP(netdev_rx_queue, struct netdev_rx_queue);
|
||||
#endif
|
||||
|
||||
#if __has_include(<linux/bpf_iter.h>)
|
||||
@@ -60,7 +61,6 @@ BTF_KEEP(module, struct module);
|
||||
BTF_KEEP(sk_buff, struct sk_buff);
|
||||
BTF_KEEP(net_device, struct net_device);
|
||||
BTF_KEEP(netdev_queue, struct netdev_queue);
|
||||
BTF_KEEP(netdev_rx_queue, struct netdev_rx_queue);
|
||||
BTF_KEEP(sock, struct sock);
|
||||
BTF_KEEP(inet_sock, struct inet_sock);
|
||||
BTF_KEEP(inet_connection_sock, struct inet_connection_sock);
|
||||
@@ -73,4 +73,4 @@ BTF_KEEP(xdp_buff, struct xdp_buff);
|
||||
BTF_KEEP(bpf_perf_event_data, struct bpf_perf_event_data);
|
||||
#if IS_ENABLED(CONFIG_CGROUPS)
|
||||
BTF_KEEP(cgroup, struct cgroup);
|
||||
#endif
|
||||
#endif
|
||||
@@ -76,4 +76,4 @@ BTF_KEEP(tcf_result, struct tcf_result);
|
||||
#if IS_ENABLED(CONFIG_XDP_SOCKETS) && __has_include(<net/xdp_sock.h>)
|
||||
#include <net/xdp_sock.h>
|
||||
BTF_KEEP(xdp_sock, struct xdp_sock);
|
||||
#endif
|
||||
#endif
|
||||
@@ -20,4 +20,4 @@ BTF_KEEP(net_bridge_port, struct net_bridge_port);
|
||||
#if __has_include("fs/mount.h")
|
||||
#include "fs/mount.h"
|
||||
BTF_KEEP(mount, struct mount);
|
||||
#endif
|
||||
#endif
|
||||
Reference in new issue
Block a user