Compare commits
282 Commits
openwrt-21
...
v18.06.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03b693064b | ||
|
|
b0b5c64c22 | ||
|
|
3442ec5d57 | ||
|
|
f4798d37f1 | ||
|
|
a3dd6c939d | ||
|
|
11a5128b98 | ||
|
|
21ad5fb1ea | ||
|
|
4dc0ff8183 | ||
|
|
f24e012997 | ||
|
|
d4a4f06589 | ||
|
|
4a39d8cfd0 | ||
|
|
cb73dd21a3 | ||
|
|
bb06f6d3ba | ||
|
|
c8e8ff1c9f | ||
|
|
ca0c649a38 | ||
|
|
cf5a892430 | ||
|
|
bf1b0fad2b | ||
|
|
cb9d5f0a7c | ||
|
|
962e86d9af | ||
|
|
29aab93ea2 | ||
|
|
4e7f4777b0 | ||
|
|
da0dd6adc2 | ||
|
|
3f0d44b8de | ||
|
|
69021e9b89 | ||
|
|
6302f0161b | ||
|
|
f91a0f3b1a | ||
|
|
f1dbfa1937 | ||
|
|
ff91b32d26 | ||
|
|
b84a1c56f3 | ||
|
|
90b15b00a2 | ||
|
|
a80276235a | ||
|
|
5b12057d7c | ||
|
|
8a0ad2660a | ||
|
|
a297324a13 | ||
|
|
1e48546a6a | ||
|
|
f8cc68670f | ||
|
|
1086408b17 | ||
|
|
5dca299fab | ||
|
|
5889cf70e9 | ||
|
|
393ee8d0b2 | ||
|
|
c9c0fc28a9 | ||
|
|
aee917a5a2 | ||
|
|
3539430b3d | ||
|
|
6363377c47 | ||
|
|
ce8cab388a | ||
|
|
dc52b7b104 | ||
|
|
7fc7128b08 | ||
|
|
4de335bdbe | ||
|
|
e4d0ee5af5 | ||
|
|
a7b2764879 | ||
|
|
bc7abe8729 | ||
|
|
c99c70e053 | ||
|
|
3e81365141 | ||
|
|
dd1f97b37d | ||
|
|
68f40d7ecc | ||
|
|
16a9ddfe64 | ||
|
|
0e6cfb6919 | ||
|
|
514a4b3e1b | ||
|
|
3e89f58a5e | ||
|
|
7fa7c854fe | ||
|
|
a5b9553cf5 | ||
|
|
2f306873ef | ||
|
|
36a4681b2b | ||
|
|
ca903c73c7 | ||
|
|
3a5498c5e5 | ||
|
|
27014da237 | ||
|
|
5a40fad22a | ||
|
|
b84a07b380 | ||
|
|
6258c965a0 | ||
|
|
585208a356 | ||
|
|
c9a51c471d | ||
|
|
9ada61881c | ||
|
|
b05619fe09 | ||
|
|
5745bbe7d5 | ||
|
|
603870e871 | ||
|
|
2a7d8cd165 | ||
|
|
208a3a1410 | ||
|
|
5505ab5c94 | ||
|
|
ab7cabd09d | ||
|
|
c96b344466 | ||
|
|
1961cdfb57 | ||
|
|
dba362772e | ||
|
|
618d59aec2 | ||
|
|
7775802eb9 | ||
|
|
ce73f89469 | ||
|
|
ecee5bf1a1 | ||
|
|
cff16587bd | ||
|
|
3f3a2c966a | ||
|
|
a63e38ba46 | ||
|
|
286a456319 | ||
|
|
5dd3400746 | ||
|
|
c437adb024 | ||
|
|
2811c97803 | ||
|
|
72f6025d69 | ||
|
|
8cfd43d1d6 | ||
|
|
6eaffbd6ee | ||
|
|
93860bb06e | ||
|
|
c51d292c47 | ||
|
|
13f64a1e59 | ||
|
|
d2aa3a1b62 | ||
|
|
78abc65347 | ||
|
|
55df39e684 | ||
|
|
97b1765a45 | ||
|
|
f27e0b6bc4 | ||
|
|
71825c0bd8 | ||
|
|
04353c3af8 | ||
|
|
6e4fb77f9e | ||
|
|
642acc0fb0 | ||
|
|
843e421a05 | ||
|
|
c4a0c0718a | ||
|
|
2ac5800fd9 | ||
|
|
7f3121cf8a | ||
|
|
c276abf061 | ||
|
|
7950e1b9f4 | ||
|
|
c2da3505e2 | ||
|
|
b72bced2d7 | ||
|
|
4e9fa569b0 | ||
|
|
29934e5f03 | ||
|
|
36234df96c | ||
|
|
0c4f658d58 | ||
|
|
9178dc282d | ||
|
|
1863c38643 | ||
|
|
7381ed3d01 | ||
|
|
5529e71357 | ||
|
|
615186d415 | ||
|
|
0daff7fe23 | ||
|
|
eb568e0aba | ||
|
|
da318f3522 | ||
|
|
afe0320ffc | ||
|
|
a1373bc6fc | ||
|
|
3a99b278cd | ||
|
|
2af5cfe9b7 | ||
|
|
3c4cf92f13 | ||
|
|
192866d2b8 | ||
|
|
2369c89b75 | ||
|
|
a21210fbb7 | ||
|
|
637d10d91e | ||
|
|
747600e93c | ||
|
|
25eb240f63 | ||
|
|
97cb9d04ee | ||
|
|
8af649756f | ||
|
|
b6c134f254 | ||
|
|
b85e150182 | ||
|
|
b3b81d9d2a | ||
|
|
520c656d7b | ||
|
|
370078466c | ||
|
|
ae0712ae8f | ||
|
|
38eee4da94 | ||
|
|
56f66be113 | ||
|
|
db969b2f30 | ||
|
|
1bb1239c28 | ||
|
|
4a571ae62b | ||
|
|
503f7f0614 | ||
|
|
697d7fd000 | ||
|
|
9fd0a2f273 | ||
|
|
29ba45bb35 | ||
|
|
0506039845 | ||
|
|
8e662b9654 | ||
|
|
da8fc1511f | ||
|
|
763c0473c8 | ||
|
|
b32c304be8 | ||
|
|
6f398aa762 | ||
|
|
d6ee5e462c | ||
|
|
4f765922f0 | ||
|
|
6cf00dcf7d | ||
|
|
4121018b3f | ||
|
|
5881e2434f | ||
|
|
be799e8c2a | ||
|
|
3b8e53f6af | ||
|
|
68598374d1 | ||
|
|
e0363a7d74 | ||
|
|
18f18a2054 | ||
|
|
244fd1aac6 | ||
|
|
8e1269c29d | ||
|
|
c0763f08a5 | ||
|
|
e6c17aa219 | ||
|
|
f18f08d9c8 | ||
|
|
21a12f4269 | ||
|
|
46e232d8a1 | ||
|
|
433fb7d2c7 | ||
|
|
48c5d6ab77 | ||
|
|
b8a5fc207a | ||
|
|
9811057ed1 | ||
|
|
c24c8bfd0a | ||
|
|
0c59c9c9db | ||
|
|
1199a91095 | ||
|
|
6f8eb1b50f | ||
|
|
805e59cdcc | ||
|
|
aa87a5cffb | ||
|
|
9310304d1a | ||
|
|
7128fe094f | ||
|
|
e5301885bc | ||
|
|
0239448532 | ||
|
|
b295e3a18d | ||
|
|
ba204d941c | ||
|
|
324ea1f414 | ||
|
|
82cfec057f | ||
|
|
b9555a9831 | ||
|
|
a973a0a38b | ||
|
|
0bfb41a55a | ||
|
|
bf5829ddf9 | ||
|
|
0037b13480 | ||
|
|
dd49c62611 | ||
|
|
17eb0c4872 | ||
|
|
8ccdf809c0 | ||
|
|
fa0275bd90 | ||
|
|
76ba98d9b0 | ||
|
|
45456fe0c8 | ||
|
|
ac24a026d2 | ||
|
|
f39a7179bc | ||
|
|
63c1719988 | ||
|
|
2301bbdf88 | ||
|
|
1df8281737 | ||
|
|
eac20ce427 | ||
|
|
c52cd4d8c3 | ||
|
|
bdddbe9718 | ||
|
|
8458febc01 | ||
|
|
a64a36308c | ||
|
|
715ff75b1b | ||
|
|
a6d825d735 | ||
|
|
d629e013ef | ||
|
|
65de91a884 | ||
|
|
e567d313b6 | ||
|
|
1b39b665c3 | ||
|
|
3ec4921c16 | ||
|
|
0882a4cf25 | ||
|
|
ec7d974055 | ||
|
|
742ac017ba | ||
|
|
66871d9c62 | ||
|
|
27223c0761 | ||
|
|
d805812e75 | ||
|
|
9361c359e4 | ||
|
|
0411d3f654 | ||
|
|
701a7b1c86 | ||
|
|
53507cef82 | ||
|
|
991ec8e5b2 | ||
|
|
23cdf9f246 | ||
|
|
16e0866a74 | ||
|
|
1f26cfc92b | ||
|
|
294a45adbe | ||
|
|
1deadfe3de | ||
|
|
95922e16d7 | ||
|
|
2c9e3736f4 | ||
|
|
a6a5de4ef3 | ||
|
|
9e4f4e1a1f | ||
|
|
8f2ac5c085 | ||
|
|
5d3b216d21 | ||
|
|
586872da59 | ||
|
|
acdac1aa55 | ||
|
|
0d6d8d71fc | ||
|
|
d4cad59927 | ||
|
|
09cb0a5626 | ||
|
|
0f35193aec | ||
|
|
1780f09ee3 | ||
|
|
fff02093e6 | ||
|
|
efdfb253d8 | ||
|
|
644f65afe1 | ||
|
|
f47b5802b5 | ||
|
|
f882f4474f | ||
|
|
9373836f94 | ||
|
|
d4df69697d | ||
|
|
dcd68100c2 | ||
|
|
e39414ed07 | ||
|
|
2b7289cd3b | ||
|
|
fdeba0e0ef | ||
|
|
c97189e26d | ||
|
|
8aae794e99 | ||
|
|
60522320f6 | ||
|
|
68586cf233 | ||
|
|
938908f400 | ||
|
|
a88ff7bf5b | ||
|
|
ff8bde5296 | ||
|
|
8948a78862 | ||
|
|
7d368e41ce | ||
|
|
fc6f1fd8fe | ||
|
|
54a864d914 | ||
|
|
4dab912edb | ||
|
|
72ebcef5be | ||
|
|
617b7e9bf4 | ||
|
|
323285ac00 | ||
|
|
dc7487885e | ||
|
|
f93c029395 |
13
.github/issue_template
vendored
Normal file
13
.github/issue_template
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
This repository is a mirror of our main repo at https://git.openwrt.org/openwrt/openwrt.git
|
||||
It is for reference only and is not active for checkins or for reporting issues.
|
||||
|
||||
All issues should be reported at: https://bugs.openwrt.org
|
||||
|
||||
Please do not open any NEW issue here - we will be closing the Github issues
|
||||
capability in the near future.
|
||||
|
||||
We will continue to accept Pull Requests here as described in the repo description.
|
||||
|
||||
Close this now and click here: https://bugs.openwrt.org
|
||||
|
||||
Thankyou for your co-operation.
|
||||
103
.github/labeler.yml
vendored
103
.github/labeler.yml
vendored
@@ -1,103 +0,0 @@
|
||||
# target/*
|
||||
"target/airoha":
|
||||
- "target/linux/airoha/**"
|
||||
"target/apm821xx":
|
||||
- "target/linux/apm821xx/**"
|
||||
"target/archs38":
|
||||
- "target/linux/archs38/**"
|
||||
"target/armvirt":
|
||||
- "target/linux/armvirt/**"
|
||||
"target/at91":
|
||||
- "target/linux/at91/**"
|
||||
"target/ath25":
|
||||
- "target/linux/ath25/**"
|
||||
"target/ath79":
|
||||
- "target/linux/ath79/**"
|
||||
"target/bcm27xx":
|
||||
- "target/linux/bcm27xx/**"
|
||||
"target/bcm47xx":
|
||||
- "target/linux/bcm47xx/**"
|
||||
"target/bcm4908":
|
||||
- "target/linux/bcm4908/**"
|
||||
"target/bcm53xx":
|
||||
- "target/linux/bcm53xx/**"
|
||||
"target/bcm63xx":
|
||||
- "target/linux/bcm63xx/**"
|
||||
"target/bmips":
|
||||
- "target/linux/bmips/**"
|
||||
"target/gemini":
|
||||
- "target/linux/gemini/**"
|
||||
"target/imx":
|
||||
- "target/linux/imx/**"
|
||||
"target/ipq40xx":
|
||||
- "target/linux/ipq40xx/**"
|
||||
"target/ipq806x":
|
||||
- "target/linux/ipq806x/**"
|
||||
"target/kirkwood":
|
||||
- "target/linux/kirkwood/**"
|
||||
"target/lantiq":
|
||||
- "target/linux/lantiq/**"
|
||||
"target/layerscape":
|
||||
- "target/linux/layerscape/**"
|
||||
"target/malta":
|
||||
- "target/linux/malta/**"
|
||||
"target/mediatek":
|
||||
- "target/linux/mediatek/**"
|
||||
"target/mpc85xx":
|
||||
- "target/linux/mpc85xx/**"
|
||||
"target/mvebu":
|
||||
- "target/linux/mvebu/**"
|
||||
"target/mxs":
|
||||
- "target/linux/mxs/**"
|
||||
"target/octeon":
|
||||
- "target/linux/octeon/**"
|
||||
"target/octeontx":
|
||||
- "target/linux/octeontx/**"
|
||||
"target/omap":
|
||||
- "target/linux/omap/**"
|
||||
"target/oxnas":
|
||||
- "target/linux/oxnas/**"
|
||||
"target/pistachio":
|
||||
- "target/linux/pistachio/**"
|
||||
"target/qoriq":
|
||||
- "target/linux/qoriq/**"
|
||||
"target/ramips":
|
||||
- "target/linux/ramips/**"
|
||||
"target/realtek":
|
||||
- "target/linux/realtek/**"
|
||||
"target/rockchip":
|
||||
- "target/linux/rockchip/**"
|
||||
"target/sunxi":
|
||||
- "target/linux/sunxi/**"
|
||||
"target/tegra":
|
||||
- "target/linux/tegra/**"
|
||||
"target/uml":
|
||||
- "target/linux/uml/**"
|
||||
"target/x86":
|
||||
- "target/linux/x86/**"
|
||||
"target/zynq":
|
||||
- "target/linux/zynq/**"
|
||||
# target/imagebuilder
|
||||
"target/imagebuilder":
|
||||
- "target/imagebuilder/**"
|
||||
# kernel
|
||||
"kernel":
|
||||
- "target/linux/generic/**"
|
||||
- "target/linux/**/config-*"
|
||||
- "target/linux/**/patches-*"
|
||||
- "target/linux/**/files/**"
|
||||
- "package/kernel/linux/**"
|
||||
# core packages
|
||||
"core packages":
|
||||
- "package/**"
|
||||
# build/scripts/tools
|
||||
"build/scripts/tools":
|
||||
- "include/**"
|
||||
- "scripts/**"
|
||||
- "tools/**"
|
||||
# toolchain
|
||||
"toolchain":
|
||||
- "toolchain/**"
|
||||
# GitHub/CI
|
||||
"GitHub/CI":
|
||||
- ".github/**"
|
||||
2
.github/pull_request_template
vendored
2
.github/pull_request_template
vendored
@@ -3,6 +3,6 @@ Thanks for your contribution to OpenWrt!
|
||||
To help keep the codebase consistent and readable,
|
||||
and to help people review your contribution,
|
||||
we ask you to follow the rules you find in the wiki at this link
|
||||
https://openwrt.org/submitting-patches
|
||||
https://lede-project.org/submitting-patches
|
||||
|
||||
Please remove this message before posting the pull request.
|
||||
|
||||
3
.github/workflows/Dockerfile.tools
vendored
3
.github/workflows/Dockerfile.tools
vendored
@@ -1,3 +0,0 @@
|
||||
FROM registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1
|
||||
|
||||
COPY --chown=buildbot:buildbot tools.tar /tools.tar
|
||||
361
.github/workflows/build.yml
vendored
361
.github/workflows/build.yml
vendored
@@ -1,361 +0,0 @@
|
||||
name: Build sub target
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
testing:
|
||||
type: boolean
|
||||
build_toolchain:
|
||||
type: boolean
|
||||
include_feeds:
|
||||
type: boolean
|
||||
build_full:
|
||||
type: boolean
|
||||
build_all_modules:
|
||||
type: boolean
|
||||
build_all_kmods:
|
||||
type: boolean
|
||||
build_all_boards:
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
setup_build:
|
||||
name: Setup build
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
owner_lc: ${{ steps.lower_owner.outputs.owner_lc }}
|
||||
ccache_hash: ${{ steps.ccache_hash.outputs.ccache_hash }}
|
||||
container_tag: ${{ steps.determine_tools_container.outputs.container_tag }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set lower case owner name
|
||||
id: lower_owner
|
||||
run: |
|
||||
OWNER_LC=$(echo "${{ github.repository_owner }}" \
|
||||
| tr '[:upper:]' '[:lower:]')
|
||||
echo "owner_lc=$OWNER_LC" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate ccache hash
|
||||
id: ccache_hash
|
||||
run: |
|
||||
CCACHE_HASH=$(md5sum include/kernel-* | awk '{ print $1 }' \
|
||||
| md5sum | awk '{ print $1 }')
|
||||
echo "ccache_hash=$CCACHE_HASH" >> $GITHUB_OUTPUT
|
||||
|
||||
# Per branch tools container tag
|
||||
# By default stick to latest
|
||||
# For official test targetting openwrt stable branch
|
||||
# Get the branch or parse the tag and push dedicated tools containers
|
||||
# For local test to use the correct container for stable release testing
|
||||
# you need to use for the branch name a prefix of openwrt-[0-9][0-9].[0-9][0-9]-
|
||||
- name: Determine tools container tag
|
||||
id: determine_tools_container
|
||||
run: |
|
||||
CONTAINER_TAG=latest
|
||||
if [ -n "${{ github.base_ref }}" ]; then
|
||||
if echo "${{ github.base_ref }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
CONTAINER_TAG="${{ github.base_ref }}"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "branch" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
CONTAINER_TAG=${{ github.ref_name }}
|
||||
elif echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]-'; then
|
||||
CONTAINER_TAG="$(echo ${{ github.ref_name }} | sed 's/^\(openwrt-[0-9][0-9]\.[0-9][0-9]\)-.*/\1/')"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "tag" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^v[0-9][0-9]\.[0-9][0-9]\..+'; then
|
||||
CONTAINER_TAG=openwrt-"$(echo ${{ github.ref_name }} | sed 's/^v\([0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')"
|
||||
fi
|
||||
fi
|
||||
echo "Tools container to use tools:$CONTAINER_TAG"
|
||||
echo "container_tag=$CONTAINER_TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
name: Build with external toolchain
|
||||
needs: setup_build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: ghcr.io/${{ needs.setup_build.outputs.owner_lc }}/tools:${{ needs.setup_build.outputs.container_tag }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
|
||||
steps:
|
||||
- name: Checkout master directory
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: openwrt
|
||||
|
||||
- name: Checkout packages feed
|
||||
if: inputs.include_feeds == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openwrt/packages
|
||||
path: openwrt/feeds/packages
|
||||
|
||||
- name: Checkout luci feed
|
||||
if: inputs.include_feeds == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openwrt/luci
|
||||
path: openwrt/feeds/luci
|
||||
|
||||
- name: Checkout routing feed
|
||||
if: inputs.include_feeds == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openwrt/routing
|
||||
path: openwrt/feeds/routing
|
||||
|
||||
- name: Checkout telephony feed
|
||||
if: inputs.include_feeds == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openwrt/telephony
|
||||
path: openwrt/feeds/telephony
|
||||
|
||||
- name: Fix permission
|
||||
run: |
|
||||
chown -R buildbot:buildbot openwrt
|
||||
|
||||
- name: Initialization environment
|
||||
run: |
|
||||
TARGET=$(echo ${{ inputs.target }} | cut -d "/" -f 1)
|
||||
SUBTARGET=$(echo ${{ inputs.target }} | cut -d "/" -f 2)
|
||||
echo "TARGET=$TARGET" >> "$GITHUB_ENV"
|
||||
echo "SUBTARGET=$SUBTARGET" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Update & Install feeds
|
||||
if: inputs.include_feeds == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
|
||||
- name: Parse toolchain file
|
||||
if: inputs.build_toolchain == false
|
||||
id: parse-toolchain
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
TOOLCHAIN_PATH=snapshots
|
||||
|
||||
if [ -n "${{ github.base_ref }}" ]; then
|
||||
if echo "${{ github.base_ref }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
major_ver="$(echo ${{ github.base_ref }} | sed 's/^openwrt-/v/')"
|
||||
fi
|
||||
elif [ "${{ github.ref_type }}" = "branch" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
major_ver="$(echo ${{ github.ref_name }} | sed 's/^openwrt-/v/')"
|
||||
elif echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]-'; then
|
||||
major_ver="$(echo ${{ github.ref_name }} | sed 's/^openwrt-\([0-9][0-9]\.[0-9][0-9]\)-.*/v\1/')"
|
||||
fi
|
||||
elif [ "${{ github.ref_type }}" = "tag" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^v[0-9][0-9]\.[0-9][0-9]\..+'; then
|
||||
major_ver="$(echo ${{ github.ref_name }} | sed 's/^\(v[0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$major_ver" ]; then
|
||||
git fetch --tags -f
|
||||
latest_tag="$(git tag --sort=-creatordate -l $major_ver* | head -n1)"
|
||||
if [ -n "$latest_tag" ]; then
|
||||
TOOLCHAIN_PATH=releases/$(echo $latest_tag | sed 's/^v//')
|
||||
fi
|
||||
fi
|
||||
|
||||
SUMS_FILE="https://downloads.cdn.openwrt.org/$TOOLCHAIN_PATH/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/sha256sums"
|
||||
if curl $SUMS_FILE | grep -q ".*openwrt-toolchain.*tar.xz"; then
|
||||
TOOLCHAIN_STRING="$( curl $SUMS_FILE | grep ".*openwrt-toolchain.*tar.xz")"
|
||||
TOOLCHAIN_FILE=$(echo "$TOOLCHAIN_STRING" | sed -n -e 's/.*\(openwrt-toolchain.*\).tar.xz/\1/p')
|
||||
TOOLCHAIN_SHA256=$(echo "$TOOLCHAIN_STRING" | cut -d ' ' -f 1)
|
||||
|
||||
echo "toolchain-type=external_toolchain" >> $GITHUB_OUTPUT
|
||||
elif curl $SUMS_FILE | grep -q ".*openwrt-sdk.*tar.xz"; then
|
||||
TOOLCHAIN_STRING="$( curl $SUMS_FILE | grep ".*openwrt-sdk.*tar.xz")"
|
||||
TOOLCHAIN_FILE=$(echo "$TOOLCHAIN_STRING" | sed -n -e 's/.*\(openwrt-sdk.*\).tar.xz/\1/p')
|
||||
TOOLCHAIN_SHA256=$(echo "$TOOLCHAIN_STRING" | cut -d ' ' -f 1)
|
||||
|
||||
echo "toolchain-type=external_sdk" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
echo "TOOLCHAIN_FILE=$TOOLCHAIN_FILE" >> "$GITHUB_ENV"
|
||||
echo "TOOLCHAIN_SHA256=$TOOLCHAIN_SHA256" >> "$GITHUB_ENV"
|
||||
echo "TOOLCHAIN_PATH=$TOOLCHAIN_PATH" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Cache external toolchain/sdk
|
||||
if: inputs.build_toolchain == false
|
||||
id: cache-external-toolchain
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: openwrt/${{ env.TOOLCHAIN_FILE }}
|
||||
key: ${{ env.TOOLCHAIN_FILE }}-${{ steps.parse-toolchain.outputs.toolchain-type }}-${{ env.TOOLCHAIN_SHA256 }}
|
||||
|
||||
- name: Cache ccache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: openwrt/.ccache
|
||||
key: ccache-kernel-${{ env.TARGET }}/${{ env.SUBTARGET }}-${{ needs.setup_build.outputs.ccache_hash }}
|
||||
restore-keys: |
|
||||
ccache-kernel-${{ env.TARGET }}/${{ env.SUBTARGET }}-
|
||||
|
||||
- name: Download external toolchain/sdk
|
||||
if: inputs.build_toolchain == false && steps.cache-external-toolchain.outputs.cache-hit != 'true'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
wget -O - https://downloads.cdn.openwrt.org/${{ env.TOOLCHAIN_PATH }}/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/${{ env.TOOLCHAIN_FILE }}.tar.xz \
|
||||
| tar --xz -xf -
|
||||
|
||||
- name: Extract prebuilt tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: ./scripts/ext-tools.sh --tools /tools.tar
|
||||
|
||||
- name: Configure testing kernel
|
||||
if: inputs.testing == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_TESTING_KERNEL=y >> .config
|
||||
|
||||
- name: Configure all kernel modules
|
||||
if: inputs.build_all_kmods == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_ALL_KMODS=y >> .config
|
||||
|
||||
- name: Configure all modules
|
||||
if: inputs.build_all_modules == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_ALL=y >> .config
|
||||
|
||||
- name: Configure all boards
|
||||
if: inputs.build_all_boards == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_TARGET_MULTI_PROFILE=y >> .config
|
||||
echo CONFIG_TARGET_PER_DEVICE_ROOTFS=y >> .config
|
||||
echo CONFIG_TARGET_ALL_PROFILES=y >> .config
|
||||
|
||||
- name: Configure external toolchain
|
||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_toolchain'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
./scripts/ext-toolchain.sh \
|
||||
--toolchain ${{ env.TOOLCHAIN_FILE }}/toolchain-* \
|
||||
--overwrite-config \
|
||||
--config ${{ env.TARGET }}/${{ env.SUBTARGET }}
|
||||
|
||||
- name: Adapt external sdk to external toolchain format
|
||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_sdk' && steps.cache-external-toolchain.outputs.cache-hit != 'true'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
TOOLCHAIN_DIR=${{ env.TOOLCHAIN_FILE }}/staging_dir/$(ls ${{ env.TOOLCHAIN_FILE }}/staging_dir | grep toolchain)
|
||||
TOOLCHAIN_BIN=$TOOLCHAIN_DIR/bin
|
||||
OPENWRT_DIR=$(pwd)
|
||||
|
||||
# Find target name from toolchain info.mk
|
||||
GNU_TARGET_NAME=$(cat $TOOLCHAIN_DIR/info.mk | grep TARGET_CROSS | sed 's/^TARGET_CROSS=\(.*\)-$/\1/')
|
||||
|
||||
cd $TOOLCHAIN_BIN
|
||||
|
||||
# Revert sdk wrapper scripts applied to all the bins
|
||||
for app in $(find . -name "*.bin"); do
|
||||
TARGET_APP=$(echo $app | sed 's/\.\/\.\(.*\)\.bin/\1/')
|
||||
rm $TARGET_APP
|
||||
mv .$TARGET_APP.bin $TARGET_APP
|
||||
done
|
||||
|
||||
# Setup the wrapper script in the sdk toolchain dir simulating an external toolchain build
|
||||
cp $OPENWRT_DIR/target/toolchain/files/wrapper.sh $GNU_TARGET_NAME-wrapper.sh
|
||||
for app in cc gcc g++ c++ cpp ld as ; do
|
||||
[ -f $GNU_TARGET_NAME-$app ] && mv $GNU_TARGET_NAME-$app $GNU_TARGET_NAME-$app.bin
|
||||
ln -sf $GNU_TARGET_NAME-wrapper.sh $GNU_TARGET_NAME-$app
|
||||
done
|
||||
|
||||
- name: Configure external toolchain with sdk
|
||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_sdk'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
./scripts/ext-toolchain.sh \
|
||||
--toolchain ${{ env.TOOLCHAIN_FILE }}/staging_dir/toolchain-* \
|
||||
--overwrite-config \
|
||||
--config ${{ env.TARGET }}/${{ env.SUBTARGET }}
|
||||
|
||||
- name: Configure internal toolchain
|
||||
if: inputs.build_toolchain == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
echo "CONFIG_TARGET_${{ env.TARGET }}=y" >> .config
|
||||
echo "CONFIG_TARGET_${{ env.TARGET }}_${{ env.SUBTARGET }}=y" >> .config
|
||||
|
||||
make defconfig
|
||||
|
||||
- name: Show configuration
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: ./scripts/diffconfig.sh
|
||||
|
||||
- name: Build tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Build toolchain
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make toolchain/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Build Kernel
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make target/compile -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Build Kernel Kmods
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make package/linux/compile -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Build everything
|
||||
if: inputs.build_full == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Upload logs
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.TARGET }}-${{ env.SUBTARGET }}-logs
|
||||
path: "openwrt/logs"
|
||||
131
.github/workflows/check-kernel-patches.yml
vendored
131
.github/workflows/check-kernel-patches.yml
vendored
@@ -1,131 +0,0 @@
|
||||
name: Refresh kernel for target
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
testing:
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
setup_build:
|
||||
name: Setup build
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
owner_lc: ${{ steps.lower_owner.outputs.owner_lc }}
|
||||
container_tag: ${{ steps.determine_tools_container.outputs.container_tag }}
|
||||
|
||||
steps:
|
||||
- name: Set lower case owner name
|
||||
id: lower_owner
|
||||
run: |
|
||||
OWNER_LC=$(echo "${{ github.repository_owner }}" \
|
||||
| tr '[:upper:]' '[:lower:]')
|
||||
echo "owner_lc=$OWNER_LC" >> $GITHUB_OUTPUT
|
||||
|
||||
# Per branch tools container tag
|
||||
# By default stick to latest
|
||||
# For official test targetting openwrt stable branch
|
||||
# Get the branch or parse the tag and push dedicated tools containers
|
||||
# For local test to use the correct container for stable release testing
|
||||
# you need to use for the branch name a prefix of openwrt-[0-9][0-9].[0-9][0-9]-
|
||||
- name: Determine tools container tag
|
||||
id: determine_tools_container
|
||||
run: |
|
||||
CONTAINER_TAG=latest
|
||||
if [ -n "${{ github.base_ref }}" ]; then
|
||||
if echo "${{ github.base_ref }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
CONTAINER_TAG="${{ github.base_ref }}"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "branch" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
CONTAINER_TAG=${{ github.ref_name }}
|
||||
elif echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]-'; then
|
||||
CONTAINER_TAG="$(echo ${{ github.ref_name }} | sed 's/^\(openwrt-[0-9][0-9]\.[0-9][0-9]\)-.*/\1/')"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "tag" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^v[0-9][0-9]\.[0-9][0-9]\..+'; then
|
||||
CONTAINER_TAG=openwrt-"$(echo ${{ github.ref_name }} | sed 's/^v\([0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')"
|
||||
fi
|
||||
fi
|
||||
echo "Tools container to use tools:$CONTAINER_TAG"
|
||||
echo "container_tag=$CONTAINER_TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
check-patch:
|
||||
name: Check Kernel patches
|
||||
needs: setup_build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: ghcr.io/${{ needs.setup_build.outputs.owner_lc }}/tools:${{ needs.setup_build.outputs.container_tag }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
|
||||
steps:
|
||||
- name: Checkout master directory
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: openwrt
|
||||
|
||||
- name: Fix permission
|
||||
run: |
|
||||
chown -R buildbot:buildbot openwrt
|
||||
|
||||
- name: Initialization environment
|
||||
run: |
|
||||
TARGET=$(echo ${{ inputs.target }} | cut -d "/" -f 1)
|
||||
SUBTARGET=$(echo ${{ inputs.target }} | cut -d "/" -f 2)
|
||||
echo "TARGET=$TARGET" >> "$GITHUB_ENV"
|
||||
echo "SUBTARGET=$SUBTARGET" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Extract prebuilt tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: ./scripts/ext-tools.sh --tools /tools.tar
|
||||
|
||||
- name: Configure testing kernel
|
||||
if: inputs.testing == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_TESTING_KERNEL=y >> .config
|
||||
|
||||
- name: Configure system
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_ALL_KMODS=y >> .config
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
echo "CONFIG_TARGET_${{ env.TARGET }}=y" >> .config
|
||||
echo "CONFIG_TARGET_${{ env.TARGET }}_${{ env.SUBTARGET }}=y" >> .config
|
||||
|
||||
make defconfig
|
||||
|
||||
- name: Build tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make tools/quilt/compile -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Refresh Kernel patches
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
make target/linux/refresh V=s
|
||||
|
||||
. .github/workflows/scripts/ci_helpers.sh
|
||||
|
||||
if git diff --name-only --exit-code; then
|
||||
success "Kernel patches for ${{ env.TARGET }}/${{ env.SUBTARGET }} seems ok"
|
||||
else
|
||||
err "Kernel patches for ${{ env.TARGET }}/${{ env.SUBTARGET }} require refresh. (run 'make target/linux/refresh' and force push this pr)"
|
||||
exit 1
|
||||
fi
|
||||
73
.github/workflows/formal.yml
vendored
73
.github/workflows/formal.yml
vendored
@@ -1,73 +0,0 @@
|
||||
name: Test Formalities
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test Formalities
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Determine branch name
|
||||
run: |
|
||||
BRANCH="${GITHUB_BASE_REF#refs/heads/}"
|
||||
echo "Building for $BRANCH"
|
||||
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
|
||||
|
||||
- name: Test formalities
|
||||
run: |
|
||||
source .github/workflows/scripts/ci_helpers.sh
|
||||
|
||||
RET=0
|
||||
for commit in $(git rev-list HEAD ^origin/$BRANCH); do
|
||||
info "=== Checking commit '$commit'"
|
||||
if git show --format='%P' -s $commit | grep -qF ' '; then
|
||||
err "Pull request should not include merge commits"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
author="$(git show -s --format=%aN $commit)"
|
||||
if echo $author | grep -q '\S\+\s\+\S\+'; then
|
||||
success "Author name ($author) seems ok"
|
||||
else
|
||||
err "Author name ($author) need to be your real name 'firstname lastname'"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
subject="$(git show -s --format=%s $commit)"
|
||||
if echo "$subject" | grep -q -e '^[0-9A-Za-z,+/_\.-]\+: ' -e '^Revert '; then
|
||||
success "Commit subject line seems ok ($subject)"
|
||||
else
|
||||
err "Commit subject line MUST start with '<area>: ' ($subject)"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
body="$(git show -s --format=%b $commit)"
|
||||
sob="$(git show -s --format='Signed-off-by: %aN <%aE>' $commit)"
|
||||
if echo "$body" | grep -qF "$sob"; then
|
||||
success "Signed-off-by match author"
|
||||
else
|
||||
err "Signed-off-by is missing or doesn't match author (should be '$sob')"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
if echo "$body" | grep -v "Signed-off-by:"; then
|
||||
success "A commit message exists"
|
||||
else
|
||||
err "Missing commit message. Please describe your changes"
|
||||
RET=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $RET
|
||||
85
.github/workflows/kernel.yml
vendored
85
.github/workflows/kernel.yml
vendored
@@ -1,85 +0,0 @@
|
||||
name: Build Kernel
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/check-kernel-patches.yml'
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/kernel.yml'
|
||||
- 'include/kernel*'
|
||||
- 'package/kernel/**'
|
||||
- 'target/linux/generic/**'
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/check-kernel-patches.yml'
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/kernel.yml'
|
||||
- 'include/kernel*'
|
||||
- 'package/kernel/**'
|
||||
- 'target/linux/generic/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
determine_targets:
|
||||
name: Set targets
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
target: ${{ steps.find_targets.outputs.target }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set targets
|
||||
id: find_targets
|
||||
run: |
|
||||
export TARGETS="$(perl ./scripts/dump-target-info.pl targets 2>/dev/null \
|
||||
| sort -u -t '/' -k1,1 \
|
||||
| awk '{ print $1 }')"
|
||||
|
||||
JSON='['
|
||||
FIRST=1
|
||||
for TARGET in $TARGETS; do
|
||||
[[ $FIRST -ne 1 ]] && JSON="$JSON"','
|
||||
JSON="$JSON"'"'"${TARGET}"'"'
|
||||
FIRST=0
|
||||
done
|
||||
JSON="$JSON"']'
|
||||
|
||||
echo -e "\n---- targets ----\n"
|
||||
echo "$JSON"
|
||||
echo -e "\n---- targets ----\n"
|
||||
|
||||
echo "target=$JSON" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
name: Build Kernel with external toolchain
|
||||
needs: determine_targets
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
target: ${{fromJson(needs.determine_targets.outputs.target)}}
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
build_all_kmods: true
|
||||
|
||||
check-kernel-patches:
|
||||
name: Check Kernel patches
|
||||
needs: determine_targets
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
target: ${{fromJson(needs.determine_targets.outputs.target)}}
|
||||
uses: ./.github/workflows/check-kernel-patches.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
33
.github/workflows/labeler.yml
vendored
33
.github/workflows/labeler.yml
vendored
@@ -1,33 +0,0 @@
|
||||
name: 'Pull Request Labeler'
|
||||
on:
|
||||
- pull_request_target
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
labeler:
|
||||
permissions:
|
||||
contents: read # to determine modified files (actions/labeler)
|
||||
pull-requests: write # to add labels to PRs (actions/labeler)
|
||||
|
||||
name: Pull Request Labeler
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
||||
- name: Check Branch
|
||||
id: check-branch
|
||||
run: |
|
||||
if echo "${{ github.base_ref }}" | grep -q -E 'openwrt-[0-9][0-9]\.[0-9][0-9]'; then
|
||||
echo "release-tag=$(echo ${{ github.base_ref }} | sed 's/openwrt-/release\//')" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- uses: buildsville/add-remove-label@v2.0.0
|
||||
if: ${{ steps.check-branch.outputs.release-tag }}
|
||||
with:
|
||||
token: ${{secrets.GITHUB_TOKEN}}
|
||||
labels: ${{ steps.check-branch.outputs.release-tag }}
|
||||
type: add
|
||||
43
.github/workflows/packages.yml
vendored
43
.github/workflows/packages.yml
vendored
@@ -1,43 +0,0 @@
|
||||
name: Build all core packages
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/packages.yml'
|
||||
- 'config/**'
|
||||
- 'include/**'
|
||||
- 'package/**'
|
||||
- 'target/linux/generic/**'
|
||||
- 'toolchain/**'
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/packages.yml'
|
||||
- 'config/**'
|
||||
- 'include/**'
|
||||
- 'package/**'
|
||||
- 'target/linux/generic/**'
|
||||
- 'toolchain/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
include:
|
||||
- target: malta/be
|
||||
- target: x86/64
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
build_all_kmods: true
|
||||
build_all_modules: true
|
||||
build_full: true
|
||||
|
||||
26
.github/workflows/scripts/ci_helpers.sh
vendored
26
.github/workflows/scripts/ci_helpers.sh
vendored
@@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
color_out() {
|
||||
printf "\e[0;$1m%s\e[0;0m\n" "$2"
|
||||
}
|
||||
|
||||
success() {
|
||||
color_out 32 "$1"
|
||||
}
|
||||
|
||||
info() {
|
||||
color_out 36 "$1"
|
||||
}
|
||||
|
||||
err() {
|
||||
color_out 31 "$1"
|
||||
}
|
||||
|
||||
warn() {
|
||||
color_out 33 "$1"
|
||||
}
|
||||
|
||||
err_die() {
|
||||
err "$1"
|
||||
exit 1
|
||||
}
|
||||
15
.github/workflows/scripts/show_build_failures.sh
vendored
15
.github/workflows/scripts/show_build_failures.sh
vendored
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
original_exit_code="${ret:-1}"
|
||||
log_dir_path="${1:-logs}"
|
||||
context="${2:-10}"
|
||||
|
||||
show_make_build_errors() {
|
||||
grep -slr 'make\[[[:digit:]]\].*Error [[:digit:]]$' "$log_dir_path" | while IFS= read -r log_file; do
|
||||
printf "====== Make errors from %s ======\n" "$log_file";
|
||||
grep -r -C"$context" 'make\[[[:digit:]]\].*Error [[:digit:]]$' "$log_file" ;
|
||||
done
|
||||
}
|
||||
|
||||
show_make_build_errors
|
||||
exit "$original_exit_code"
|
||||
226
.github/workflows/tools.yml
vendored
226
.github/workflows/tools.yml
vendored
@@ -1,226 +0,0 @@
|
||||
name: Build host tools
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'tools/**'
|
||||
- '.github/workflows/tools.yml'
|
||||
push:
|
||||
paths:
|
||||
- 'tools/**'
|
||||
- '.github/workflows/tools.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-macos-latest:
|
||||
if: github.event_name != 'push'
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: openwrt
|
||||
|
||||
- name: Setup MacOS
|
||||
run: |
|
||||
echo "WORKPATH=/Volumes/OpenWrt" >> "$GITHUB_ENV"
|
||||
hdiutil create -size 20g -type SPARSE -fs "Case-sensitive HFS+" -volname OpenWrt OpenWrt.sparseimage
|
||||
hdiutil attach OpenWrt.sparseimage
|
||||
mv "$GITHUB_WORKSPACE/openwrt" /Volumes/OpenWrt/
|
||||
|
||||
- name: Install required prereq on MacOS
|
||||
working-directory: ${{ env.WORKPATH }}/openwrt
|
||||
run: |
|
||||
brew install \
|
||||
autoconf \
|
||||
automake \
|
||||
coreutils \
|
||||
diffutils \
|
||||
findutils \
|
||||
gawk \
|
||||
gettext \
|
||||
git-extras \
|
||||
gmp \
|
||||
gnu-getopt \
|
||||
gnu-sed \
|
||||
gnu-tar \
|
||||
grep \
|
||||
libidn2 \
|
||||
libunistring \
|
||||
m4 \
|
||||
make \
|
||||
mpfr \
|
||||
ncurses \
|
||||
openssl@1.1 \
|
||||
pcre \
|
||||
pkg-config \
|
||||
quilt \
|
||||
readline \
|
||||
wget \
|
||||
zstd
|
||||
|
||||
echo "/bin" >> "$GITHUB_PATH"
|
||||
echo "/sbin/Library/Apple/usr/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/coreutils/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/findutils/libexec/gnubin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/gettext/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/gnu-getopt/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/make/libexec/gnubin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/make/libexec/gnubin" >> "$GITHUB_PATH"
|
||||
echo "/usr/sbin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Make prereq
|
||||
working-directory: ${{ env.WORKPATH }}/openwrt
|
||||
run: make defconfig
|
||||
|
||||
- name: Build tools MacOS
|
||||
working-directory: ${{ env.WORKPATH }}/openwrt
|
||||
run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macos-latest-logs
|
||||
path: ${{ env.WORKPATH }}/openwrt/logs
|
||||
|
||||
- name: Upload config
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macos-latest-config
|
||||
path: ${{ env.WORKPATH }}/openwrt/.config
|
||||
|
||||
build-linux-buildbot:
|
||||
runs-on: ubuntu-latest
|
||||
container: registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: 'openwrt'
|
||||
|
||||
- name: Fix permission
|
||||
run: |
|
||||
chown -R buildbot:buildbot openwrt
|
||||
|
||||
- name: Set configs for tools container
|
||||
if: github.event_name == 'push'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
touch .config
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
- name: Make prereq
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make defconfig
|
||||
|
||||
- name: Build tools BuildBot Container
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-buildbot-logs
|
||||
path: openwrt/logs
|
||||
|
||||
- name: Upload config
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-buildbot-config
|
||||
path: openwrt/.config
|
||||
|
||||
- name: Archive prebuilt tools
|
||||
if: github.event_name == 'push'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: tar --mtime=now -cf tools.tar staging_dir/host build_dir/host dl
|
||||
|
||||
- name: Upload prebuilt tools
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-buildbot-prebuilt-tools
|
||||
path: openwrt/tools.tar
|
||||
retention-days: 1
|
||||
|
||||
push-tools-container:
|
||||
needs: build-linux-buildbot
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Set lower case owner name
|
||||
env:
|
||||
OWNER: ${{ github.repository_owner }}
|
||||
run: |
|
||||
echo "OWNER_LC=${OWNER,,}" >> "$GITHUB_ENV"
|
||||
|
||||
# Per branch tools container tag
|
||||
# By default stick to latest
|
||||
# For official test targetting openwrt stable branch
|
||||
# Get the branch or parse the tag and push dedicated tools containers
|
||||
# Any branch that will match this pattern openwrt-[0-9][0-9].[0-9][0-9]
|
||||
# will refresh the tools container with the matching tag.
|
||||
# (example branch openwrt-22.03 -> tools:openwrt-22.03)
|
||||
# (example branch openwrt-22.03-test -> tools:openwrt-22.03)
|
||||
- name: Determine tools container tag
|
||||
run: |
|
||||
CONTAINER_TAG=latest
|
||||
|
||||
if [ ${{ github.ref_type }} == "branch" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E 'openwrt-[0-9][0-9]\.[0-9][0-9]'; then
|
||||
CONTAINER_TAG="$(echo ${{ github.ref_name }} | sed 's/^\(openwrt-[0-9][0-9]\.[0-9][0-9]\).*/\1/')"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "tag" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E 'v[0-9][0-9]\.[0-9][0-9]\..+'; then
|
||||
CONTAINER_TAG=openwrt-"$(echo ${{ github.ref_name }} | sed 's/v\([0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Tools container to push tools:$CONTAINER_TAG"
|
||||
echo "CONTAINER_TAG=$CONTAINER_TAG" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: 'openwrt'
|
||||
|
||||
- name: Download prebuilt tools from build job
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: linux-buildbot-prebuilt-tools
|
||||
path: openwrt
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: openwrt
|
||||
push: true
|
||||
tags: ghcr.io/${{ env.OWNER_LC }}/tools:${{ env.CONTAINER_TAG }}
|
||||
file: openwrt/.github/workflows/Dockerfile.tools
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -16,7 +16,6 @@
|
||||
/overlay
|
||||
/package/feeds
|
||||
/package/openwrt-packages
|
||||
/*.patch
|
||||
key-build*
|
||||
*.orig
|
||||
*.rej
|
||||
@@ -28,5 +27,3 @@ TAGS*~
|
||||
git-src
|
||||
.project
|
||||
.cproject
|
||||
.ccache
|
||||
.vscode
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
world ${.TARGETS}:
|
||||
@gmake $@
|
||||
|
||||
12
COPYING
12
COPYING
@@ -1,12 +0,0 @@
|
||||
OpenWrt is provided under:
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
Being under the terms of the GNU General Public License version 2 only,
|
||||
according with:
|
||||
|
||||
LICENSES/GPL-2.0
|
||||
|
||||
In addition, other licenses may also apply.
|
||||
|
||||
All contributions to OpenWrt are subject to this COPYING file.
|
||||
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2013 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
mainmenu "OpenWrt Configuration"
|
||||
|
||||
|
||||
340
LICENSE
Normal file
340
LICENSE
Normal file
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
@@ -1,32 +0,0 @@
|
||||
Valid-License-Identifier: BSD-2-Clause
|
||||
SPDX-URL: https://spdx.org/licenses/BSD-2-Clause.html
|
||||
Usage-Guide:
|
||||
To use the BSD 2-clause "Simplified" License put the following SPDX
|
||||
tag/value pair into a comment according to the placement guidelines in
|
||||
the licensing rules documentation:
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
License-Text:
|
||||
|
||||
Copyright (c) <year> <owner> . All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,36 +0,0 @@
|
||||
Valid-License-Identifier: BSD-3-Clause
|
||||
SPDX-URL: https://spdx.org/licenses/BSD-3-Clause.html
|
||||
Usage-Guide:
|
||||
To use the BSD 3-clause "New" or "Revised" License put the following SPDX
|
||||
tag/value pair into a comment according to the placement guidelines in
|
||||
the licensing rules documentation:
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
License-Text:
|
||||
|
||||
Copyright (c) <year> <owner> . All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
261
LICENSES/GPL-1.0
261
LICENSES/GPL-1.0
@@ -1,261 +0,0 @@
|
||||
Valid-License-Identifier: GPL-1.0-or-later
|
||||
Valid-License-Identifier: GPL-1.0+
|
||||
SPDX-URL: https://spdx.org/licenses/GPL-1.0.html
|
||||
Usage-Guide:
|
||||
The GNU General Public License (GPL) version 1 should not be used in new
|
||||
code. For existing kernel code the 'or any later version' option is
|
||||
required to be compatible with the general license of the project: GPLv2.
|
||||
To use the license in source code, put the following SPDX tag/value pair
|
||||
into a comment according to the placement guidelines in the licensing
|
||||
rules documentation:
|
||||
SPDX-License-Identifier: GPL-1.0-or-later
|
||||
License-Text:
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 1, February 1989
|
||||
|
||||
Copyright (C) 1989 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The license agreements of most software companies try to keep users
|
||||
at the mercy of those companies. By contrast, our General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. The
|
||||
General Public License applies to the Free Software Foundation's
|
||||
software and to any other program whose authors commit to using it.
|
||||
You can use it for your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Specifically, the General Public License is designed to make
|
||||
sure that you have the freedom to give away or sell copies of free
|
||||
software, that you receive source code or can get it if you want it,
|
||||
that you can change the software or use pieces of it in new free
|
||||
programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of a such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must tell them their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any program or other work which
|
||||
contains a notice placed by the copyright holder saying it may be
|
||||
distributed under the terms of this General Public License. The
|
||||
"Program", below, refers to any such program or work, and a "work based
|
||||
on the Program" means either the Program or any work containing the
|
||||
Program or a portion of it, either verbatim or with modifications. Each
|
||||
licensee is addressed as "you".
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source
|
||||
code as you receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice and
|
||||
disclaimer of warranty; keep intact all the notices that refer to this
|
||||
General Public License and to the absence of any warranty; and give any
|
||||
other recipients of the Program a copy of this General Public License
|
||||
along with the Program. You may charge a fee for the physical act of
|
||||
transferring a copy.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of
|
||||
it, and copy and distribute such modifications under the terms of Paragraph
|
||||
1 above, provided that you also do the following:
|
||||
|
||||
a) cause the modified files to carry prominent notices stating that
|
||||
you changed the files and the date of any change; and
|
||||
|
||||
b) cause the whole of any work that you distribute or publish, that
|
||||
in whole or in part contains the Program or any part thereof, either
|
||||
with or without modifications, to be licensed at no charge to all
|
||||
third parties under the terms of this General Public License (except
|
||||
that you may choose to grant warranty protection to some or all
|
||||
third parties, at your option).
|
||||
|
||||
c) If the modified program normally reads commands interactively when
|
||||
run, you must cause it, when started running for such interactive use
|
||||
in the simplest and most usual way, to print or display an
|
||||
announcement including an appropriate copyright notice and a notice
|
||||
that there is no warranty (or else, saying that you provide a
|
||||
warranty) and that users may redistribute the program under these
|
||||
conditions, and telling the user how to view a copy of this General
|
||||
Public License.
|
||||
|
||||
d) You may charge a fee for the physical act of transferring a
|
||||
copy, and you may at your option offer warranty protection in
|
||||
exchange for a fee.
|
||||
|
||||
Mere aggregation of another independent work with the Program (or its
|
||||
derivative) on a volume of a storage or distribution medium does not bring
|
||||
the other work under the scope of these terms.
|
||||
|
||||
3. You may copy and distribute the Program (or a portion or derivative of
|
||||
it, under Paragraph 2) in object code or executable form under the terms of
|
||||
Paragraphs 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of
|
||||
Paragraphs 1 and 2 above; or,
|
||||
|
||||
b) accompany it with a written offer, valid for at least three
|
||||
years, to give any third party free (except for a nominal charge
|
||||
for the cost of distribution) a complete machine-readable copy of the
|
||||
corresponding source code, to be distributed under the terms of
|
||||
Paragraphs 1 and 2 above; or,
|
||||
|
||||
c) accompany it with the information you received as to where the
|
||||
corresponding source code may be obtained. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form alone.)
|
||||
|
||||
Source code for a work means the preferred form of the work for making
|
||||
modifications to it. For an executable file, complete source code means
|
||||
all the source code for all modules it contains; but, as a special
|
||||
exception, it need not include source code for modules which are standard
|
||||
libraries that accompany the operating system on which the executable
|
||||
file runs, or for standard header files or definitions files that
|
||||
accompany that operating system.
|
||||
|
||||
4. You may not copy, modify, sublicense, distribute or transfer the
|
||||
Program except as expressly provided under this General Public License.
|
||||
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
|
||||
the Program is void, and will automatically terminate your rights to use
|
||||
the Program under this License. However, parties who have received
|
||||
copies, or rights to use copies, from you under this General Public
|
||||
License will not have their licenses terminated so long as such parties
|
||||
remain in full compliance.
|
||||
|
||||
5. By copying, distributing or modifying the Program (or any work based
|
||||
on the Program) you indicate your acceptance of this license to do so,
|
||||
and all its terms and conditions.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the original
|
||||
licensor to copy, distribute or modify the Program subject to these
|
||||
terms and conditions. You may not impose any further restrictions on the
|
||||
recipients' exercise of the rights granted herein.
|
||||
|
||||
7. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of the license which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
the license, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
8. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to humanity, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to
|
||||
attach them to the start of each source file to most effectively convey
|
||||
the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 1, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19xx name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the
|
||||
appropriate parts of the General Public License. Of course, the
|
||||
commands you use may be called something other than `show w' and `show
|
||||
c'; they could even be mouse-clicks or menu items--whatever suits your
|
||||
program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
program `Gnomovision' (a program to direct compilers to make passes
|
||||
at assemblers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
355
LICENSES/GPL-2.0
355
LICENSES/GPL-2.0
@@ -1,355 +0,0 @@
|
||||
Valid-License-Identifier: GPL-2.0-only
|
||||
Valid-License-Identifier: GPL-2.0
|
||||
Valid-License-Identifier: GPL-2.0-or-later
|
||||
Valid-License-Identifier: GPL-2.0+
|
||||
SPDX-URL: https://spdx.org/licenses/GPL-2.0.html
|
||||
Usage-Guide:
|
||||
To use this license in source code, put one of the following SPDX
|
||||
tag/value pairs into a comment according to the placement
|
||||
guidelines in the licensing rules documentation.
|
||||
For 'GNU General Public License (GPL) version 2 only' use:
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
For 'GNU General Public License (GPL) version 2 or any later version' use:
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
License-Text:
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
24
LICENSES/ISC
24
LICENSES/ISC
@@ -1,24 +0,0 @@
|
||||
Valid-License-Identifier: ISC
|
||||
SPDX-URL: https://spdx.org/licenses/ISC.html
|
||||
Usage-Guide:
|
||||
To use the ISC License put the following SPDX tag/value pair into a
|
||||
comment according to the placement guidelines in the licensing rules
|
||||
documentation:
|
||||
SPDX-License-Identifier: ISC
|
||||
License-Text:
|
||||
|
||||
ISC License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
@@ -1,25 +0,0 @@
|
||||
SPDX-Exception-Identifier: Linux-syscall-note
|
||||
SPDX-URL: https://spdx.org/licenses/Linux-syscall-note.html
|
||||
SPDX-Licenses: GPL-2.0-only, GPL-2.0, GPL-2.0-or-later, GPL-2.0+, GPL-1.0-or-later, GPL-1.0+, LGPL-2.0, LGPL-2.0+, LGPL-2.1, LGPL-2.1+
|
||||
Usage-Guide:
|
||||
This exception is used together with one of the above SPDX-Licenses
|
||||
to mark user space API (uapi) header files so they can be included
|
||||
into non GPL compliant user space application code.
|
||||
To use this exception add it with the keyword WITH to one of the
|
||||
identifiers in the SPDX-Licenses tag:
|
||||
SPDX-License-Identifier: <SPDX-License> WITH Linux-syscall-note
|
||||
License-Text:
|
||||
|
||||
NOTE! This copyright does *not* cover user programs that use kernel
|
||||
services by normal system calls - this is merely considered normal use
|
||||
of the kernel, and does *not* fall under the heading of "derived work".
|
||||
Also note that the GPL below is copyrighted by the Free Software
|
||||
Foundation, but the instance of code that it refers to (the Linux
|
||||
kernel) is copyrighted by me and others who actually wrote it.
|
||||
|
||||
Also note that the only valid version of the GPL as far as the kernel
|
||||
is concerned is _this_ particular version of the license (ie v2, not
|
||||
v2.2 or v3.x or whatever), unless explicitly otherwise stated.
|
||||
|
||||
Linus Torvalds
|
||||
|
||||
30
LICENSES/MIT
30
LICENSES/MIT
@@ -1,30 +0,0 @@
|
||||
Valid-License-Identifier: MIT
|
||||
SPDX-URL: https://spdx.org/licenses/MIT.html
|
||||
Usage-Guide:
|
||||
To use the MIT License put the following SPDX tag/value pair into a
|
||||
comment according to the placement guidelines in the licensing rules
|
||||
documentation:
|
||||
SPDX-License-Identifier: MIT
|
||||
License-Text:
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
42
Makefile
42
Makefile
@@ -1,6 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
# Makefile for OpenWrt
|
||||
#
|
||||
# Copyright (C) 2007 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
TOPDIR:=${CURDIR}
|
||||
LC_ALL:=C
|
||||
@@ -14,7 +18,6 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir
|
||||
|
||||
world:
|
||||
|
||||
DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep '/usr' | head -n 1)
|
||||
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
|
||||
|
||||
ifneq ($(OPENWRT_BUILD),1)
|
||||
@@ -24,8 +27,6 @@ ifneq ($(OPENWRT_BUILD),1)
|
||||
export OPENWRT_BUILD
|
||||
GREP_OPTIONS=
|
||||
export GREP_OPTIONS
|
||||
CDPATH=
|
||||
export CDPATH
|
||||
include $(TOPDIR)/include/debug.mk
|
||||
include $(TOPDIR)/include/depends.mk
|
||||
include $(TOPDIR)/include/toplevel.mk
|
||||
@@ -56,12 +57,6 @@ clean: FORCE
|
||||
dirclean: clean
|
||||
rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/host $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN)
|
||||
rm -rf $(TMP_DIR)
|
||||
$(MAKE) -C $(TOPDIR)/scripts/config clean
|
||||
|
||||
cacheclean:
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
$(STAGING_DIR_HOST)/bin/ccache -C
|
||||
endif
|
||||
|
||||
ifndef DUMP_TARGET_DB
|
||||
$(BUILD_DIR)/.prepared: Makefile
|
||||
@@ -89,40 +84,19 @@ prereq: $(target/stamp-prereq) tmp/.prereq_packages
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
$(BIN_DIR)/profiles.json: FORCE
|
||||
$(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
|
||||
WORK_DIR=$(BUILD_DIR)/json_info_files \
|
||||
$(SCRIPT_DIR)/json_overview_image_info.py $@ \
|
||||
)
|
||||
|
||||
json_overview_image_info: $(BIN_DIR)/profiles.json
|
||||
|
||||
checksum: FORCE
|
||||
$(call sha256sums,$(BIN_DIR),$(CONFIG_BUILDBOT))
|
||||
|
||||
buildversion: FORCE
|
||||
$(SCRIPT_DIR)/getver.sh > $(BIN_DIR)/version.buildinfo
|
||||
|
||||
feedsversion: FORCE
|
||||
$(SCRIPT_DIR)/feeds list -fs > $(BIN_DIR)/feeds.buildinfo
|
||||
$(call sha256sums,$(BIN_DIR))
|
||||
|
||||
diffconfig: FORCE
|
||||
mkdir -p $(BIN_DIR)
|
||||
$(SCRIPT_DIR)/diffconfig.sh > $(BIN_DIR)/config.buildinfo
|
||||
|
||||
buildinfo: FORCE
|
||||
$(_SINGLE)$(SUBMAKE) -r diffconfig buildversion feedsversion
|
||||
$(SCRIPT_DIR)/diffconfig.sh > $(BIN_DIR)/config.seed
|
||||
|
||||
prepare: .config $(tools/stamp-compile) $(toolchain/stamp-compile)
|
||||
$(_SINGLE)$(SUBMAKE) -r buildinfo
|
||||
$(_SINGLE)$(SUBMAKE) -r diffconfig
|
||||
|
||||
world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-install) $(target/stamp-install) FORCE
|
||||
$(_SINGLE)$(SUBMAKE) -r package/index
|
||||
$(_SINGLE)$(SUBMAKE) -r json_overview_image_info
|
||||
$(_SINGLE)$(SUBMAKE) -r checksum
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
$(STAGING_DIR_HOST)/bin/ccache -s
|
||||
endif
|
||||
|
||||
.PHONY: clean dirclean prereq prepare world package/symlinks package/symlinks-install package/symlinks-clean
|
||||
|
||||
|
||||
29
README
Normal file
29
README
Normal file
@@ -0,0 +1,29 @@
|
||||
This is the buildsystem for the OpenWrt Linux distribution.
|
||||
|
||||
Please use "make menuconfig" to choose your preferred
|
||||
configuration for the toolchain and firmware.
|
||||
|
||||
You need to have installed gcc, binutils, bzip2, flex, python, perl, make,
|
||||
find, grep, diff, unzip, gawk, getopt, subversion, libz-dev and libc headers.
|
||||
|
||||
Run "./scripts/feeds update -a" to get all the latest package definitions
|
||||
defined in feeds.conf / feeds.conf.default respectively
|
||||
and "./scripts/feeds install -a" to install symlinks of all of them into
|
||||
package/feeds/.
|
||||
|
||||
Use "make menuconfig" to configure your image.
|
||||
|
||||
Simply running "make" will build your firmware.
|
||||
It will download all sources, build the cross-compile toolchain,
|
||||
the kernel and all choosen applications.
|
||||
|
||||
To build your own firmware you need to have access to a Linux, BSD or MacOSX system
|
||||
(case-sensitive filesystem required). Cygwin will not be supported because of
|
||||
the lack of case sensitiveness in the file system.
|
||||
|
||||
|
||||
Sunshine!
|
||||
Your OpenWrt Community
|
||||
http://www.openwrt.org
|
||||
|
||||
|
||||
87
README.md
87
README.md
@@ -1,87 +0,0 @@
|
||||

|
||||
|
||||
OpenWrt Project is a Linux operating system targeting embedded devices. Instead
|
||||
of trying to create a single, static firmware, OpenWrt provides a fully
|
||||
writable filesystem with package management. This frees you from the
|
||||
application selection and configuration provided by the vendor and allows you
|
||||
to customize the device through the use of packages to suit any application.
|
||||
For developers, OpenWrt is the framework to build an application without having
|
||||
to build a complete firmware around it; for users this means the ability for
|
||||
full customization, to use the device in ways never envisioned.
|
||||
|
||||
Sunshine!
|
||||
|
||||
## Development
|
||||
|
||||
To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case
|
||||
sensitive filesystem required). Cygwin is unsupported because of the lack of a
|
||||
case sensitive file system.
|
||||
|
||||
### Requirements
|
||||
|
||||
You need the following tools to compile OpenWrt, the package names vary between
|
||||
distributions. A complete list with distribution specific packages is found in
|
||||
the [Build System Setup](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem)
|
||||
documentation.
|
||||
|
||||
```
|
||||
gcc binutils bzip2 flex python3 perl make find grep diff unzip gawk getopt
|
||||
subversion libz-dev libc-dev rsync which
|
||||
```
|
||||
|
||||
### Quickstart
|
||||
|
||||
1. Run `./scripts/feeds update -a` to obtain all the latest package definitions
|
||||
defined in feeds.conf / feeds.conf.default
|
||||
|
||||
2. Run `./scripts/feeds install -a` to install symlinks for all obtained
|
||||
packages into package/feeds/
|
||||
|
||||
3. Run `make menuconfig` to select your preferred configuration for the
|
||||
toolchain, target system & firmware packages.
|
||||
|
||||
4. Run `make` to build your firmware. This will download all sources, build the
|
||||
cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen
|
||||
applications for your target system.
|
||||
|
||||
### Related Repositories
|
||||
|
||||
The main repository uses multiple sub-repositories to manage packages of
|
||||
different categories. All packages are installed via the OpenWrt package
|
||||
manager called `opkg`. If you're looking to develop the web interface or port
|
||||
packages to OpenWrt, please find the fitting repository below.
|
||||
|
||||
* [LuCI Web Interface](https://github.com/openwrt/luci): Modern and modular
|
||||
interface to control the device via a web browser.
|
||||
|
||||
* [OpenWrt Packages](https://github.com/openwrt/packages): Community repository
|
||||
of ported packages.
|
||||
|
||||
* [OpenWrt Routing](https://github.com/openwrt/routing): Packages specifically
|
||||
focused on (mesh) routing.
|
||||
|
||||
## Support Information
|
||||
|
||||
For a list of supported devices see the [OpenWrt Hardware Database](https://openwrt.org/supported_devices)
|
||||
|
||||
### Documentation
|
||||
|
||||
* [Quick Start Guide](https://openwrt.org/docs/guide-quick-start/start)
|
||||
* [User Guide](https://openwrt.org/docs/guide-user/start)
|
||||
* [Developer Documentation](https://openwrt.org/docs/guide-developer/start)
|
||||
* [Technical Reference](https://openwrt.org/docs/techref/start)
|
||||
|
||||
### Support Community
|
||||
|
||||
* [Forum](https://forum.openwrt.org): For usage, projects, discussions and hardware advise.
|
||||
* [Support Chat](https://webchat.oftc.net/#openwrt): Channel `#openwrt` on **oftc.net**.
|
||||
|
||||
### Developer Community
|
||||
|
||||
* [Bug Reports](https://bugs.openwrt.org): Report bugs in OpenWrt
|
||||
* [Dev Mailing List](https://lists.openwrt.org/mailman/listinfo/openwrt-devel): Send patches
|
||||
* [Dev Chat](https://webchat.oftc.net/#openwrt-devel): Channel `#openwrt-devel` on **oftc.net**.
|
||||
|
||||
## License
|
||||
|
||||
OpenWrt is licensed under GPL-2.0
|
||||
@@ -1,32 +1,12 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2013 OpenWrt.org
|
||||
# Copyright (C) 2016 LEDE Project
|
||||
|
||||
config EXPERIMENTAL
|
||||
bool "Enable experimental features by default"
|
||||
default n
|
||||
help
|
||||
Set this option to build with latest bleeding edge features
|
||||
which may or may not work as expected.
|
||||
If you would like to help the development of OpenWrt, you are
|
||||
encouraged to set this option and provide feedback (both
|
||||
positive and negative). But do so only if you know how to
|
||||
recover your device in case of flashing potentially non-working
|
||||
firmware.
|
||||
|
||||
If you plan to use this build in production, say NO!
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
menu "Global build settings"
|
||||
|
||||
config JSON_OVERVIEW_IMAGE_INFO
|
||||
bool "Create JSON info file overview per target"
|
||||
default BUILDBOT
|
||||
help
|
||||
Create a JSON info file called profiles.json in the target
|
||||
directory containing machine readable list of built profiles
|
||||
and resulting images.
|
||||
|
||||
config ALL_NONSHARED
|
||||
bool "Select all target specific packages by default"
|
||||
select ALL_KMODS
|
||||
@@ -54,25 +34,8 @@ menu "Global build settings"
|
||||
bool "Cryptographically signed package lists"
|
||||
default y
|
||||
|
||||
config SIGNATURE_CHECK
|
||||
bool "Enable signature checking in opkg"
|
||||
default SIGNED_PACKAGES
|
||||
|
||||
config DOWNLOAD_CHECK_CERTIFICATE
|
||||
bool "Enable TLS certificate verification during package download"
|
||||
default y
|
||||
|
||||
comment "General build options"
|
||||
|
||||
config TESTING_KERNEL
|
||||
bool "Use the testing kernel version"
|
||||
depends on HAS_TESTING_KERNEL
|
||||
default EXPERIMENTAL
|
||||
help
|
||||
If the target supports a newer kernel version than the default,
|
||||
you can use this config option to enable it
|
||||
|
||||
|
||||
config DISPLAY_SUPPORT
|
||||
bool "Show packages that require graphics support (local or remote)"
|
||||
default n
|
||||
@@ -105,28 +68,11 @@ menu "Global build settings"
|
||||
This removes all ipkg/opkg status data files from the target directory
|
||||
before building the root filesystem.
|
||||
|
||||
config IPK_FILES_CHECKSUMS
|
||||
bool
|
||||
prompt "Record files checksums in package metadata"
|
||||
default n
|
||||
help
|
||||
This makes file checksums part of package metadata. It increases size
|
||||
but provides you with pkg_check command to check for flash coruptions.
|
||||
|
||||
config INCLUDE_CONFIG
|
||||
bool "Include build configuration in firmware" if DEVEL
|
||||
default n
|
||||
help
|
||||
If enabled, buildinfo files will be stored in /etc/build.* of firmware.
|
||||
|
||||
config REPRODUCIBLE_DEBUG_INFO
|
||||
bool "Make debug information reproducible"
|
||||
default BUILDBOT
|
||||
help
|
||||
This strips the local build path out of debug information. This has the
|
||||
advantage of making it reproducible, but the disadvantage of making local
|
||||
debugging using ./scripts/remote-gdb harder, since the debug data will
|
||||
no longer point to the full path on the build host.
|
||||
If enabled, config.seed will be stored in /etc/build.config of firmware.
|
||||
|
||||
config COLLECT_KERNEL_DEBUG
|
||||
bool
|
||||
@@ -164,6 +110,7 @@ menu "Global build settings"
|
||||
|
||||
choice
|
||||
prompt "Binary stripping method"
|
||||
default USE_STRIP if EXTERNAL_TOOLCHAIN
|
||||
default USE_STRIP if USE_GLIBC
|
||||
default USE_SSTRIP
|
||||
help
|
||||
@@ -197,14 +144,6 @@ menu "Global build settings"
|
||||
help
|
||||
Specifies arguments passed to the strip command when stripping binaries.
|
||||
|
||||
config SSTRIP_ARGS
|
||||
string
|
||||
prompt "Sstrip arguments"
|
||||
depends on USE_SSTRIP
|
||||
default "-z"
|
||||
help
|
||||
Specifies arguments passed to the sstrip command when stripping binaries.
|
||||
|
||||
config STRIP_KERNEL_EXPORTS
|
||||
bool "Strip unnecessary exports from the kernel image"
|
||||
help
|
||||
@@ -245,10 +184,11 @@ menu "Global build settings"
|
||||
this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
|
||||
Makefile.
|
||||
|
||||
choice
|
||||
config PKG_ASLR_PIE
|
||||
bool
|
||||
prompt "User space ASLR PIE compilation"
|
||||
default PKG_ASLR_PIE_NONE if ((SMALL_FLASH || LOW_MEMORY_FOOTPRINT) && !SDK)
|
||||
default PKG_ASLR_PIE_REGULAR
|
||||
select BUSYBOX_DEFAULT_PIE
|
||||
default n
|
||||
help
|
||||
Add -fPIC to CFLAGS and -specs=hardened-build-ld to LDFLAGS.
|
||||
This enables package build as Position Independent Executables (PIE)
|
||||
@@ -259,24 +199,10 @@ menu "Global build settings"
|
||||
to predict when an attacker is attempting a memory-corruption exploit.
|
||||
You can disable this per package by adding PKG_ASLR_PIE:=0 in the package
|
||||
Makefile.
|
||||
Be ware that ASLR increases the binary size.
|
||||
config PKG_ASLR_PIE_NONE
|
||||
bool "None"
|
||||
help
|
||||
PIE is deactivated for all applications
|
||||
config PKG_ASLR_PIE_REGULAR
|
||||
bool "Regular"
|
||||
help
|
||||
PIE is activated for some binaries, mostly network exposed applications
|
||||
config PKG_ASLR_PIE_ALL
|
||||
bool "All"
|
||||
select BUSYBOX_DEFAULT_PIE
|
||||
help
|
||||
PIE is activated for all applications
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "User space Stack-Smashing Protection"
|
||||
depends on USE_MUSL
|
||||
default PKG_CC_STACKPROTECTOR_REGULAR
|
||||
help
|
||||
Enable GCC Stack Smashing Protection (SSP) for userspace applications
|
||||
@@ -284,13 +210,19 @@ menu "Global build settings"
|
||||
bool "None"
|
||||
config PKG_CC_STACKPROTECTOR_REGULAR
|
||||
bool "Regular"
|
||||
select GCC_LIBSSP if !USE_MUSL
|
||||
depends on KERNEL_CC_STACKPROTECTOR_REGULAR
|
||||
config PKG_CC_STACKPROTECTOR_STRONG
|
||||
bool "Strong"
|
||||
select GCC_LIBSSP if !USE_MUSL
|
||||
depends on !GCC_VERSION_4_8
|
||||
depends on KERNEL_CC_STACKPROTECTOR_STRONG
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Kernel space Stack-Smashing Protection"
|
||||
default KERNEL_CC_STACKPROTECTOR_REGULAR
|
||||
depends on USE_MUSL || !(x86_64 || i386)
|
||||
help
|
||||
Enable GCC Stack-Smashing Protection (SSP) for the kernel
|
||||
config KERNEL_CC_STACKPROTECTOR_NONE
|
||||
@@ -298,17 +230,10 @@ menu "Global build settings"
|
||||
config KERNEL_CC_STACKPROTECTOR_REGULAR
|
||||
bool "Regular"
|
||||
config KERNEL_CC_STACKPROTECTOR_STRONG
|
||||
depends on !GCC_VERSION_4_8
|
||||
bool "Strong"
|
||||
endchoice
|
||||
|
||||
config KERNEL_STACKPROTECTOR
|
||||
bool
|
||||
default KERNEL_CC_STACKPROTECTOR_REGULAR || KERNEL_CC_STACKPROTECTOR_STRONG
|
||||
|
||||
config KERNEL_STACKPROTECTOR_STRONG
|
||||
bool
|
||||
default KERNEL_CC_STACKPROTECTOR_STRONG
|
||||
|
||||
choice
|
||||
prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
|
||||
default PKG_FORTIFY_SOURCE_1
|
||||
@@ -347,46 +272,4 @@ menu "Global build settings"
|
||||
bool "Full"
|
||||
endchoice
|
||||
|
||||
config TARGET_ROOTFS_SECURITY_LABELS
|
||||
bool
|
||||
select KERNEL_SQUASHFS_XATTR
|
||||
select KERNEL_EXT4_FS_SECURITY
|
||||
select KERNEL_F2FS_FS_SECURITY
|
||||
select KERNEL_UBIFS_FS_SECURITY
|
||||
select KERNEL_JFFS2_FS_SECURITY
|
||||
|
||||
config SELINUX
|
||||
bool "Enable SELinux"
|
||||
select KERNEL_SECURITY_SELINUX
|
||||
select TARGET_ROOTFS_SECURITY_LABELS
|
||||
select PACKAGE_procd-selinux
|
||||
select PACKAGE_busybox-selinux
|
||||
help
|
||||
This option enables SELinux kernel features, applies security labels
|
||||
in squashfs rootfs and selects the selinux-variants of busybox and procd.
|
||||
|
||||
Selecting this option results in about 0.5MiB of additional flash space
|
||||
usage accounting for increased kernel and rootfs size.
|
||||
|
||||
choice
|
||||
prompt "default SELinux type"
|
||||
depends on TARGET_ROOTFS_SECURITY_LABELS
|
||||
default SELINUXTYPE_dssp
|
||||
help
|
||||
Select SELinux policy to be installed and used for applying rootfs labels.
|
||||
|
||||
config SELINUXTYPE_targeted
|
||||
bool "targeted"
|
||||
select PACKAGE_refpolicy
|
||||
help
|
||||
SELinux Reference Policy (refpolicy)
|
||||
|
||||
config SELINUXTYPE_dssp
|
||||
bool "dssp"
|
||||
select PACKAGE_selinux-policy
|
||||
help
|
||||
Defensec SELinux Security Policy -- OpenWrt edition
|
||||
|
||||
endchoice
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2013 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
menuconfig DEVEL
|
||||
bool "Advanced configuration options (for developers)"
|
||||
default n
|
||||
|
||||
config BROKEN
|
||||
bool "Show broken platforms / packages / devices" if DEVEL
|
||||
bool "Show broken platforms / packages" if DEVEL
|
||||
default n
|
||||
|
||||
config BINARY_FOLDER
|
||||
@@ -67,18 +69,6 @@ menuconfig DEVEL
|
||||
help
|
||||
Compiler cache; see https://ccache.samba.org/
|
||||
|
||||
config CCACHE_DIR
|
||||
string "Set ccache directory" if CCACHE
|
||||
default ""
|
||||
help
|
||||
Store ccache in this directory.
|
||||
If not set, uses './.ccache'
|
||||
|
||||
config KERNEL_CFLAGS
|
||||
string "Kernel extra CFLAGS" if DEVEL
|
||||
default "-falign-functions=32" if TARGET_bcm53xx
|
||||
default ""
|
||||
|
||||
config EXTERNAL_KERNEL_TREE
|
||||
string "Use external kernel tree" if DEVEL
|
||||
default ""
|
||||
@@ -110,23 +100,11 @@ menuconfig DEVEL
|
||||
It can be a git hash or a branch name.
|
||||
If unused, the clone's repository HEAD will be checked-out.
|
||||
|
||||
config KERNEL_GIT_MIRROR_HASH
|
||||
string "Enter hash of Git kernel tree source checkout tarball" if DEVEL
|
||||
depends on (KERNEL_GIT_CLONE_URI != "")
|
||||
default ""
|
||||
|
||||
config BUILD_LOG
|
||||
bool "Enable log files during build process" if DEVEL
|
||||
help
|
||||
If enabled, log files will be written to the ./log directory.
|
||||
|
||||
config BUILD_LOG_DIR
|
||||
string "Log folder" if DEVEL
|
||||
default ""
|
||||
help
|
||||
Store build logs in this directory.
|
||||
If not set, uses './logs'
|
||||
|
||||
config SRC_TREE_OVERRIDE
|
||||
bool "Enable package source tree override" if DEVEL
|
||||
help
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2013 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
menu "Target Images"
|
||||
|
||||
@@ -12,11 +14,10 @@ menu "Target Images"
|
||||
|
||||
choice
|
||||
prompt "Compression"
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ath79_mikrotik
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_lantiq
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ar71xx
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
|
||||
default TARGET_INITRAMFS_COMPRESSION_NONE
|
||||
depends on TARGET_ROOTFS_INITRAMFS
|
||||
help
|
||||
@@ -118,6 +119,13 @@ menu "Target Images"
|
||||
help
|
||||
Create an ext4 filesystem with a journal.
|
||||
|
||||
config TARGET_ROOTFS_ISO
|
||||
bool "iso"
|
||||
default n
|
||||
depends on TARGET_x86_generic
|
||||
help
|
||||
Create a bootable ISO image.
|
||||
|
||||
config TARGET_ROOTFS_JFFS2
|
||||
bool "jffs2"
|
||||
depends on USES_JFFS2
|
||||
@@ -141,7 +149,6 @@ menu "Target Images"
|
||||
int "Block size (in KiB)"
|
||||
depends on TARGET_ROOTFS_SQUASHFS
|
||||
default 64 if LOW_MEMORY_FOOTPRINT
|
||||
default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
|
||||
default 256
|
||||
|
||||
menuconfig TARGET_ROOTFS_UBIFS
|
||||
@@ -182,32 +189,25 @@ menu "Target Images"
|
||||
config GRUB_IMAGES
|
||||
bool "Build GRUB images (Linux x86 or x86_64 host only)"
|
||||
depends on TARGET_x86
|
||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
||||
select PACKAGE_grub2
|
||||
default y
|
||||
|
||||
config GRUB_EFI_IMAGES
|
||||
bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
|
||||
depends on TARGET_x86
|
||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
||||
select PACKAGE_grub2
|
||||
select PACKAGE_grub2-efi
|
||||
select PACKAGE_kmod-fs-vfat
|
||||
default y
|
||||
|
||||
config GRUB_CONSOLE
|
||||
bool "Use Console Terminal (in addition to Serial)"
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
depends on GRUB_IMAGES
|
||||
default n if (TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501 || TARGET_x86_geos || TARGET_x86_alix2)
|
||||
default y
|
||||
|
||||
config GRUB_SERIAL
|
||||
string "Serial port device"
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
default "ttyS0"
|
||||
depends on GRUB_IMAGES
|
||||
default "hvc0" if TARGET_x86_xen_domu
|
||||
default "ttyS0" if ! TARGET_x86_xen_domu
|
||||
|
||||
config GRUB_BAUDRATE
|
||||
int "Serial port baud rate"
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
depends on GRUB_IMAGES
|
||||
default 38400 if TARGET_x86_generic
|
||||
default 115200
|
||||
|
||||
@@ -218,45 +218,39 @@ menu "Target Images"
|
||||
|
||||
config GRUB_BOOTOPTS
|
||||
string "Extra kernel boot options"
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
depends on GRUB_IMAGES
|
||||
default "xencons=hvc" if TARGET_x86_xen_domu
|
||||
help
|
||||
If you don't know, just leave it blank.
|
||||
|
||||
config GRUB_TIMEOUT
|
||||
string "Seconds to wait before booting the default entry"
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
depends on GRUB_IMAGES
|
||||
default "5"
|
||||
help
|
||||
If you don't know, 5 seconds is a reasonable default.
|
||||
|
||||
config GRUB_TITLE
|
||||
string "Title for the menu entry in GRUB"
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
default "OpenWrt"
|
||||
help
|
||||
This is the title of the GRUB menu entry.
|
||||
If unspecified, it defaults to OpenWrt.
|
||||
|
||||
config ISO_IMAGES
|
||||
bool "Build LiveCD image (ISO)"
|
||||
depends on TARGET_x86
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
|
||||
config VDI_IMAGES
|
||||
bool "Build VirtualBox image files (VDI)"
|
||||
depends on TARGET_x86
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
depends on TARGET_x86 || TARGET_x86_64
|
||||
select GRUB_IMAGES
|
||||
select TARGET_IMAGES_PAD
|
||||
select PACKAGE_kmod-e1000
|
||||
|
||||
config VMDK_IMAGES
|
||||
bool "Build VMware image files (VMDK)"
|
||||
depends on TARGET_x86
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
depends on TARGET_x86 || TARGET_x86_64
|
||||
select GRUB_IMAGES
|
||||
select TARGET_IMAGES_PAD
|
||||
select PACKAGE_kmod-e1000
|
||||
|
||||
config TARGET_IMAGES_PAD
|
||||
bool "Pad images to filesystem size (for JFFS2)"
|
||||
depends on GRUB_IMAGES
|
||||
|
||||
config TARGET_IMAGES_GZIP
|
||||
bool "GZip images"
|
||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
|
||||
depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS || TARGET_x86
|
||||
default y
|
||||
|
||||
comment "Image Options"
|
||||
@@ -265,21 +259,19 @@ menu "Target Images"
|
||||
|
||||
config TARGET_KERNEL_PARTSIZE
|
||||
int "Kernel partition size (in MB)"
|
||||
depends on USES_BOOT_PART
|
||||
default 8 if TARGET_apm821xx_sata
|
||||
default 64 if TARGET_bcm27xx
|
||||
depends on GRUB_IMAGES
|
||||
default 16
|
||||
|
||||
config TARGET_ROOTFS_PARTSIZE
|
||||
int "Root filesystem partition size (in MB)"
|
||||
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_sunxi || TARGET_uml
|
||||
default 104
|
||||
depends on GRUB_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532 || TARGET_mvebu || TARGET_uml
|
||||
default 256
|
||||
help
|
||||
Select the root filesystem partition size.
|
||||
|
||||
config TARGET_ROOTFS_PARTNAME
|
||||
string "Root partition on target device"
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
depends on GRUB_IMAGES
|
||||
help
|
||||
Override the root partition on the final device. If left empty,
|
||||
it will be mounted by PARTUUID which makes the kernel find the
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
config KERNEL_BUILD_USER
|
||||
string "Custom Kernel Build User Name"
|
||||
default "builder" if BUILDBOT
|
||||
default ""
|
||||
help
|
||||
Sets the Kernel build user string, which for example will be returned
|
||||
@@ -13,7 +14,6 @@ config KERNEL_BUILD_USER
|
||||
|
||||
config KERNEL_BUILD_DOMAIN
|
||||
string "Custom Kernel Build Domain Name"
|
||||
default "buildhost" if BUILDBOT
|
||||
default ""
|
||||
help
|
||||
Sets the Kernel build domain string, which for example will be
|
||||
@@ -31,11 +31,7 @@ config KERNEL_CRASHLOG
|
||||
|
||||
config KERNEL_SWAP
|
||||
bool "Support for paging of anonymous memory (swap)"
|
||||
default y if !SMALL_FLASH
|
||||
|
||||
config KERNEL_PROC_STRIPPED
|
||||
bool "Strip non-essential /proc functionality to reduce code size"
|
||||
default y if SMALL_FLASH
|
||||
default y
|
||||
|
||||
config KERNEL_DEBUG_FS
|
||||
bool "Compile the kernel with debug filesystem enabled"
|
||||
@@ -46,33 +42,16 @@ config KERNEL_DEBUG_FS
|
||||
write to these files. Many common debugging facilities, such as
|
||||
ftrace, require the existence of debugfs.
|
||||
|
||||
config KERNEL_MIPS_FP_SUPPORT
|
||||
bool
|
||||
config KERNEL_MIPS_FPU_EMULATOR
|
||||
bool "Compile the kernel with MIPS FPU Emulator"
|
||||
default y if TARGET_pistachio
|
||||
depends on (mips || mipsel || mips64 || mips64el)
|
||||
|
||||
config KERNEL_ARM_PMU
|
||||
bool
|
||||
default n
|
||||
depends on (arm || aarch64)
|
||||
|
||||
config KERNEL_X86_VSYSCALL_EMULATION
|
||||
bool "Enable vsyscall emulation"
|
||||
default n
|
||||
depends on x86_64
|
||||
help
|
||||
This enables emulation of the legacy vsyscall page. Disabling
|
||||
it is roughly equivalent to booting with vsyscall=none, except
|
||||
that it will also disable the helpful warning if a program
|
||||
tries to use a vsyscall. With this option set to N, offending
|
||||
programs will just segfault, citing addresses of the form
|
||||
0xffffffffff600?00.
|
||||
|
||||
This option is required by many programs built before 2013, and
|
||||
care should be used even with newer programs if set to N.
|
||||
|
||||
Disabling this option saves about 7K of kernel size and
|
||||
possibly 4K of additional runtime pagetable memory.
|
||||
|
||||
config KERNEL_PERF_EVENTS
|
||||
bool "Compile the kernel with performance events and counters"
|
||||
default n
|
||||
@@ -86,147 +65,6 @@ config KERNEL_PROFILING
|
||||
Enable the extended profiling support mechanisms used by profilers such
|
||||
as OProfile.
|
||||
|
||||
config KERNEL_UBSAN
|
||||
bool "Compile the kernel with undefined behaviour sanity checker"
|
||||
help
|
||||
This option enables undefined behaviour sanity checker
|
||||
Compile-time instrumentation is used to detect various undefined
|
||||
behaviours in runtime. Various types of checks may be enabled
|
||||
via boot parameter ubsan_handle
|
||||
(see: Documentation/dev-tools/ubsan.rst).
|
||||
|
||||
config KERNEL_UBSAN_SANITIZE_ALL
|
||||
bool "Enable instrumentation for the entire kernel"
|
||||
depends on KERNEL_UBSAN
|
||||
default y
|
||||
help
|
||||
This option activates instrumentation for the entire kernel.
|
||||
If you don't enable this option, you have to explicitly specify
|
||||
UBSAN_SANITIZE := y for the files/directories you want to check for UB.
|
||||
Enabling this option will get kernel image size increased
|
||||
significantly.
|
||||
|
||||
config KERNEL_UBSAN_ALIGNMENT
|
||||
bool "Enable checking of pointers alignment"
|
||||
depends on KERNEL_UBSAN
|
||||
help
|
||||
This option enables detection of unaligned memory accesses.
|
||||
Enabling this option on architectures that support unaligned
|
||||
accesses may produce a lot of false positives.
|
||||
|
||||
config KERNEL_UBSAN_NULL
|
||||
bool "Enable checking of null pointers"
|
||||
depends on KERNEL_UBSAN
|
||||
help
|
||||
This option enables detection of memory accesses via a
|
||||
null pointer.
|
||||
|
||||
config KERNEL_KASAN
|
||||
bool "Compile the kernel with KASan: runtime memory debugger"
|
||||
select KERNEL_SLUB_DEBUG
|
||||
depends on (x86_64 || aarch64)
|
||||
help
|
||||
Enables kernel address sanitizer - runtime memory debugger,
|
||||
designed to find out-of-bounds accesses and use-after-free bugs.
|
||||
This is strictly a debugging feature and it requires a gcc version
|
||||
of 4.9.2 or later. Detection of out of bounds accesses to stack or
|
||||
global variables requires gcc 5.0 or later.
|
||||
This feature consumes about 1/8 of available memory and brings about
|
||||
~x3 performance slowdown.
|
||||
For better error detection enable CONFIG_STACKTRACE.
|
||||
Currently CONFIG_KASAN doesn't work with CONFIG_DEBUG_SLAB
|
||||
(the resulting kernel does not boot).
|
||||
|
||||
config KERNEL_KASAN_EXTRA
|
||||
bool "KAsan: extra checks"
|
||||
depends on KERNEL_KASAN && KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
This enables further checks in the kernel address sanitizer, for now
|
||||
it only includes the address-use-after-scope check that can lead
|
||||
to excessive kernel stack usage, frame size warnings and longer
|
||||
compile time.
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
|
||||
|
||||
|
||||
choice
|
||||
prompt "Instrumentation type"
|
||||
depends on KERNEL_KASAN
|
||||
default KERNEL_KASAN_OUTLINE
|
||||
|
||||
config KERNEL_KASAN_OUTLINE
|
||||
bool "Outline instrumentation"
|
||||
help
|
||||
Before every memory access compiler insert function call
|
||||
__asan_load*/__asan_store*. These functions performs check
|
||||
of shadow memory. This is slower than inline instrumentation,
|
||||
however it doesn't bloat size of kernel's .text section so
|
||||
much as inline does.
|
||||
|
||||
config KERNEL_KASAN_INLINE
|
||||
bool "Inline instrumentation"
|
||||
help
|
||||
Compiler directly inserts code checking shadow memory before
|
||||
memory accesses. This is faster than outline (in some workloads
|
||||
it gives about x2 boost over outline instrumentation), but
|
||||
make kernel's .text size much bigger.
|
||||
This requires a gcc version of 5.0 or later.
|
||||
|
||||
endchoice
|
||||
|
||||
config KERNEL_KCOV
|
||||
bool "Compile the kernel with code coverage for fuzzing"
|
||||
select KERNEL_DEBUG_FS
|
||||
help
|
||||
KCOV exposes kernel code coverage information in a form suitable
|
||||
for coverage-guided fuzzing (randomized testing).
|
||||
|
||||
If RANDOMIZE_BASE is enabled, PC values will not be stable across
|
||||
different machines and across reboots. If you need stable PC values,
|
||||
disable RANDOMIZE_BASE.
|
||||
|
||||
For more details, see Documentation/kcov.txt.
|
||||
|
||||
config KERNEL_KCOV_ENABLE_COMPARISONS
|
||||
bool "Enable comparison operands collection by KCOV"
|
||||
depends on KERNEL_KCOV
|
||||
help
|
||||
KCOV also exposes operands of every comparison in the instrumented
|
||||
code along with operand sizes and PCs of the comparison instructions.
|
||||
These operands can be used by fuzzing engines to improve the quality
|
||||
of fuzzing coverage.
|
||||
|
||||
config KERNEL_KCOV_INSTRUMENT_ALL
|
||||
bool "Instrument all code by default"
|
||||
depends on KERNEL_KCOV
|
||||
default y if KERNEL_KCOV
|
||||
help
|
||||
If you are doing generic system call fuzzing (like e.g. syzkaller),
|
||||
then you will want to instrument the whole kernel and you should
|
||||
say y here. If you are doing more targeted fuzzing (like e.g.
|
||||
filesystem fuzzing with AFL) then you will want to enable coverage
|
||||
for more specific subsets of files, and should say n here.
|
||||
|
||||
config KERNEL_TASKSTATS
|
||||
bool "Compile the kernel with task resource/io statistics and accounting"
|
||||
default n
|
||||
help
|
||||
Enable the collection and publishing of task/io statistics and
|
||||
accounting. Enable this option to enable i/o monitoring in system
|
||||
monitors.
|
||||
|
||||
if KERNEL_TASKSTATS
|
||||
|
||||
config KERNEL_TASK_DELAY_ACCT
|
||||
def_bool y
|
||||
|
||||
config KERNEL_TASK_IO_ACCOUNTING
|
||||
def_bool y
|
||||
|
||||
config KERNEL_TASK_XACCT
|
||||
def_bool y
|
||||
|
||||
endif
|
||||
|
||||
config KERNEL_KALLSYMS
|
||||
bool "Compile the kernel with symbol table information"
|
||||
default y if !SMALL_FLASH
|
||||
@@ -268,47 +106,13 @@ config KERNEL_FUNCTION_PROFILER
|
||||
depends on KERNEL_FUNCTION_TRACER
|
||||
default n
|
||||
|
||||
config KERNEL_IRQSOFF_TRACER
|
||||
bool "Interrupts-off Latency Tracer"
|
||||
depends on KERNEL_FTRACE
|
||||
help
|
||||
This option measures the time spent in irqs-off critical
|
||||
sections, with microsecond accuracy.
|
||||
|
||||
The default measurement method is a maximum search, which is
|
||||
disabled by default and can be runtime (re-)started
|
||||
via:
|
||||
|
||||
echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
|
||||
|
||||
(Note that kernel size and overhead increase with this option
|
||||
enabled. This option and the preempt-off timing option can be
|
||||
used together or separately.)
|
||||
|
||||
config KERNEL_PREEMPT_TRACER
|
||||
bool "Preemption-off Latency Tracer"
|
||||
depends on KERNEL_FTRACE
|
||||
help
|
||||
This option measures the time spent in preemption-off critical
|
||||
sections, with microsecond accuracy.
|
||||
|
||||
The default measurement method is a maximum search, which is
|
||||
disabled by default and can be runtime (re-)started
|
||||
via:
|
||||
|
||||
echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
|
||||
|
||||
(Note that kernel size and overhead increase with this option
|
||||
enabled. This option and the irqs-off timing option can be
|
||||
used together or separately.)
|
||||
|
||||
config KERNEL_DEBUG_KERNEL
|
||||
bool
|
||||
default n
|
||||
|
||||
config KERNEL_DEBUG_INFO
|
||||
bool "Compile the kernel with debug information"
|
||||
default y if !SMALL_FLASH
|
||||
default y
|
||||
select KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
This will compile your kernel and modules with debug information.
|
||||
@@ -363,54 +167,26 @@ config KERNEL_KPROBES
|
||||
instrumentation and testing.
|
||||
If in doubt, say "N".
|
||||
|
||||
config KERNEL_KPROBE_EVENTS
|
||||
config KERNEL_KPROBE_EVENT
|
||||
bool
|
||||
default y if KERNEL_KPROBES
|
||||
|
||||
config KERNEL_AIO
|
||||
bool "Compile the kernel with asynchronous IO support"
|
||||
default y if !SMALL_FLASH
|
||||
|
||||
config KERNEL_IO_URING
|
||||
bool "Compile the kernel with io_uring support"
|
||||
default y if !SMALL_FLASH
|
||||
default n
|
||||
|
||||
config KERNEL_FHANDLE
|
||||
bool "Compile the kernel with support for fhandle syscalls"
|
||||
default y if !SMALL_FLASH
|
||||
default n
|
||||
|
||||
config KERNEL_FANOTIFY
|
||||
bool "Compile the kernel with modern file notification support"
|
||||
default y if !SMALL_FLASH
|
||||
default n
|
||||
|
||||
config KERNEL_BLK_DEV_BSG
|
||||
bool "Compile the kernel with SCSI generic v4 support for any block device"
|
||||
default n
|
||||
|
||||
config KERNEL_TRANSPARENT_HUGEPAGE
|
||||
bool
|
||||
|
||||
choice
|
||||
prompt "Transparent Hugepage Support sysfs defaults"
|
||||
depends on KERNEL_TRANSPARENT_HUGEPAGE
|
||||
default KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
|
||||
|
||||
config KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
|
||||
bool "always"
|
||||
|
||||
config KERNEL_TRANSPARENT_HUGEPAGE_MADVISE
|
||||
bool "madvise"
|
||||
endchoice
|
||||
|
||||
config KERNEL_HUGETLBFS
|
||||
bool
|
||||
|
||||
config KERNEL_HUGETLB_PAGE
|
||||
bool "Compile the kernel with HugeTLB support"
|
||||
select KERNEL_TRANSPARENT_HUGEPAGE
|
||||
select KERNEL_HUGETLBFS
|
||||
default n
|
||||
|
||||
config KERNEL_MAGIC_SYSRQ
|
||||
bool "Compile the kernel with SysRq support"
|
||||
default y
|
||||
@@ -429,69 +205,13 @@ config KERNEL_COREDUMP
|
||||
config KERNEL_ELF_CORE
|
||||
bool "Enable process core dump support"
|
||||
select KERNEL_COREDUMP
|
||||
default y if !SMALL_FLASH
|
||||
default y
|
||||
|
||||
config KERNEL_PROVE_LOCKING
|
||||
bool "Enable kernel lock checking"
|
||||
select KERNEL_DEBUG_KERNEL
|
||||
default n
|
||||
|
||||
config KERNEL_SOFTLOCKUP_DETECTOR
|
||||
bool "Compile the kernel with detect Soft Lockups"
|
||||
depends on KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
Say Y here to enable the kernel to act as a watchdog to detect
|
||||
soft lockups.
|
||||
|
||||
Softlockups are bugs that cause the kernel to loop in kernel
|
||||
mode for more than 20 seconds, without giving other tasks a
|
||||
chance to run. The current stack trace is displayed upon
|
||||
detection and the system will stay locked up.
|
||||
|
||||
config KERNEL_DETECT_HUNG_TASK
|
||||
bool "Compile the kernel with detect Hung Tasks"
|
||||
depends on KERNEL_DEBUG_KERNEL
|
||||
default KERNEL_SOFTLOCKUP_DETECTOR
|
||||
help
|
||||
Say Y here to enable the kernel to detect "hung tasks",
|
||||
which are bugs that cause the task to be stuck in
|
||||
uninterruptible "D" state indefinitely.
|
||||
|
||||
When a hung task is detected, the kernel will print the
|
||||
current stack trace (which you should report), but the
|
||||
task will stay in uninterruptible state. If lockdep is
|
||||
enabled then all held locks will also be reported. This
|
||||
feature has negligible overhead.
|
||||
|
||||
config KERNEL_WQ_WATCHDOG
|
||||
bool "Compile the kernel with detect Workqueue Stalls"
|
||||
depends on KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
Say Y here to enable stall detection on workqueues. If a
|
||||
worker pool doesn't make forward progress on a pending work
|
||||
item for over a given amount of time, 30s by default, a
|
||||
warning message is printed along with dump of workqueue
|
||||
state. This can be configured through kernel parameter
|
||||
"workqueue.watchdog_thresh" and its sysfs counterpart.
|
||||
|
||||
config KERNEL_DEBUG_ATOMIC_SLEEP
|
||||
bool "Compile the kernel with sleep inside atomic section checking"
|
||||
depends on KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
If you say Y here, various routines which may sleep will become very
|
||||
noisy if they are called inside atomic sections: when a spinlock is
|
||||
held, inside an rcu read side critical section, inside preempt disabled
|
||||
sections, inside an interrupt, etc...
|
||||
|
||||
config KERNEL_DEBUG_VM
|
||||
bool "Compile the kernel with debug VM"
|
||||
depends on KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
Enable this to turn on extended checks in the virtual-memory system
|
||||
that may impact performance.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config KERNEL_PRINTK_TIME
|
||||
bool "Enable printk timestamps"
|
||||
default y
|
||||
@@ -519,14 +239,10 @@ config KERNEL_KEXEC
|
||||
config KERNEL_PROC_VMCORE
|
||||
bool
|
||||
|
||||
config KERNEL_PROC_KCORE
|
||||
bool
|
||||
|
||||
config KERNEL_CRASH_DUMP
|
||||
depends on i386 || x86_64 || arm || armeb
|
||||
select KERNEL_KEXEC
|
||||
select KERNEL_PROC_VMCORE
|
||||
select KERNEL_PROC_KCORE
|
||||
bool "Enable support for kexec crashdump"
|
||||
default y
|
||||
|
||||
@@ -555,23 +271,23 @@ if KERNEL_DEVTMPFS
|
||||
endif
|
||||
|
||||
config KERNEL_KEYS
|
||||
bool "Enable kernel access key retention support"
|
||||
default !SMALL_FLASH
|
||||
bool "Enable kernel access key retention support"
|
||||
default n
|
||||
|
||||
config KERNEL_PERSISTENT_KEYRINGS
|
||||
bool "Enable kernel persistent keyrings"
|
||||
depends on KERNEL_KEYS
|
||||
default n
|
||||
|
||||
config KERNEL_KEYS_REQUEST_CACHE
|
||||
bool "Enable temporary caching of the last request_key() result"
|
||||
depends on KERNEL_KEYS
|
||||
default n
|
||||
bool "Enable kernel persistent keyrings"
|
||||
depends on KERNEL_KEYS
|
||||
default n
|
||||
|
||||
config KERNEL_BIG_KEYS
|
||||
bool "Enable large payload keys on kernel keyrings"
|
||||
depends on KERNEL_KEYS
|
||||
default n
|
||||
bool "Enable large payload keys on kernel keyrings"
|
||||
depends on KERNEL_KEYS
|
||||
default n
|
||||
|
||||
config KERNEL_ENCRYPTED_KEYS
|
||||
tristate "Enable keys with encrypted payloads on kernel keyrings"
|
||||
depends on KERNEL_KEYS
|
||||
default n
|
||||
|
||||
#
|
||||
# CGROUP support symbols
|
||||
@@ -579,7 +295,7 @@ config KERNEL_BIG_KEYS
|
||||
|
||||
config KERNEL_CGROUPS
|
||||
bool "Enable kernel cgroups"
|
||||
default y if !SMALL_FLASH
|
||||
default n
|
||||
|
||||
if KERNEL_CGROUPS
|
||||
|
||||
@@ -593,29 +309,21 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_FREEZER
|
||||
bool
|
||||
default y if KERNEL_CGROUP_FREEZER
|
||||
|
||||
config KERNEL_CGROUP_FREEZER
|
||||
bool "legacy Freezer cgroup subsystem"
|
||||
default n
|
||||
select KERNEL_FREEZER
|
||||
bool "Freezer cgroup subsystem"
|
||||
default y
|
||||
help
|
||||
Provides a way to freeze and unfreeze all tasks in a
|
||||
cgroup.
|
||||
(legacy cgroup1-only controller, in cgroup2 freezer
|
||||
is integrated in the Memory controller)
|
||||
|
||||
config KERNEL_CGROUP_DEVICE
|
||||
bool "legacy Device controller for cgroups"
|
||||
default n
|
||||
bool "Device controller for cgroups"
|
||||
default y
|
||||
help
|
||||
Provides a cgroup implementing whitelists for devices which
|
||||
a process in the cgroup can mknod or open.
|
||||
(legacy cgroup1-only controller)
|
||||
|
||||
config KERNEL_CGROUP_HUGETLB
|
||||
bool "HugeTLB controller"
|
||||
default n
|
||||
select KERNEL_HUGETLB_PAGE
|
||||
|
||||
config KERNEL_CGROUP_PIDS
|
||||
bool "PIDs cgroup subsystem"
|
||||
@@ -624,17 +332,9 @@ if KERNEL_CGROUPS
|
||||
Provides enforcement of process number limits in the scope of a
|
||||
cgroup.
|
||||
|
||||
config KERNEL_CGROUP_RDMA
|
||||
bool "RDMA controller for cgroups"
|
||||
default y
|
||||
|
||||
config KERNEL_CGROUP_BPF
|
||||
bool "Support for eBPF programs attached to cgroups"
|
||||
default y
|
||||
|
||||
config KERNEL_CPUSETS
|
||||
bool "Cpuset support"
|
||||
default y
|
||||
default n
|
||||
help
|
||||
This option will let you create and manage CPUSETs which
|
||||
allow dynamically partitioning a system into sets of CPUs and
|
||||
@@ -648,14 +348,14 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_CGROUP_CPUACCT
|
||||
bool "Simple CPU accounting cgroup subsystem"
|
||||
default y
|
||||
default n
|
||||
help
|
||||
Provides a simple Resource Controller for monitoring the
|
||||
total CPU consumed by the tasks in a cgroup.
|
||||
|
||||
config KERNEL_RESOURCE_COUNTERS
|
||||
bool "Resource counters"
|
||||
default y
|
||||
default n
|
||||
help
|
||||
This option enables controller independent resource accounting
|
||||
infrastructure that works with cgroups.
|
||||
@@ -666,8 +366,7 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_MEMCG
|
||||
bool "Memory Resource Controller for Control Groups"
|
||||
default y
|
||||
select KERNEL_FREEZER
|
||||
default n
|
||||
depends on KERNEL_RESOURCE_COUNTERS || !LINUX_3_18
|
||||
help
|
||||
Provides a memory resource controller that manages both anonymous
|
||||
@@ -690,7 +389,7 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_MEMCG_SWAP
|
||||
bool "Memory Resource Controller Swap Extension"
|
||||
default y
|
||||
default n
|
||||
depends on KERNEL_MEMCG
|
||||
help
|
||||
Add swap management feature to memory resource controller. When you
|
||||
@@ -725,7 +424,7 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_MEMCG_KMEM
|
||||
bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
|
||||
default y
|
||||
default n
|
||||
depends on KERNEL_MEMCG
|
||||
help
|
||||
The Kernel Memory extension for Memory Resource Controller can limit
|
||||
@@ -746,7 +445,7 @@ if KERNEL_CGROUPS
|
||||
|
||||
menuconfig KERNEL_CGROUP_SCHED
|
||||
bool "Group CPU scheduler"
|
||||
default y
|
||||
default n
|
||||
help
|
||||
This feature lets CPU scheduler recognize task groups and control CPU
|
||||
bandwidth allocation to such task groups. It uses cgroups to group
|
||||
@@ -756,11 +455,11 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_FAIR_GROUP_SCHED
|
||||
bool "Group scheduling for SCHED_OTHER"
|
||||
default y
|
||||
default n
|
||||
|
||||
config KERNEL_CFS_BANDWIDTH
|
||||
bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
|
||||
default y
|
||||
default n
|
||||
depends on KERNEL_FAIR_GROUP_SCHED
|
||||
help
|
||||
This option allows users to define CPU bandwidth rates (limits) for
|
||||
@@ -771,7 +470,7 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_RT_GROUP_SCHED
|
||||
bool "Group scheduling for SCHED_RR/FIFO"
|
||||
default y
|
||||
default n
|
||||
help
|
||||
This feature lets you explicitly allocate real CPU bandwidth
|
||||
to task groups. If enabled, it will also make it impossible to
|
||||
@@ -799,20 +498,6 @@ if KERNEL_CGROUPS
|
||||
CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
|
||||
CONFIG_BLK_DEV_THROTTLING=y.
|
||||
|
||||
if KERNEL_BLK_CGROUP
|
||||
|
||||
config KERNEL_CFQ_GROUP_IOSCHED
|
||||
bool "Proportional weight of disk bandwidth in CFQ"
|
||||
|
||||
config KERNEL_BLK_DEV_THROTTLING
|
||||
bool "Enable throttling policy"
|
||||
default y
|
||||
|
||||
config KERNEL_BLK_DEV_THROTTLING_LOW
|
||||
bool "Block throttling .low limit interface support (EXPERIMENTAL)"
|
||||
depends on KERNEL_BLK_DEV_THROTTLING
|
||||
endif
|
||||
|
||||
config KERNEL_DEBUG_BLK_CGROUP
|
||||
bool "Enable Block IO controller debugging"
|
||||
default n
|
||||
@@ -822,16 +507,12 @@ if KERNEL_CGROUPS
|
||||
files in a cgroup which can be useful for debugging.
|
||||
|
||||
config KERNEL_NET_CLS_CGROUP
|
||||
bool "legacy Control Group Classifier"
|
||||
default n
|
||||
bool "Control Group Classifier"
|
||||
default y
|
||||
|
||||
config KERNEL_CGROUP_NET_CLASSID
|
||||
bool "legacy Network classid cgroup"
|
||||
default n
|
||||
|
||||
config KERNEL_CGROUP_NET_PRIO
|
||||
bool "legacy Network priority cgroup"
|
||||
default n
|
||||
config KERNEL_NETPRIO_CGROUP
|
||||
bool "Network priority cgroup"
|
||||
default y
|
||||
|
||||
endif
|
||||
|
||||
@@ -841,7 +522,7 @@ endif
|
||||
|
||||
config KERNEL_NAMESPACES
|
||||
bool "Enable kernel namespaces"
|
||||
default y if !SMALL_FLASH
|
||||
default n
|
||||
|
||||
if KERNEL_NAMESPACES
|
||||
|
||||
@@ -883,40 +564,51 @@ if KERNEL_NAMESPACES
|
||||
|
||||
endif
|
||||
|
||||
config KERNEL_DEVPTS_MULTIPLE_INSTANCES
|
||||
bool "Support multiple instances of devpts"
|
||||
default y if !SMALL_FLASH
|
||||
help
|
||||
Enable support for multiple instances of devpts filesystem.
|
||||
If you want to have isolated PTY namespaces (eg: in containers),
|
||||
say Y here. Otherwise, say N. If enabled, each mount of devpts
|
||||
filesystem with the '-o newinstance' option will create an
|
||||
independent PTY namespace.
|
||||
#
|
||||
# LXC related symbols
|
||||
#
|
||||
|
||||
config KERNEL_POSIX_MQUEUE
|
||||
bool "POSIX Message Queues"
|
||||
default y if !SMALL_FLASH
|
||||
help
|
||||
POSIX variant of message queues is a part of IPC. In POSIX message
|
||||
queues every message has a priority which decides about succession
|
||||
of receiving it by a process. If you want to compile and run
|
||||
programs written e.g. for Solaris with use of its POSIX message
|
||||
queues (functions mq_*) say Y here.
|
||||
config KERNEL_LXC_MISC
|
||||
bool "Enable miscellaneous LXC related options"
|
||||
default n
|
||||
|
||||
POSIX message queues are visible as a filesystem called 'mqueue'
|
||||
and can be mounted somewhere if you want to do filesystem
|
||||
operations on message queues.
|
||||
if KERNEL_LXC_MISC
|
||||
|
||||
config KERNEL_DEVPTS_MULTIPLE_INSTANCES
|
||||
bool "Support multiple instances of devpts"
|
||||
default y
|
||||
help
|
||||
Enable support for multiple instances of devpts filesystem.
|
||||
If you want to have isolated PTY namespaces (eg: in containers),
|
||||
say Y here. Otherwise, say N. If enabled, each mount of devpts
|
||||
filesystem with the '-o newinstance' option will create an
|
||||
independent PTY namespace.
|
||||
|
||||
config KERNEL_POSIX_MQUEUE
|
||||
bool "POSIX Message Queues"
|
||||
default y
|
||||
help
|
||||
POSIX variant of message queues is a part of IPC. In POSIX message
|
||||
queues every message has a priority which decides about succession
|
||||
of receiving it by a process. If you want to compile and run
|
||||
programs written e.g. for Solaris with use of its POSIX message
|
||||
queues (functions mq_*) say Y here.
|
||||
|
||||
POSIX message queues are visible as a filesystem called 'mqueue'
|
||||
and can be mounted somewhere if you want to do filesystem
|
||||
operations on message queues.
|
||||
|
||||
endif
|
||||
|
||||
config KERNEL_SECCOMP_FILTER
|
||||
bool
|
||||
default y if !SMALL_FLASH
|
||||
default n
|
||||
|
||||
config KERNEL_SECCOMP
|
||||
bool "Enable seccomp support"
|
||||
depends on !(TARGET_uml)
|
||||
select KERNEL_SECCOMP_FILTER
|
||||
default y if !SMALL_FLASH
|
||||
default n
|
||||
help
|
||||
Build kernel with support for seccomp.
|
||||
|
||||
@@ -956,15 +648,6 @@ if KERNEL_IPV6
|
||||
config KERNEL_IPV6_PIMSM_V2
|
||||
def_bool n
|
||||
|
||||
config KERNEL_IPV6_SEG6_LWTUNNEL
|
||||
bool "Enable support for lightweight tunnels"
|
||||
default y if !SMALL_FLASH
|
||||
help
|
||||
Using lwtunnel (needed for IPv6 segment routing) requires ip-full package.
|
||||
|
||||
config KERNEL_LWTUNNEL_BPF
|
||||
def_bool n
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
@@ -1051,7 +734,7 @@ menu "Filesystem ACL and attr support options"
|
||||
select KERNEL_FS_POSIX_ACL
|
||||
default y if USE_FS_ACL_ATTR
|
||||
|
||||
config KERNEL_HFSPLUS_FS_POSIX_ACL
|
||||
config KERNEL_HFSPLUG_FS_POSIX_ACL
|
||||
bool "Enable POSIX ACL for HFS+ Filesystems"
|
||||
select KERNEL_FS_POSIX_ACL
|
||||
default y if USE_FS_ACL_ATTR
|
||||
@@ -1102,89 +785,3 @@ config KERNEL_DEVKMEM
|
||||
Say Y here if you want to support the /dev/kmem device. The
|
||||
/dev/kmem device is rarely used, but can be used for certain
|
||||
kind of kernel debugging operations.
|
||||
|
||||
config KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE
|
||||
int "Number of squashfs fragments cached"
|
||||
default 2 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
|
||||
default 3
|
||||
|
||||
config KERNEL_SQUASHFS_XATTR
|
||||
bool "Squashfs XATTR support"
|
||||
|
||||
#
|
||||
# compile optimiziation setting
|
||||
#
|
||||
choice
|
||||
prompt "Compiler optimization level"
|
||||
default KERNEL_CC_OPTIMIZE_FOR_SIZE if SMALL_FLASH
|
||||
|
||||
config KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE
|
||||
bool "Optimize for performance"
|
||||
help
|
||||
This is the default optimization level for the kernel, building
|
||||
with the "-O2" compiler flag for best performance and most
|
||||
helpful compile-time warnings.
|
||||
|
||||
config KERNEL_CC_OPTIMIZE_FOR_SIZE
|
||||
bool "Optimize for size"
|
||||
help
|
||||
Enabling this option will pass "-Os" instead of "-O2" to
|
||||
your compiler resulting in a smaller kernel.
|
||||
|
||||
endchoice
|
||||
|
||||
config KERNEL_AUDIT
|
||||
bool "Auditing support"
|
||||
|
||||
config KERNEL_SECURITY
|
||||
bool "Enable different security models"
|
||||
|
||||
config KERNEL_SECURITY_NETWORK
|
||||
bool "Socket and Networking Security Hooks"
|
||||
select KERNEL_SECURITY
|
||||
|
||||
config KERNEL_SECURITY_SELINUX
|
||||
bool "NSA SELinux Support"
|
||||
select KERNEL_SECURITY_NETWORK
|
||||
select KERNEL_AUDIT
|
||||
|
||||
config KERNEL_SECURITY_SELINUX_BOOTPARAM
|
||||
bool "NSA SELinux boot parameter"
|
||||
depends on KERNEL_SECURITY_SELINUX
|
||||
default y
|
||||
|
||||
config KERNEL_SECURITY_SELINUX_DISABLE
|
||||
bool "NSA SELinux runtime disable"
|
||||
depends on KERNEL_SECURITY_SELINUX
|
||||
|
||||
config KERNEL_SECURITY_SELINUX_DEVELOP
|
||||
bool "NSA SELinux Development Support"
|
||||
depends on KERNEL_SECURITY_SELINUX
|
||||
default y
|
||||
|
||||
config KERNEL_SECURITY_SELINUX_SIDTAB_HASH_BITS
|
||||
int
|
||||
depends on KERNEL_SECURITY_SELINUX
|
||||
default 9
|
||||
|
||||
config KERNEL_SECURITY_SELINUX_SID2STR_CACHE_SIZE
|
||||
int
|
||||
depends on KERNEL_SECURITY_SELINUX
|
||||
default 256
|
||||
|
||||
config KERNEL_LSM
|
||||
string
|
||||
default "lockdown,yama,loadpin,safesetid,integrity,selinux"
|
||||
depends on KERNEL_SECURITY_SELINUX
|
||||
|
||||
config KERNEL_EXT4_FS_SECURITY
|
||||
bool "Ext4 Security Labels"
|
||||
|
||||
config KERNEL_F2FS_FS_SECURITY
|
||||
bool "F2FS Security Labels"
|
||||
|
||||
config KERNEL_UBIFS_FS_SECURITY
|
||||
bool "UBIFS Security Labels"
|
||||
|
||||
config KERNEL_JFFS2_FS_SECURITY
|
||||
bool "JFFS2 Security Labels"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
src-git-full packages https://git.openwrt.org/feed/packages.git;openwrt-21.02
|
||||
src-git-full luci https://git.openwrt.org/project/luci.git;openwrt-21.02
|
||||
src-git-full routing https://git.openwrt.org/feed/routing.git;openwrt-21.02
|
||||
src-git-full telephony https://git.openwrt.org/feed/telephony.git;openwrt-21.02
|
||||
#src-link custom /usr/src/openwrt/custom-feed
|
||||
src-git packages https://git.openwrt.org/feed/packages.git^8bf5fc17db6072549a4e3bd8230d7962364f2043
|
||||
src-git luci https://git.openwrt.org/project/luci.git^6df9a57ef0773c7158dadbb5054a58cb3d70c621
|
||||
src-git routing https://git.openwrt.org/feed/routing.git^1b9d1c419f0ecefda51922a7845ab2183d6acd76
|
||||
src-git telephony https://git.openwrt.org/feed/telephony.git^88b12368f11f3feeefcd4dcbe54f21159b8356c1
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2007-2020 OpenWrt.org
|
||||
# Copyright (C) 2007-2012 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
autoconf_bool = $(patsubst %,$(if $($(1)),--enable,--disable)-%,$(2))
|
||||
|
||||
@@ -36,9 +39,7 @@ define autoreconf
|
||||
[ -e $(p)/config.rpath ] || \
|
||||
ln -s $(SCRIPT_DIR)/config.rpath $(p)/config.rpath; \
|
||||
touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; \
|
||||
$(AM_TOOL_PATHS) \
|
||||
LIBTOOLIZE='$(STAGING_DIR_HOST)/bin/libtoolize --install' \
|
||||
$(STAGING_DIR_HOST)/bin/autoreconf -v -f -i -s \
|
||||
$(AM_TOOL_PATHS) $(STAGING_DIR_HOST)/bin/autoreconf -v -f -i -s \
|
||||
$(if $(word 2,$(3)),--no-recursive) \
|
||||
-B $(STAGING_DIR_HOST)/share/aclocal \
|
||||
$(patsubst %,-I %,$(5)) \
|
||||
@@ -62,12 +63,6 @@ define patch_libtool
|
||||
);
|
||||
endef
|
||||
|
||||
define set_libtool_abiver
|
||||
sed -i \
|
||||
-e 's,^soname_spec=.*,soname_spec="\\$$$${libname}\\$$$${shared_ext}.$(PKG_ABI_VERSION)",' \
|
||||
-e 's,^library_names_spec=.*,library_names_spec="\\$$$${libname}\\$$$${shared_ext}.$(PKG_ABI_VERSION) \\$$$${libname}\\$$$${shared_ext}",' \
|
||||
$(PKG_BUILD_DIR)/libtool
|
||||
endef
|
||||
|
||||
PKG_LIBTOOL_PATHS?=$(CONFIGURE_PATH)
|
||||
PKG_AUTOMAKE_PATHS?=$(CONFIGURE_PATH)
|
||||
@@ -116,10 +111,6 @@ ifneq ($(filter libtool,$(PKG_FIXUP)),)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(filter libtool-abiver,$(PKG_FIXUP)),)
|
||||
Hooks/Configure/Post += set_libtool_abiver
|
||||
endif
|
||||
|
||||
ifneq ($(filter libtool-ucxx,$(PKG_FIXUP)),)
|
||||
PKG_BUILD_DEPENDS += libtool gettext libiconv
|
||||
ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),)
|
||||
|
||||
@@ -4,12 +4,11 @@ PKG_INSTALL:=1
|
||||
|
||||
ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
|
||||
MAKE_FLAGS+=VERBOSE=1
|
||||
HOST_MAKE_FLAGS+=VERBOSE=1
|
||||
endif
|
||||
|
||||
CMAKE_BINARY_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_BINARY_SUBDIR),/$(CMAKE_BINARY_SUBDIR))
|
||||
CMAKE_SOURCE_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_SOURCE_SUBDIR),/$(CMAKE_SOURCE_SUBDIR))
|
||||
HOST_CMAKE_SOURCE_DIR = $(HOST_BUILD_DIR)$(if $(CMAKE_SOURCE_SUBDIR),/$(CMAKE_SOURCE_SUBDIR))
|
||||
CMAKE_SOURCE_DIR = $(PKG_BUILD_DIR)
|
||||
HOST_CMAKE_SOURCE_DIR = $(HOST_BUILD_DIR)
|
||||
MAKE_PATH = $(firstword $(CMAKE_BINARY_SUBDIR) .)
|
||||
|
||||
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
@@ -19,22 +18,16 @@ else
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CCACHE),)
|
||||
CMAKE_C_COMPILER_LAUNCHER:=
|
||||
CMAKE_CXX_COMPILER_LAUNCHER:=
|
||||
CMAKE_C_COMPILER:=$(call cmake_tool,$(TARGET_CC))
|
||||
CMAKE_CXX_COMPILER:=$(call cmake_tool,$(TARGET_CXX))
|
||||
|
||||
CMAKE_HOST_C_COMPILER:=$(HOSTCC)
|
||||
CMAKE_HOST_CXX_COMPILER:=$(HOSTCXX)
|
||||
CMAKE_C_COMPILER_ARG1:=
|
||||
CMAKE_CXX_COMPILER_ARG1:=
|
||||
else
|
||||
CCACHE:=$(STAGING_DIR_HOST)/bin/ccache
|
||||
CMAKE_C_COMPILER_LAUNCHER:=$(CCACHE)
|
||||
CMAKE_CXX_COMPILER_LAUNCHER:=$(CCACHE)
|
||||
CMAKE_C_COMPILER:=$(TARGET_CC_NOCACHE)
|
||||
CMAKE_CXX_COMPILER:=$(TARGET_CXX_NOCACHE)
|
||||
|
||||
CMAKE_HOST_C_COMPILER:=$(HOSTCC_NOCACHE)
|
||||
CMAKE_HOST_CXX_COMPILER:=$(HOSTCXX_NOCACHE)
|
||||
CMAKE_C_COMPILER:=$(CCACHE)
|
||||
CMAKE_C_COMPILER_ARG1:=$(TARGET_CC_NOCACHE)
|
||||
CMAKE_CXX_COMPILER:=$(CCACHE)
|
||||
CMAKE_CXX_COMPILER_ARG1:=$(TARGET_CXX_NOCACHE)
|
||||
endif
|
||||
CMAKE_AR:=$(call cmake_tool,$(TARGET_AR))
|
||||
CMAKE_NM:=$(call cmake_tool,$(TARGET_NM))
|
||||
@@ -57,12 +50,12 @@ define Build/Configure/Default
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
|
||||
-DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \
|
||||
-DCMAKE_C_COMPILER="$(CMAKE_C_COMPILER)" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$(CMAKE_CXX_COMPILER_LAUNCHER)" \
|
||||
-DCMAKE_C_COMPILER_ARG1="$(CMAKE_C_COMPILER_ARG1)" \
|
||||
-DCMAKE_CXX_COMPILER="$(CMAKE_CXX_COMPILER)" \
|
||||
-DCMAKE_ASM_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \
|
||||
-DCMAKE_CXX_COMPILER_ARG1="$(CMAKE_CXX_COMPILER_ARG1)" \
|
||||
-DCMAKE_ASM_COMPILER="$(CMAKE_C_COMPILER)" \
|
||||
-DCMAKE_ASM_COMPILER_ARG1="$(CMAKE_C_COMPILER_ARG1)" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
|
||||
-DCMAKE_MODULE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS) $(CMAKE_SHARED_LDFLAGS)" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS) $(CMAKE_SHARED_LDFLAGS)" \
|
||||
@@ -78,12 +71,6 @@ define Build/Configure/Default
|
||||
-DDL_LIBRARY=$(STAGING_DIR) \
|
||||
-DCMAKE_PREFIX_PATH=$(STAGING_DIR) \
|
||||
-DCMAKE_SKIP_RPATH=TRUE \
|
||||
-DCMAKE_EXPORT_PACKAGE_REGISTRY=FALSE \
|
||||
-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE \
|
||||
-DCMAKE_FIND_USE_PACKAGE_REGISTRY=FALSE \
|
||||
-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=TRUE \
|
||||
-DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=FALSE \
|
||||
-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=TRUE \
|
||||
$(CMAKE_OPTIONS) \
|
||||
$(CMAKE_SOURCE_DIR) \
|
||||
)
|
||||
@@ -103,12 +90,6 @@ define Host/Configure/Default
|
||||
LDFLAGS="$(HOST_LDFLAGS)" \
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \
|
||||
-DCMAKE_C_COMPILER="$(CMAKE_HOST_C_COMPILER)" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$(CMAKE_CXX_COMPILER_LAUNCHER)" \
|
||||
-DCMAKE_CXX_COMPILER="$(CMAKE_HOST_CXX_COMPILER)" \
|
||||
-DCMAKE_ASM_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \
|
||||
-DCMAKE_ASM_COMPILER="$(CMAKE_HOST_C_COMPILER)" \
|
||||
-DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
|
||||
-DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
|
||||
@@ -122,13 +103,6 @@ define Host/Configure/Default
|
||||
-DCMAKE_INSTALL_PREFIX=$(HOST_BUILD_PREFIX) \
|
||||
-DCMAKE_PREFIX_PATH=$(HOST_BUILD_PREFIX) \
|
||||
-DCMAKE_SKIP_RPATH=TRUE \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_EXPORT_PACKAGE_REGISTRY=FALSE \
|
||||
-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE \
|
||||
-DCMAKE_FIND_USE_PACKAGE_REGISTRY=FALSE \
|
||||
-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=TRUE \
|
||||
-DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=FALSE \
|
||||
-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=TRUE \
|
||||
$(CMAKE_HOST_OPTIONS) \
|
||||
$(HOST_CMAKE_SOURCE_DIR) \
|
||||
)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2007-2020 OpenWrt.org
|
||||
# Copyright (C) 2007 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
# debug flags:
|
||||
#
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2007-2020 OpenWrt.org
|
||||
|
||||
# Copyright (C) 2007 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# define a dependency on a subtree
|
||||
# parameters:
|
||||
# 1: directories/files
|
||||
@@ -11,8 +13,7 @@
|
||||
|
||||
DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp" -x "*/.pkgdir*"
|
||||
|
||||
find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -printf "%p%T@\n" | sort | mkhash md5
|
||||
find_md5_reproducible=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -print0 | xargs -0 mkhash md5 | sort | mkhash md5
|
||||
find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) | mkhash md5
|
||||
|
||||
define rdep
|
||||
.PRECIOUS: $(2)
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2012 OpenWrt.org
|
||||
# Copyright (C) 2016 LEDE project
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
PROJECT_GIT = https://git.openwrt.org
|
||||
|
||||
@@ -9,32 +12,24 @@ OPENWRT_GIT = $(PROJECT_GIT)
|
||||
LEDE_GIT = $(PROJECT_GIT)
|
||||
|
||||
ifdef PKG_SOURCE_VERSION
|
||||
ifndef PKG_VERSION
|
||||
PKG_VERSION := $(if $(PKG_SOURCE_DATE),$(PKG_SOURCE_DATE)-)$(call version_abbrev,$(PKG_SOURCE_VERSION))
|
||||
endif
|
||||
PKG_SOURCE_SUBDIR ?= $(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE ?= $(PKG_SOURCE_SUBDIR).tar.xz
|
||||
PKG_VERSION ?= $(if $(PKG_SOURCE_DATE),$(PKG_SOURCE_DATE)-)$(call version_abbrev,$(PKG_SOURCE_VERSION))
|
||||
PKG_SOURCE_SUBDIR ?= $(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE ?= $(PKG_SOURCE_SUBDIR).tar.xz
|
||||
endif
|
||||
|
||||
DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)
|
||||
|
||||
define dl_method_git
|
||||
$(if $(filter https://github.com/% git://github.com/%,$(1)),github_archive,git)
|
||||
endef
|
||||
|
||||
# Try to guess the download method from the URL
|
||||
define dl_method
|
||||
$(strip \
|
||||
$(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)),
|
||||
$(if $(2),$(2), \
|
||||
$(if $(filter @OPENWRT @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
|
||||
$(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \
|
||||
$(if $(filter svn://%,$(1)),svn, \
|
||||
$(if $(filter cvs://%,$(1)),cvs, \
|
||||
$(if $(filter hg://%,$(1)),hg, \
|
||||
$(if $(filter sftp://%,$(1)),bzr, \
|
||||
unknown \
|
||||
) \
|
||||
$(if $(2),$(2), \
|
||||
$(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
|
||||
$(if $(filter git://%,$(1)),git, \
|
||||
$(if $(filter svn://%,$(1)),svn, \
|
||||
$(if $(filter cvs://%,$(1)),cvs, \
|
||||
$(if $(filter hg://%,$(1)),hg, \
|
||||
$(if $(filter sftp://%,$(1)),bzr, \
|
||||
unknown \
|
||||
) \
|
||||
) \
|
||||
) \
|
||||
@@ -49,24 +44,18 @@ endef
|
||||
dl_pack/bz2=bzip2 -c > $(1)
|
||||
dl_pack/gz=gzip -nc > $(1)
|
||||
dl_pack/xz=xz -zc -7e > $(1)
|
||||
dl_pack/zst=zstd -T0 --ultra -20 -c > $(1)
|
||||
dl_pack/unknown=$(error ERROR: Unknown pack format for file $(1))
|
||||
define dl_pack
|
||||
$(if $(dl_pack/$(call ext,$(1))),$(dl_pack/$(call ext,$(1))),$(dl_pack/unknown))
|
||||
endef
|
||||
define dl_tar_pack
|
||||
$(TAR) --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name \
|
||||
$$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -c $(2) | $(call dl_pack,$(1))
|
||||
$(TAR) --numeric-owner --owner=0 --group=0 --sort=name $$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -c $(2) | $(call dl_pack,$(1))
|
||||
endef
|
||||
|
||||
ifdef CHECK
|
||||
check_escape=$(subst ','\'',$(1))
|
||||
#')
|
||||
|
||||
# $(1): suffix of the F_, C_ variables, e.g. hash_deprecated, hash_mismatch, etc.
|
||||
# $(2): filename
|
||||
# $(3): expected hash value
|
||||
# $(4): var name of the the form: {PKG_,Download/<name>:}{,MIRROR_}{HASH,MIRROR_HASH}
|
||||
check_warn_nofix = $(info $(shell printf "$(_R)WARNING: %s$(_N)" '$(call check_escape,$(call C_$(1),$(2),$(3),$(4)))'))
|
||||
ifndef FIXUP
|
||||
check_warn = $(check_warn_nofix)
|
||||
@@ -82,17 +71,11 @@ F_hash_mismatch = $(F_hash_deprecated)
|
||||
F_hash_missing = $(SCRIPT_DIR)/fixup-makefile.pl $(CURDIR)/Makefile add-hash $(3) $(call gen_sha256sum,$(1))
|
||||
endif
|
||||
|
||||
# $(1): filename
|
||||
# $(2): expected hash value
|
||||
# $(3): var name of the the form: {PKG_,Download/<name>:}{,MIRROR_}{HASH,MIRROR_HASH}
|
||||
C_download_missing = $(1) is missing, please run make download before re-running this check
|
||||
C_hash_mismatch = $(3) does not match $(1) hash $(call gen_sha256sum,$(1))
|
||||
C_hash_deprecated = $(3) uses deprecated hash, set to $(call gen_sha256sum,$(1))
|
||||
C_hash_missing = $(3) is missing, set to $(call gen_sha256sum,$(1))
|
||||
|
||||
# $(1): filename
|
||||
# $(2): expected hash value
|
||||
# $(3): var name of the the form: {PKG_,Download/<name>:}{,MIRROR_}{HASH,MIRROR_HASH}
|
||||
check_hash = \
|
||||
$(if $(wildcard $(DL_DIR)/$(1)), \
|
||||
$(if $(filter-out x,$(2)), \
|
||||
@@ -133,9 +116,6 @@ define DownloadMethod/default
|
||||
)
|
||||
endef
|
||||
|
||||
# $(1): "check"
|
||||
# $(2): "PKG_" if <name> as in Download/<name> is "default", otherwise "Download/<name>:"
|
||||
# $(3): shell command sequence to do the download
|
||||
define wrap_mirror
|
||||
$(if $(if $(MIRROR),$(filter-out x,$(MIRROR_HASH))),$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_HASH)" "" || ( $(3) ),$(3)) \
|
||||
$(if $(filter check,$(1)), \
|
||||
@@ -179,41 +159,23 @@ endef
|
||||
|
||||
define DownloadMethod/git
|
||||
$(call wrap_mirror,$(1),$(2), \
|
||||
$(call DownloadMethod/rawgit) \
|
||||
echo "Checking out files from the git repository..."; \
|
||||
mkdir -p $(TMP_DIR)/dl && \
|
||||
cd $(TMP_DIR)/dl && \
|
||||
rm -rf $(SUBDIR) && \
|
||||
[ \! -d $(SUBDIR) ] && \
|
||||
git clone $(OPTS) $(URL) $(SUBDIR) && \
|
||||
(cd $(SUBDIR) && git checkout $(VERSION) && \
|
||||
git submodule update --init --recursive) && \
|
||||
echo "Packing checkout..." && \
|
||||
export TAR_TIMESTAMP=`cd $(SUBDIR) && git log -1 --format='@%ct'` && \
|
||||
rm -rf $(SUBDIR)/.git && \
|
||||
$(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
|
||||
mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
|
||||
rm -rf $(SUBDIR); \
|
||||
)
|
||||
endef
|
||||
|
||||
define DownloadMethod/github_archive
|
||||
$(call wrap_mirror,$(1),$(2), \
|
||||
$(SCRIPT_DIR)/dl_github_archive.py \
|
||||
--dl-dir="$(DL_DIR)" \
|
||||
--url="$(URL)" \
|
||||
--version="$(VERSION)" \
|
||||
--subdir="$(SUBDIR)" \
|
||||
--source="$(FILE)" \
|
||||
--hash="$(MIRROR_HASH)" \
|
||||
|| ( $(call DownloadMethod/rawgit) ); \
|
||||
)
|
||||
endef
|
||||
|
||||
# Only intends to be called as a submethod from other DownloadMethod
|
||||
define DownloadMethod/rawgit
|
||||
echo "Checking out files from the git repository..."; \
|
||||
mkdir -p $(TMP_DIR)/dl && \
|
||||
cd $(TMP_DIR)/dl && \
|
||||
rm -rf $(SUBDIR) && \
|
||||
[ \! -d $(SUBDIR) ] && \
|
||||
git clone $(OPTS) $(URL) $(SUBDIR) && \
|
||||
(cd $(SUBDIR) && git checkout $(VERSION) && \
|
||||
git submodule update --init --recursive) && \
|
||||
echo "Packing checkout..." && \
|
||||
export TAR_TIMESTAMP=`cd $(SUBDIR) && git log -1 --format='@%ct'` && \
|
||||
rm -rf $(SUBDIR)/.git && \
|
||||
$(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
|
||||
mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
|
||||
rm -rf $(SUBDIR);
|
||||
endef
|
||||
|
||||
define DownloadMethod/bzr
|
||||
$(call wrap_mirror,$(1),$(2), \
|
||||
echo "Checking out files from the bzr repository..."; \
|
||||
@@ -289,7 +251,6 @@ endef
|
||||
define Download/default
|
||||
FILE:=$(PKG_SOURCE)
|
||||
URL:=$(PKG_SOURCE_URL)
|
||||
URL_FILE:=$(PKG_SOURCE_URL_FILE)
|
||||
SUBDIR:=$(PKG_SOURCE_SUBDIR)
|
||||
PROTO:=$(PKG_SOURCE_PROTO)
|
||||
$(if $(PKG_SOURCE_MIRROR),MIRROR:=$(filter 1,$(PKG_MIRROR)))
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
# Copyright (C) 2016 LEDE Project
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
-include $(TMP_DIR)/.packageauxvars
|
||||
-include $(TMP_DIR)/.packagesubdirs
|
||||
|
||||
FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*))
|
||||
FEEDS_AVAILABLE:=$(sort $(FEEDS_INSTALLED) $(shell $(SCRIPT_DIR)/feeds list -n 2>/dev/null))
|
||||
FEEDS_AVAILABLE:=$(sort $(FEEDS_INSTALLED) $(shell $(SCRIPT_DIR)/feeds list -n))
|
||||
|
||||
PACKAGE_SUBDIRS=$(PACKAGE_DIR)
|
||||
ifneq ($(CONFIG_PER_FEED_REPO),)
|
||||
@@ -31,23 +34,10 @@ endef
|
||||
define FeedSourcesAppend
|
||||
( \
|
||||
echo 'src/gz %d_core %U/targets/%S/packages'; \
|
||||
echo 'src/gz %d_base %U/packages/%A/base'; \
|
||||
$(strip $(if $(CONFIG_PER_FEED_REPO), \
|
||||
echo 'src/gz %d_base %U/packages/%A/base'; \
|
||||
$(if $(filter %SNAPSHOT-y,$(VERSION_NUMBER)-$(CONFIG_BUILDBOT)), \
|
||||
echo 'src/gz %d_kmods %U/targets/%S/kmods/$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)';) \
|
||||
$(foreach feed,$(FEEDS_AVAILABLE), \
|
||||
$(if $(CONFIG_FEED_$(feed)), \
|
||||
echo '$(if $(filter m,$(CONFIG_FEED_$(feed))),# )src/gz %d_$(feed) %U/packages/%A/$(feed)';)))) \
|
||||
) >> $(1)
|
||||
endef
|
||||
|
||||
# 1: package name
|
||||
define GetABISuffix
|
||||
$(if $(ABIV_$(1)),$(ABIV_$(1)),$(call FormatABISuffix,$(1),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
|
||||
endef
|
||||
|
||||
# 1: package name
|
||||
# 2: abi version
|
||||
define FormatABISuffix
|
||||
$(if $(filter-out kmod-%,$(1)),$(if $(2),$(if $(filter %0 %1 %2 %3 %4 %5 %6 %7 %8 %9,$(1)),-)$(2)))
|
||||
endef
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2015-2020 OpenWrt.org
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
PKG_CHECK_FORMAT_SECURITY ?= 1
|
||||
PKG_ASLR_PIE ?= 1
|
||||
PKG_ASLR_PIE_REGULAR ?= 0
|
||||
PKG_SSP ?= 1
|
||||
PKG_FORTIFY_SOURCE ?= 1
|
||||
PKG_RELRO ?= 1
|
||||
@@ -14,16 +16,10 @@ ifdef CONFIG_PKG_CHECK_FORMAT_SECURITY
|
||||
TARGET_CFLAGS += -Wformat -Werror=format-security
|
||||
endif
|
||||
endif
|
||||
ifdef CONFIG_PKG_ASLR_PIE_ALL
|
||||
ifdef CONFIG_PKG_ASLR_PIE
|
||||
ifeq ($(strip $(PKG_ASLR_PIE)),1)
|
||||
TARGET_CFLAGS += $(FPIC)
|
||||
TARGET_LDFLAGS += $(FPIC) -specs=$(INCLUDE_DIR)/hardened-ld-pie.specs
|
||||
endif
|
||||
endif
|
||||
ifdef CONFIG_PKG_ASLR_PIE_REGULAR
|
||||
ifeq ($(strip $(PKG_ASLR_PIE_REGULAR)),1)
|
||||
TARGET_CFLAGS += $(FPIC)
|
||||
TARGET_LDFLAGS += $(FPIC) -specs=$(INCLUDE_DIR)/hardened-ld-pie.specs
|
||||
TARGET_CFLAGS += -fPIC
|
||||
TARGET_LDFLAGS += -specs=$(INCLUDE_DIR)/hardened-ld-pie.specs
|
||||
endif
|
||||
endif
|
||||
ifdef CONFIG_PKG_CC_STACKPROTECTOR_REGULAR
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(INCLUDE_DIR)/download.mk
|
||||
|
||||
@@ -21,7 +24,7 @@ include $(INCLUDE_DIR)/depends.mk
|
||||
include $(INCLUDE_DIR)/quilt.mk
|
||||
|
||||
BUILD_TYPES += host
|
||||
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
|
||||
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
|
||||
HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured
|
||||
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
|
||||
HOST_BUILD_PREFIX?=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST))
|
||||
@@ -129,6 +132,7 @@ define Host/Exports/Default
|
||||
$(1) : export STAGING_PREFIX=$$(HOST_BUILD_PREFIX)
|
||||
$(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig
|
||||
$(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig
|
||||
$(1) : export CCACHE_DIR:=$(STAGING_DIR_HOST)/ccache
|
||||
$(if $(HOST_CONFIG_SITE),$(1) : export CONFIG_SITE:=$(HOST_CONFIG_SITE))
|
||||
$(if $(IS_PACKAGE_BUILD),$(1) : export PATH=$$(TARGET_PATH_PKG))
|
||||
endef
|
||||
@@ -180,25 +184,23 @@ ifndef DUMP
|
||||
clean-build: host-clean-build
|
||||
endif
|
||||
|
||||
$(DL_DIR)/$(FILE): FORCE
|
||||
|
||||
$(_host_target)host-prepare: $(HOST_STAMP_PREPARED)
|
||||
$(_host_target)host-configure: $(HOST_STAMP_CONFIGURED)
|
||||
$(_host_target)host-compile: $(HOST_STAMP_BUILT) $(HOST_STAMP_INSTALLED)
|
||||
host-install: host-compile
|
||||
|
||||
host-clean-build: FORCE
|
||||
$(call Host/Uninstall)
|
||||
rm -rf $(HOST_BUILD_DIR) $(HOST_STAMP_BUILT)
|
||||
|
||||
host-clean: host-clean-build
|
||||
$(call Host/Clean)
|
||||
$(call Host/Uninstall)
|
||||
rm -rf $(HOST_STAMP_INSTALLED)
|
||||
|
||||
ifneq ($(CONFIG_AUTOREMOVE),)
|
||||
host-compile:
|
||||
$(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -print0 | \
|
||||
$(XARGS) -0 rm -rf
|
||||
$(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' | \
|
||||
$(XARGS) rm -rf
|
||||
endif
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -3,122 +3,11 @@
|
||||
IMAGE_KERNEL = $(word 1,$^)
|
||||
IMAGE_ROOTFS = $(word 2,$^)
|
||||
|
||||
define ModelNameLimit16
|
||||
$(shell expr substr "$(word 2, $(subst _, ,$(1)))" 1 16)
|
||||
endef
|
||||
|
||||
define rootfs_align
|
||||
$(patsubst %-256k,0x40000,$(patsubst %-128k,0x20000,$(patsubst %-64k,0x10000,$(patsubst squashfs%,0x4,$(patsubst root.%,%,$(1))))))
|
||||
endef
|
||||
|
||||
|
||||
define Build/append-dtb
|
||||
cat $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb >> $@
|
||||
endef
|
||||
|
||||
define Build/append-dtb-elf
|
||||
$(TARGET_CROSS)objcopy \
|
||||
--set-section-flags=.appended_dtb=alloc,contents \
|
||||
--update-section \
|
||||
.appended_dtb=$(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb $@
|
||||
endef
|
||||
|
||||
define Build/append-kernel
|
||||
dd if=$(IMAGE_KERNEL) >> $@
|
||||
endef
|
||||
|
||||
compat_version=$(if $(DEVICE_COMPAT_VERSION),$(DEVICE_COMPAT_VERSION),1.0)
|
||||
json_quote=$(subst ','\'',$(subst ",\",$(1)))
|
||||
#")')
|
||||
|
||||
legacy_supported_message=$(SUPPORTED_DEVICES) - Image version mismatch: image $(compat_version), \
|
||||
device 1.0. Please wipe config during upgrade (force required) or reinstall. \
|
||||
$(if $(DEVICE_COMPAT_MESSAGE),Reason: $(DEVICE_COMPAT_MESSAGE),Please check documentation ...)
|
||||
|
||||
metadata_devices=$(if $(1),$(subst "$(space)","$(comma)",$(strip $(foreach v,$(1),"$(call json_quote,$(v))"))))
|
||||
metadata_json = \
|
||||
'{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \
|
||||
"metadata_version": "1.1", \
|
||||
"compat_version": "$(call json_quote,$(compat_version))", \
|
||||
$(if $(DEVICE_COMPAT_MESSAGE),"compat_message": "$(call json_quote,$(DEVICE_COMPAT_MESSAGE))"$(comma)) \
|
||||
$(if $(filter-out 1.0,$(compat_version)),"new_supported_devices": \
|
||||
[$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma) \
|
||||
"supported_devices": ["$(call json_quote,$(legacy_supported_message))"]$(comma)) \
|
||||
$(if $(filter 1.0,$(compat_version)),"supported_devices":[$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma)) \
|
||||
"version": { \
|
||||
"dist": "$(call json_quote,$(VERSION_DIST))", \
|
||||
"version": "$(call json_quote,$(VERSION_NUMBER))", \
|
||||
"revision": "$(call json_quote,$(REVISION))", \
|
||||
"target": "$(call json_quote,$(TARGETID))", \
|
||||
"board": "$(call json_quote,$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)))" \
|
||||
} \
|
||||
}'
|
||||
|
||||
define Build/append-metadata
|
||||
$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json) | fwtool -I - $@)
|
||||
[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || { \
|
||||
cp "$(BUILD_KEY).ucert" "$@.ucert" ;\
|
||||
usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\
|
||||
ucert -A -c "$@.ucert" -x "$@.sig" ;\
|
||||
fwtool -S "$@.ucert" "$@" ;\
|
||||
}
|
||||
endef
|
||||
|
||||
define Build/append-rootfs
|
||||
dd if=$(IMAGE_ROOTFS) >> $@
|
||||
endef
|
||||
|
||||
define Build/append-squashfs-fakeroot-be
|
||||
rm -rf $@.fakefs $@.fakesquashfs
|
||||
mkdir $@.fakefs
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
|
||||
$@.fakefs $@.fakesquashfs \
|
||||
-noappend -root-owned -be -nopad -b 65536 \
|
||||
$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
|
||||
cat $@.fakesquashfs >> $@
|
||||
endef
|
||||
|
||||
define Build/append-string
|
||||
echo -n $(1) >> $@
|
||||
endef
|
||||
|
||||
define Build/append-ubi
|
||||
sh $(TOPDIR)/scripts/ubinize-image.sh \
|
||||
$(if $(UBOOTENV_IN_UBI),--uboot-env) \
|
||||
$(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \
|
||||
$(foreach part,$(UBINIZE_PARTS),--part $(part)) \
|
||||
$(IMAGE_ROOTFS) \
|
||||
$@.tmp \
|
||||
-p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \
|
||||
$(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
|
||||
$(if $(VID_HDR_OFFSET),-O $(VID_HDR_OFFSET)) \
|
||||
$(UBINIZE_OPTS)
|
||||
cat $@.tmp >> $@
|
||||
rm $@.tmp
|
||||
endef
|
||||
|
||||
define Build/append-uboot
|
||||
dd if=$(UBOOT_PATH) >> $@
|
||||
endef
|
||||
|
||||
# append a fake/empty uImage header, to fool bootloaders rootfs integrity check
|
||||
# for example
|
||||
define Build/append-uImage-fakehdr
|
||||
$(eval type=$(word 1,$(1)))
|
||||
$(eval magic=$(word 2,$(1)))
|
||||
touch $@.fakehdr
|
||||
$(STAGING_DIR_HOST)/bin/mkimage \
|
||||
-A $(LINUX_KARCH) -O linux -T $(type) -C none \
|
||||
-n '$(VERSION_DIST) fake $(type)' \
|
||||
$(if $(magic),-M $(magic)) \
|
||||
-d $@.fakehdr \
|
||||
-s \
|
||||
$@.fakehdr
|
||||
cat $@.fakehdr >> $@
|
||||
endef
|
||||
|
||||
define Build/buffalo-dhp-image
|
||||
$(STAGING_DIR_HOST)/bin/mkdhpimg $@ $@.new
|
||||
define Build/uImage
|
||||
mkimage -A $(LINUX_KARCH) \
|
||||
-O linux -T kernel \
|
||||
-C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||
-n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION))' -d $@ $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
@@ -150,45 +39,9 @@ define Build/buffalo-tag-dhp
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/check-size
|
||||
@imagesize="$$(stat -c%s $@)"; \
|
||||
limitsize="$$(($(subst k,* 1024,$(subst m, * 1024k,$(if $(1),$(1),$(IMAGE_SIZE))))))"; \
|
||||
[ $$limitsize -ge $$imagesize ] || { \
|
||||
echo "WARNING: Image file $@ is too big: $$imagesize > $$limitsize" >&2; \
|
||||
rm -f $@; \
|
||||
}
|
||||
endef
|
||||
|
||||
define Build/elecom-product-header
|
||||
$(eval product=$(word 1,$(1)))
|
||||
$(eval fw=$(if $(word 2,$(1)),$(word 2,$(1)),$@))
|
||||
|
||||
( \
|
||||
echo -n -e "ELECOM\x00\x00$(product)" | dd bs=40 count=1 conv=sync; \
|
||||
echo -n "0.00" | dd bs=16 count=1 conv=sync; \
|
||||
dd if=$(fw); \
|
||||
) > $(fw).new
|
||||
mv $(fw).new $(fw)
|
||||
endef
|
||||
|
||||
define Build/elx-header
|
||||
$(eval hw_id=$(word 1,$(1)))
|
||||
$(eval xor_pattern=$(word 2,$(1)))
|
||||
( \
|
||||
echo -ne "\x00\x00\x00\x00\x00\x00\x00\x03" | \
|
||||
dd bs=42 count=1 conv=sync; \
|
||||
hw_id="$(hw_id)"; \
|
||||
echo -ne "\x$${hw_id:0:2}\x$${hw_id:2:2}\x$${hw_id:4:2}\x$${hw_id:6:2}" | \
|
||||
dd bs=20 count=1 conv=sync; \
|
||||
echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \
|
||||
dd bs=8 count=1 conv=sync; \
|
||||
echo -ne "$$($(STAGING_DIR_HOST)/bin/mkhash md5 $@ | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \
|
||||
dd bs=58 count=1 conv=sync; \
|
||||
) > $(KDIR)/tmp/$(DEVICE_NAME).header
|
||||
$(call Build/xor-image,-p $(xor_pattern) -x)
|
||||
cat $(KDIR)/tmp/$(DEVICE_NAME).header $@ > $@.new
|
||||
define Build/buffalo-dhp-image
|
||||
$(STAGING_DIR_HOST)/bin/mkdhpimg $@ $@.new
|
||||
mv $@.new $@
|
||||
rm -rf $(KDIR)/tmp/$(DEVICE_NAME).header
|
||||
endef
|
||||
|
||||
define Build/eva-image
|
||||
@@ -196,78 +49,6 @@ define Build/eva-image
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/fit
|
||||
$(TOPDIR)/scripts/mkits.sh \
|
||||
-D $(DEVICE_NAME) -o $@.its -k $@ \
|
||||
$(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \
|
||||
-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||
$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \
|
||||
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config@1") \
|
||||
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
|
||||
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/gzip
|
||||
gzip -f -9n -c $@ $(1) > $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/install-dtb
|
||||
$(call locked, \
|
||||
$(foreach dts,$(DEVICE_DTS), \
|
||||
$(CP) \
|
||||
$(DTS_DIR)/$(dts).dtb \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-$(dts).dtb; \
|
||||
), \
|
||||
install-dtb-$(IMG_PREFIX) \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/jffs2
|
||||
rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 && \
|
||||
mkdir -p $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$$(dirname $(1)) && \
|
||||
cp $@ $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$(1) && \
|
||||
$(STAGING_DIR_HOST)/bin/mkfs.jffs2 --pad \
|
||||
$(if $(CONFIG_BIG_ENDIAN),--big-endian,--little-endian) \
|
||||
--squash-uids -v -e $(patsubst %k,%KiB,$(BLOCKSIZE)) \
|
||||
-o $@.new \
|
||||
-d $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 \
|
||||
2>&1 1>/dev/null | awk '/^.+$$$$/' && \
|
||||
$(STAGING_DIR_HOST)/bin/padjffs2 $@.new -J $(patsubst %k,,$(BLOCKSIZE))
|
||||
-rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/kernel2minor
|
||||
$(eval temp_file := $(shell mktemp))
|
||||
cp $@ $(temp_file)
|
||||
kernel2minor -k $(temp_file) -r $(temp_file).new $(1)
|
||||
mv $(temp_file).new $@
|
||||
rm -f $(temp_file)
|
||||
endef
|
||||
|
||||
define Build/kernel-bin
|
||||
rm -f $@
|
||||
cp $< $@
|
||||
endef
|
||||
|
||||
define Build/linksys-image
|
||||
$(TOPDIR)/scripts/linksys-image.sh \
|
||||
"$(call param_get_default,type,$(1),$(DEVICE_NAME))" \
|
||||
$@ $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/lzma
|
||||
$(call Build/lzma-no-dict,-lc1 -lp2 -pb2 $(1))
|
||||
endef
|
||||
|
||||
define Build/lzma-no-dict
|
||||
$(STAGING_DIR_HOST)/bin/lzma e $@ $(1) $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/netgear-chk
|
||||
$(STAGING_DIR_HOST)/bin/mkchkimg \
|
||||
-o $@.new \
|
||||
@@ -286,23 +67,143 @@ define Build/netgear-dni
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/openmesh-image
|
||||
$(TOPDIR)/scripts/om-fwupgradecfg-gen.sh \
|
||||
"$(call param_get_default,ce_type,$(1),$(DEVICE_NAME))" \
|
||||
"$@-fwupgrade.cfg" \
|
||||
"$(call param_get_default,kernel,$(1),$(IMAGE_KERNEL))" \
|
||||
"$(call param_get_default,rootfs,$(1),$@)"
|
||||
$(TOPDIR)/scripts/combined-ext-image.sh \
|
||||
"$(call param_get_default,ce_type,$(1),$(DEVICE_NAME))" "$@" \
|
||||
"$@-fwupgrade.cfg" "fwupgrade.cfg" \
|
||||
"$(call param_get_default,kernel,$(1),$(IMAGE_KERNEL))" "kernel" \
|
||||
"$(call param_get_default,rootfs,$(1),$@)" "rootfs"
|
||||
define Build/append-squashfs-fakeroot-be
|
||||
rm -rf $@.fakefs $@.fakesquashfs
|
||||
mkdir $@.fakefs
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
|
||||
$@.fakefs $@.fakesquashfs \
|
||||
-noappend -root-owned -be -nopad -b 65536 \
|
||||
$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
|
||||
cat $@.fakesquashfs >> $@
|
||||
endef
|
||||
|
||||
# append a fake/empty uImage header, to fool bootloaders rootfs integrity check
|
||||
# for example
|
||||
define Build/append-uImage-fakehdr
|
||||
touch $@.fakehdr
|
||||
$(STAGING_DIR_HOST)/bin/mkimage \
|
||||
-A $(LINUX_KARCH) -O linux -T $(1) -C none \
|
||||
-n '$(VERSION_DIST) fake $(1)' \
|
||||
-d $@.fakehdr \
|
||||
-s \
|
||||
$@.fakehdr
|
||||
cat $@.fakehdr >> $@
|
||||
endef
|
||||
|
||||
define Build/tplink-safeloader
|
||||
-$(STAGING_DIR_HOST)/bin/tplink-safeloader \
|
||||
-B $(TPLINK_BOARD_ID) \
|
||||
-V $(REVISION) \
|
||||
-k $(IMAGE_KERNEL) \
|
||||
-r $@ \
|
||||
-o $@.new \
|
||||
-j \
|
||||
$(wordlist 2,$(words $(1)),$(1)) \
|
||||
$(if $(findstring sysupgrade,$(word 1,$(1))),-S) && mv $@.new $@ || rm -f $@
|
||||
endef
|
||||
|
||||
define Build/append-dtb
|
||||
cat $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb >> $@
|
||||
endef
|
||||
|
||||
define Build/install-dtb
|
||||
$(foreach dts,$(DEVICE_DTS), \
|
||||
$(CP) \
|
||||
$(DTS_DIR)/$(dts).dtb \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-$(dts).dtb; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/fit
|
||||
$(TOPDIR)/scripts/mkits.sh \
|
||||
-D $(DEVICE_NAME) -o $@.its -k $@ \
|
||||
$(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \
|
||||
-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config@1") \
|
||||
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
|
||||
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/lzma
|
||||
$(call Build/lzma-no-dict,-lc1 -lp2 -pb2 $(1))
|
||||
endef
|
||||
|
||||
define Build/lzma-no-dict
|
||||
$(STAGING_DIR_HOST)/bin/lzma e $@ $(1) $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/gzip
|
||||
gzip -f -9n -c $@ $(1) > $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/jffs2
|
||||
rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 && \
|
||||
mkdir -p $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$$(dirname $(1)) && \
|
||||
cp $@ $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$(1) && \
|
||||
$(STAGING_DIR_HOST)/bin/mkfs.jffs2 --pad \
|
||||
$(if $(CONFIG_BIG_ENDIAN),--big-endian,--little-endian) \
|
||||
--squash-uids -v -e $(patsubst %k,%KiB,$(BLOCKSIZE)) \
|
||||
-o $@.new \
|
||||
-d $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 \
|
||||
2>&1 1>/dev/null | awk '/^.+$$$$/' && \
|
||||
$(STAGING_DIR_HOST)/bin/padjffs2 $@.new -J $(patsubst %k,,$(BLOCKSIZE))
|
||||
-rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/kernel-bin
|
||||
rm -f $@
|
||||
cp $< $@
|
||||
endef
|
||||
|
||||
define Build/patch-cmdline
|
||||
$(STAGING_DIR_HOST)/bin/patch-cmdline $@ '$(CMDLINE)'
|
||||
endef
|
||||
|
||||
define Build/append-kernel
|
||||
dd if=$(IMAGE_KERNEL) >> $@
|
||||
endef
|
||||
|
||||
define Build/append-rootfs
|
||||
dd if=$(IMAGE_ROOTFS) >> $@
|
||||
endef
|
||||
|
||||
define Build/append-ubi
|
||||
sh $(TOPDIR)/scripts/ubinize-image.sh \
|
||||
$(if $(UBOOTENV_IN_UBI),--uboot-env) \
|
||||
$(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \
|
||||
$(foreach part,$(UBINIZE_PARTS),--part $(part)) \
|
||||
$(IMAGE_ROOTFS) \
|
||||
$@.tmp \
|
||||
-p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \
|
||||
$(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
|
||||
$(if $(VID_HDR_OFFSET),-O $(VID_HDR_OFFSET)) \
|
||||
$(UBINIZE_OPTS)
|
||||
cat $@.tmp >> $@
|
||||
rm $@.tmp
|
||||
endef
|
||||
|
||||
define Build/append-uboot
|
||||
dd if=$(UBOOT_PATH) >> $@
|
||||
endef
|
||||
|
||||
define Build/pad-to
|
||||
dd if=$@ of=$@.new bs=$(1) conv=sync
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/pad-extra
|
||||
dd if=/dev/zero bs=$(1) count=1 >> $@
|
||||
endef
|
||||
|
||||
define Build/pad-rootfs
|
||||
$(STAGING_DIR_HOST)/bin/padjffs2 $@ $(1) \
|
||||
$(if $(BLOCKSIZE),$(BLOCKSIZE:%k=%),4 8 16 64 128 256)
|
||||
endef
|
||||
|
||||
define Build/pad-offset
|
||||
let \
|
||||
size="$$(stat -c%s $@)" \
|
||||
@@ -314,59 +215,32 @@ define Build/pad-offset
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/pad-rootfs
|
||||
$(STAGING_DIR_HOST)/bin/padjffs2 $@ $(1) \
|
||||
$(if $(BLOCKSIZE),$(BLOCKSIZE:%k=%),4 8 16 64 128 256)
|
||||
define Build/check-size
|
||||
@[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$(stat -c%s $@)" ] || { \
|
||||
echo "WARNING: Image file $@ is too big" >&2; \
|
||||
rm -f $@; \
|
||||
}
|
||||
endef
|
||||
|
||||
define Build/pad-to
|
||||
$(call Image/pad-to,$@,$(1))
|
||||
endef
|
||||
|
||||
define Build/patch-cmdline
|
||||
$(STAGING_DIR_HOST)/bin/patch-cmdline $@ '$(CMDLINE)'
|
||||
endef
|
||||
|
||||
# Convert a raw image into a $1 type image.
|
||||
# E.g. | qemu-image vdi
|
||||
define Build/qemu-image
|
||||
if command -v qemu-img; then \
|
||||
qemu-img convert -f raw -O $1 $@ $@.new; \
|
||||
mv $@.new $@; \
|
||||
else \
|
||||
echo "WARNING: Install qemu-img to create VDI/VMDK images" >&2; exit 1; \
|
||||
fi
|
||||
endef
|
||||
|
||||
define Build/qsdk-ipq-factory-nand
|
||||
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
|
||||
$@.its ubi $@
|
||||
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
|
||||
define Build/combined-image
|
||||
-sh $(TOPDIR)/scripts/combined-image.sh \
|
||||
"$(IMAGE_KERNEL)" \
|
||||
"$@" \
|
||||
"$@.new"
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/qsdk-ipq-factory-nor
|
||||
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
|
||||
$@.its hlos $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS)
|
||||
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/seama
|
||||
$(STAGING_DIR_HOST)/bin/seama -i $@ \
|
||||
-m "dev=/dev/mtdblock/$(SEAMA_MTDBLOCK)" -m "type=firmware"
|
||||
mv $@.seama $@
|
||||
endef
|
||||
|
||||
define Build/seama-seal
|
||||
$(STAGING_DIR_HOST)/bin/seama -i $@ -s $@.seama \
|
||||
-m "signature=$(SEAMA_SIGNATURE)"
|
||||
mv $@.seama $@
|
||||
endef
|
||||
|
||||
define Build/senao-header
|
||||
$(STAGING_DIR_HOST)/bin/mksenaofw $(1) -e $@ -o $@.new
|
||||
mv $@.new $@
|
||||
define Build/openmesh-image
|
||||
$(TOPDIR)/scripts/om-fwupgradecfg-gen.sh \
|
||||
"$(call param_get_default,ce_type,$(1),$(DEVICE_NAME))" \
|
||||
"$@-fwupgrade.cfg" \
|
||||
"$(call param_get_default,kernel,$(1),$(IMAGE_KERNEL))" \
|
||||
"$(call param_get_default,rootfs,$(1),$@)"
|
||||
$(TOPDIR)/scripts/combined-ext-image.sh \
|
||||
"$(call param_get_default,ce_type,$(1),$(DEVICE_NAME))" "$@" \
|
||||
"$@-fwupgrade.cfg" "fwupgrade.cfg" \
|
||||
"$(call param_get_default,kernel,$(1),$(IMAGE_KERNEL))" "kernel" \
|
||||
"$(call param_get_default,rootfs,$(1),$@)" "rootfs"
|
||||
endef
|
||||
|
||||
define Build/sysupgrade-tar
|
||||
@@ -377,18 +251,6 @@ define Build/sysupgrade-tar
|
||||
$@
|
||||
endef
|
||||
|
||||
define Build/tplink-safeloader
|
||||
-$(STAGING_DIR_HOST)/bin/tplink-safeloader \
|
||||
-B $(TPLINK_BOARD_ID) \
|
||||
-V $(REVISION) \
|
||||
-k $(IMAGE_KERNEL) \
|
||||
-r $@ \
|
||||
-o $@.new \
|
||||
-j \
|
||||
$(wordlist 2,$(words $(1)),$(1)) \
|
||||
$(if $(findstring sysupgrade,$(word 1,$(1))),-S) && mv $@.new $@ || rm -f $@
|
||||
endef
|
||||
|
||||
define Build/tplink-v1-header
|
||||
$(STAGING_DIR_HOST)/bin/mktplinkfw \
|
||||
-c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
|
||||
@@ -398,24 +260,6 @@ define Build/tplink-v1-header
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
# combine kernel and rootfs into one image
|
||||
# mktplinkfw <type> <optional extra arguments to mktplinkfw binary>
|
||||
# <type> is "sysupgrade" or "factory"
|
||||
#
|
||||
# -a align the rootfs start on an <align> bytes boundary
|
||||
# -j add jffs2 end-of-filesystem markers
|
||||
# -s strip padding from end of the image
|
||||
# -X reserve <size> bytes in the firmware image (hexval prefixed with 0x)
|
||||
define Build/tplink-v1-image
|
||||
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
|
||||
-H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) \
|
||||
-N "$(VERSION_DIST)" -V $(REVISION) -m $(TPLINK_HEADER_VERSION) \
|
||||
-k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new -j -X 0x40000 \
|
||||
-a $(call rootfs_align,$(FILESYSTEM)) \
|
||||
$(wordlist 2,$(words $(1)),$(1)) \
|
||||
$(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@
|
||||
endef
|
||||
|
||||
define Build/tplink-v2-header
|
||||
$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
|
||||
-c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
|
||||
@@ -436,45 +280,25 @@ define Build/tplink-v2-image
|
||||
rm -rf $@.new
|
||||
endef
|
||||
|
||||
define Build/uImage
|
||||
mkimage \
|
||||
-A $(LINUX_KARCH) \
|
||||
-O linux \
|
||||
-T kernel \
|
||||
-C $(word 1,$(1)) \
|
||||
-a $(KERNEL_LOADADDR) \
|
||||
-e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||
-n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION))' \
|
||||
$(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC)) \
|
||||
$(wordlist 2,$(words $(1)),$(1)) \
|
||||
-d $@ $@.new
|
||||
json_quote=$(subst ','\'',$(subst ",\",$(1)))
|
||||
#")')
|
||||
metadata_devices=$(if $(1),$(subst "$(space)","$(comma)",$(strip $(foreach v,$(1),"$(call json_quote,$(v))"))))
|
||||
metadata_json = \
|
||||
'{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \
|
||||
"supported_devices":[$(call metadata_devices,$(1))], \
|
||||
"version": { \
|
||||
"dist": "$(call json_quote,$(VERSION_DIST))", \
|
||||
"version": "$(call json_quote,$(VERSION_NUMBER))", \
|
||||
"revision": "$(call json_quote,$(REVISION))", \
|
||||
"board": "$(call json_quote,$(BOARD))" \
|
||||
} \
|
||||
}'
|
||||
|
||||
define Build/append-metadata
|
||||
$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
|
||||
endef
|
||||
|
||||
define Build/kernel2minor
|
||||
kernel2minor -k $@ -r $@.new $(1)
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/xor-image
|
||||
$(STAGING_DIR_HOST)/bin/xorimage -i $@ -o $@.xor $(1)
|
||||
mv $@.xor $@
|
||||
endef
|
||||
|
||||
define Build/zip
|
||||
mkdir $@.tmp
|
||||
mv $@ $@.tmp/$(1)
|
||||
|
||||
zip -j -X \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime="$(SOURCE_DATE_EPOCH)") \
|
||||
$@ $@.tmp/$(if $(1),$(1),$@)
|
||||
rm -rf $@.tmp
|
||||
endef
|
||||
|
||||
define Build/zyxel-ras-image
|
||||
let \
|
||||
newsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \
|
||||
$(STAGING_DIR_HOST)/bin/mkrasimage \
|
||||
-b $(RAS_BOARD) \
|
||||
-v $(RAS_VERSION) \
|
||||
-r $@ \
|
||||
-s $$newsize \
|
||||
-o $@.new \
|
||||
$(if $(findstring separate-kernel,$(word 1,$(1))),-k $(IMAGE_KERNEL)) \
|
||||
&& mv $@.new $@
|
||||
endef
|
||||
|
||||
93
include/image-legacy.mk
Normal file
93
include/image-legacy.mk
Normal file
@@ -0,0 +1,93 @@
|
||||
ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
|
||||
define Image/mkfs/ubifs/generate
|
||||
$(CP) ./ubinize$(1).cfg $(KDIR)
|
||||
( cd $(KDIR); \
|
||||
$(STAGING_DIR_HOST)/bin/ubinize \
|
||||
$(if $($(PROFILE)_UBI_OPTS),$($(PROFILE)_UBI_OPTS),$(shell echo $(UBI_OPTS))) \
|
||||
-o $(KDIR)/root$(1).ubi \
|
||||
ubinize$(1).cfg \
|
||||
)
|
||||
endef
|
||||
|
||||
define Image/mkfs/ubifs/legacy
|
||||
|
||||
$(if $($(PROFILE)_UBIFS_OPTS)$(UBIFS_OPTS),
|
||||
$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
|
||||
$(if $($(PROFILE)_UBIFS_OPTS),$($(PROFILE)_UBIFS_OPTS),$(UBIFS_OPTS)) \
|
||||
$(if $(CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP),--space-fixup) \
|
||||
$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_NONE),--compr=none) \
|
||||
$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_LZO),--compr=lzo) \
|
||||
$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_ZLIB),--compr=zlib) \
|
||||
$(if $(shell echo $(CONFIG_TARGET_UBIFS_JOURNAL_SIZE)),--jrn-size=$(CONFIG_TARGET_UBIFS_JOURNAL_SIZE)) \
|
||||
--squash-uids \
|
||||
-o $(KDIR)/root.ubifs \
|
||||
-d $(TARGET_DIR)
|
||||
)
|
||||
$(call Image/Build,ubifs)
|
||||
|
||||
$(if $($(PROFILE)_UBI_OPTS)$(UBI_OPTS),
|
||||
$(if $(wildcard ./ubinize.cfg),$(call Image/mkfs/ubifs/generate,))
|
||||
$(if $(wildcard ./ubinize-overlay.cfg),$(call Image/mkfs/ubifs/generate,-overlay))
|
||||
)
|
||||
$(if $(wildcard ./ubinize.cfg),$(call Image/Build,ubi))
|
||||
endef
|
||||
endif
|
||||
|
||||
LegacyDevice/Dump = $(Device/Dump)
|
||||
|
||||
define LegacyDevice/Check
|
||||
$(Device/Check/Common)
|
||||
_TARGET_PREPARE := $$(if $$(_PROFILE_SET),legacy-images-prepare,prepare-disabled)
|
||||
_TARGET := $$(if $$(_PROFILE_SET),legacy-images,install-disabled)
|
||||
$$(if $$(_PROFILE_SET),install: legacy-images-make)
|
||||
ifndef IB
|
||||
$$(if $$(_PROFILE_SET),kernel_prepare: legacy-images-prepare-make)
|
||||
endif
|
||||
endef
|
||||
|
||||
ifdef TARGET_PER_DEVICE_ROOTFS
|
||||
define Image/Build/Profile/Filesystem
|
||||
cp $(KDIR)/root.$(2)+pkg=$(3) $(KDIR)/root.$(2)
|
||||
$(call Image/Build/$(2),$(2))
|
||||
$(call Image/Build/Profile,$(1),$(2))
|
||||
endef
|
||||
else
|
||||
Image/Build/Profile/Filesystem = $(Image/Build/Profile)
|
||||
endif
|
||||
|
||||
define LegacyDevice/Build
|
||||
$$(_TARGET): legacy-image-$(1)
|
||||
$$(_TARGET_PREPARE): legacy-image-prepare-$(1)
|
||||
.PHONY: legacy-image-prepare-$(1) legacy-image-$(1)
|
||||
|
||||
legacy-image-prepare-$(1):
|
||||
$$(call Image/Prepare/Profile,$(1))
|
||||
|
||||
ifndef IB
|
||||
ifdef CONFIG_TARGET_PER_DEVICE_ROOTFS
|
||||
ROOTFS/$(1) := $(foreach fs,$(TARGET_FILESYSTEMS), \
|
||||
$(KDIR)/root.$(fs)$$(strip $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),+pkg=$$(ROOTFS_ID/$(1)))) \
|
||||
)
|
||||
|
||||
$$(ROOTFS/$(1)): target-dir-$$(ROOTFS_ID/$(1))
|
||||
legacy-images-make: $$(if $$(_PROFILE_SET),$$(ROOTFS/$(1)))
|
||||
endif
|
||||
endif
|
||||
|
||||
legacy-image-$(1):
|
||||
$$(call Image/BuildKernel/Profile,$(1))
|
||||
$(foreach fs,$(TARGET_FILESYSTEMS),
|
||||
$$(call Image/Build/Profile/Filesystem,$(1),$(fs),$$(ROOTFS_ID/$(1)))
|
||||
)
|
||||
|
||||
endef
|
||||
|
||||
define LegacyDevice
|
||||
$(call Device/InitProfile,$(1))
|
||||
$(call Device/Default,$(1))
|
||||
$(call LegacyDevice/Default,$(1))
|
||||
$(call LegacyDevice/$(1),$(1))
|
||||
$(call LegacyDevice/Check,$(1))
|
||||
$(call LegacyDevice/$(if $(DUMP),Dump,Build),$(1))
|
||||
|
||||
endef
|
||||
295
include/image.mk
295
include/image.mk
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
override TARGET_BUILD=
|
||||
include $(INCLUDE_DIR)/prereq.mk
|
||||
@@ -14,6 +17,7 @@ ifndef IB
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(INCLUDE_DIR)/image-legacy.mk
|
||||
include $(INCLUDE_DIR)/feeds.mk
|
||||
include $(INCLUDE_DIR)/rootfs.mk
|
||||
|
||||
@@ -26,7 +30,7 @@ param_get_default = $(firstword $(call param_get,$(1),$(2)) $(3))
|
||||
param_mangle = $(subst $(space),_,$(strip $(1)))
|
||||
param_unmangle = $(subst _,$(space),$(1))
|
||||
|
||||
mkfs_packages_id = $(shell echo $(sort $(1)) | mkhash md5 | cut -b1-8)
|
||||
mkfs_packages_id = $(shell echo $(sort $(1)) | mkhash md5 | head -c 8)
|
||||
mkfs_target_dir = $(if $(call param_get,pkg,$(1)),$(KDIR)/target-dir-$(call param_get,pkg,$(1)),$(TARGET_DIR))
|
||||
|
||||
KDIR=$(KERNEL_BUILD_DIR)
|
||||
@@ -38,10 +42,6 @@ IMG_PREFIX_VERNUM:=$(if $(CONFIG_VERSION_FILENAMES),$(call sanitize,$(VERSION_NU
|
||||
IMG_PREFIX_VERCODE:=$(if $(CONFIG_VERSION_CODE_FILENAMES),$(call sanitize,$(VERSION_CODE))-)
|
||||
|
||||
IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
|
||||
IMG_ROOTFS:=$(IMG_PREFIX)-rootfs
|
||||
IMG_COMBINED:=$(IMG_PREFIX)-combined
|
||||
IMG_PART_SIGNATURE:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | mkhash md5 | cut -b1-8)
|
||||
IMG_PART_DISKGUID:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | mkhash md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/')
|
||||
|
||||
MKFS_DEVTABLE_OPT := -D $(INCLUDE_DIR)/device_table.txt
|
||||
|
||||
@@ -90,6 +90,7 @@ fs-types-$(CONFIG_TARGET_ROOTFS_SQUASHFS) += squashfs
|
||||
fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addprefix jffs2-,$(JFFS2_BLOCKSIZE))
|
||||
fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2_NAND) += $(addprefix jffs2-nand-,$(NAND_BLOCKSIZE))
|
||||
fs-types-$(CONFIG_TARGET_ROOTFS_EXT4FS) += ext4
|
||||
fs-types-$(CONFIG_TARGET_ROOTFS_ISO) += iso
|
||||
fs-types-$(CONFIG_TARGET_ROOTFS_UBIFS) += ubifs
|
||||
fs-subtypes-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addsuffix -raw,$(addprefix jffs2-,$(JFFS2_BLOCKSIZE)))
|
||||
|
||||
@@ -103,7 +104,7 @@ define add_jffs2_mark
|
||||
echo -ne '\xde\xad\xc0\xde' >> $(1)
|
||||
endef
|
||||
|
||||
PROFILE_SANITIZED := $(call tolower,$(subst DEVICE_,,$(subst $(space),-,$(PROFILE))))
|
||||
PROFILE_SANITIZED := $(call sanitize,$(PROFILE))
|
||||
|
||||
define split_args
|
||||
$(foreach data, \
|
||||
@@ -151,32 +152,6 @@ ifdef CONFIG_TARGET_IMAGES_GZIP
|
||||
endef
|
||||
endif
|
||||
|
||||
|
||||
# Disable noisy checks by default as in upstream
|
||||
DTC_FLAGS += \
|
||||
-Wno-unit_address_vs_reg \
|
||||
-Wno-simple_bus_reg \
|
||||
-Wno-unit_address_format \
|
||||
-Wno-pci_bridge \
|
||||
-Wno-pci_device_bus_num \
|
||||
-Wno-pci_device_reg \
|
||||
-Wno-avoid_unnecessary_addr_size \
|
||||
-Wno-alias_paths \
|
||||
-Wno-graph_child_address \
|
||||
-Wno-graph_port \
|
||||
-Wno-unique_unit_address
|
||||
|
||||
define Image/pad-to
|
||||
dd if=$(1) of=$(1).new bs=$(2) conv=sync
|
||||
mv $(1).new $(1)
|
||||
endef
|
||||
|
||||
ROOTFS_PARTSIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024*1024)))
|
||||
|
||||
define Image/pad-root-squashfs
|
||||
$(call Image/pad-to,$(KDIR)/root.squashfs,$(if $(1),$(1),$(ROOTFS_PARTSIZE)))
|
||||
endef
|
||||
|
||||
# $(1) source dts file
|
||||
# $(2) target dtb file
|
||||
# $(3) extra CPP flags
|
||||
@@ -189,7 +164,7 @@ define Image/BuildDTB
|
||||
-undef -D__DTS__ $(3) \
|
||||
-o $(2).tmp $(1)
|
||||
$(LINUX_DIR)/scripts/dtc/dtc -O dtb \
|
||||
-i$(dir $(1)) $(DTC_FLAGS) $(4) \
|
||||
-i$(dir $(1)) $(4) \
|
||||
-o $(2) $(2).tmp
|
||||
$(RM) $(2).tmp
|
||||
endef
|
||||
@@ -224,28 +199,41 @@ endef
|
||||
$(eval $(foreach S,$(JFFS2_BLOCKSIZE),$(call Image/mkfs/jffs2/template,$(S))))
|
||||
$(eval $(foreach S,$(NAND_BLOCKSIZE),$(call Image/mkfs/jffs2-nand/template,$(S))))
|
||||
|
||||
define Image/mkfs/squashfs-common
|
||||
define Image/mkfs/squashfs
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \
|
||||
-nopad -noappend -root-owned \
|
||||
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
|
||||
-processors 1
|
||||
-processors 1 \
|
||||
$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_SECURITY_LABELS),y)
|
||||
define Image/mkfs/squashfs
|
||||
echo ". $(call mkfs_target_dir,$(1))/etc/selinux/config" > $@.fakeroot-script
|
||||
echo "$(STAGING_DIR_HOST)/bin/setfiles -r" \
|
||||
"$(call mkfs_target_dir,$(1))" \
|
||||
"$(call mkfs_target_dir,$(1))/etc/selinux/\$${SELINUXTYPE}/contexts/files/file_contexts " \
|
||||
"$(call mkfs_target_dir,$(1))" >> $@.fakeroot-script
|
||||
echo "$(Image/mkfs/squashfs-common)" >> $@.fakeroot-script
|
||||
chmod +x $@.fakeroot-script
|
||||
$(FAKEROOT) "$@.fakeroot-script"
|
||||
endef
|
||||
else
|
||||
define Image/mkfs/squashfs
|
||||
$(call Image/mkfs/squashfs-common,$(1))
|
||||
endef
|
||||
# $(1): board name
|
||||
# $(2): rootfs type
|
||||
# $(3): kernel image
|
||||
# $(4): compat string
|
||||
ifneq ($(CONFIG_NAND_SUPPORT),)
|
||||
define Image/Build/SysupgradeNAND
|
||||
mkdir -p "$(KDIR_TMP)/sysupgrade-$(if $(4),$(4),$(1))/"
|
||||
echo "BOARD=$(if $(4),$(4),$(1))" > "$(KDIR_TMP)/sysupgrade-$(if $(4),$(4),$(1))/CONTROL"
|
||||
[ -z "$(2)" ] || $(CP) "$(KDIR)/root.$(2)" "$(KDIR_TMP)/sysupgrade-$(if $(4),$(4),$(1))/root"
|
||||
[ -z "$(3)" ] || $(CP) "$(3)" "$(KDIR_TMP)/sysupgrade-$(if $(4),$(4),$(1))/kernel"
|
||||
(cd "$(KDIR_TMP)"; $(TAR) cvf \
|
||||
"$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2)-sysupgrade.tar" sysupgrade-$(if $(4),$(4),$(1)) \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
||||
)
|
||||
endef
|
||||
|
||||
# $(1) board name
|
||||
# $(2) ubinize-image options (e.g. --uboot-env and/or --kernel kernelimage)
|
||||
# $(3) rootfstype (e.g. squashfs or ubifs)
|
||||
# $(4) options to pass-through to ubinize (i.e. $($(PROFILE)_UBI_OPTS)))
|
||||
define Image/Build/UbinizeImage
|
||||
sh $(TOPDIR)/scripts/ubinize-image.sh $(2) \
|
||||
"$(KDIR)/root.$(3)" \
|
||||
"$(KDIR)/$(IMG_PREFIX)-$(1)-$(3)-ubinized.bin" \
|
||||
$(4)
|
||||
endef
|
||||
|
||||
endif
|
||||
|
||||
define Image/mkfs/ubifs
|
||||
@@ -260,9 +248,11 @@ define Image/mkfs/ubifs
|
||||
-o $@ -d $(call mkfs_target_dir,$(1))
|
||||
endef
|
||||
|
||||
E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024*1024)))
|
||||
|
||||
define Image/mkfs/ext4
|
||||
$(STAGING_DIR_HOST)/bin/make_ext4fs -L rootfs \
|
||||
-l $(ROOTFS_PARTSIZE) -b $(CONFIG_TARGET_EXT4_BLOCKSIZE) \
|
||||
$(STAGING_DIR_HOST)/bin/make_ext4fs \
|
||||
-l $(E2SIZE) -b $(CONFIG_TARGET_EXT4_BLOCKSIZE) \
|
||||
$(if $(CONFIG_TARGET_EXT4_RESERVED_PCT),-m $(CONFIG_TARGET_EXT4_RESERVED_PCT)) \
|
||||
$(if $(CONFIG_TARGET_EXT4_JOURNAL),,-J) \
|
||||
$(if $(SOURCE_DATE_EPOCH),-T $(SOURCE_DATE_EPOCH)) \
|
||||
@@ -274,26 +264,9 @@ define Image/Manifest
|
||||
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest
|
||||
endef
|
||||
|
||||
define Image/gzip-ext4-padded-squashfs
|
||||
|
||||
define Image/Build/squashfs
|
||||
$(call Image/pad-root-squashfs)
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
|
||||
define Image/Build/gzip/ext4
|
||||
$(call Image/Build/gzip,ext4)
|
||||
endef
|
||||
define Image/Build/gzip/squashfs
|
||||
$(call Image/Build/gzip,squashfs)
|
||||
endef
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
ifdef CONFIG_TARGET_ROOTFS_TARGZ
|
||||
define Image/Build/targz
|
||||
$(TAR) -cp --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name \
|
||||
$(TAR) -cp --numeric-owner --owner=0 --group=0 --sort=name \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
||||
-C $(TARGET_DIR)/ . | gzip -9n > $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED))-rootfs.tar.gz
|
||||
endef
|
||||
@@ -301,13 +274,13 @@ endif
|
||||
|
||||
ifdef CONFIG_TARGET_ROOTFS_CPIOGZ
|
||||
define Image/Build/cpiogz
|
||||
( cd $(TARGET_DIR); find . | cpio -o -H newc -R root:root | gzip -9n >$(BIN_DIR)/$(IMG_ROOTFS).cpio.gz )
|
||||
( cd $(TARGET_DIR); find . | cpio -o -H newc -R root:root | gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
|
||||
endef
|
||||
endif
|
||||
|
||||
mkfs_packages = $(filter-out @%,$(PACKAGES_$(call param_get,pkg,pkg=$(target_params))))
|
||||
mkfs_packages_add = $(foreach pkg,$(filter-out -%,$(mkfs_packages)),$(pkg)$(call GetABISuffix,$(pkg)))
|
||||
mkfs_packages_remove = $(foreach pkg,$(patsubst -%,%,$(filter -%,$(mkfs_packages))),$(pkg)$(call GetABISuffix,$(pkg)))
|
||||
mkfs_packages_add = $(filter-out -%,$(mkfs_packages))
|
||||
mkfs_packages_remove = $(patsubst -%,%,$(filter -%,$(mkfs_packages)))
|
||||
mkfs_cur_target_dir = $(call mkfs_target_dir,pkg=$(target_params))
|
||||
|
||||
opkg_target = \
|
||||
@@ -335,22 +308,7 @@ $(KDIR)/root.%: kernel_prepare
|
||||
|
||||
define Device/InitProfile
|
||||
PROFILES := $(PROFILE)
|
||||
DEVICE_TITLE = $$(DEVICE_VENDOR) $$(DEVICE_MODEL)$$(if $$(DEVICE_VARIANT), $$(DEVICE_VARIANT))
|
||||
DEVICE_ALT0_TITLE = $$(DEVICE_ALT0_VENDOR) $$(DEVICE_ALT0_MODEL)$$(if $$(DEVICE_ALT0_VARIANT), $$(DEVICE_ALT0_VARIANT))
|
||||
DEVICE_ALT1_TITLE = $$(DEVICE_ALT1_VENDOR) $$(DEVICE_ALT1_MODEL)$$(if $$(DEVICE_ALT1_VARIANT), $$(DEVICE_ALT1_VARIANT))
|
||||
DEVICE_ALT2_TITLE = $$(DEVICE_ALT2_VENDOR) $$(DEVICE_ALT2_MODEL)$$(if $$(DEVICE_ALT2_VARIANT), $$(DEVICE_ALT2_VARIANT))
|
||||
DEVICE_VENDOR :=
|
||||
DEVICE_MODEL :=
|
||||
DEVICE_VARIANT :=
|
||||
DEVICE_ALT0_VENDOR :=
|
||||
DEVICE_ALT0_MODEL :=
|
||||
DEVICE_ALT0_VARIANT :=
|
||||
DEVICE_ALT1_VENDOR :=
|
||||
DEVICE_ALT1_MODEL :=
|
||||
DEVICE_ALT1_VARIANT :=
|
||||
DEVICE_ALT2_VENDOR :=
|
||||
DEVICE_ALT2_MODEL :=
|
||||
DEVICE_ALT2_VARIANT :=
|
||||
DEVICE_TITLE :=
|
||||
DEVICE_PACKAGES :=
|
||||
DEVICE_DESCRIPTION = Build firmware images for $$(DEVICE_TITLE)
|
||||
endef
|
||||
@@ -359,13 +317,12 @@ define Device/Init
|
||||
DEVICE_NAME := $(1)
|
||||
KERNEL:=
|
||||
KERNEL_INITRAMFS = $$(KERNEL)
|
||||
KERNEL_SIZE:=
|
||||
CMDLINE:=
|
||||
|
||||
IMAGES :=
|
||||
ARTIFACTS :=
|
||||
IMAGE_PREFIX := $(IMG_PREFIX)-$(1)
|
||||
IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1)-$$(2)
|
||||
IMAGE_SIZE :=
|
||||
KERNEL_PREFIX = $$(IMAGE_PREFIX)
|
||||
KERNEL_SUFFIX := -kernel.bin
|
||||
KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX)
|
||||
@@ -393,38 +350,22 @@ define Device/Init
|
||||
DEVICE_DTS :=
|
||||
DEVICE_DTS_CONFIG :=
|
||||
DEVICE_DTS_DIR :=
|
||||
DEVICE_FDT_NUM :=
|
||||
SOC :=
|
||||
|
||||
BOARD_NAME :=
|
||||
UIMAGE_MAGIC :=
|
||||
UIMAGE_NAME :=
|
||||
DEVICE_COMPAT_VERSION := 1.0
|
||||
DEVICE_COMPAT_MESSAGE :=
|
||||
SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
|
||||
SUPPORTED_DEVICES :=
|
||||
IMAGE_METADATA :=
|
||||
|
||||
FILESYSTEMS := $(TARGET_FILESYSTEMS)
|
||||
|
||||
UBOOT_PATH := $(STAGING_DIR_IMAGE)/uboot-$(1)
|
||||
|
||||
BROKEN :=
|
||||
DEFAULT :=
|
||||
endef
|
||||
|
||||
DEFAULT_DEVICE_VARS := \
|
||||
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \
|
||||
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \
|
||||
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \
|
||||
DEVICE_DTS_CONFIG DEVICE_DTS_DIR DEVICE_FDT_NUM SOC BOARD_NAME \
|
||||
UIMAGE_MAGIC UIMAGE_NAME \
|
||||
SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
|
||||
IMAGE_PREFIX DEVICE_PACKAGES UBOOT_PATH IMAGE_SIZE \
|
||||
DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \
|
||||
DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \
|
||||
DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \
|
||||
DEVICE_ALT1_VENDOR DEVICE_ALT1_MODEL DEVICE_ALT1_VARIANT \
|
||||
DEVICE_ALT2_VENDOR DEVICE_ALT2_MODEL DEVICE_ALT2_VARIANT
|
||||
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_SIZE KERNEL_INITRAMFS_IMAGE \
|
||||
KERNEL_LOADADDR DEVICE_DTS DEVICE_DTS_CONFIG DEVICE_DTS_DIR BOARD_NAME \
|
||||
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI \
|
||||
BLOCKSIZE PAGESIZE SUBPAGESIZE VID_HDR_OFFSET \
|
||||
UBINIZE_OPTS UIMAGE_NAME UBINIZE_PARTS \
|
||||
SUPPORTED_DEVICES IMAGE_METADATA
|
||||
|
||||
define Device/ExportVar
|
||||
$(1) : $(2):=$$($(2))
|
||||
@@ -472,8 +413,7 @@ endef
|
||||
ifndef IB
|
||||
define Device/Build/initramfs
|
||||
$(call Device/Export,$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE),$(1))
|
||||
$$(_TARGET): $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) \
|
||||
$$(if $$(CONFIG_JSON_OVERVIEW_IMAGE_INFO), $(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,))
|
||||
$$(_TARGET): $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE))
|
||||
|
||||
$(KDIR)/$$(KERNEL_INITRAMFS_NAME):: image_prepare
|
||||
$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
|
||||
@@ -482,38 +422,6 @@ define Device/Build/initramfs
|
||||
$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare
|
||||
@rm -f $$@
|
||||
$$(call concat_cmd,$$(KERNEL_INITRAMFS))
|
||||
|
||||
$(call Device/Export,$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,$(1))
|
||||
|
||||
$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json: $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
|
||||
@mkdir -p $$(shell dirname $$@)
|
||||
DEVICE_ID="$(1)" \
|
||||
BIN_DIR="$(BIN_DIR)" \
|
||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||
IMAGE_NAME="$$(notdir $$^)" \
|
||||
IMAGE_TYPE="kernel" \
|
||||
IMAGE_FILESYSTEM="initramfs" \
|
||||
IMAGE_PREFIX="$$(IMAGE_PREFIX)" \
|
||||
DEVICE_VENDOR="$$(DEVICE_VENDOR)" \
|
||||
DEVICE_MODEL="$$(DEVICE_MODEL)" \
|
||||
DEVICE_VARIANT="$$(DEVICE_VARIANT)" \
|
||||
DEVICE_ALT0_VENDOR="$$(DEVICE_ALT0_VENDOR)" \
|
||||
DEVICE_ALT0_MODEL="$$(DEVICE_ALT0_MODEL)" \
|
||||
DEVICE_ALT0_VARIANT="$$(DEVICE_ALT0_VARIANT)" \
|
||||
DEVICE_ALT1_VENDOR="$$(DEVICE_ALT1_VENDOR)" \
|
||||
DEVICE_ALT1_MODEL="$$(DEVICE_ALT1_MODEL)" \
|
||||
DEVICE_ALT1_VARIANT="$$(DEVICE_ALT1_VARIANT)" \
|
||||
DEVICE_ALT2_VENDOR="$$(DEVICE_ALT2_VENDOR)" \
|
||||
DEVICE_ALT2_MODEL="$$(DEVICE_ALT2_MODEL)" \
|
||||
DEVICE_ALT2_VARIANT="$$(DEVICE_ALT2_VARIANT)" \
|
||||
DEVICE_TITLE="$$(DEVICE_TITLE)" \
|
||||
DEVICE_PACKAGES="$$(DEVICE_PACKAGES)" \
|
||||
TARGET="$(BOARD)" \
|
||||
SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
|
||||
VERSION_NUMBER="$(VERSION_NUMBER)" \
|
||||
VERSION_CODE="$(VERSION_CODE)" \
|
||||
SUPPORTED_DEVICES="$$(SUPPORTED_DEVICES)" \
|
||||
$(TOPDIR)/scripts/json_add_image_info.py $$@
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -564,11 +472,8 @@ endef
|
||||
|
||||
define Device/Build/image
|
||||
GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz))
|
||||
$$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
|
||||
$(BUILD_DIR)/json_info_files/$(call IMAGE_NAME,$(1),$(2)).json, \
|
||||
$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX))
|
||||
$$(_TARGET): $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX)
|
||||
$(eval $(call Device/Export,$(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)),$(1)))
|
||||
|
||||
ROOTFS/$(1)/$(3) := \
|
||||
$(KDIR)/root.$(1)$$(strip \
|
||||
$$(if $$(FS_OPTIONS/$(1)),+fs=$$(call param_mangle,$$(FS_OPTIONS/$(1)))) \
|
||||
@@ -591,50 +496,6 @@ define Device/Build/image
|
||||
$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2))
|
||||
cp $$^ $$@
|
||||
|
||||
$(BUILD_DIR)/json_info_files/$(call IMAGE_NAME,$(1),$(2)).json: $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX)
|
||||
@mkdir -p $$(shell dirname $$@)
|
||||
DEVICE_ID="$(DEVICE_NAME)" \
|
||||
BIN_DIR="$(BIN_DIR)" \
|
||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||
IMAGE_NAME="$(IMAGE_NAME)" \
|
||||
IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \
|
||||
IMAGE_FILESYSTEM="$(1)" \
|
||||
IMAGE_PREFIX="$(IMAGE_PREFIX)" \
|
||||
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
|
||||
DEVICE_MODEL="$(DEVICE_MODEL)" \
|
||||
DEVICE_VARIANT="$(DEVICE_VARIANT)" \
|
||||
DEVICE_ALT0_VENDOR="$(DEVICE_ALT0_VENDOR)" \
|
||||
DEVICE_ALT0_MODEL="$(DEVICE_ALT0_MODEL)" \
|
||||
DEVICE_ALT0_VARIANT="$(DEVICE_ALT0_VARIANT)" \
|
||||
DEVICE_ALT1_VENDOR="$(DEVICE_ALT1_VENDOR)" \
|
||||
DEVICE_ALT1_MODEL="$(DEVICE_ALT1_MODEL)" \
|
||||
DEVICE_ALT1_VARIANT="$(DEVICE_ALT1_VARIANT)" \
|
||||
DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \
|
||||
DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \
|
||||
DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
|
||||
DEVICE_TITLE="$(DEVICE_TITLE)" \
|
||||
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
|
||||
TARGET="$(BOARD)" \
|
||||
SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
|
||||
VERSION_NUMBER="$(VERSION_NUMBER)" \
|
||||
VERSION_CODE="$(VERSION_CODE)" \
|
||||
SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \
|
||||
$(TOPDIR)/scripts/json_add_image_info.py $$@
|
||||
|
||||
endef
|
||||
|
||||
define Device/Build/artifact
|
||||
$$(_TARGET): $(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
|
||||
$(eval $(call Device/Export,$(KDIR)/tmp/$(IMAGE_PREFIX)-$(1)))
|
||||
$(KDIR)/tmp/$(IMAGE_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE)
|
||||
@rm -f $$@
|
||||
$$(call concat_cmd,$(ARTIFACT/$(1)))
|
||||
|
||||
.IGNORE: $(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
|
||||
|
||||
$(BIN_DIR)/$(IMAGE_PREFIX)-$(1): $(KDIR)/tmp/$(IMAGE_PREFIX)-$(1)
|
||||
cp $$^ $$@
|
||||
|
||||
endef
|
||||
|
||||
define Device/Build
|
||||
@@ -647,44 +508,19 @@ define Device/Build
|
||||
$$(eval $$(foreach image,$$(IMAGES), \
|
||||
$$(foreach fs,$$(filter $(TARGET_FILESYSTEMS),$$(FILESYSTEMS)), \
|
||||
$$(call Device/Build/image,$$(fs),$$(image),$(1)))))
|
||||
|
||||
$$(eval $$(foreach artifact,$$(ARTIFACTS), \
|
||||
$$(call Device/Build/artifact,$$(artifact))))
|
||||
|
||||
endef
|
||||
|
||||
define Device/DumpInfo
|
||||
Target-Profile: DEVICE_$(1)
|
||||
Target-Profile-Name: $(DEVICE_DISPLAY)
|
||||
Target-Profile-Name: $(DEVICE_TITLE)
|
||||
Target-Profile-Packages: $(DEVICE_PACKAGES)
|
||||
Target-Profile-hasImageMetadata: $(if $(foreach image,$(IMAGES),$(findstring append-metadata,$(IMAGE/$(image)))),1,0)
|
||||
Target-Profile-SupportedDevices: $(SUPPORTED_DEVICES)
|
||||
$(if $(BROKEN),Target-Profile-Broken: $(BROKEN))
|
||||
$(if $(DEFAULT),Target-Profile-Default: $(DEFAULT))
|
||||
Target-Profile-Description:
|
||||
$(DEVICE_DESCRIPTION)
|
||||
$(if $(strip $(DEVICE_ALT0_TITLE)),Alternative device titles:
|
||||
- $(DEVICE_ALT0_TITLE))
|
||||
$(if $(strip $(DEVICE_ALT1_TITLE)),- $(DEVICE_ALT1_TITLE))
|
||||
$(if $(strip $(DEVICE_ALT2_TITLE)),- $(DEVICE_ALT2_TITLE))
|
||||
@@
|
||||
|
||||
endef
|
||||
|
||||
define Device/Dump
|
||||
ifneq ($$(strip $$(DEVICE_ALT0_TITLE)),)
|
||||
DEVICE_DISPLAY = $$(DEVICE_ALT0_TITLE) ($$(DEVICE_TITLE))
|
||||
$$(info $$(call Device/DumpInfo,$(1)))
|
||||
endif
|
||||
ifneq ($$(strip $$(DEVICE_ALT1_TITLE)),)
|
||||
DEVICE_DISPLAY = $$(DEVICE_ALT1_TITLE) ($$(DEVICE_TITLE))
|
||||
$$(info $$(call Device/DumpInfo,$(1)))
|
||||
endif
|
||||
ifneq ($$(strip $$(DEVICE_ALT2_TITLE)),)
|
||||
DEVICE_DISPLAY = $$(DEVICE_ALT2_TITLE) ($$(DEVICE_TITLE))
|
||||
$$(info $$(call Device/DumpInfo,$(1)))
|
||||
endif
|
||||
DEVICE_DISPLAY = $$(DEVICE_TITLE)
|
||||
$$(eval $$(if $$(DEVICE_TITLE),$$(info $$(call Device/DumpInfo,$(1)))))
|
||||
endef
|
||||
|
||||
@@ -710,6 +546,8 @@ define BuildImage
|
||||
prepare:
|
||||
compile:
|
||||
clean:
|
||||
legacy-images-prepare:
|
||||
legacy-images:
|
||||
image_prepare:
|
||||
|
||||
ifeq ($(IB),)
|
||||
@@ -722,9 +560,11 @@ define BuildImage
|
||||
|
||||
image_prepare: compile
|
||||
mkdir -p $(BIN_DIR) $(KDIR)/tmp
|
||||
rm -rf $(BUILD_DIR)/json_info_files
|
||||
$(call Image/Prepare)
|
||||
|
||||
legacy-images-prepare-make: image_prepare
|
||||
$(MAKE) legacy-images-prepare
|
||||
|
||||
else
|
||||
image_prepare:
|
||||
mkdir -p $(BIN_DIR) $(KDIR)/tmp
|
||||
@@ -738,12 +578,17 @@ define BuildImage
|
||||
$(call Image/InstallKernel)
|
||||
|
||||
$(foreach device,$(TARGET_DEVICES),$(call Device,$(device)))
|
||||
$(foreach device,$(LEGACY_DEVICES),$(call LegacyDevice,$(device)))
|
||||
|
||||
install-images: kernel_prepare $(foreach fs,$(filter-out $(if $(UBIFS_OPTS),,ubifs),$(TARGET_FILESYSTEMS) $(fs-subtypes-y)),$(KDIR)/root.$(fs))
|
||||
$(foreach fs,$(TARGET_FILESYSTEMS),
|
||||
$(call Image/Build,$(fs))
|
||||
)
|
||||
|
||||
legacy-images-make: install-images
|
||||
$(call Image/mkfs/ubifs/legacy)
|
||||
$(MAKE) legacy-images
|
||||
|
||||
install: install-images
|
||||
$(call Image/Manifest)
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
LINUX_VERSION-5.4 = .238
|
||||
LINUX_KERNEL_HASH-5.4.238 = 70a2b2da85598eba6a73cdc0749e441cbdf3011d9babcb7028a46aa8d98aa91f
|
||||
@@ -1,7 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
|
||||
# Copyright (C) 2006-2007 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(INCLUDE_DIR)/prereq.mk
|
||||
include $(INCLUDE_DIR)/depends.mk
|
||||
|
||||
@@ -10,7 +12,7 @@ ifneq ($(DUMP),1)
|
||||
endif
|
||||
|
||||
KERNEL_FILE_DEPENDS=$(GENERIC_BACKPORT_DIR) $(GENERIC_PATCH_DIR) $(GENERIC_HACK_DIR) $(PATCH_DIR) $(GENERIC_FILES_DIR) $(FILES_DIR)
|
||||
STAMP_PREPARED=$(LINUX_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),$(KERNEL_FILE_DEPENDS),)))
|
||||
STAMP_PREPARED=$(LINUX_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,$(KERNEL_FILE_DEPENDS),)))
|
||||
STAMP_CONFIGURED:=$(LINUX_DIR)/.configured
|
||||
include $(INCLUDE_DIR)/download.mk
|
||||
include $(INCLUDE_DIR)/quilt.mk
|
||||
@@ -68,7 +70,7 @@ ifdef CONFIG_COLLECT_KERNEL_DEBUG
|
||||
$(FIND) $(KERNEL_BUILD_DIR)/debug -type f | $(XARGS) $(KERNEL_CROSS)strip --only-keep-debug
|
||||
$(TAR) c -C $(KERNEL_BUILD_DIR) debug \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
||||
| zstd -T0 -f -o $(BIN_DIR)/kernel-debug.tar.zst
|
||||
| bzip2 -c -9 > $(BIN_DIR)/kernel-debug.tar.bz2
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -103,7 +105,7 @@ define BuildKernel
|
||||
xargs $(TARGET_CROSS)nm | \
|
||||
awk '$$$$1 == "U" { print $$$$2 } ' | \
|
||||
sort -u > $(KERNEL_BUILD_DIR)/mod_symtab.txt
|
||||
$(TARGET_CROSS)nm -n $(LINUX_DIR)/vmlinux.o | awk '/^[0-9a-f]+ [rR] __ksymtab_/ {print substr($$$$3,11)}' > $(KERNEL_BUILD_DIR)/kernel_symtab.txt
|
||||
$(TARGET_CROSS)nm -n $(LINUX_DIR)/vmlinux.o | grep ' [rR] __ksymtab' | sed -e 's,........ [rR] __ksymtab_,,' > $(KERNEL_BUILD_DIR)/kernel_symtab.txt
|
||||
grep -Ff $(KERNEL_BUILD_DIR)/mod_symtab.txt $(KERNEL_BUILD_DIR)/kernel_symtab.txt > $(KERNEL_BUILD_DIR)/sym_include.txt
|
||||
grep -Fvf $(KERNEL_BUILD_DIR)/mod_symtab.txt $(KERNEL_BUILD_DIR)/kernel_symtab.txt > $(KERNEL_BUILD_DIR)/sym_exclude.txt
|
||||
( \
|
||||
@@ -129,16 +131,10 @@ define BuildKernel
|
||||
$(Kernel/Configure)
|
||||
touch $$@
|
||||
|
||||
$(LINUX_DIR)/.modules: export STAGING_PREFIX=$$(STAGING_DIR_HOST)
|
||||
$(LINUX_DIR)/.modules: export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig
|
||||
$(LINUX_DIR)/.modules: export PKG_CONFIG_LIBDIR=$$(STAGING_DIR_HOST)/lib/pkgconfig
|
||||
$(LINUX_DIR)/.modules: $(STAMP_CONFIGURED) $(LINUX_DIR)/.config FORCE
|
||||
$(Kernel/CompileModules)
|
||||
touch $$@
|
||||
|
||||
$(LINUX_DIR)/.image: export STAGING_PREFIX=$$(STAGING_DIR_HOST)
|
||||
$(LINUX_DIR)/.image: export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig
|
||||
$(LINUX_DIR)/.image: export PKG_CONFIG_LIBDIR=$$(STAGING_DIR_HOST)/lib/pkgconfig
|
||||
$(LINUX_DIR)/.image: $(STAMP_CONFIGURED) $(if $(CONFIG_STRIP_KERNEL_EXPORTS),$(KERNEL_BUILD_DIR)/symtab.h) FORCE
|
||||
$(Kernel/CompileImage)
|
||||
$(Kernel/CollectDebug)
|
||||
@@ -155,19 +151,14 @@ define BuildKernel
|
||||
compile: $(LINUX_DIR)/.modules
|
||||
$(MAKE) -C image compile TARGET_BUILD=
|
||||
|
||||
oldconfig menuconfig nconfig xconfig: $(STAMP_PREPARED) $(STAMP_CHECKED) FORCE
|
||||
oldconfig menuconfig nconfig: $(STAMP_PREPARED) $(STAMP_CHECKED) FORCE
|
||||
rm -f $(LINUX_DIR)/.config.prev
|
||||
rm -f $(STAMP_CONFIGURED)
|
||||
$(LINUX_RECONF_CMD) > $(LINUX_DIR)/.config
|
||||
$(_SINGLE)$(KERNEL_MAKE) \
|
||||
$(if $(findstring Darwin,$(HOST_OS)), \
|
||||
HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses" \
|
||||
HOSTLDLIBS_mconf="-L$(STAGING_DIR_HOST)/lib -lncurses" \
|
||||
filechk_conf_cfg=" :" \
|
||||
) \
|
||||
YACC=$(STAGING_DIR_HOST)/bin/bison \
|
||||
$(if $(findstring Darwin,$(HOST_OS)),HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses") \
|
||||
$$@
|
||||
$(call LINUX_RECONF_DIFF,$(LINUX_DIR)/.config) > $(LINUX_RECONFIG_TARGET)
|
||||
$(LINUX_RECONF_DIFF) $(LINUX_DIR)/.config > $(LINUX_RECONFIG_TARGET)
|
||||
|
||||
install: $(LINUX_DIR)/.image
|
||||
+$(MAKE) -C image compile install TARGET_BUILD=
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006-2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
ifdef CONFIG_STRIP_KERNEL_EXPORTS
|
||||
KERNEL_MAKEOPTS += \
|
||||
@@ -18,22 +21,16 @@ export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
|
||||
# defined in quilt.mk
|
||||
Kernel/Patch:=$(Kernel/Patch/Default)
|
||||
|
||||
ifneq (,$(findstring .xz,$(LINUX_SOURCE)))
|
||||
LINUX_CAT:=xzcat
|
||||
else
|
||||
LINUX_CAT:=gzip -dc
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
|
||||
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
|
||||
define Kernel/Prepare/Default
|
||||
$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
|
||||
xzcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
|
||||
$(Kernel/Patch)
|
||||
$(if $(QUILT),touch $(LINUX_DIR)/.quilt_used)
|
||||
endef
|
||||
else
|
||||
define Kernel/Prepare/Default
|
||||
$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
|
||||
xzcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
|
||||
endef
|
||||
endif
|
||||
else
|
||||
@@ -43,9 +40,6 @@ else
|
||||
rmdir $(LINUX_DIR); \
|
||||
fi
|
||||
ln -s $(CONFIG_EXTERNAL_KERNEL_TREE) $(LINUX_DIR)
|
||||
if [ -d $(LINUX_DIR)/user_headers ]; then \
|
||||
rm -rf $(LINUX_DIR)/user_headers; \
|
||||
fi
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -77,7 +71,6 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),CONFIG_INITRAMFS_COMPRESSION_LZO=y\nCONFIG_RD_LZO=y,# CONFIG_INITRAMFS_COMPRESSION_LZO is not set\n# CONFIG_RD_LZO is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),CONFIG_INITRAMFS_COMPRESSION_XZ=y\nCONFIG_RD_XZ=y,# CONFIG_INITRAMFS_COMPRESSION_XZ is not set\n# CONFIG_RD_XZ is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),CONFIG_INITRAMFS_COMPRESSION_LZ4=y\nCONFIG_RD_LZ4=y,# CONFIG_INITRAMFS_COMPRESSION_LZ4 is not set\n# CONFIG_RD_LZ4 is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),CONFIG_INITRAMFS_COMPRESSION_ZSTD=y\nCONFIG_RD_STD=y,# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\n# CONFIG_RD_ZSTD is not set)" >> $(LINUX_DIR)/.config
|
||||
endef
|
||||
else
|
||||
endif
|
||||
@@ -147,7 +140,6 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
|
||||
define Kernel/CompileImage/Initramfs
|
||||
$(call Kernel/Configure/Initramfs)
|
||||
$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init
|
||||
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init)
|
||||
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
|
||||
+$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
|
||||
$(call Kernel/CopyImage,-initramfs)
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
|
||||
# Use the default kernel version if the Makefile doesn't override it
|
||||
|
||||
LINUX_RELEASE?=1
|
||||
|
||||
ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
LINUX_VERSION-3.18 = .71
|
||||
LINUX_VERSION-4.4 = .121
|
||||
LINUX_VERSION-4.9 = .111
|
||||
LINUX_VERSION-4.14 = .54
|
||||
|
||||
KERNEL_DETAILS_FILE=$(INCLUDE_DIR)/kernel-$(KERNEL_PATCHVER)
|
||||
ifeq ($(wildcard $(KERNEL_DETAILS_FILE)),)
|
||||
$(error Missing kernel version/hash file for $(KERNEL_PATCHVER). Please create $(KERNEL_DETAILS_FILE))
|
||||
endif
|
||||
|
||||
include $(KERNEL_DETAILS_FILE)
|
||||
LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
|
||||
LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
|
||||
LINUX_KERNEL_HASH-4.9.111 = 5966558959dc580f163766f3fdefd7e57c01b2b45d51202d00b3807c253759dd
|
||||
LINUX_KERNEL_HASH-4.14.54 = 451642ac28c539a91072f1fb83b1c061d6d44df870ddf5562400ade5e1c4b6c6
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
@@ -26,9 +25,6 @@ else
|
||||
ifdef KERNEL_PATCHVER
|
||||
LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
|
||||
endif
|
||||
ifdef KERNEL_TESTING_PATCHVER
|
||||
LINUX_TESTING_VERSION:=$(KERNEL_TESTING_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_TESTING_PATCHVER)))
|
||||
endif
|
||||
endif
|
||||
|
||||
split_version=$(subst ., ,$(1))
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006-2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
ifneq ($(filter check,$(MAKECMDGOALS)),)
|
||||
CHECK:=1
|
||||
@@ -56,16 +59,10 @@ else
|
||||
|
||||
LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux
|
||||
|
||||
ifneq (,$(findstring -rc,$(LINUX_VERSION)))
|
||||
LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.gz
|
||||
else
|
||||
LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.xz
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring -rc,$(LINUX_VERSION)))
|
||||
LINUX_SITE:=https://git.kernel.org/torvalds/t
|
||||
else ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
|
||||
LINUX_SITE:=@KERNEL/linux/kernel/v$(word 1,$(subst ., ,$(KERNEL_BASE))).x
|
||||
LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.xz
|
||||
TESTING:=$(if $(findstring -rc,$(LINUX_VERSION)),/testing,)
|
||||
ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
|
||||
LINUX_SITE:=@KERNEL/linux/kernel/v$(word 1,$(subst ., ,$(KERNEL_BASE))).x$(TESTING)
|
||||
else
|
||||
LINUX_UNAME_VERSION:=$(strip $(shell cat $(LINUX_DIR)/include/config/kernel.release 2>/dev/null))
|
||||
endif
|
||||
@@ -74,7 +71,7 @@ else
|
||||
TARGET_MODULES_DIR:=$(LINUX_TARGET_DIR)/$(MODULES_SUBDIR)
|
||||
|
||||
ifneq ($(TARGET_BUILD),1)
|
||||
PKG_BUILD_DIR ?= $(KERNEL_BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
|
||||
PKG_BUILD_DIR ?= $(KERNEL_BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -100,8 +97,7 @@ endif
|
||||
|
||||
KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS)
|
||||
|
||||
KERNEL_MAKE_FLAGS = \
|
||||
KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR))) $(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION))) $(call qstrip,$(CONFIG_KERNEL_CFLAGS))" \
|
||||
KERNEL_MAKE_FLAGS := \
|
||||
HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \
|
||||
CROSS_COMPILE="$(KERNEL_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
@@ -111,15 +107,10 @@ KERNEL_MAKE_FLAGS = \
|
||||
KBUILD_BUILD_TIMESTAMP="$(KBUILD_BUILD_TIMESTAMP)" \
|
||||
KBUILD_BUILD_VERSION="0" \
|
||||
HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib" \
|
||||
KBUILD_HOSTLDLIBS="-L$(STAGING_DIR_HOST)/lib" \
|
||||
CONFIG_SHELL="$(BASH)" \
|
||||
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
|
||||
$(if $(PKG_BUILD_ID),LDFLAGS_MODULE=--build-id=0x$(PKG_BUILD_ID)) \
|
||||
cmd_syscalls= \
|
||||
$(if $(__package_mk),KBUILD_EXTRA_SYMBOLS="$(wildcard $(PKG_SYMVERS_DIR)/*.symvers)")
|
||||
|
||||
KERNEL_NOSTDINC_FLAGS = \
|
||||
-nostdinc $(if $(DUMP),, -isystem $(shell $(TARGET_CC) -print-file-name=include))
|
||||
cmd_syscalls=
|
||||
|
||||
ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
|
||||
KERNEL_MAKE_FLAGS += \
|
||||
@@ -132,29 +123,27 @@ ifdef CONFIG_USE_SPARSE
|
||||
KERNEL_MAKEOPTS += C=1 CHECK=$(STAGING_DIR_HOST)/bin/sparse
|
||||
endif
|
||||
|
||||
ifneq ($(HOST_OS),Linux)
|
||||
KERNEL_MAKEOPTS += CONFIG_STACK_VALIDATION=
|
||||
export SKIP_STACK_VALIDATION:=1
|
||||
endif
|
||||
|
||||
PKG_EXTMOD_SUBDIRS ?= .
|
||||
|
||||
PKG_SYMVERS_DIR = $(KERNEL_BUILD_DIR)/symvers
|
||||
define populate_module_symvers
|
||||
@mkdir -p $(PKG_INFO_DIR)
|
||||
cat /dev/null > $(PKG_INFO_DIR)/$(PKG_NAME).symvers; \
|
||||
for subdir in $(PKG_EXTMOD_SUBDIRS); do \
|
||||
cat $(PKG_INFO_DIR)/*.symvers 2>/dev/null > $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers; \
|
||||
done
|
||||
endef
|
||||
|
||||
define collect_module_symvers
|
||||
for subdir in $(PKG_EXTMOD_SUBDIRS); do \
|
||||
realdir=$$$$(readlink -f $(PKG_BUILD_DIR)); \
|
||||
grep -F $(PKG_BUILD_DIR) $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
|
||||
[ "$(PKG_BUILD_DIR)" = "$$$$realdir" ] || \
|
||||
grep -F $$$$realdir $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
|
||||
grep -F $$$$(readlink -f $(PKG_BUILD_DIR)) $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
|
||||
done; \
|
||||
sort -u $(PKG_BUILD_DIR)/Module.symvers.tmp > $(PKG_BUILD_DIR)/Module.symvers; \
|
||||
mkdir -p $(PKG_SYMVERS_DIR); \
|
||||
mv $(PKG_BUILD_DIR)/Module.symvers $(PKG_SYMVERS_DIR)/$(PKG_NAME).symvers
|
||||
mv $(PKG_BUILD_DIR)/Module.symvers $(PKG_INFO_DIR)/$(PKG_NAME).symvers
|
||||
endef
|
||||
|
||||
define KernelPackage/hooks
|
||||
ifneq ($(PKG_NAME),kernel)
|
||||
Hooks/Compile/Pre += populate_module_symvers
|
||||
Hooks/Compile/Post += collect_module_symvers
|
||||
endif
|
||||
define KernelPackage/hooks
|
||||
@@ -248,7 +237,7 @@ $(call KernelPackage/$(1)/config)
|
||||
exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
$(call ModuleAutoLoad,$(1),$$(1),$(filter-out 0-,$(word 1,$(AUTOLOAD))-),$(filter-out 0,$(word 2,$(AUTOLOAD))),$(sort $(wordlist 3,99,$(AUTOLOAD))))
|
||||
$(call ModuleAutoLoad,$(1),$$(1),$(filter-out 0-,$(word 1,$(AUTOLOAD))-),$(filter-out 0,$(word 2,$(AUTOLOAD))),$(wordlist 3,99,$(AUTOLOAD)))
|
||||
$(call KernelPackage/$(1)/install,$$(1))
|
||||
endef
|
||||
$(if $(CONFIG_PACKAGE_kmod-$(1)),
|
||||
@@ -264,8 +253,7 @@ $(call KernelPackage/$(1)/config)
|
||||
endif
|
||||
$$(eval $$(call BuildPackage,kmod-$(1)))
|
||||
|
||||
$$(IPKG_kmod-$(1)): $$(wildcard $$(call version_filter,$$(FILES)))
|
||||
|
||||
$$(IPKG_kmod-$(1)): $$(wildcard $$(FILES))
|
||||
endef
|
||||
|
||||
version_filter=$(if $(findstring @,$(1)),$(shell $(SCRIPT_DIR)/package-metadata.pl version_filter $(KERNEL_PATCHVER) $(1)),$(1))
|
||||
|
||||
BIN
include/logo.png
BIN
include/logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB |
398
include/logo.svg
398
include/logo.svg
@@ -1,398 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="2000mm"
|
||||
height="595.20099mm"
|
||||
viewBox="0 0 2000.0002 595.20098"
|
||||
version="1.1"
|
||||
id="svg971"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
sodipodi:docname="logo.svg">
|
||||
<defs
|
||||
id="defs965">
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath78">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path76" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath106">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path104" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath130">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path128" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath154">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path152" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath174">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path172" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath194">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path192" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath214">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path212" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.35"
|
||||
inkscape:cx="1579.8791"
|
||||
inkscape:cy="728.41283"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-rotation="0"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata968">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(312.17635,44.559227)">
|
||||
<g
|
||||
id="g72"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g74"
|
||||
clip-path="url(#clipPath78)">
|
||||
<g
|
||||
id="g80"
|
||||
transform="translate(173.1753,319.1396)">
|
||||
<path
|
||||
d="m 0,0 c 0,-5.745 -4.627,-10.263 -10.545,-10.263 -5.918,0 -10.544,4.518 -10.544,10.263 0,5.771 4.626,10.367 10.544,10.367 C -4.627,10.367 0,5.771 0,0 m -3.685,0 c 0,3.995 -3.013,7.024 -6.86,7.024 -3.846,0 -6.859,-3.029 -6.859,-7.024 0,-3.995 3.013,-6.946 6.859,-6.946 3.847,0 6.86,2.95 6.86,6.946"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path82" />
|
||||
</g>
|
||||
<g
|
||||
id="g84"
|
||||
transform="translate(189.0894,315.771)">
|
||||
<path
|
||||
d="m 0,0 c 0,-4.099 -3.174,-6.894 -6.591,-6.894 -1.829,0 -3.308,0.523 -4.438,1.41 v -8.329 H -14.58 V 6.528 h 3.552 V 5.484 C -9.898,6.397 -8.419,6.92 -6.59,6.92 -3.174,6.92 0,4.1 0,0 m -3.443,0 c 0,2.402 -1.614,3.917 -3.766,3.917 -1.91,0 -3.82,-1.515 -3.82,-3.917 0,-2.402 1.91,-3.889 3.82,-3.889 2.152,-0.002 3.766,1.486 3.766,3.889"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path86" />
|
||||
</g>
|
||||
<g
|
||||
id="g88"
|
||||
transform="translate(203.958,314.8574)">
|
||||
<path
|
||||
d="m 0,0 h -10.222 c 0.349,-1.88 1.721,-3.029 3.362,-3.029 1.049,0 2.367,0.131 3.336,1.723 l 3.174,-0.652 c -1.183,-2.716 -3.577,-4.022 -6.51,-4.022 -3.793,0 -6.887,2.794 -6.887,6.894 0,4.099 3.094,6.918 6.94,6.918 3.578,0 6.671,-2.689 6.806,-6.659 z m -10.115,2.429 h 6.485 c -0.457,1.671 -1.749,2.402 -3.174,2.402 -1.347,0 -2.88,-0.784 -3.311,-2.402"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path90" />
|
||||
</g>
|
||||
<g
|
||||
id="g92"
|
||||
transform="translate(218.446,317.2075)">
|
||||
<path
|
||||
d="m 0,0 v -7.938 h -3.551 v 7.207 c 0,1.827 -1.076,3.055 -2.717,3.055 -2.017,0 -3.335,-1.306 -3.335,-4.492 v -5.77 h -3.551 v 13.03 h 3.55 V 3.917 c 1.049,1.018 2.447,1.566 4.223,1.566 C -2.152,5.483 0,3.238 0,0"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path94" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g96"
|
||||
transform="matrix(12.354182,0,0,-12.354182,1281.2351,460.31368)">
|
||||
<path
|
||||
d="M 0,0 H -2.851 L -7.854,12.874 -12.885,0 h -2.824 l -6.699,19.846 h 3.82 l 4.492,-13.109 5.138,13.109 h 2.179 L -1.641,6.737 2.851,19.846 h 3.846 z"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path98" />
|
||||
</g>
|
||||
<g
|
||||
id="g100"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g102"
|
||||
clip-path="url(#clipPath106)">
|
||||
<g
|
||||
id="g108"
|
||||
transform="translate(255.7183,322.3774)">
|
||||
<path
|
||||
d="m 0,0 -0.188,-3.316 h -0.78 c -3.282,0 -4.789,-1.959 -4.789,-5.588 v -4.204 h -3.551 v 13.03 h 3.551 V -2.35 c 0.996,1.515 2.556,2.454 4.816,2.454 0.349,0 0.618,0 0.941,-0.104"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path110" />
|
||||
</g>
|
||||
<g
|
||||
id="g112"
|
||||
transform="translate(263.2698,314.0737)">
|
||||
<path
|
||||
d="m 0,0 c 0,-1.279 0.619,-1.985 1.695,-1.985 0.618,0 1.533,0.262 2.234,0.627 L 4.952,-4.23 C 3.553,-4.961 2.584,-5.197 1.455,-5.197 c -3.201,0 -5.004,1.776 -5.004,4.937 v 5.665 h -2.879 v 2.821 h 2.879 v 4.726 l 3.55,1.045 V 8.226 H 5.193 V 5.405 H 0 Z"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path114" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g116"
|
||||
transform="matrix(12.354182,0,0,-12.354182,612.14009,549.73584)">
|
||||
<path
|
||||
d="M 0,0 H -0.799 L -1.549,2 -2.304,0 H -3.1 l -1.224,3.689 h 1.02 l 0.635,-1.99 0.795,1.99 h 0.65 l 0.79,-1.99 0.64,1.99 h 1.02 z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path118" />
|
||||
</g>
|
||||
<g
|
||||
id="g120"
|
||||
transform="matrix(12.354182,0,0,-12.354182,674.30011,539.84385)">
|
||||
<path
|
||||
d="m 0,0 h 0.785 v -0.801 h -2.53 V 0 h 0.785 v 2.083 h -0.785 v 0.805 h 2.53 V 2.083 H 0 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path122" />
|
||||
</g>
|
||||
<g
|
||||
id="g124"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g126"
|
||||
clip-path="url(#clipPath130)">
|
||||
<g
|
||||
id="g132"
|
||||
transform="translate(196.9004,302.0308)">
|
||||
<path
|
||||
d="M 0,0 -0.7,0.801 H -1.449 V 0 H -2.41 v 3.689 h 1.771 c 1,0 1.605,-0.573 1.605,-1.427 0,-0.549 -0.255,-0.991 -0.695,-1.238 L 1.206,0 Z m -0.675,1.602 c 0.4,0 0.73,0.262 0.73,0.66 0,0.388 -0.33,0.628 -0.73,0.628 H -1.449 V 1.604 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path134" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g136"
|
||||
transform="matrix(12.354182,0,0,-12.354182,820.47493,549.73584)">
|
||||
<path
|
||||
d="m 0,0 h -2.9 v 3.689 h 2.87 V 2.888 H -1.94 V 2.257 h 1.88 V 1.456 H -1.94 V 0.801 h 1.941 z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path138" />
|
||||
</g>
|
||||
<g
|
||||
id="g140"
|
||||
transform="matrix(12.354182,0,0,-12.354182,886.62894,549.73584)">
|
||||
<path
|
||||
d="m 0,0 h -2.805 v 3.689 h 0.96 V 0.801 H 0 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path142" />
|
||||
</g>
|
||||
<g
|
||||
id="g144"
|
||||
transform="matrix(12.354182,0,0,-12.354182,953.79261,549.73584)">
|
||||
<path
|
||||
d="m 0,0 h -2.9 v 3.689 h 2.87 V 2.888 H -1.94 V 2.257 h 1.88 V 1.456 H -1.94 V 0.801 H 0 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path146" />
|
||||
</g>
|
||||
<g
|
||||
id="g148"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g150"
|
||||
clip-path="url(#clipPath154)">
|
||||
<g
|
||||
id="g156"
|
||||
transform="translate(219.3787,304.7295)">
|
||||
<path
|
||||
d="m 0,0 -0.94,-0.185 c -0.08,0.374 -0.34,0.481 -0.565,0.481 -0.225,0 -0.41,-0.111 -0.41,-0.316 0,-0.146 0.08,-0.238 0.245,-0.286 l 0.74,-0.228 c 0.625,-0.199 0.965,-0.481 0.965,-1.058 0,-0.83 -0.75,-1.18 -1.495,-1.18 -0.825,0 -1.495,0.422 -1.59,1.126 l 0.985,0.194 c 0.08,-0.364 0.304,-0.519 0.635,-0.519 0.28,0 0.45,0.126 0.45,0.321 0,0.145 -0.08,0.247 -0.29,0.3 l -0.705,0.199 c -0.575,0.16 -0.965,0.447 -0.965,1.044 0,0.752 0.609,1.165 1.44,1.165 0.79,0 1.375,-0.369 1.5,-1.058"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path158" />
|
||||
</g>
|
||||
<g
|
||||
id="g160"
|
||||
transform="translate(224.4026,304.7295)">
|
||||
<path
|
||||
d="m 0,0 -0.94,-0.185 c -0.08,0.374 -0.34,0.481 -0.565,0.481 -0.225,0 -0.41,-0.111 -0.41,-0.316 0,-0.146 0.08,-0.238 0.245,-0.286 l 0.74,-0.228 c 0.625,-0.199 0.965,-0.481 0.965,-1.058 0,-0.83 -0.75,-1.18 -1.495,-1.18 -0.825,0 -1.495,0.422 -1.591,1.126 l 0.986,0.194 c 0.08,-0.364 0.304,-0.519 0.635,-0.519 0.28,0 0.45,0.126 0.45,0.321 0,0.145 -0.08,0.247 -0.29,0.3 l -0.705,0.2 c -0.575,0.16 -0.965,0.446 -0.965,1.044 0,0.752 0.608,1.165 1.44,1.165 C -0.71,1.058 -0.125,0.689 0,0"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path162" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g164"
|
||||
transform="matrix(12.354182,0,0,-12.354182,1170.9286,521.84896)">
|
||||
<path
|
||||
d="M 0,0 H 1.785 V -0.801 H 0 V -2.257 H -0.96 V 1.432 H 1.915 V 0.631 H 0 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path166" />
|
||||
</g>
|
||||
<g
|
||||
id="g168"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g170"
|
||||
clip-path="url(#clipPath174)">
|
||||
<g
|
||||
id="g176"
|
||||
transform="translate(238.2297,302.0308)">
|
||||
<path
|
||||
d="M 0,0 -0.7,0.801 H -1.45 V 0 h -0.96 v 3.689 h 1.77 c 1,0 1.605,-0.573 1.605,-1.427 C 0.965,1.713 0.71,1.271 0.27,1.024 L 1.205,0 Z m -0.675,1.602 c 0.4,0 0.73,0.262 0.73,0.66 0,0.388 -0.33,0.628 -0.73,0.628 H -1.45 V 1.604 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path178" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g180"
|
||||
transform="matrix(12.354182,0,0,-12.354182,1331.0682,549.73584)">
|
||||
<path
|
||||
d="m 0,0 h -2.9 v 3.689 h 2.87 V 2.888 H -1.94 V 2.257 h 1.88 V 1.456 H -1.94 V 0.801 H 0 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path182" />
|
||||
</g>
|
||||
<g
|
||||
id="g184"
|
||||
transform="matrix(12.354182,0,0,-12.354182,1398.3947,549.73584)">
|
||||
<path
|
||||
d="m 0,0 h -2.9 v 3.689 h 2.87 V 2.888 H -1.94 V 2.257 h 1.88 V 1.456 H -1.94 V 0.801 h 1.941 z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path186" />
|
||||
</g>
|
||||
<g
|
||||
id="g188"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g190"
|
||||
clip-path="url(#clipPath194)">
|
||||
<g
|
||||
id="g196"
|
||||
transform="translate(254.0122,305.7197)">
|
||||
<path
|
||||
d="M 0,0 C 1.21,0 2.01,-0.739 2.01,-1.844 2.01,-2.95 1.211,-3.689 0,-3.689 H -1.695 V 0 Z m -0.01,-2.888 c 0.655,0 1.055,0.417 1.055,1.044 0,0.626 -0.4,1.043 -1.055,1.043 h -0.723 v -2.087 z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path198" />
|
||||
</g>
|
||||
<g
|
||||
id="g200"
|
||||
transform="translate(262.0693,303.8706)">
|
||||
<path
|
||||
d="m 0,0 c 0,-1.078 -0.91,-1.913 -2.03,-1.913 -1.12,0 -2.035,0.835 -2.035,1.913 0,1.077 0.91,1.917 2.035,1.917 C -0.905,1.917 0,1.073 0,0 m -0.965,0 c 0,0.606 -0.47,1.077 -1.066,1.077 -0.595,0 -1.065,-0.471 -1.065,-1.077 0,-0.607 0.47,-1.078 1.065,-1.078 0.596,0 1.066,0.466 1.066,1.078"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path202" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g204"
|
||||
transform="matrix(12.354182,0,0,-12.354182,1629.3552,549.73584)">
|
||||
<path
|
||||
d="M 0,0 H -0.94 V 1.752 L -2.06,0.256 H -2.35 L -3.47,1.75 v -1.751 h -0.94 v 3.689 h 0.615 l 1.59,-2.17 1.59,2.17 H 0 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path206" />
|
||||
</g>
|
||||
<g
|
||||
id="g208"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g210"
|
||||
clip-path="url(#clipPath214)">
|
||||
<g
|
||||
id="g216"
|
||||
transform="translate(271.6895,328.4058)">
|
||||
<path
|
||||
d="M 0,0 -0.99,1.042 H -1.398 V 0 h -0.455 v 2.468 h 0.95 c 0.533,0 0.856,-0.296 0.856,-0.712 0.008,-0.283 -0.169,-0.54 -0.441,-0.642 L 0.569,0 Z m -0.903,1.441 c 0.267,0 0.405,0.137 0.405,0.315 0,0.179 -0.141,0.311 -0.405,0.311 H -1.398 V 1.44 Z"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path218" />
|
||||
</g>
|
||||
<g
|
||||
id="g220"
|
||||
transform="translate(270.8284,327.209)">
|
||||
<path
|
||||
d="m 0,0 c -1.307,0 -2.366,1.028 -2.367,2.296 0,1.269 1.059,2.298 2.366,2.298 1.307,0 2.366,-1.028 2.367,-2.296 V 2.297 C 2.365,1.029 1.306,0.002 0,0 m 0,4.269 c -1.122,0 -2.031,-0.883 -2.031,-1.972 0,-1.089 0.909,-1.971 2.031,-1.971 1.122,0 2.031,0.882 2.031,1.971 C 2.03,3.386 1.121,4.268 0,4.269 Z"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path222" />
|
||||
</g>
|
||||
<g
|
||||
id="g224"
|
||||
transform="translate(130.3613,326.9673)">
|
||||
<path
|
||||
d="m 0,0 c -1.713,0 -3.102,-1.348 -3.102,-3.011 0,-1.663 1.389,-3.011 3.102,-3.011 1.713,0 3.102,1.348 3.102,3.011 C 3.099,-1.35 1.712,-0.003 0,0"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path226" />
|
||||
</g>
|
||||
<g
|
||||
id="g228"
|
||||
transform="translate(111.3059,342.4536)">
|
||||
<path
|
||||
d="m 0,0 3.229,-3.134 c 4.051,3.933 9.653,6.36 15.826,6.36 6.174,0 11.776,-2.428 15.827,-6.36 L 38.111,0 C 33.236,4.732 26.494,7.682 19.055,7.682 11.617,7.682 4.875,4.732 0,0"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path230" />
|
||||
</g>
|
||||
<g
|
||||
id="g232"
|
||||
transform="translate(117.1301,336.7998)">
|
||||
<path
|
||||
d="m 0,0 3.229,-3.134 c 2.564,2.488 6.109,4.025 10.001,4.025 3.892,0 7.44,-1.537 10.004,-4.025 L 26.463,0 C 23.076,3.288 18.391,5.348 13.232,5.348 8.072,5.348 3.388,3.289 0,0"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path234" />
|
||||
</g>
|
||||
<g
|
||||
id="g236"
|
||||
transform="translate(122.9229,331.1763)">
|
||||
<path
|
||||
d="m 0,0 3.229,-3.134 c 2.326,2.253 6.093,2.253 8.419,0 L 14.877,0 C 12.905,1.915 10.228,2.988 7.438,2.98 4.558,2.98 1.93,1.844 0,0"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path238" />
|
||||
</g>
|
||||
<g
|
||||
id="g240"
|
||||
transform="translate(141.8201,332.0371)">
|
||||
<path
|
||||
d="m 0,0 c 1.709,-2.274 2.722,-5.07 2.722,-8.081 0,-7.589 -6.362,-13.766 -14.181,-13.766 -7.818,0 -14.18,6.177 -14.18,13.766 0,3.011 1.013,5.807 2.722,8.081 l -3.26,3.165 c -2.533,-3.103 -4.021,-7.006 -4.021,-11.246 0,-10.017 8.42,-18.19 18.739,-18.19 10.32,0 18.739,8.173 18.739,18.19 0,4.24 -1.519,8.143 -4.02,11.246 z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path242" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 17 KiB |
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006-2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
ifneq ($(__inc_netfilter),1)
|
||||
__inc_netfilter:=1
|
||||
@@ -64,7 +67,9 @@ $(eval $(if $(NF_KMOD),,$(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MARK, $(P_XT)
|
||||
|
||||
# kernel only
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_CONNTRACK, $(P_XT)nf_conntrack),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_CONNTRACK_RTCACHE, $(P_XT)nf_conntrack_rtcache),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV4, $(P_V4)nf_defrag_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_CONNTRACK_IPV4, $(P_V4)nf_conntrack_ipv4),))
|
||||
|
||||
$(eval $(call nf_add,IPT_CONNTRACK,CONFIG_NETFILTER_XT_MATCH_STATE, $(P_XT)xt_state))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK,CONFIG_NETFILTER_XT_TARGET_CT, $(P_XT)xt_CT))
|
||||
@@ -75,7 +80,6 @@ $(eval $(call nf_add,IPT_CONNTRACK,CONFIG_NETFILTER_XT_MATCH_CONNTRACK, $(P_XT)x
|
||||
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_MATCH_CONNBYTES, $(P_XT)xt_connbytes))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_MATCH_CONNLIMIT, $(P_XT)xt_connlimit))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_CONNCOUNT, $(P_XT)nf_conncount))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_CONNMARK, $(P_XT)xt_connmark))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_MATCH_HELPER, $(P_XT)xt_helper))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_MATCH_RECENT, $(P_XT)xt_recent))
|
||||
@@ -102,7 +106,6 @@ $(eval $(call nf_add,IPT_PHYSDEV,CONFIG_NETFILTER_XT_MATCH_PHYSDEV, $(P_XT)xt_ph
|
||||
# filter
|
||||
|
||||
$(eval $(call nf_add,IPT_FILTER,CONFIG_NETFILTER_XT_MATCH_STRING, $(P_XT)xt_string))
|
||||
$(eval $(call nf_add,IPT_FILTER,CONFIG_NETFILTER_XT_MATCH_BPF, $(P_XT)xt_bpf))
|
||||
|
||||
|
||||
# ipopt
|
||||
@@ -117,6 +120,7 @@ $(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_MATCH_STATISTIC, $(P_XT)xt_st
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_MATCH_TCPMSS, $(P_XT)xt_tcpmss))
|
||||
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_TARGET_CLASSIFY, $(P_XT)xt_CLASSIFY))
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_IP_NF_MATCH_DSCP, $(P_V4)ipt_dscp))
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_IP_NF_TARGET_ECN, $(P_V4)ipt_ECN))
|
||||
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_MATCH_ECN, $(P_XT)xt_ecn))
|
||||
@@ -151,15 +155,18 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_REJECT6,CONFIG_NF_REJECT_IPV6, $(P_V6)nf
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_IPT6,CONFIG_IP6_NF_IPTABLES, $(P_V6)ip6_tables),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV6, $(P_V6)nf_defrag_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK6,CONFIG_NF_DEFRAG_IPV6, $(P_V6)nf_defrag_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK6,CONFIG_NF_CONNTRACK_IPV6, $(P_V6)nf_conntrack_ipv6),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_FILTER, $(P_V6)ip6table_filter),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_MANGLE, $(P_V6)ip6table_mangle),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_QUEUE, $(P_V6)ip6_queue),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_NF_LOG_IPV6, $(P_V6)nf_log_ipv6),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),,$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_IPTABLES, ip6t_icmp6)))
|
||||
|
||||
|
||||
$(eval $(call nf_add,IPT_IPV6,CONFIG_IP6_NF_TARGET_LOG, $(P_V6)ip6t_LOG))
|
||||
$(eval $(call nf_add,IPT_IPV6,CONFIG_IP6_NF_TARGET_REJECT, $(P_V6)ip6t_REJECT))
|
||||
|
||||
# ipv6 extra
|
||||
@@ -175,18 +182,25 @@ $(eval $(call nf_add,IPT_IPV6_EXTRA,CONFIG_IP6_NF_MATCH_RT, $(P_V6)ip6t_rt))
|
||||
|
||||
# kernel only
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT, $(P_XT)nf_nat),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_REDIRECT, $(P_XT)nf_nat_redirect, ge 3.19.0),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_IPV4, $(P_V4)nf_nat_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_MASQUERADE_IPV4, $(P_V4)nf_nat_masquerade_ipv4),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT6,CONFIG_NF_NAT_IPV6, $(P_V6)nf_nat_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT6,CONFIG_NF_NAT_MASQUERADE_IPV6, $(P_V6)nf_nat_masquerade_ipv6),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_NETFILTER_XT_NAT, $(P_XT)xt_nat),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_IP_NF_NAT, $(P_V4)iptable_nat),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_NAT, $(P_V6)ip6table_nat),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_TARGET_MASQUERADE, $(P_V6)ip6t_MASQUERADE),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_TARGET_NPT, $(P_V6)ip6t_NPT),))
|
||||
|
||||
# userland only
|
||||
$(eval $(if $(NF_KMOD),,$(call nf_add,IPT_NAT,CONFIG_NF_NAT, ipt_SNAT ipt_DNAT)))
|
||||
$(eval $(if $(NF_KMOD),,$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_TARGET_NPT, ip6t_DNPT ip6t_SNPT)))
|
||||
|
||||
$(eval $(call nf_add,IPT_NAT,CONFIG_NETFILTER_XT_TARGET_MASQUERADE, $(P_XT)xt_MASQUERADE))
|
||||
$(eval $(call nf_add,IPT_NAT,CONFIG_NETFILTER_XT_TARGET_REDIRECT, $(P_XT)xt_REDIRECT))
|
||||
$(eval $(call nf_add,IPT_NAT,CONFIG_IP_NF_TARGET_MASQUERADE, $(P_V4)ipt_MASQUERADE))
|
||||
$(eval $(call nf_add,IPT_NAT,CONFIG_IP_NF_TARGET_REDIRECT, $(P_XT)xt_REDIRECT))
|
||||
|
||||
|
||||
# nat-extra
|
||||
@@ -205,6 +219,8 @@ $(eval $(call nf_add,NF_NATHELPER,CONFIG_NF_NAT_FTP, $(P_XT)nf_nat_ftp))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_BROADCAST, $(P_XT)nf_conntrack_broadcast))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_AMANDA, $(P_XT)nf_conntrack_amanda))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_AMANDA, $(P_XT)nf_nat_amanda))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CT_PROTO_GRE, $(P_XT)nf_conntrack_proto_gre))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_PROTO_GRE, $(P_V4)nf_nat_proto_gre))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_H323, $(P_XT)nf_conntrack_h323))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_H323, $(P_V4)nf_nat_h323))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_PPTP, $(P_XT)nf_conntrack_pptp))
|
||||
@@ -219,6 +235,11 @@ $(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_IRC, $(P_XT)nf_connt
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_IRC, $(P_XT)nf_nat_irc))
|
||||
|
||||
|
||||
# ulog
|
||||
|
||||
$(eval $(call nf_add,IPT_ULOG,CONFIG_IP_NF_TARGET_ULOG, $(P_V4)ipt_ULOG))
|
||||
|
||||
|
||||
# nflog
|
||||
|
||||
$(eval $(call nf_add,IPT_NFLOG,CONFIG_NETFILTER_XT_TARGET_NFLOG, $(P_XT)xt_NFLOG))
|
||||
@@ -236,11 +257,7 @@ $(eval $(call nf_add,IPT_DEBUG,CONFIG_NETFILTER_XT_TARGET_TRACE, $(P_XT)xt_TRACE
|
||||
# tproxy
|
||||
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_MATCH_SOCKET, $(P_XT)xt_socket))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_TARGET_TPROXY, $(P_XT)xt_TPROXY))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV4, $(P_V4)nf_tproxy_ipv4))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV6, $(P_V6)nf_tproxy_ipv6))
|
||||
|
||||
# led
|
||||
$(eval $(call nf_add,IPT_LED,CONFIG_NETFILTER_XT_TARGET_LED, $(P_XT)xt_LED))
|
||||
@@ -248,8 +265,8 @@ $(eval $(call nf_add,IPT_LED,CONFIG_NETFILTER_XT_TARGET_LED, $(P_XT)xt_LED))
|
||||
# tee
|
||||
|
||||
$(eval $(call nf_add,IPT_TEE,CONFIG_NETFILTER_XT_TARGET_TEE, $(P_XT)xt_TEE))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV4, $(P_V4)nf_dup_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, $(P_V6)nf_dup_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV4, $(P_V4)nf_dup_ipv4, ge 4.3),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, $(P_V6)nf_dup_ipv6, ge 4.3),))
|
||||
|
||||
# u32
|
||||
|
||||
@@ -304,43 +321,49 @@ $(eval $(call nf_add,EBTABLES_IP4,CONFIG_BRIDGE_EBT_SNAT, $(P_EBT)ebt_snat))
|
||||
|
||||
# watchers
|
||||
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_LOG, $(P_EBT)ebt_log))
|
||||
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_ULOG, $(P_EBT)ebt_ulog))
|
||||
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFLOG, $(P_EBT)ebt_nflog))
|
||||
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFQUEUE, $(P_EBT)ebt_nfqueue))
|
||||
|
||||
# nftables
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES, $(P_XT)nf_tables),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_SET, $(P_XT)nf_tables_set),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_COUNTER, $(P_XT)nft_counter),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CT, $(P_XT)nft_ct),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_HASH, $(P_XT)nft_hash),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LIMIT, $(P_XT)nft_limit),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LOG, $(P_XT)nft_log),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_INET, $(P_XT)nf_tables_inet),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_EXTHDR, $(P_XT)nft_exthdr),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_META, $(P_XT)nft_meta),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_NUMGEN, $(P_XT)nft_numgen),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_OBJREF, $(P_XT)nft_objref),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_QUOTA, $(P_XT)nft_quota),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REDIR, $(P_XT)nft_redir),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_NUMGEN, $(P_XT)nft_numgen, ge 4.9.0),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CT, $(P_XT)nft_ct),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_RBTREE, $(P_XT)nft_set_rbtree, ge 4.9.0),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_RBTREE, $(P_XT)nft_rbtree, lt 4.9.0),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_HASH, $(P_XT)nft_set_hash, ge 4.9.0),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_HASH, $(P_XT)nft_hash, lt 4.9.0),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_COUNTER, $(P_XT)nft_counter),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LOG, $(P_XT)nft_log),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LIMIT, $(P_XT)nft_limit),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REJECT, $(P_XT)nft_reject $(P_V4)nft_reject_ipv4 $(P_V6)nft_reject_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REJECT_INET, $(P_XT)nft_reject_inet),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV4, $(P_V4)nf_tables_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CHAIN_ROUTE_IPV4, $(P_V4)nft_chain_route_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV6, $(P_V6)nf_tables_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CHAIN_ROUTE_IPV6, $(P_V6)nft_chain_route_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REDIR, $(P_XT)nft_redir, ge 3.19.0),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_QUOTA, $(P_XT)nft_quota, ge 4.9.0),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_ARP,CONFIG_NF_TABLES_ARP, $(P_V4)nf_tables_arp),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NF_TABLES_BRIDGE, $(P_EBT)nf_tables_bridge),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NFT_BRIDGE_META, $(P_EBT)nft_meta_bridge),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NFT_BRIDGE_REJECT, $(P_EBT)nft_reject_bridge),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_NAT, $(P_XT)nft_nat),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_NAT, $(P_XT)nft_chain_nat),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_REDIR_IPV4, $(P_V4)nft_redir_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_CHAIN_NAT_IPV4, $(P_V4)nft_chain_nat_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_REDIR_IPV4, $(P_V4)nft_redir_ipv4, ge 3.19.0),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_MASQ, $(P_XT)nft_masq),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_MASQ_IPV4, $(P_V4)nft_masq_ipv4),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_REDIR_IPV6, $(P_V6)nft_redir_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_REDIR_IPV6, $(P_V6)nft_redir_ipv6, ge 3.19.0),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_CHAIN_NAT_IPV6, $(P_V6)nft_chain_nat_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_MASQ_IPV6, $(P_V6)nft_masq_ipv6),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB, $(P_XT)nft_fib),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB_INET, $(P_XT)nft_fib_inet),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB_IPV4, $(P_V4)nft_fib_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB_IPV6, $(P_V6)nft_fib_ipv6),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_QUEUE,CONFIG_NFT_QUEUE, $(P_XT)nft_queue),))
|
||||
|
||||
# userland only
|
||||
IPT_BUILTIN += $(NF_IPT-y) $(NF_IPT-m)
|
||||
@@ -366,6 +389,7 @@ IPT_BUILTIN += $(IPT_NAT6-y)
|
||||
IPT_BUILTIN += $(IPT_NAT_EXTRA-y)
|
||||
IPT_BUILTIN += $(NF_NATHELPER-y)
|
||||
IPT_BUILTIN += $(NF_NATHELPER_EXTRA-y)
|
||||
IPT_BUILTIN += $(IPT_ULOG-y)
|
||||
IPT_BUILTIN += $(IPT_TPROXY-y)
|
||||
IPT_BUILTIN += $(NFNETLINK-y)
|
||||
IPT_BUILTIN += $(NFNETLINK_LOG-y)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2011-2020 OpenWrt.org
|
||||
# Copyright (C) 2011-2012 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
# iconv full
|
||||
ifeq ($(CONFIG_BUILD_NLS),y)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2007-2020 OpenWrt.org
|
||||
# Copyright (C) 2007-2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
ifeq ($(DUMP),)
|
||||
define BuildTarget/bin
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
PKG_DEFAULT_DEPENDS = +libc +USE_GLIBC:librt +USE_GLIBC:libpthread
|
||||
PKG_DEFAULT_DEPENDS = +libc +GCC_LIBSSP:libssp +USE_GLIBC:librt +USE_GLIBC:libpthread
|
||||
|
||||
ifneq ($(PKG_NAME),toolchain)
|
||||
PKG_FIXUP_DEPENDS = $(if $(filter kmod-%,$(1)),$(2),$(PKG_DEFAULT_DEPENDS) $(filter-out $(PKG_DEFAULT_DEPENDS),$(2)))
|
||||
@@ -56,7 +59,6 @@ define Package/Default
|
||||
ALTERNATIVES:=
|
||||
LICENSE:=$(PKG_LICENSE)
|
||||
LICENSE_FILES:=$(PKG_LICENSE_FILES)
|
||||
FILE_MODES:=$(PKG_FILE_MODES)
|
||||
endef
|
||||
|
||||
Build/Patch:=$(Build/Patch/Default)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
ifneq ($(DUMP),)
|
||||
|
||||
|
||||
@@ -1,28 +1,20 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006-2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
ifndef DUMP
|
||||
include $(INCLUDE_DIR)/feeds.mk
|
||||
endif
|
||||
|
||||
IPKG_REMOVE:= \
|
||||
$(SCRIPT_DIR)/ipkg-remove
|
||||
# invoke ipkg-build with some default options
|
||||
IPKG_BUILD:= \
|
||||
$(SCRIPT_DIR)/ipkg-build -c -o 0 -g 0
|
||||
|
||||
IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/opkg
|
||||
|
||||
# Generates a make statement to return a wildcard for candidate ipkg files
|
||||
# 1: package name
|
||||
define gen_ipkg_wildcard
|
||||
$(1)$$(if $$(filter -%,$$(ABIV_$(1))),,[^a-z-])*
|
||||
endef
|
||||
|
||||
# 1: package name
|
||||
# 2: candidate ipk files
|
||||
define remove_ipkg_files
|
||||
$(if $(strip $(2)),$(IPKG_REMOVE) $(1) $(2))
|
||||
endef
|
||||
|
||||
# 1: package name
|
||||
# 2: variable name
|
||||
# 3: variable suffix
|
||||
@@ -40,8 +32,7 @@ PARENR :=)
|
||||
|
||||
dep_split=$(subst :,$(space),$(1))
|
||||
dep_rem=$(subst !,,$(subst $(strip $(PARENL)),,$(subst $(strip $(PARENR)),,$(word 1,$(call dep_split,$(1))))))
|
||||
dep_and=dep_and_res:=$$(and $(subst $(space),$(comma),$(foreach cond,$(subst &&, ,$(1)),$$(CONFIG_$(cond)))))
|
||||
dep_confvar=$(strip $(foreach cond,$(subst ||, ,$(call dep_rem,$(1))),$(eval $(call dep_and,$(cond)))$(dep_and_res)))
|
||||
dep_confvar=$(strip $(foreach cond,$(subst ||, ,$(call dep_rem,$(1))),$(CONFIG_$(cond))))
|
||||
dep_pos=$(if $(call dep_confvar,$(1)),$(call dep_val,$(1)))
|
||||
dep_neg=$(if $(call dep_confvar,$(1)),,$(call dep_val,$(1)))
|
||||
dep_if=$(if $(findstring !,$(1)),$(call dep_neg,$(1)),$(call dep_pos,$(1)))
|
||||
@@ -99,9 +90,8 @@ _endef=endef
|
||||
|
||||
ifeq ($(DUMP),)
|
||||
define BuildTarget/ipkg
|
||||
ABIV_$(1):=$(call FormatABISuffix,$(1),$(ABI_VERSION))
|
||||
PDIR_$(1):=$(call FeedPackageDir,$(1))
|
||||
IPKG_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).ipk
|
||||
IPKG_$(1):=$$(PDIR_$(1))/$(1)_$(VERSION)_$(PKGARCH).ipk
|
||||
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
|
||||
KEEP_$(1):=$(strip $(call Package/$(1)/conffiles))
|
||||
|
||||
@@ -129,8 +119,6 @@ ifeq ($(DUMP),)
|
||||
endif
|
||||
$(PKG_INSTALL_STAMP).$(1): prepare-package-install
|
||||
echo "$(1)" >> $(PKG_INSTALL_STAMP)
|
||||
else
|
||||
$(if $(CONFIG_PACKAGE_$(1)),$$(warning WARNING: skipping $(1) -- package has no install section))
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -156,36 +144,27 @@ ifeq ($(DUMP),)
|
||||
|
||||
$(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
|
||||
mkdir -p $(STAGING_DIR_ROOT)/stamp
|
||||
$(if $(ABI_VERSION),echo '$(ABI_VERSION)' | cmp -s - $(PKG_INFO_DIR)/$(1).version || { \
|
||||
echo '$(ABI_VERSION)' > $(PKG_INFO_DIR)/$(1).version; \
|
||||
$(foreach pkg,$(filter-out $(1),$(PROVIDES)), \
|
||||
cp $(PKG_INFO_DIR)/$(1).version $(PKG_INFO_DIR)/$(pkg).version; \
|
||||
) \
|
||||
} )
|
||||
$(if $(ABI_VERSION),echo '$(ABI_VERSION)' | cmp -s - $(PKG_INFO_DIR)/$(1).version || echo '$(ABI_VERSION)' > $(PKG_INFO_DIR)/$(1).version)
|
||||
$(call locked,$(CP) $(PKG_BUILD_DIR)/.pkgdir/$(1)/. $(STAGING_DIR_ROOT)/,root-copy)
|
||||
touch $$@
|
||||
|
||||
Package/$(1)/DEPENDS := $$(call mergelist,$$(foreach dep,$$(filter-out @%,$$(IDEPEND_$(1))),$$(dep)$$(call GetABISuffix,$$(dep))))
|
||||
Package/$(1)/DEPENDS := $$(call mergelist,$$(filter-out @%,$$(IDEPEND_$(1))))
|
||||
ifneq ($$(EXTRA_DEPENDS),)
|
||||
Package/$(1)/DEPENDS := $$(EXTRA_DEPENDS)$$(if $$(Package/$(1)/DEPENDS),$$(comma) $$(Package/$(1)/DEPENDS))
|
||||
endif
|
||||
|
||||
$(_define) Package/$(1)/CONTROL
|
||||
Package: $(1)$$(ABIV_$(1))
|
||||
Package: $(1)
|
||||
Version: $(VERSION)
|
||||
$$(call addfield,Depends,$$(Package/$(1)/DEPENDS)
|
||||
)$$(call addfield,Conflicts,$$(call mergelist,$(CONFLICTS))
|
||||
)$$(call addfield,Provides,$$(call mergelist,$$(filter-out $(1)$$(ABIV_$(1)),$(PROVIDES)$$(if $$(ABIV_$(1)), $(1) $(foreach provide,$(PROVIDES),$(provide)$$(ABIV_$(1))))))
|
||||
)$$(call addfield,Provides,$$(call mergelist,$(PROVIDES))
|
||||
)$$(call addfield,Alternatives,$$(call mergelist,$(ALTERNATIVES))
|
||||
)$$(call addfield,Source,$(SOURCE)
|
||||
)$$(call addfield,SourceName,$(1)
|
||||
)$$(call addfield,License,$(LICENSE)
|
||||
)$$(call addfield,LicenseFiles,$(LICENSE_FILES)
|
||||
)$$(call addfield,Section,$(SECTION)
|
||||
)$$(call addfield,Require-User,$(USERID)
|
||||
)$$(call addfield,SourceDateEpoch,$(PKG_SOURCE_DATE_EPOCH)
|
||||
)$$(if $$(ABIV_$(1)),ABIVersion: $$(ABIV_$(1))
|
||||
)$(if $(PKG_CPE_ID),CPE-ID: $(PKG_CPE_ID)
|
||||
)$(if $(filter hold,$(PKG_FLAGS)),Status: unknown hold not-installed
|
||||
)$(if $(filter essential,$(PKG_FLAGS)),Essential: yes
|
||||
)$(if $(MAINTAINER),Maintainer: $(MAINTAINER)
|
||||
@@ -196,10 +175,8 @@ $(_endef)
|
||||
$$(IPKG_$(1)) : export CONTROL=$$(Package/$(1)/CONTROL)
|
||||
$$(IPKG_$(1)) : export DESCRIPTION=$$(Package/$(1)/description)
|
||||
$$(IPKG_$(1)) : export PATH=$$(TARGET_PATH_PKG)
|
||||
$$(IPKG_$(1)) : export PKG_SOURCE_DATE_EPOCH:=$(PKG_SOURCE_DATE_EPOCH)
|
||||
$(PKG_INFO_DIR)/$(1).provides $$(IPKG_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk
|
||||
@rm -rf $$(IDIR_$(1)); \
|
||||
$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_ipkg_wildcard,$(1))))
|
||||
@rm -rf $$(IDIR_$(1)) $$(call opkg_package_files,$(1))
|
||||
mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR)
|
||||
$(call Package/$(1)/install,$$(IDIR_$(1)))
|
||||
$(if $(Package/$(1)/install-overlay),mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/rootfs-overlay)
|
||||
@@ -217,15 +194,6 @@ $(_endef)
|
||||
$(CheckDependencies)
|
||||
|
||||
$(RSTRIP) $$(IDIR_$(1))
|
||||
|
||||
ifneq ($$(CONFIG_IPK_FILES_CHECKSUMS),)
|
||||
(cd $$(IDIR_$(1)); \
|
||||
( \
|
||||
find . -type f \! -path ./CONTROL/\* -exec mkhash sha256 -n \{\} \; 2> /dev/null | \
|
||||
sed 's|\([[:blank:]]\)\./| \1/|' > $$(IDIR_$(1))/CONTROL/files-sha256sum \
|
||||
) || true \
|
||||
)
|
||||
endif
|
||||
(cd $$(IDIR_$(1))/CONTROL; \
|
||||
( \
|
||||
echo "$$$$CONTROL"; \
|
||||
@@ -235,13 +203,13 @@ $(_endef)
|
||||
( \
|
||||
echo "#!/bin/sh"; \
|
||||
echo "[ \"\$$$${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; \
|
||||
echo "[ -s "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \
|
||||
echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \
|
||||
echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
|
||||
echo "default_postinst \$$$$0 \$$$$@"; \
|
||||
) > postinst; \
|
||||
( \
|
||||
echo "#!/bin/sh"; \
|
||||
echo "[ -s "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \
|
||||
echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \
|
||||
echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
|
||||
echo "default_prerm \$$$$0 \$$$$@"; \
|
||||
) > prerm; \
|
||||
@@ -263,11 +231,11 @@ $(_endef)
|
||||
endif
|
||||
|
||||
$(INSTALL_DIR) $$(PDIR_$(1))
|
||||
$(FAKEROOT) $(SCRIPT_DIR)/ipkg-build -m "$(FILE_MODES)" $$(IDIR_$(1)) $$(PDIR_$(1))
|
||||
$(IPKG_BUILD) $$(IDIR_$(1)) $$(PDIR_$(1))
|
||||
@[ -f $$(IPKG_$(1)) ]
|
||||
|
||||
$(1)-clean:
|
||||
$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_ipkg_wildcard,$(1))))
|
||||
$$(if $$(call opkg_package_files,$(1)),rm -f $$(call opkg_package_files,$(1)))
|
||||
|
||||
clean: $(1)-clean
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2015-2020 OpenWrt.org
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
PKG_CONFIG_DEPENDS+= CONFIG_KERNEL_SECCOMP
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006-2008 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
__package_mk:=1
|
||||
|
||||
@@ -8,7 +11,7 @@ all: $(if $(DUMP),dumpinfo,$(if $(CHECK),check,compile))
|
||||
|
||||
include $(INCLUDE_DIR)/download.mk
|
||||
|
||||
PKG_BUILD_DIR ?= $(BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
|
||||
PKG_BUILD_DIR ?= $(BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
|
||||
PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
|
||||
PKG_BUILD_PARALLEL ?=
|
||||
PKG_USE_MIPS16 ?= 1
|
||||
@@ -16,8 +19,6 @@ PKG_IREMAP ?= 1
|
||||
|
||||
MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
|
||||
|
||||
PKG_SOURCE_DATE_EPOCH:=$(if $(DUMP),,$(shell $(TOPDIR)/scripts/get_source_date_epoch.sh $(CURDIR)))
|
||||
|
||||
ifeq ($(strip $(PKG_BUILD_PARALLEL)),0)
|
||||
PKG_JOBS?=-j1
|
||||
else
|
||||
@@ -39,10 +40,6 @@ include $(INCLUDE_DIR)/prereq.mk
|
||||
include $(INCLUDE_DIR)/unpack.mk
|
||||
include $(INCLUDE_DIR)/depends.mk
|
||||
|
||||
ifneq ($(wildcard $(TOPDIR)/git-src/$(PKG_NAME)/.git),)
|
||||
USE_GIT_SRC_CHECKOUT:=1
|
||||
QUILT:=1
|
||||
endif
|
||||
ifneq ($(if $(CONFIG_SRC_TREE_OVERRIDE),$(wildcard ./git-src)),)
|
||||
USE_GIT_TREE:=1
|
||||
QUILT:=1
|
||||
@@ -56,26 +53,14 @@ endif
|
||||
|
||||
include $(INCLUDE_DIR)/quilt.mk
|
||||
|
||||
find_library_dependencies = \
|
||||
$(wildcard $(patsubst %,$(STAGING_DIR)/pkginfo/%.version, \
|
||||
$(filter-out $(BUILD_PACKAGES), $(sort $(foreach dep4, \
|
||||
$(sort $(foreach dep3, \
|
||||
$(sort $(foreach dep2, \
|
||||
$(sort $(foreach dep1, \
|
||||
$(sort $(foreach dep0, \
|
||||
$(Package/$(1)/depends), \
|
||||
$(Package/$(dep0)/depends) $(dep0) \
|
||||
)), \
|
||||
$(Package/$(dep1)/depends) $(dep1) \
|
||||
)), \
|
||||
$(Package/$(dep2)/depends) $(dep2) \
|
||||
)), \
|
||||
$(Package/$(dep3)/depends) $(dep3) \
|
||||
)), \
|
||||
$(Package/$(dep4)/depends) $(dep4) \
|
||||
))) \
|
||||
))
|
||||
|
||||
find_library_dependencies = $(wildcard $(patsubst %,$(STAGING_DIR)/pkginfo/%.version, \
|
||||
$(filter-out $(BUILD_PACKAGES),$(foreach dep, \
|
||||
$(filter-out @%, $(patsubst +%,%,$(1))), \
|
||||
$(if $(findstring :,$(dep)), \
|
||||
$(word 2,$(subst :,$(space),$(dep))), \
|
||||
$(dep) \
|
||||
) \
|
||||
))))
|
||||
|
||||
PKG_DIR_NAME:=$(lastword $(subst /,$(space),$(CURDIR)))
|
||||
STAMP_NO_AUTOREBUILD=$(wildcard $(PKG_BUILD_DIR)/.no_autorebuild)
|
||||
@@ -84,7 +69,7 @@ ifneq ($(PREV_STAMP_PREPARED),)
|
||||
STAMP_PREPARED:=$(PREV_STAMP_PREPARED)
|
||||
CONFIG_AUTOREBUILD:=
|
||||
else
|
||||
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS)))
|
||||
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS)))
|
||||
endif
|
||||
STAMP_CONFIGURED=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS)))
|
||||
STAMP_CONFIGURED_WILDCARD=$(PKG_BUILD_DIR)/.configured_*
|
||||
@@ -96,10 +81,9 @@ STAGING_FILES_LIST:=$(PKG_DIR_NAME)$(if $(BUILD_VARIANT),.$(BUILD_VARIANT),).lis
|
||||
define CleanStaging
|
||||
rm -f $(STAMP_INSTALLED)
|
||||
@-(\
|
||||
if [ -f $(STAGING_DIR)/packages/$(STAGING_FILES_LIST) ]; then \
|
||||
$(SCRIPT_DIR)/clean-package.sh \
|
||||
"$(STAGING_DIR)/packages/$(STAGING_FILES_LIST)" \
|
||||
"$(STAGING_DIR)"; \
|
||||
cd "$(STAGING_DIR)"; \
|
||||
if [ -f packages/$(STAGING_FILES_LIST) ]; then \
|
||||
cat packages/$(STAGING_FILES_LIST) | xargs -r rm -f 2>/dev/null; \
|
||||
fi; \
|
||||
)
|
||||
endef
|
||||
@@ -132,18 +116,6 @@ ifeq ($(DUMP)$(filter prereq clean refresh update,$(MAKECMDGOALS)),)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef USE_GIT_SRC_CHECKOUT
|
||||
define Build/Prepare/Default
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
ln -s $(TOPDIR)/git-src/$(PKG_NAME)/.git $(PKG_BUILD_DIR)/.git
|
||||
( cd $(PKG_BUILD_DIR); \
|
||||
git checkout .; \
|
||||
git submodule update --recursive; \
|
||||
git submodule foreach git config --unset core.worktree; \
|
||||
git submodule foreach git checkout .; \
|
||||
)
|
||||
endef
|
||||
endif
|
||||
ifdef USE_GIT_TREE
|
||||
define Build/Prepare/Default
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
@@ -172,6 +144,7 @@ define Build/Exports/Default
|
||||
$(1) : export CONFIG_SITE:=$$(CONFIG_SITE)
|
||||
$(1) : export PKG_CONFIG_PATH:=$$(PKG_CONFIG_PATH)
|
||||
$(1) : export PKG_CONFIG_LIBDIR:=$$(PKG_CONFIG_PATH)
|
||||
$(1) : export CCACHE_DIR:=$(STAGING_DIR)/ccache
|
||||
endef
|
||||
Build/Exports=$(Build/Exports/Default)
|
||||
|
||||
@@ -183,8 +156,6 @@ define Build/CoreTargets
|
||||
$(call Build/Autoclean)
|
||||
$(call DefaultTargets)
|
||||
|
||||
$(DL_DIR)/$(FILE): FORCE
|
||||
|
||||
download:
|
||||
$(foreach hook,$(Hooks/Download),
|
||||
$(call $(hook))$(sep)
|
||||
@@ -223,7 +194,7 @@ define Build/CoreTargets
|
||||
$(STAMP_INSTALLED) : export PATH=$$(TARGET_PATH_PKG)
|
||||
$(STAMP_INSTALLED): $(STAMP_BUILT)
|
||||
rm -rf $(TMP_DIR)/stage-$(PKG_DIR_NAME)
|
||||
mkdir -p $(TMP_DIR)/stage-$(PKG_DIR_NAME)/host $(STAGING_DIR)/packages
|
||||
mkdir -p $(TMP_DIR)/stage-$(PKG_DIR_NAME)/host $(STAGING_DIR)/packages $(STAGING_DIR_HOST)/packages
|
||||
$(foreach hook,$(Hooks/InstallDev/Pre),\
|
||||
$(call $(hook),$(TMP_DIR)/stage-$(PKG_DIR_NAME),$(TMP_DIR)/stage-$(PKG_DIR_NAME)/host)$(sep)\
|
||||
)
|
||||
@@ -258,13 +229,13 @@ define Build/CoreTargets
|
||||
ifneq ($(CONFIG_AUTOREMOVE),)
|
||||
compile:
|
||||
-touch -r $(PKG_BUILD_DIR)/.built $(PKG_BUILD_DIR)/.autoremove 2>/dev/null >/dev/null
|
||||
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' -print0 | \
|
||||
$(XARGS) -0 rm -rf
|
||||
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' | \
|
||||
$(XARGS) rm -rf
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/DefaultTargets
|
||||
$(if $(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
|
||||
$(if $(USE_SOURCE_DIR)$(USE_GIT_TREE),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
|
||||
$(if $(DUMP),,$(Build/CoreTargets))
|
||||
|
||||
define Build/DefaultTargets
|
||||
@@ -286,7 +257,7 @@ endef
|
||||
endif
|
||||
|
||||
BUILD_PACKAGES += $(1)
|
||||
$(STAMP_PREPARED): $$(if $(QUILT)$(DUMP),,$(call find_library_dependencies,$(1)))
|
||||
$(STAMP_PREPARED): $$(if $(QUILT)$(DUMP),,$(call find_library_dependencies,$(DEPENDS)))
|
||||
|
||||
$(foreach FIELD, TITLE CATEGORY SECTION VERSION,
|
||||
ifeq ($($(FIELD)),)
|
||||
@@ -342,9 +313,9 @@ clean-build: $(if $(wildcard $(PKG_BUILD_DIR)/.autoremove),force-clean-build)
|
||||
|
||||
clean: force-clean-build
|
||||
$(CleanStaging)
|
||||
$(call Build/UninstallDev,$(STAGING_DIR),$(STAGING_DIR)/host)
|
||||
$(call Build/UninstallDev,$(STAGING_DIR),$(STAGING_DIR_HOST))
|
||||
$(Build/Clean)
|
||||
rm -f $(STAGING_DIR)/packages/$(STAGING_FILES_LIST)
|
||||
rm -f $(STAGING_DIR)/packages/$(STAGING_FILES_LIST) $(STAGING_DIR_HOST)/packages/$(STAGING_FILES_LIST)
|
||||
|
||||
dist:
|
||||
$(Build/Dist)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006-2012 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/prereq.mk
|
||||
@@ -11,8 +14,8 @@ PKG_NAME:=Build dependency
|
||||
|
||||
# Required for the toolchain
|
||||
$(eval $(call TestHostCommand,working-make, \
|
||||
Please install GNU make v3.82 or later. (This version has bugs), \
|
||||
$(MAKE) -v | grep -E 'Make (3\.8[2-9]|3\.9[0-9]|[4-9]\.)'))
|
||||
Please install GNU make v3.81 or later. (This version has bugs), \
|
||||
$(MAKE) -v | grep -E 'Make (3\.8[1-9]|3\.9[0-9]|[4-9]\.)'))
|
||||
|
||||
$(eval $(call TestHostCommand,case-sensitive-fs, \
|
||||
OpenWrt can only be built on a case-sensitive filesystem, \
|
||||
@@ -21,14 +24,20 @@ $(eval $(call TestHostCommand,case-sensitive-fs, \
|
||||
|
||||
$(eval $(call TestHostCommand,proper-umask, \
|
||||
Please build with umask 022 - other values produce broken packages, \
|
||||
umask | grep -xE 0?0[012][012]))
|
||||
umask | grep -xE 00[012][012]))
|
||||
|
||||
ifndef IB
|
||||
$(eval $(call SetupHostCommand,gcc, \
|
||||
Please install the GNU C Compiler (gcc) 4.8 or later, \
|
||||
$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
|
||||
gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
|
||||
gcc --version | grep -E 'Apple.(LLVM|clang)' ))
|
||||
Please install the GNU C Compiler (gcc) 4.8 or later \
|
||||
$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
|
||||
gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
|
||||
gcc48 --version | grep gcc, \
|
||||
gcc49 --version | grep gcc, \
|
||||
gcc5 --version | grep gcc, \
|
||||
gcc6 --version | grep gcc, \
|
||||
gcc7 --version | grep gcc, \
|
||||
gcc8 --version | grep gcc, \
|
||||
gcc9 --version | grep gcc, \
|
||||
gcc --version | grep Apple.LLVM ))
|
||||
|
||||
$(eval $(call TestHostCommand,working-gcc, \
|
||||
\nPlease reinstall the GNU C Compiler (4.8 or later) - \
|
||||
@@ -37,10 +46,17 @@ $(eval $(call TestHostCommand,working-gcc, \
|
||||
gcc -x c -o $(TMP_DIR)/a.out -))
|
||||
|
||||
$(eval $(call SetupHostCommand,g++, \
|
||||
Please install the GNU C++ Compiler (g++) 4.8 or later, \
|
||||
$(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
|
||||
g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
|
||||
g++ --version | grep -E 'Apple.(LLVM|clang)' ))
|
||||
Please install the GNU C++ Compiler (g++) 4.8 or later \
|
||||
$(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
|
||||
g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
|
||||
g++48 --version | grep g++, \
|
||||
g++49 --version | grep g++, \
|
||||
g++5 --version | grep g++, \
|
||||
g++6 --version | grep g++, \
|
||||
g++7 --version | grep g++, \
|
||||
g++8 --version | grep g++, \
|
||||
g++9 --version | grep g++, \
|
||||
g++ --version | grep Apple.LLVM ))
|
||||
|
||||
$(eval $(call TestHostCommand,working-g++, \
|
||||
\nPlease reinstall the GNU C++ Compiler (4.8 or later) - \
|
||||
@@ -53,7 +69,6 @@ $(eval $(call TestHostCommand,ncurses, \
|
||||
Please install ncurses. (Missing libncurses.so or ncurses.h), \
|
||||
echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
|
||||
gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses))
|
||||
endif # IB
|
||||
|
||||
ifeq ($(HOST_OS),Linux)
|
||||
zlib_link_flags := -Wl,-Bstatic -lz -Wl,-Bdynamic
|
||||
@@ -61,26 +76,11 @@ else
|
||||
zlib_link_flags := -lz
|
||||
endif
|
||||
|
||||
$(eval $(call TestHostCommand,perl-data-dumper, \
|
||||
Please install the Perl Data::Dumper module, \
|
||||
perl -MData::Dumper -e 1))
|
||||
|
||||
$(eval $(call TestHostCommand,perl-findbin, \
|
||||
Please install the Perl FindBin module, \
|
||||
perl -MFindBin -e 1))
|
||||
|
||||
$(eval $(call TestHostCommand,perl-file-copy, \
|
||||
Please install the Perl File::Copy module, \
|
||||
perl -MFile::Copy -e 1))
|
||||
|
||||
$(eval $(call TestHostCommand,perl-file-compare, \
|
||||
Please install the Perl File::Compare module, \
|
||||
perl -MFile::Compare -e 1))
|
||||
|
||||
$(eval $(call TestHostCommand,perl-thread-queue, \
|
||||
Please install the Perl Thread::Queue module, \
|
||||
perl -MThread::Queue -e 1))
|
||||
|
||||
|
||||
$(eval $(call SetupHostCommand,tar,Please install GNU 'tar', \
|
||||
gtar --version 2>&1 | grep GNU, \
|
||||
gnutar --version 2>&1 | grep GNU, \
|
||||
@@ -93,11 +93,6 @@ $(eval $(call SetupHostCommand,find,Please install GNU 'find', \
|
||||
$(eval $(call SetupHostCommand,bash,Please install GNU 'bash', \
|
||||
bash --version 2>&1 | grep GNU))
|
||||
|
||||
$(eval $(call SetupHostCommand,xargs, \
|
||||
Please install 'xargs' that supports '-r/--no-run-if-empty', \
|
||||
gxargs -r --version, \
|
||||
xargs -r --version))
|
||||
|
||||
$(eval $(call SetupHostCommand,patch,Please install GNU 'patch', \
|
||||
gpatch --version 2>&1 | grep 'Free Software Foundation', \
|
||||
patch --version 2>&1 | grep 'Free Software Foundation'))
|
||||
@@ -110,9 +105,9 @@ $(eval $(call SetupHostCommand,cp,Please install GNU fileutils, \
|
||||
gcp --help 2>&1 | grep 'Copy SOURCE', \
|
||||
cp --help 2>&1 | grep 'Copy SOURCE'))
|
||||
|
||||
$(eval $(call SetupHostCommand,seq,Please install seq, \
|
||||
$(eval $(call SetupHostCommand,seq,, \
|
||||
gseq --version, \
|
||||
seq --version 2>&1 | grep seq))
|
||||
seq --version))
|
||||
|
||||
$(eval $(call SetupHostCommand,awk,Please install GNU 'awk', \
|
||||
gawk --version 2>&1 | grep GNU, \
|
||||
@@ -122,15 +117,11 @@ $(eval $(call SetupHostCommand,grep,Please install GNU 'grep', \
|
||||
ggrep --version 2>&1 | grep GNU, \
|
||||
grep --version 2>&1 | grep GNU))
|
||||
|
||||
$(eval $(call SetupHostCommand,egrep,Please install GNU 'grep', \
|
||||
gegrep --version 2>&1 | grep GNU, \
|
||||
egrep --version 2>&1 | grep GNU))
|
||||
|
||||
$(eval $(call SetupHostCommand,getopt, \
|
||||
Please install an extended getopt version that supports --long, \
|
||||
gnugetopt -o t --long test -- --test | grep '^ *--test *--', \
|
||||
getopt -o t --long test -- --test | grep '^ *--test *--', \
|
||||
/usr/local/opt/gnu-getopt/bin/getopt -o t --long test -- --test | grep '^ *--test *--'))
|
||||
/usr/local/bin/getopt -o t --long test -- --test | grep '^ *--test *--', \
|
||||
getopt -o t --long test -- --test | grep '^ *--test *--'))
|
||||
|
||||
$(eval $(call SetupHostCommand,stat,Cannot find a file stat utility, \
|
||||
gnustat -c%s $(TOPDIR)/Makefile, \
|
||||
@@ -147,34 +138,18 @@ $(eval $(call SetupHostCommand,bzip2,Please install 'bzip2', \
|
||||
$(eval $(call SetupHostCommand,wget,Please install GNU 'wget', \
|
||||
wget --version | grep GNU))
|
||||
|
||||
$(eval $(call SetupHostCommand,time,Please install GNU 'time' or BusyBox 'time' that supports -f, \
|
||||
gtime --version 2>&1 | grep GNU, \
|
||||
time --version 2>&1 | grep GNU, \
|
||||
busybox time 2>&1 | grep -- '-f FMT'))
|
||||
|
||||
$(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \
|
||||
perl --version | grep "perl.*v5"))
|
||||
|
||||
$(eval $(call CleanupPython2))
|
||||
|
||||
$(eval $(call SetupHostCommand,python,Please install Python >= 3.5, \
|
||||
python3.11 -V 2>&1 | grep 'Python 3', \
|
||||
python3.10 -V 2>&1 | grep 'Python 3', \
|
||||
python3.9 -V 2>&1 | grep 'Python 3', \
|
||||
python3.8 -V 2>&1 | grep 'Python 3', \
|
||||
python3.7 -V 2>&1 | grep 'Python 3', \
|
||||
python3.6 -V 2>&1 | grep 'Python 3', \
|
||||
python3.5 -V 2>&1 | grep 'Python 3', \
|
||||
python3 -V 2>&1 | grep -E 'Python 3\.([5-9]|[0-9][0-9])\.?'))
|
||||
|
||||
$(eval $(call SetupHostCommand,python3,Please install Python >= 3.5, \
|
||||
python3.11 -V 2>&1 | grep 'Python 3', \
|
||||
python3.10 -V 2>&1 | grep 'Python 3', \
|
||||
python3.9 -V 2>&1 | grep 'Python 3', \
|
||||
python3.8 -V 2>&1 | grep 'Python 3', \
|
||||
python3.7 -V 2>&1 | grep 'Python 3', \
|
||||
python3.6 -V 2>&1 | grep 'Python 3', \
|
||||
python3.5 -V 2>&1 | grep 'Python 3', \
|
||||
python3 -V 2>&1 | grep -E 'Python 3\.([5-9]|[0-9][0-9])\.?'))
|
||||
|
||||
$(eval $(call TestHostCommand,python3-distutils, \
|
||||
Please install the Python3 distutils module, \
|
||||
$(STAGING_DIR_HOST)/bin/python3 -c 'import distutils'))
|
||||
$(eval $(call SetupHostCommand,python,Please install Python 2.x, \
|
||||
python2.7 -V 2>&1 | grep Python, \
|
||||
python2 -V 2>&1 | grep Python, \
|
||||
python -V 2>&1 | grep Python))
|
||||
|
||||
$(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
|
||||
git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule))
|
||||
@@ -182,23 +157,13 @@ $(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
|
||||
$(eval $(call SetupHostCommand,file,Please install the 'file' package, \
|
||||
file --version 2>&1 | grep file))
|
||||
|
||||
$(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
|
||||
rsync --version </dev/null))
|
||||
|
||||
$(eval $(call SetupHostCommand,which,Please install 'which', \
|
||||
/usr/bin/which which, \
|
||||
/bin/which which, \
|
||||
which which))
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
|
||||
mkdir -p $(dir $@)
|
||||
$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/xxd: $(SCRIPT_DIR)/xxdi.pl
|
||||
$(LN) $< $@
|
||||
|
||||
prereq: $(STAGING_DIR_HOST)/bin/mkhash $(STAGING_DIR_HOST)/bin/xxd
|
||||
prereq: $(STAGING_DIR_HOST)/bin/mkhash
|
||||
|
||||
# Install ldconfig stub
|
||||
$(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \
|
||||
$(LN) /bin/true $(STAGING_DIR_HOST)/bin/ldconfig))
|
||||
touch $(STAGING_DIR_HOST)/bin/ldconfig && \
|
||||
chmod +x $(STAGING_DIR_HOST)/bin/ldconfig))
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006-2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
ifneq ($(__prereq_inc),1)
|
||||
__prereq_inc:=1
|
||||
@@ -63,18 +66,6 @@ define RequireHeader
|
||||
$$(eval $$(call Require,$(1),$(2)))
|
||||
endef
|
||||
|
||||
define CleanupPython2
|
||||
define Require/python2-cleanup
|
||||
if [ -f "$(STAGING_DIR_HOST)/bin/python" ] && \
|
||||
$(STAGING_DIR_HOST)/bin/python -V 2>&1 | \
|
||||
grep -q 'Python 2'; then \
|
||||
rm $(STAGING_DIR_HOST)/bin/python; \
|
||||
fi
|
||||
endef
|
||||
|
||||
$$(eval $$(call Require,python2-cleanup))
|
||||
endef
|
||||
|
||||
define QuoteHostCommand
|
||||
'$(subst ','"'"',$(strip $(1)))'
|
||||
endef
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2007-2020 OpenWrt.org
|
||||
# Copyright (C) 2007-2009 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
||||
ifeq ($(TARGET_BUILD),1)
|
||||
PKG_BUILD_DIR:=$(LINUX_DIR)
|
||||
@@ -92,17 +94,17 @@ endef
|
||||
|
||||
kernel_files=$(foreach fdir,$(GENERIC_FILES_DIR) $(FILES_DIR),$(fdir)/.)
|
||||
define Kernel/Patch/Default
|
||||
$(if $(QUILT),rm -rf $(LINUX_DIR)/patches; mkdir -p $(LINUX_DIR)/patches)
|
||||
$(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches)
|
||||
$(if $(kernel_files),$(CP) $(kernel_files) $(LINUX_DIR)/)
|
||||
find $(LINUX_DIR)/ -name \*.rej -or -name \*.orig | $(XARGS) rm -f
|
||||
if [ -d $(GENERIC_PLATFORM_DIR)/patches$(if $(wildcard $(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER)) ]; then \
|
||||
echo "generic patches directory is present. please move your patches to the pending directory" ; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(call PatchDir,$(LINUX_DIR),$(GENERIC_BACKPORT_DIR),generic-backport/)
|
||||
$(call PatchDir,$(LINUX_DIR),$(GENERIC_PATCH_DIR),generic/)
|
||||
$(call PatchDir,$(LINUX_DIR),$(GENERIC_HACK_DIR),generic-hack/)
|
||||
$(call PatchDir,$(LINUX_DIR),$(PATCH_DIR),platform/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(GENERIC_BACKPORT_DIR),generic-backport/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(GENERIC_PATCH_DIR),generic/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(GENERIC_HACK_DIR),generic-hack/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR),platform/)
|
||||
endef
|
||||
|
||||
define Quilt/RefreshDir
|
||||
|
||||
@@ -47,7 +47,7 @@ TARGET_DIR_ORIG := $(TARGET_ROOTFS_DIR)/root.orig-$(BOARD)
|
||||
|
||||
ifdef CONFIG_CLEAN_IPKG
|
||||
define clean_ipkg
|
||||
-find $(1)/usr/lib/opkg/info -type f -and -not -name '*.control' -delete
|
||||
-find $(1)/usr/lib/opkg/info -type f -and -not -name '*.control' | $(XARGS) rm -rf
|
||||
-sed -i -ne '/^Require-User: /p' $(1)/usr/lib/opkg/info/*.control
|
||||
awk ' \
|
||||
BEGIN { conffiles = 0; print "Conffiles:" } \
|
||||
@@ -56,7 +56,7 @@ ifdef CONFIG_CLEAN_IPKG
|
||||
conffiles == 1 { print } \
|
||||
' $(1)/usr/lib/opkg/status >$(1)/usr/lib/opkg/status.new
|
||||
mv $(1)/usr/lib/opkg/status.new $(1)/usr/lib/opkg/status
|
||||
-find $(1)/usr/lib/opkg -empty -delete
|
||||
-find $(1)/usr/lib/opkg -empty | $(XARGS) rm -rf
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -69,7 +69,7 @@ define prepare_rootfs
|
||||
@( \
|
||||
cd $(1); \
|
||||
for script in ./usr/lib/opkg/info/*.postinst; do \
|
||||
IPKG_INSTROOT=$(1) $$(command -v bash) $$script; \
|
||||
IPKG_INSTROOT=$(1) $$(which bash) $$script; \
|
||||
ret=$$?; \
|
||||
if [ $$ret -ne 0 ]; then \
|
||||
echo "postinst script $$script has failed with exit code $$ret" >&2; \
|
||||
@@ -78,24 +78,18 @@ define prepare_rootfs
|
||||
done; \
|
||||
for script in ./etc/init.d/*; do \
|
||||
grep '#!/bin/sh /etc/rc.common' $$script >/dev/null || continue; \
|
||||
if ! echo " $(3) " | grep -q " $$(basename $$script) "; then \
|
||||
IPKG_INSTROOT=$(1) $$(command -v bash) ./etc/rc.common $$script enable; \
|
||||
echo "Enabling" $$(basename $$script); \
|
||||
else \
|
||||
IPKG_INSTROOT=$(1) $$(command -v bash) ./etc/rc.common $$script disable; \
|
||||
echo "Disabling" $$(basename $$script); \
|
||||
fi; \
|
||||
IPKG_INSTROOT=$(1) $$(which bash) ./etc/rc.common $$script enable; \
|
||||
done || true \
|
||||
)
|
||||
$(if $(SOURCE_DATE_EPOCH),sed -i "s/Installed-Time: .*/Installed-Time: $(SOURCE_DATE_EPOCH)/" $(1)/usr/lib/opkg/status)
|
||||
@-find $(1) -name CVS -o -name .svn -o -name .git -o -name '.#*' | $(XARGS) rm -rf
|
||||
rm -rf \
|
||||
$(1)/boot \
|
||||
$(1)/tmp/* \
|
||||
$(1)/usr/lib/opkg/info/*.postinst* \
|
||||
$(1)/usr/lib/opkg/lists/* \
|
||||
$(1)/var/lock/*.lock
|
||||
@-find $(1) -name CVS | $(XARGS) rm -rf
|
||||
@-find $(1) -name .svn | $(XARGS) rm -rf
|
||||
@-find $(1) -name .git | $(XARGS) rm -rf
|
||||
@-find $(1) -name '.#*' | $(XARGS) rm -f
|
||||
rm -rf $(1)/tmp/*
|
||||
rm -f $(1)/usr/lib/opkg/lists/*
|
||||
rm -f $(1)/usr/lib/opkg/info/*.postinst*
|
||||
rm -f $(1)/var/lock/*.lock
|
||||
$(call clean_ipkg,$(1))
|
||||
$(call mklibs,$(1))
|
||||
$(if $(SOURCE_DATE_EPOCH),find $(1)/ -mindepth 1 -execdir touch -hcd "@$(SOURCE_DATE_EPOCH)" "{}" +)
|
||||
endef
|
||||
|
||||
@@ -12,35 +12,26 @@ OVERRIDELIST:=$(TMP_DIR)/info/.overrides-$(SCAN_TARGET)-$(SCAN_COOKIE)
|
||||
|
||||
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
|
||||
|
||||
define feedname
|
||||
$(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1))))
|
||||
endef
|
||||
|
||||
ifeq ($(SCAN_NAME),target)
|
||||
SCAN_DEPS=image/Makefile profiles/*.mk $(TOPDIR)/include/kernel*.mk $(TOPDIR)/include/target.mk image/*.mk
|
||||
else
|
||||
SCAN_DEPS=$(TOPDIR)/include/package*.mk
|
||||
ifneq ($(call feedname,$(SCAN_DIR)),)
|
||||
SCAN_DEPS += $(TOPDIR)/feeds/$(call feedname,$(SCAN_DIR))/*.mk
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(IS_TTY),1)
|
||||
ifneq ($(strip $(NO_COLOR)),1)
|
||||
define progress
|
||||
define progress
|
||||
printf "\033[M\r$(1)" >&2;
|
||||
endef
|
||||
else
|
||||
define progress
|
||||
printf "\r$(1)" >&2;
|
||||
endef
|
||||
endif
|
||||
endef
|
||||
else
|
||||
define progress
|
||||
:;
|
||||
endef
|
||||
endif
|
||||
|
||||
define feedname
|
||||
$(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1))))
|
||||
endef
|
||||
|
||||
define PackageDir
|
||||
$(TMP_DIR)/.$(SCAN_TARGET): $(TMP_DIR)/info/.$(SCAN_TARGET)-$(1)
|
||||
$(TMP_DIR)/info/.$(SCAN_TARGET)-$(1): $(SCAN_DIR)/$(2)/Makefile $(foreach DEP,$(DEPS_$(SCAN_DIR)/$(2)/Makefile) $(SCAN_DEPS),$(wildcard $(if $(filter /%,$(DEP)),$(DEP),$(SCAN_DIR)/$(2)/$(DEP))))
|
||||
|
||||
23
include/scons.mk
Normal file
23
include/scons.mk
Normal file
@@ -0,0 +1,23 @@
|
||||
export PLATFORM=posix
|
||||
|
||||
SCONS_VARS = \
|
||||
CC="$(TARGET_CC_NOCACHE)" \
|
||||
CXX="$(TARGET_CXX_NOCACHE)" \
|
||||
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
|
||||
CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)" \
|
||||
CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)"
|
||||
|
||||
define Build/Configure/Default
|
||||
(cd $(PKG_BUILD_DIR); \
|
||||
$(SCONS_VARS) \
|
||||
scons \
|
||||
prefix=/usr \
|
||||
$(SCONS_OPTIONS) \
|
||||
install \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2007-2020 OpenWrt.org
|
||||
# Copyright (C) 2007 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
ifeq ($(MAKECMDGOALS),prereq)
|
||||
SUBTARGETS:=prereq
|
||||
@@ -20,7 +23,7 @@ define subtarget
|
||||
endef
|
||||
|
||||
define ERROR
|
||||
($(call MESSAGE, $(2)); $(if $(BUILD_LOG), echo "$(2)" >> $(BUILD_LOG_DIR)/$(1)/error.txt;) $(if $(3),, exit 1;))
|
||||
($(call MESSAGE, $(2)); $(if $(BUILD_LOG), echo "$(2)" >> $(BUILD_LOG_DIR)/$(1)/error.txt))
|
||||
endef
|
||||
|
||||
lastdir=$(word $(words $(subst /, ,$(1))),$(subst /, ,$(1)))
|
||||
@@ -40,7 +43,7 @@ log_make = \
|
||||
$(if $(BUILD_LOG), \
|
||||
set -o pipefail; \
|
||||
mkdir -p $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4));) \
|
||||
$(SCRIPT_DIR)/time.pl "time: $(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2)" \
|
||||
env time -f "time: $(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2)\#%U\#%S\#%e" -- \
|
||||
$$(SUBMAKE) $(subdir_make_opts) $(if $(3),$(3)-)$(2) \
|
||||
$(if $(BUILD_LOG),SILENT= 2>&1 | tee $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2).txt)
|
||||
|
||||
@@ -63,7 +66,7 @@ define subdir
|
||||
$(foreach btype,$(buildtypes-$(bd)),
|
||||
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(btype)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(btype)/$(target)) $(call $(1)//$(btype)/$(target),$(1)/$(bd)/$(btype))))
|
||||
$(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant))) \
|
||||
|| $(call ERROR,$(2), ERROR: $(1)/$(bd) [$(btype)] failed to build.,$(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target))))
|
||||
$(if $(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target))), || $(call ERROR,$(1), ERROR: $(1)/$(bd) [$(btype)] failed to build.))
|
||||
$(if $(call diralias,$(bd)),$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(call diralias,$(bd))/$(btype)/$(target): $(1)/$(bd)/$(btype)/$(target)))
|
||||
)
|
||||
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd))))
|
||||
@@ -71,7 +74,7 @@ define subdir
|
||||
$(if $(BUILD_LOG),@mkdir -p $(BUILD_LOG_DIR)/$(1)/$(bd)/$(filter-out __default,$(variant)))
|
||||
$(if $($(1)/autoremove),$(call rebuild_check,$(1)/$(bd),$(target),,$(filter-out __default,$(variant))))
|
||||
$(call log_make,$(1)/$(bd),$(target),,$(filter-out __default,$(variant))) \
|
||||
|| $(call ERROR,$(1), ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).,$(findstring $(bd),$($(1)/builddirs-ignore-$(target))))
|
||||
$(if $(findstring $(bd),$($(1)/builddirs-ignore-$(target))), || $(call ERROR,$(1), ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).))
|
||||
)
|
||||
$(if $(PREREQ_ONLY)$(DUMP_TARGET_DB),,
|
||||
# aliases
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2007-2008 OpenWrt.org
|
||||
# Copyright (C) 2016 LEDE Project
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
ifneq ($(__target_inc),1)
|
||||
__target_inc=1
|
||||
@@ -10,48 +13,12 @@ __target_inc=1
|
||||
DEVICE_TYPE?=router
|
||||
|
||||
# Default packages - the really basic set
|
||||
DEFAULT_PACKAGES:=\
|
||||
base-files \
|
||||
ca-bundle \
|
||||
dropbear \
|
||||
fstools \
|
||||
libc \
|
||||
libgcc \
|
||||
libustream-wolfssl \
|
||||
logd \
|
||||
mtd \
|
||||
netifd \
|
||||
opkg \
|
||||
uci \
|
||||
uclient-fetch \
|
||||
urandom-seed \
|
||||
urngd
|
||||
|
||||
ifneq ($(CONFIG_SELINUX),)
|
||||
DEFAULT_PACKAGES+=busybox-selinux procd-selinux
|
||||
else
|
||||
DEFAULT_PACKAGES+=busybox procd
|
||||
endif
|
||||
|
||||
# For the basic set
|
||||
DEFAULT_PACKAGES.basic:=
|
||||
DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd
|
||||
# For nas targets
|
||||
DEFAULT_PACKAGES.nas:=\
|
||||
block-mount \
|
||||
fdisk \
|
||||
lsblk \
|
||||
mdadm
|
||||
DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm
|
||||
# For router targets
|
||||
DEFAULT_PACKAGES.router:=\
|
||||
dnsmasq \
|
||||
firewall \
|
||||
ip6tables \
|
||||
iptables \
|
||||
kmod-ipt-offload \
|
||||
odhcp6c \
|
||||
odhcpd-ipv6only \
|
||||
ppp \
|
||||
ppp-mod-pppoe
|
||||
DEFAULT_PACKAGES.router:=dnsmasq iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c kmod-ipt-offload
|
||||
DEFAULT_PACKAGES.bootloader:=
|
||||
|
||||
ifneq ($(DUMP),)
|
||||
all: dumpinfo
|
||||
@@ -84,11 +51,15 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(filter 3.18 4.4 4.9,$(KERNEL_PATCHVER)),)
|
||||
DEFAULT_PACKAGES.router:=$(filter-out kmod-ipt-offload,$(DEFAULT_PACKAGES.router))
|
||||
endif
|
||||
|
||||
# Add device specific packages (here below to allow device type set from subtarget)
|
||||
DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
|
||||
|
||||
filter_packages = $(filter-out -% $(patsubst -%,%,$(filter -%,$(1))),$(1))
|
||||
extra_packages = $(if $(filter wpad wpad-% nas,$(1)),iwinfo)
|
||||
extra_packages = $(if $(filter wpad-mini wpad nas,$(1)),iwinfo)
|
||||
|
||||
define ProfileDefault
|
||||
NAME:=
|
||||
@@ -182,11 +153,11 @@ ifeq ($(CONFIG_TARGET),env)
|
||||
LINUX_RECONFIG_TARGET = $(TOPDIR)/env/kernel-config
|
||||
endif
|
||||
|
||||
__linux_confcmd = $(2) $(patsubst %,+,$(wordlist 2,9999,$(1))) $(1)
|
||||
__linux_confcmd = $(SCRIPT_DIR)/kconfig.pl $(2) $(patsubst %,+,$(wordlist 2,9999,$(1))) $(1)
|
||||
|
||||
LINUX_CONF_CMD = $(SCRIPT_DIR)/kconfig.pl $(call __linux_confcmd,$(LINUX_KCONFIG_LIST))
|
||||
LINUX_RECONF_CMD = $(SCRIPT_DIR)/kconfig.pl $(call __linux_confcmd,$(LINUX_RECONFIG_LIST))
|
||||
LINUX_RECONF_DIFF = $(SCRIPT_DIR)/kconfig.pl - '>' $(call __linux_confcmd,$(filter-out $(LINUX_RECONFIG_TARGET),$(LINUX_RECONFIG_LIST))) $(1) $(GENERIC_PLATFORM_DIR)/config-filter
|
||||
LINUX_CONF_CMD = $(call __linux_confcmd,$(LINUX_KCONFIG_LIST),)
|
||||
LINUX_RECONF_CMD = $(call __linux_confcmd,$(LINUX_RECONFIG_LIST),)
|
||||
LINUX_RECONF_DIFF = $(call __linux_confcmd,$(filter-out $(LINUX_RECONFIG_TARGET),$(LINUX_RECONFIG_LIST)),'>')
|
||||
|
||||
ifeq ($(DUMP),1)
|
||||
BuildTarget=$(BuildTargets/DumpCurrent)
|
||||
@@ -201,19 +172,37 @@ ifeq ($(DUMP),1)
|
||||
CPU_CFLAGS += -mno-branch-likely
|
||||
CPU_CFLAGS_mips32 = -mips32 -mtune=mips32
|
||||
CPU_CFLAGS_mips64 = -mips64 -mtune=mips64 -mabi=64
|
||||
CPU_CFLAGS_mips64r2 = -mips64r2 -mtune=mips64r2 -mabi=64
|
||||
CPU_CFLAGS_4kec = -mips32r2 -mtune=4kec
|
||||
CPU_CFLAGS_24kc = -mips32r2 -mtune=24kc
|
||||
CPU_CFLAGS_74kc = -mips32r2 -mtune=74kc
|
||||
CPU_CFLAGS_octeonplus = -march=octeon+ -mabi=64
|
||||
CPU_CFLAGS_octeon = -march=octeon -mabi=64
|
||||
endif
|
||||
ifeq ($(ARCH),i386)
|
||||
CPU_TYPE ?= pentium-mmx
|
||||
CPU_CFLAGS_pentium-mmx = -march=pentium-mmx
|
||||
CPU_TYPE ?= pentium
|
||||
CPU_CFLAGS_pentium = -march=pentium-mmx
|
||||
CPU_CFLAGS_pentium4 = -march=pentium4
|
||||
endif
|
||||
ifneq ($(findstring arm,$(ARCH)),)
|
||||
CPU_TYPE ?= xscale
|
||||
CPU_CFLAGS_arm920t = -mcpu=arm920t
|
||||
CPU_CFLAGS_arm926ej-s = -mcpu=arm926ej-s
|
||||
CPU_CFLAGS_arm1136j-s = -mcpu=arm1136j-s
|
||||
CPU_CFLAGS_arm1176jzf-s = -mcpu=arm1176jzf-s
|
||||
CPU_CFLAGS_cortex-a5 = -mcpu=cortex-a5
|
||||
CPU_CFLAGS_cortex-a7 = -mcpu=cortex-a7
|
||||
CPU_CFLAGS_cortex-a8 = -mcpu=cortex-a8
|
||||
CPU_CFLAGS_cortex-a9 = -mcpu=cortex-a9
|
||||
CPU_CFLAGS_cortex-a15 = -mcpu=cortex-a15
|
||||
CPU_CFLAGS_cortex-a53 = -mcpu=cortex-a53
|
||||
CPU_CFLAGS_cortex-a72 = -mcpu=cortex-a72
|
||||
CPU_CFLAGS_fa526 = -mcpu=fa526
|
||||
CPU_CFLAGS_mpcore = -mcpu=mpcore
|
||||
CPU_CFLAGS_xscale = -mcpu=xscale
|
||||
ifeq ($(CONFIG_SOFT_FLOAT),)
|
||||
CPU_CFLAGS_neon = -mfpu=neon
|
||||
CPU_CFLAGS_vfp = -mfpu=vfp
|
||||
CPU_CFLAGS_vfpv3 = -mfpu=vfpv3-d16
|
||||
CPU_CFLAGS_neon-vfpv4 = -mfpu=neon-vfpv4
|
||||
endif
|
||||
endif
|
||||
ifeq ($(ARCH),powerpc)
|
||||
CPU_CFLAGS_603e:=-mcpu=603e
|
||||
@@ -256,11 +245,6 @@ ifeq ($(DUMP),1)
|
||||
.SILENT: $(TMP_CONFIG)
|
||||
.PRECIOUS: $(TMP_CONFIG)
|
||||
|
||||
ifdef KERNEL_TESTING_PATCHVER
|
||||
ifneq ($(KERNEL_TESTING_PATCHVER),$(KERNEL_PATCHVER))
|
||||
FEATURES += testing-kernel
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONFIG_OF),)
|
||||
FEATURES += dt
|
||||
endif
|
||||
@@ -319,7 +303,6 @@ define BuildTargets/DumpCurrent
|
||||
echo 'Target-Optimization: $(if $(CFLAGS),$(CFLAGS),$(DEFAULT_CFLAGS))'; \
|
||||
echo 'CPU-Type: $(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))'; \
|
||||
echo 'Linux-Version: $(LINUX_VERSION)'; \
|
||||
$(if $(LINUX_TESTING_VERSION),echo 'Linux-Testing-Version: $(LINUX_TESTING_VERSION)';) \
|
||||
echo 'Linux-Release: $(LINUX_RELEASE)'; \
|
||||
echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \
|
||||
$(if $(SUBTARGET),,$(if $(DEFAULT_SUBTARGET), echo 'Default-Subtarget: $(DEFAULT_SUBTARGET)'; )) \
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2009-2020 OpenWrt.org
|
||||
# Copyright (C) 2009 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
override CONFIG_AUTOREBUILD=
|
||||
override CONFIG_AUTOREMOVE=
|
||||
@@ -9,7 +12,6 @@ HOST_BUILD_PREFIX:=$(TOOLCHAIN_DIR)
|
||||
BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/hardening.mk
|
||||
|
||||
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
# Makefile for OpenWrt
|
||||
#
|
||||
# Copyright (C) 2007-2012 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# Copyright (C) 2007-2020 OpenWrt.org
|
||||
|
||||
PREP_MK= OPENWRT_BUILD= QUIET=0
|
||||
|
||||
@@ -15,6 +19,7 @@ else
|
||||
SOURCE_DATE_EPOCH:=$(shell $(TOPDIR)/scripts/get_source_date_epoch.sh)
|
||||
endif
|
||||
|
||||
HOSTCC ?= $(CC)
|
||||
export REVISION
|
||||
export SOURCE_DATE_EPOCH
|
||||
export GIT_CONFIG_PARAMETERS='core.autocrlf=false'
|
||||
@@ -24,12 +29,6 @@ export GNU_HOST_NAME:=$(shell $(TOPDIR)/scripts/config.guess)
|
||||
export HOST_OS:=$(shell uname)
|
||||
export HOST_ARCH:=$(shell uname -m)
|
||||
|
||||
ifeq ($(HOST_OS),Darwin)
|
||||
ifneq ($(filter /Applications/Xcode.app/% /Library/Developer/%,$(MAKE)),)
|
||||
$(error Please use a newer version of GNU make. The version shipped by Apple is not supported)
|
||||
endif
|
||||
endif
|
||||
|
||||
# prevent perforce from messing with the patch utility
|
||||
unexport P4PORT P4USER P4CONFIG P4CLIENT
|
||||
|
||||
@@ -54,6 +53,13 @@ export PATH:=$(path)
|
||||
|
||||
unexport TAR_OPTIONS
|
||||
|
||||
ifneq ($(shell $(HOSTCC) 2>&1 | grep clang),)
|
||||
export HOSTCC_REAL?=$(HOSTCC)
|
||||
export HOSTCC_WRAPPER:=$(TOPDIR)/scripts/clang-gcc-wrapper
|
||||
else
|
||||
export HOSTCC_WRAPPER:=$(HOSTCC)
|
||||
endif
|
||||
|
||||
ifeq ($(FORCE),)
|
||||
.config scripts/config/conf scripts/config/mconf: staging_dir/host/.prereq-build
|
||||
endif
|
||||
@@ -82,10 +88,9 @@ prepare-tmpinfo: FORCE
|
||||
f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \
|
||||
[ "$$t" -nt "$$f" ] || ./scripts/$${type}-metadata.pl $(_ignore) config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
|
||||
done
|
||||
[ tmp/.config-feeds.in -nt tmp/.packageauxvars ] || ./scripts/feeds feed_config > tmp/.config-feeds.in
|
||||
[ tmp/.config-feeds.in -nt tmp/.packagesubdirs ] || ./scripts/feeds feed_config > tmp/.config-feeds.in
|
||||
./scripts/package-metadata.pl mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; }
|
||||
./scripts/package-metadata.pl pkgaux tmp/.packageinfo > tmp/.packageauxvars || { rm -f tmp/.packageauxvars; false; }
|
||||
./scripts/package-metadata.pl usergroup tmp/.packageinfo > tmp/.packageusergroup || { rm -f tmp/.packageusergroup; false; }
|
||||
./scripts/package-metadata.pl subdirs tmp/.packageinfo > tmp/.packagesubdirs || { rm -f tmp/.packagesubdirs; false; }
|
||||
touch $(TOPDIR)/tmp/.build
|
||||
|
||||
.config: ./scripts/config/conf $(if $(CONFIG_HAVE_DOT_CONFIG),,prepare-tmpinfo)
|
||||
@@ -94,22 +99,20 @@ prepare-tmpinfo: FORCE
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) menuconfig $(PREP_MK); \
|
||||
fi
|
||||
|
||||
ifeq ($(RECURSIVE_DEP_IS_ERROR),1)
|
||||
KCONF_FLAGS=--fatalrecursive
|
||||
endif
|
||||
ifneq ($(DISTRO_PKG_CONFIG),)
|
||||
scripts/config/%onf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
|
||||
endif
|
||||
scripts/config/%onf: CFLAGS+= -O2
|
||||
scripts/config/%onf:
|
||||
@$(_SINGLE)$(SUBMAKE) $(if $(findstring s,$(OPENWRT_VERBOSE)),,-s) \
|
||||
-C scripts/config $(notdir $@)
|
||||
scripts/config/mconf:
|
||||
@$(_SINGLE)$(SUBMAKE) -s -C scripts/config all CC="$(HOSTCC_WRAPPER)"
|
||||
|
||||
$(eval $(call rdep,scripts/config,scripts/config/mconf))
|
||||
|
||||
scripts/config/qconf:
|
||||
@$(_SINGLE)$(SUBMAKE) -s -C scripts/config qconf CC="$(HOSTCC_WRAPPER)"
|
||||
|
||||
scripts/config/conf:
|
||||
@$(_SINGLE)$(SUBMAKE) -s -C scripts/config conf CC="$(HOSTCC_WRAPPER)"
|
||||
|
||||
config: scripts/config/conf prepare-tmpinfo FORCE
|
||||
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
|
||||
$< $(KCONF_FLAGS) Config.in
|
||||
$< Config.in
|
||||
|
||||
config-clean: FORCE
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -C scripts/config clean
|
||||
@@ -118,7 +121,7 @@ defconfig: scripts/config/conf prepare-tmpinfo FORCE
|
||||
touch .config
|
||||
@if [ ! -s .config -a -e $(HOME)/.openwrt/defconfig ]; then cp $(HOME)/.openwrt/defconfig .config; fi
|
||||
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
|
||||
$< $(KCONF_FLAGS) --defconfig=.config Config.in
|
||||
$< --defconfig=.config Config.in
|
||||
|
||||
confdefault-y=allyes
|
||||
confdefault-m=allmod
|
||||
@@ -127,7 +130,7 @@ confdefault:=$(confdefault-$(CONFDEFAULT))
|
||||
|
||||
oldconfig: scripts/config/conf prepare-tmpinfo FORCE
|
||||
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
|
||||
$< $(KCONF_FLAGS) --$(if $(confdefault),$(confdefault),old)config Config.in
|
||||
$< --$(if $(confdefault),$(confdefault),old)config Config.in
|
||||
|
||||
menuconfig: scripts/config/mconf prepare-tmpinfo FORCE
|
||||
if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \
|
||||
@@ -136,20 +139,13 @@ menuconfig: scripts/config/mconf prepare-tmpinfo FORCE
|
||||
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
|
||||
$< Config.in
|
||||
|
||||
nconfig: scripts/config/nconf prepare-tmpinfo FORCE
|
||||
if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \
|
||||
cp $(HOME)/.openwrt/defconfig .config; \
|
||||
fi
|
||||
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
|
||||
$< Config.in
|
||||
|
||||
xconfig: scripts/config/qconf prepare-tmpinfo FORCE
|
||||
if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \
|
||||
cp $(HOME)/.openwrt/defconfig .config; \
|
||||
fi
|
||||
$< Config.in
|
||||
|
||||
prepare_kernel_conf: .config toolchain/install FORCE
|
||||
prepare_kernel_conf: .config FORCE
|
||||
|
||||
ifeq ($(wildcard staging_dir/host/bin/quilt),)
|
||||
prepare_kernel_conf:
|
||||
@@ -161,20 +157,12 @@ endif
|
||||
kernel_oldconfig: prepare_kernel_conf
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux oldconfig
|
||||
|
||||
ifneq ($(DISTRO_PKG_CONFIG),)
|
||||
kernel_menuconfig: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
|
||||
kernel_nconfig: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
|
||||
kernel_xconfig: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
|
||||
endif
|
||||
kernel_menuconfig: prepare_kernel_conf
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux menuconfig
|
||||
|
||||
kernel_nconfig: prepare_kernel_conf
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux nconfig
|
||||
|
||||
kernel_xconfig: prepare_kernel_conf
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux xconfig
|
||||
|
||||
staging_dir/host/.prereq-build: include/prereq-build.mk
|
||||
mkdir -p tmp
|
||||
@$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
|
||||
@@ -219,7 +207,7 @@ ifeq ($(SDK),1)
|
||||
|
||||
%::
|
||||
@+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq
|
||||
@./scripts/config/conf $(KCONF_FLAGS) --defconfig=.config Config.in
|
||||
@./scripts/config/conf --defconfig=.config Config.in
|
||||
@+$(ULIMIT_FIX) $(SUBMAKE) -r $@
|
||||
|
||||
else
|
||||
@@ -228,7 +216,7 @@ else
|
||||
@+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq
|
||||
@( \
|
||||
cp .config tmp/.config; \
|
||||
./scripts/config/conf $(KCONF_FLAGS) --defconfig=tmp/.config -w tmp/.config Config.in > /dev/null 2>&1; \
|
||||
./scripts/config/conf --defconfig=tmp/.config -w tmp/.config Config.in > /dev/null 2>&1; \
|
||||
if ./scripts/kconfig.pl '>' .config tmp/.config | grep -q CONFIG; then \
|
||||
printf "$(_R)WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!$(_N)\n" >&2; \
|
||||
fi \
|
||||
@@ -255,10 +243,10 @@ package/symlinks-clean:
|
||||
./scripts/feeds uninstall -a
|
||||
|
||||
help:
|
||||
cat README.md
|
||||
cat README
|
||||
|
||||
distclean:
|
||||
rm -rf bin build_dir .ccache .config* dl feeds key-build* logs package/feeds package/openwrt-packages staging_dir tmp
|
||||
rm -rf bin build_dir .config* dl feeds key-build* logs package/feeds package/openwrt-packages staging_dir tmp
|
||||
@$(_SINGLE)$(SUBMAKE) -C scripts/config clean
|
||||
|
||||
ifeq ($(findstring v,$(DEBUG)),)
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
PKG_NAME ?= trusted-firmware-a
|
||||
PKG_CPE_ID ?= cpe:/a:arm:arm_trusted_firmware
|
||||
|
||||
ifndef PKG_SOURCE_PROTO
|
||||
PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR = $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_TARGETS := bin
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=docs/license.rst
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
export GCC_HONOUR_COPTS=s
|
||||
|
||||
define Package/trusted-firmware-a/install/default
|
||||
$(CP) $(patsubst %,$(PKG_BUILD_DIR)/build/$(PLAT)/release/%,$(TFA_IMAGE)) $(1)/
|
||||
endef
|
||||
|
||||
Package/trusted-firmware-a/install = $(Package/trusted-firmware-a/install/default)
|
||||
|
||||
define Trusted-Firmware-A/Init
|
||||
BUILD_TARGET:=
|
||||
BUILD_SUBTARGET:=
|
||||
BUILD_DEVICES:=
|
||||
NAME:=
|
||||
DEPENDS:=
|
||||
HIDDEN:=
|
||||
DEFAULT:=
|
||||
PLAT:=
|
||||
VARIANT:=$(1)
|
||||
TFA_IMAGE:=
|
||||
endef
|
||||
|
||||
TARGET_DEP = TARGET_$(BUILD_TARGET)$(if $(BUILD_SUBTARGET),_$(BUILD_SUBTARGET))
|
||||
|
||||
define Build/Trusted-Firmware-A/Target
|
||||
$(eval $(call Trusted-Firmware-A/Init,$(1)))
|
||||
$(eval $(call Trusted-Firmware-A/Default,$(1)))
|
||||
$(eval $(call Trusted-Firmware-A/$(1),$(1)))
|
||||
|
||||
define Package/trusted-firmware-a-$(1)
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
TITLE:=Trusted-Firmware-A for $(NAME)
|
||||
VARIANT:=$(VARIANT)
|
||||
DEPENDS:=@!IN_SDK $(DEPENDS)
|
||||
HIDDEN:=$(HIDDEN)
|
||||
ifneq ($(BUILD_TARGET),)
|
||||
DEPENDS += @$(TARGET_DEP)
|
||||
ifneq ($(BUILD_DEVICES),)
|
||||
DEFAULT := y if ($(TARGET_DEP)_Default \
|
||||
$(patsubst %,|| $(TARGET_DEP)_DEVICE_%,$(BUILD_DEVICES)) \
|
||||
$(patsubst %,|| $(patsubst TARGET_%,TARGET_DEVICE_%,$(TARGET_DEP))_DEVICE_%,$(BUILD_DEVICES)))
|
||||
endif
|
||||
endif
|
||||
$(if $(DEFAULT),DEFAULT:=$(DEFAULT))
|
||||
URL:=https://www.trustedfirmware.org/projects/tf-a/
|
||||
endef
|
||||
|
||||
define Package/trusted-firmware-a-$(1)/install
|
||||
$$(Package/trusted-firmware-a/install)
|
||||
endef
|
||||
endef
|
||||
|
||||
|
||||
define Build/Compile/Trusted-Firmware-A
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
CROSS_COMPILE=$(TARGET_CROSS) \
|
||||
OPENSSL_DIR=$(STAGING_DIR_HOST) \
|
||||
PLAT=$(PLAT) \
|
||||
BUILD_STRING="OpenWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \
|
||||
$(TFA_MAKE_FLAGS)
|
||||
endef
|
||||
|
||||
define BuildPackage/Trusted-Firmware-A/Defaults
|
||||
Build/Configure/Default = $$$$(Build/Configure/Trusted-Firmware-A)
|
||||
Build/Compile/Default = $$$$(Build/Compile/Trusted-Firmware-A)
|
||||
endef
|
||||
|
||||
define BuildPackage/Trusted-Firmware-A
|
||||
$(eval $(call BuildPackage/Trusted-Firmware-A/Defaults))
|
||||
$(foreach type,$(if $(DUMP),$(TFA_TARGETS),$(BUILD_VARIANT)), \
|
||||
$(eval $(call Build/Trusted-Firmware-A/Target,$(type)))
|
||||
)
|
||||
$(eval $(call Build/DefaultTargets))
|
||||
$(foreach type,$(if $(DUMP),$(TFA_TARGETS),$(BUILD_VARIANT)), \
|
||||
$(call BuildPackage,trusted-firmware-a-$(type))
|
||||
)
|
||||
endef
|
||||
@@ -3,8 +3,7 @@ PKG_NAME ?= u-boot
|
||||
ifndef PKG_SOURCE_PROTO
|
||||
PKG_SOURCE = $(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL = \
|
||||
https://mirror.cyberbits.eu/u-boot \
|
||||
https://ftp.denx.de/pub/u-boot \
|
||||
http://sources.lede-project.org \
|
||||
ftp://ftp.denx.de/pub/u-boot
|
||||
endif
|
||||
|
||||
@@ -43,8 +42,7 @@ TARGET_DEP = TARGET_$(BUILD_TARGET)$(if $(BUILD_SUBTARGET),_$(BUILD_SUBTARGET))
|
||||
|
||||
UBOOT_MAKE_FLAGS = \
|
||||
HOSTCC="$(HOSTCC)" \
|
||||
HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -std=gnu11" \
|
||||
LOCALVERSION="-OpenWrt-$(REVISION)" \
|
||||
HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS)" \
|
||||
HOSTLDFLAGS="$(HOST_LDFLAGS)"
|
||||
|
||||
define Build/U-Boot/Target
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006-2007 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
HOST_TAR:=$(TAR)
|
||||
TAR_CMD=$(HOST_TAR) -C $(1)/.. $(TAR_OPTIONS)
|
||||
@@ -28,10 +31,6 @@ ifeq ($(strip $(UNPACK_CMD)),)
|
||||
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
|
||||
DECOMPRESS_CMD:=xzcat $(DL_DIR)/$(PKG_SOURCE) |
|
||||
endif
|
||||
ifeq (zst,$(EXT))
|
||||
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
|
||||
DECOMPRESS_CMD:=zstdcat $(DL_DIR)/$(PKG_SOURCE) |
|
||||
endif
|
||||
ifeq ($(filter tgz tbz tbz2 txz,$(EXT1)),$(EXT1))
|
||||
EXT:=tar
|
||||
endif
|
||||
@@ -59,13 +58,18 @@ ifeq ($(strip $(UNPACK_CMD)),)
|
||||
UNPACK_CMD=gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR_CMD)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(strip $(CRLF_WORKAROUND)),)
|
||||
CRLF_CMD := && find $(PKG_BUILD_DIR) -type f -print0 | xargs -0 perl -pi -e 's!\r$$$$!!g'
|
||||
else
|
||||
CRLF_CMD :=
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef PKG_BUILD_DIR
|
||||
PKG_UNPACK ?= $(SH_FUNC) $(call UNPACK_CMD,$(PKG_BUILD_DIR))
|
||||
PKG_UNPACK ?= $(SH_FUNC) $(call UNPACK_CMD,$(PKG_BUILD_DIR)) $(call CRLF_CMD,$(PKG_BUILD_DIR))
|
||||
endif
|
||||
ifdef HOST_BUILD_DIR
|
||||
HOST_UNPACK ?= $(SH_FUNC) $(call UNPACK_CMD,$(HOST_BUILD_DIR))
|
||||
HOST_UNPACK ?= $(SH_FUNC) $(call UNPACK_CMD,$(HOST_BUILD_DIR)) $(call CRLF_CMD,$(HOST_BUILD_DIR))
|
||||
endif
|
||||
|
||||
endif # PKG_SOURCE
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
ifndef OPENWRT_VERBOSE
|
||||
OPENWRT_VERBOSE:=
|
||||
@@ -51,7 +54,7 @@ ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
|
||||
else
|
||||
SILENT:=>/dev/null $(if $(findstring w,$(OPENWRT_VERBOSE)),,2>&1)
|
||||
export QUIET:=1
|
||||
SUBMAKE=cmd() { $(SILENT) $(MAKE) -s "$$@" < /dev/null || { echo "make $$*: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on"; false; } } 8>&1 9>&2; cmd
|
||||
SUBMAKE=cmd() { $(SILENT) $(MAKE) -s $$* < /dev/null || { echo "make $$*: build failed. Please re-run make with -j1 V=s to see what's going on"; false; } } 8>&1 9>&2; cmd
|
||||
endif
|
||||
|
||||
.SILENT: $(MAKECMDGOALS)
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2012-2015 OpenWrt.org
|
||||
# Copyright (C) 2016 LEDE Project
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
# Substituted by SDK, do not remove
|
||||
# REVISION:=x
|
||||
# SOURCE_DATE_EPOCH:=x
|
||||
|
||||
PKG_CONFIG_DEPENDS += \
|
||||
CONFIG_VERSION_HOME_URL \
|
||||
CONFIG_VERSION_BUG_URL \
|
||||
CONFIG_VERSION_NUMBER \
|
||||
CONFIG_VERSION_CODE \
|
||||
@@ -23,13 +25,13 @@ PKG_CONFIG_DEPENDS += \
|
||||
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
|
||||
|
||||
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02-SNAPSHOT)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),18.06.0)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r7188-b0b5c64c22)
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02-SNAPSHOT)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.openwrt.org/releases/18.06.0)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
|
||||
@@ -39,16 +41,13 @@ VERSION_MANUFACTURER:=$(call qstrip,$(CONFIG_VERSION_MANUFACTURER))
|
||||
VERSION_MANUFACTURER:=$(if $(VERSION_MANUFACTURER),$(VERSION_MANUFACTURER),OpenWrt)
|
||||
|
||||
VERSION_MANUFACTURER_URL:=$(call qstrip,$(CONFIG_VERSION_MANUFACTURER_URL))
|
||||
VERSION_MANUFACTURER_URL:=$(if $(VERSION_MANUFACTURER_URL),$(VERSION_MANUFACTURER_URL),https://openwrt.org/)
|
||||
VERSION_MANUFACTURER_URL:=$(if $(VERSION_MANUFACTURER_URL),$(VERSION_MANUFACTURER_URL),http://openwrt.org/)
|
||||
|
||||
VERSION_BUG_URL:=$(call qstrip,$(CONFIG_VERSION_BUG_URL))
|
||||
VERSION_BUG_URL:=$(if $(VERSION_BUG_URL),$(VERSION_BUG_URL),https://bugs.openwrt.org/)
|
||||
|
||||
VERSION_HOME_URL:=$(call qstrip,$(CONFIG_VERSION_HOME_URL))
|
||||
VERSION_HOME_URL:=$(if $(VERSION_HOME_URL),$(VERSION_HOME_URL),https://openwrt.org/)
|
||||
VERSION_BUG_URL:=$(if $(VERSION_BUG_URL),$(VERSION_BUG_URL),http://bugs.openwrt.org/)
|
||||
|
||||
VERSION_SUPPORT_URL:=$(call qstrip,$(CONFIG_VERSION_SUPPORT_URL))
|
||||
VERSION_SUPPORT_URL:=$(if $(VERSION_SUPPORT_URL),$(VERSION_SUPPORT_URL),https://forum.openwrt.org/)
|
||||
VERSION_SUPPORT_URL:=$(if $(VERSION_SUPPORT_URL),$(VERSION_SUPPORT_URL),http://forum.lede-project.org/)
|
||||
|
||||
VERSION_PRODUCT:=$(call qstrip,$(CONFIG_VERSION_PRODUCT))
|
||||
VERSION_PRODUCT:=$(if $(VERSION_PRODUCT),$(VERSION_PRODUCT),Generic)
|
||||
@@ -101,7 +100,6 @@ VERSION_SED_SCRIPT:=$(SED) 's,%U,$(call sed_escape,$(VERSION_REPO)),g' \
|
||||
-e 's,%M,$(call sed_escape,$(VERSION_MANUFACTURER)),g' \
|
||||
-e 's,%m,$(call sed_escape,$(VERSION_MANUFACTURER_URL)),g' \
|
||||
-e 's,%b,$(call sed_escape,$(VERSION_BUG_URL)),g' \
|
||||
-e 's,%u,$(call sed_escape,$(VERSION_HOME_URL)),g' \
|
||||
-e 's,%s,$(call sed_escape,$(VERSION_SUPPORT_URL)),g' \
|
||||
-e 's,%P,$(call sed_escape,$(VERSION_PRODUCT)),g' \
|
||||
-e 's,%h,$(call sed_escape,$(VERSION_HWREV)),g'
|
||||
|
||||
@@ -11,7 +11,6 @@ include $(INCLUDE_DIR)/feeds.mk
|
||||
include $(INCLUDE_DIR)/rootfs.mk
|
||||
|
||||
-include $(TMP_DIR)/.packagedeps
|
||||
package-y += kernel/linux
|
||||
$(curdir)/autoremove:=1
|
||||
$(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m))
|
||||
$(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
|
||||
@@ -66,10 +65,8 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DE
|
||||
- find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755
|
||||
rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG)
|
||||
mkdir -p $(TARGET_DIR)/tmp
|
||||
$(file >$(TMP_DIR)/opkg_install_list,\
|
||||
$(call opkg_package_files,\
|
||||
$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg)))))
|
||||
$(call opkg,$(TARGET_DIR)) install $$(cat $(TMP_DIR)/opkg_install_list)
|
||||
$(call opkg,$(TARGET_DIR)) install \
|
||||
$(call opkg_package_files,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null))
|
||||
@for file in $(PACKAGE_INSTALL_FILES); do \
|
||||
[ -s $$file.flags ] || continue; \
|
||||
for flag in `cat $$file.flags`; do \
|
||||
@@ -87,16 +84,8 @@ $(curdir)/index: FORCE
|
||||
mkdir -p $$d; \
|
||||
cd $$d || continue; \
|
||||
$(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages.manifest; \
|
||||
grep -vE '^(Maintainer|LicenseFiles|Source|SourceName|Require|SourceDateEpoch)' Packages.manifest > Packages; \
|
||||
case "$$(((64 + $$(stat -L -c%s Packages)) % 128))" in 110|111) \
|
||||
$(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \
|
||||
{ echo ""; echo ""; } >> Packages;; \
|
||||
esac; \
|
||||
echo -n '{"architecture": "$(ARCH_PACKAGES)", "packages":{' > index.json; \
|
||||
sed -n -e 's/^Package: \(.*\)$$/"\1":/p' -e 's/^Version: \(.*\)$$/"\1",/p' Packages | tr '\n' ' ' >> index.json; \
|
||||
echo '}}' >> index.json; \
|
||||
sed -i 's/, }}/}}/' index.json; \
|
||||
gzip -9nc Packages > Packages.gz; \
|
||||
grep -vE '^(Maintainer|LicenseFiles|Source|Require)' Packages.manifest > Packages && \
|
||||
gzip -9nc Packages > Packages.gz; \
|
||||
); done
|
||||
ifdef CONFIG_SIGNED_PACKAGES
|
||||
@echo Signing package index...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2007-2021 OpenWrt.org
|
||||
# Copyright (C) 2007-2016 OpenWrt.org
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
@@ -12,11 +12,11 @@ include $(INCLUDE_DIR)/version.mk
|
||||
include $(INCLUDE_DIR)/feeds.mk
|
||||
|
||||
PKG_NAME:=base-files
|
||||
PKG_RELEASE:=192
|
||||
PKG_FLAGS:=nonshared
|
||||
PKG_RELEASE:=$(COMMITCOUNT)
|
||||
|
||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||
PKG_BUILD_DEPENDS:=usign/host ucert/host
|
||||
PKG_BUILD_DEPENDS:=usign/host
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
# Extend depends from version.mk
|
||||
@@ -37,7 +37,7 @@ endif
|
||||
define Package/base-files
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+netifd +libc +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:openwrt-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool
|
||||
DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:openwrt-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool
|
||||
TITLE:=Base filesystem for OpenWrt
|
||||
URL:=http://openwrt.org/
|
||||
VERSION:=$(PKG_RELEASE)-$(REVISION)
|
||||
@@ -49,7 +49,6 @@ define Package/base-files/conffiles
|
||||
/etc/config/system
|
||||
/etc/crontabs/
|
||||
/etc/dropbear/
|
||||
/etc/ethers
|
||||
/etc/group
|
||||
/etc/hosts
|
||||
/etc/inittab
|
||||
@@ -63,7 +62,6 @@ define Package/base-files/conffiles
|
||||
/etc/services
|
||||
/etc/shadow
|
||||
/etc/shells
|
||||
/etc/shinit
|
||||
/etc/sysctl.conf
|
||||
/etc/sysupgrade.conf
|
||||
$(call $(TARGET)/conffiles)
|
||||
@@ -104,19 +102,14 @@ ifdef CONFIG_SIGNED_PACKAGES
|
||||
[ -s $(BUILD_KEY) -a -s $(BUILD_KEY).pub ] || \
|
||||
$(STAGING_DIR_HOST)/bin/usign -G -s $(BUILD_KEY) -p $(BUILD_KEY).pub -c "Local build key"
|
||||
|
||||
[ -s $(BUILD_KEY).ucert ] || \
|
||||
$(STAGING_DIR_HOST)/bin/ucert -I -c $(BUILD_KEY).ucert -p $(BUILD_KEY).pub -s $(BUILD_KEY)
|
||||
|
||||
endef
|
||||
|
||||
ifndef CONFIG_BUILDBOT
|
||||
define Package/base-files/install-key
|
||||
mkdir -p $(1)/etc/opkg/keys
|
||||
$(CP) $(BUILD_KEY).pub $(1)/etc/opkg/keys/`$(STAGING_DIR_HOST)/bin/usign -F -p $(BUILD_KEY).pub`
|
||||
|
||||
endef
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NAND_SUPPORT),)
|
||||
define Package/base-files/nand-support
|
||||
@@ -192,19 +185,12 @@ define Package/base-files/install
|
||||
|
||||
$(if $(CONFIG_INCLUDE_CONFIG), \
|
||||
echo -e "# Build configuration for board $(BOARD)/$(SUBTARGET)/$(PROFILE)\n" >$(1)/etc/build.config; \
|
||||
cat $(BIN_DIR)/config.buildinfo >>$(1)/etc/build.config; \
|
||||
cat $(BIN_DIR)/feeds.buildinfo >>$(1)/etc/build.feeds; \
|
||||
cat $(BIN_DIR)/version.buildinfo >>$(1)/etc/build.version)
|
||||
cat $(BIN_DIR)/config.seed >>$(1)/etc/build.config)
|
||||
|
||||
$(if $(CONFIG_CLEAN_IPKG),, \
|
||||
mkdir -p $(1)/etc/opkg; \
|
||||
$(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf); \
|
||||
$(VERSION_SED_SCRIPT) $(1)/etc/opkg/distfeeds.conf)
|
||||
$(if $(CONFIG_IPK_FILES_CHECKSUMS),, \
|
||||
rm -f $(1)/sbin/pkg_check)
|
||||
|
||||
$(if $(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE), \
|
||||
rm -f $(1)/etc/banner.failsafe,)
|
||||
endef
|
||||
|
||||
ifneq ($(DUMP),1)
|
||||
|
||||
@@ -5,7 +5,7 @@ CFG=$1
|
||||
[ -n "$CFG" ] || CFG=/etc/board.json
|
||||
|
||||
[ -d "/etc/board.d/" -a ! -s "$CFG" ] && {
|
||||
for a in $(ls /etc/board.d/*); do
|
||||
for a in `ls /etc/board.d/*`; do
|
||||
[ -x $a ] || continue;
|
||||
$(. $a)
|
||||
done
|
||||
|
||||
@@ -7,51 +7,18 @@ CFG=/etc/board.json
|
||||
[ -s $CFG ] || /bin/board_detect || exit 1
|
||||
[ -s /etc/config/network -a -s /etc/config/system ] && exit 0
|
||||
|
||||
generate_bridge() {
|
||||
local name=$1
|
||||
local macaddr=$2
|
||||
uci -q batch <<-EOF
|
||||
set network.$name=device
|
||||
set network.$name.name=$name
|
||||
set network.$name.type=bridge
|
||||
EOF
|
||||
if [ -n "$macaddr" ]; then
|
||||
uci -q batch <<-EOF
|
||||
set network.$name.macaddr=$macaddr
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
bridge_vlan_id=0
|
||||
generate_bridge_vlan() {
|
||||
local name=$1_vlan
|
||||
local device=$2
|
||||
local ports="$3"
|
||||
local vlan="$4"
|
||||
uci -q batch <<-EOF
|
||||
set network.$name=bridge-vlan
|
||||
set network.$name.device='$device'
|
||||
set network.$name.vlan='$vlan'
|
||||
set network.$name.ports='$ports'
|
||||
EOF
|
||||
}
|
||||
|
||||
generate_static_network() {
|
||||
uci -q batch <<-EOF
|
||||
delete network.loopback
|
||||
set network.loopback='interface'
|
||||
set network.loopback.device='lo'
|
||||
set network.loopback.ifname='lo'
|
||||
set network.loopback.proto='static'
|
||||
set network.loopback.ipaddr='127.0.0.1'
|
||||
set network.loopback.netmask='255.0.0.0'
|
||||
delete network.globals
|
||||
set network.globals='globals'
|
||||
set network.globals.ula_prefix='auto'
|
||||
EOF
|
||||
[ -e /proc/sys/net/ipv6 ] && {
|
||||
uci -q batch <<-EOF
|
||||
delete network.globals
|
||||
set network.globals='globals'
|
||||
set network.globals.ula_prefix='auto'
|
||||
EOF
|
||||
}
|
||||
|
||||
if json_is_a dsl object; then
|
||||
json_select dsl
|
||||
@@ -91,73 +58,36 @@ generate_static_network() {
|
||||
|
||||
addr_offset=2
|
||||
generate_network() {
|
||||
local ports device macaddr protocol type ipaddr netmask vlan
|
||||
local bridge=$2
|
||||
local ifname macaddr protocol type ipaddr netmask
|
||||
|
||||
json_select network
|
||||
json_select "$1"
|
||||
json_get_vars device macaddr metric protocol ipaddr netmask vlan
|
||||
json_get_values ports ports
|
||||
json_get_vars ifname macaddr protocol ipaddr netmask
|
||||
json_select ..
|
||||
json_select ..
|
||||
|
||||
[ -n "$device" -o -n "$ports" ] || return
|
||||
[ -n "$ifname" ] || return
|
||||
|
||||
# Force bridge for "lan" as it may have other devices (e.g. wireless)
|
||||
# bridged
|
||||
[ "$1" = "lan" -a -z "$ports" ] && {
|
||||
ports="$device"
|
||||
}
|
||||
|
||||
[ -n "$ports" -a -z "$bridge" ] && {
|
||||
uci -q batch <<-EOF
|
||||
add network device
|
||||
set network.@device[-1].name='br-$1'
|
||||
set network.@device[-1].type='bridge'
|
||||
EOF
|
||||
for port in $ports; do uci add_list network.@device[-1].ports="$port"; done
|
||||
[ -n "$macaddr" ] && {
|
||||
for port in $ports; do
|
||||
uci -q batch <<-EOF
|
||||
add network device
|
||||
set network.@device[-1].name='$port'
|
||||
set network.@device[-1].macaddr='$macaddr'
|
||||
EOF
|
||||
done
|
||||
}
|
||||
device=br-$1
|
||||
type=
|
||||
macaddr=""
|
||||
}
|
||||
|
||||
[ -n "$bridge" ] && {
|
||||
[ -z "$ports" ] && ports="$device"
|
||||
if [ -z "$vlan" ]; then
|
||||
bridge_vlan_id=$((bridge_vlan_id + 1))
|
||||
vlan=$bridge_vlan_id
|
||||
fi
|
||||
generate_bridge_vlan $1 $bridge "$ports" $vlan
|
||||
device=$bridge.$vlan
|
||||
type=""
|
||||
}
|
||||
|
||||
if [ -n "$macaddr" ]; then
|
||||
uci -q batch <<-EOF
|
||||
add network device
|
||||
set network.@device[-1].name='$device'
|
||||
set network.@device[-1].macaddr='$macaddr'
|
||||
EOF
|
||||
fi
|
||||
# force bridge for multi-interface devices (and lan)
|
||||
case "$1:$ifname" in
|
||||
*\ * | lan:*) type="bridge" ;;
|
||||
esac
|
||||
|
||||
uci -q batch <<-EOF
|
||||
delete network.$1
|
||||
set network.$1='interface'
|
||||
set network.$1.type='$type'
|
||||
set network.$1.device='$device'
|
||||
set network.$1.metric='$metric'
|
||||
set network.$1.ifname='$ifname'
|
||||
set network.$1.proto='none'
|
||||
EOF
|
||||
|
||||
[ -n "$macaddr" ] && uci -q batch <<-EOF
|
||||
delete network.$1_dev
|
||||
set network.$1_dev='device'
|
||||
set network.$1_dev.name='$ifname'
|
||||
set network.$1_dev.macaddr='$macaddr'
|
||||
EOF
|
||||
|
||||
case "$protocol" in
|
||||
static)
|
||||
local ipad
|
||||
@@ -172,23 +102,21 @@ generate_network() {
|
||||
set network.$1.proto='static'
|
||||
set network.$1.ipaddr='$ipad'
|
||||
set network.$1.netmask='$netm'
|
||||
set network.$1.ip6assign='60'
|
||||
EOF
|
||||
[ -e /proc/sys/net/ipv6 ] && uci set network.$1.ip6assign='60'
|
||||
;;
|
||||
|
||||
dhcp)
|
||||
# fixup IPv6 slave interface if parent is a bridge
|
||||
[ "$type" = "bridge" ] && device="br-$1"
|
||||
[ "$type" = "bridge" ] && ifname="br-$1"
|
||||
|
||||
uci set network.$1.proto='dhcp'
|
||||
[ -e /proc/sys/net/ipv6 ] && {
|
||||
uci -q batch <<-EOF
|
||||
delete network.${1}6
|
||||
set network.${1}6='interface'
|
||||
set network.${1}6.device='$device'
|
||||
set network.${1}6.proto='dhcpv6'
|
||||
EOF
|
||||
}
|
||||
uci -q batch <<-EOF
|
||||
set network.$1.proto='dhcp'
|
||||
delete network.${1}6
|
||||
set network.${1}6='interface'
|
||||
set network.${1}6.ifname='$ifname'
|
||||
set network.${1}6.proto='dhcpv6'
|
||||
EOF
|
||||
;;
|
||||
|
||||
pppoe)
|
||||
@@ -196,16 +124,12 @@ generate_network() {
|
||||
set network.$1.proto='pppoe'
|
||||
set network.$1.username='username'
|
||||
set network.$1.password='password'
|
||||
set network.$1.ipv6='1'
|
||||
delete network.${1}6
|
||||
set network.${1}6='interface'
|
||||
set network.${1}6.ifname='@${1}'
|
||||
set network.${1}6.proto='dhcpv6'
|
||||
EOF
|
||||
[ -e /proc/sys/net/ipv6 ] && {
|
||||
uci -q batch <<-EOF
|
||||
set network.$1.ipv6='1'
|
||||
delete network.${1}6
|
||||
set network.${1}6='interface'
|
||||
set network.${1}6.device='@${1}'
|
||||
set network.${1}6.proto='dhcpv6'
|
||||
EOF
|
||||
}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -279,8 +203,7 @@ generate_switch() {
|
||||
|
||||
json_select switch
|
||||
json_select "$key"
|
||||
json_get_vars enable reset blinkrate cpu_port \
|
||||
ar8xxx_mib_type ar8xxx_mib_poll_interval
|
||||
json_get_vars enable reset blinkrate cpu_port
|
||||
|
||||
uci -q batch <<-EOF
|
||||
add network switch
|
||||
@@ -288,8 +211,6 @@ generate_switch() {
|
||||
set network.@switch[-1].reset='$reset'
|
||||
set network.@switch[-1].enable_vlan='$enable'
|
||||
set network.@switch[-1].blinkrate='$blinkrate'
|
||||
set network.@switch[-1].ar8xxx_mib_type='$ar8xxx_mib_type'
|
||||
set network.@switch[-1].ar8xxx_mib_poll_interval='$ar8xxx_mib_poll_interval'
|
||||
EOF
|
||||
|
||||
generate_switch_vlans_ports "$1"
|
||||
@@ -298,6 +219,7 @@ generate_switch() {
|
||||
json_select ..
|
||||
}
|
||||
|
||||
|
||||
generate_static_system() {
|
||||
uci -q batch <<-EOF
|
||||
delete system.@system[0]
|
||||
@@ -325,13 +247,6 @@ generate_static_system() {
|
||||
uci -q set "system.@system[-1].hostname=$hostname"
|
||||
fi
|
||||
|
||||
local compat_version
|
||||
if json_get_var compat_version compat_version; then
|
||||
uci -q set "system.@system[-1].compat_version=$compat_version"
|
||||
else
|
||||
uci -q set "system.@system[-1].compat_version=1.0"
|
||||
fi
|
||||
|
||||
if json_is_a ntpserver array; then
|
||||
local keys key
|
||||
json_get_keys keys ntpserver
|
||||
@@ -441,12 +356,11 @@ generate_led() {
|
||||
;;
|
||||
|
||||
switch)
|
||||
local port_mask speed_mask mode
|
||||
json_get_vars port_mask speed_mask mode
|
||||
local port_mask speed_mask
|
||||
json_get_vars port_mask speed_mask
|
||||
uci -q batch <<-EOF
|
||||
set system.$cfg.port_mask='$port_mask'
|
||||
set system.$cfg.speed_mask='$speed_mask'
|
||||
set system.$cfg.mode='$mode'
|
||||
EOF
|
||||
;;
|
||||
|
||||
@@ -494,24 +408,12 @@ generate_gpioswitch() {
|
||||
json_init
|
||||
json_load "$(cat ${CFG})"
|
||||
|
||||
umask 077
|
||||
|
||||
if [ ! -s /etc/config/network ]; then
|
||||
bridge_name=""
|
||||
touch /etc/config/network
|
||||
generate_static_network
|
||||
|
||||
json_get_vars bridge
|
||||
[ -n "$bridge" ] && {
|
||||
json_select bridge
|
||||
json_get_vars name macaddr
|
||||
generate_bridge "$name" "$macaddr"
|
||||
json_select ..
|
||||
bridge_name=$name
|
||||
}
|
||||
|
||||
json_get_keys keys network
|
||||
for key in $keys; do generate_network $key $bridge_name; done
|
||||
for key in $keys; do generate_network $key; done
|
||||
|
||||
json_get_keys keys switch
|
||||
for key in $keys; do generate_switch $key; done
|
||||
|
||||
@@ -1,52 +1,4 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2006-2019 OpenWrt.org
|
||||
# Copyright (C) 2006-2009 OpenWrt.org
|
||||
|
||||
. /lib/functions/leds.sh
|
||||
|
||||
boot="$(get_dt_led boot)"
|
||||
failsafe="$(get_dt_led failsafe)"
|
||||
running="$(get_dt_led running)"
|
||||
upgrade="$(get_dt_led upgrade)"
|
||||
|
||||
set_led_state() {
|
||||
status_led="$boot"
|
||||
|
||||
case "$1" in
|
||||
preinit)
|
||||
status_led_blink_preinit
|
||||
;;
|
||||
failsafe)
|
||||
status_led_off
|
||||
[ -n "$running" ] && {
|
||||
status_led="$running"
|
||||
status_led_off
|
||||
}
|
||||
status_led="$failsafe"
|
||||
status_led_blink_failsafe
|
||||
;;
|
||||
preinit_regular)
|
||||
status_led_blink_preinit_regular
|
||||
;;
|
||||
upgrade)
|
||||
[ -n "$running" ] && {
|
||||
status_led="$running"
|
||||
status_led_off
|
||||
}
|
||||
status_led="$upgrade"
|
||||
status_led_blink_preinit_regular
|
||||
;;
|
||||
done)
|
||||
status_led_off
|
||||
[ "$status_led" != "$running" ] && \
|
||||
status_led_restore_trigger "boot"
|
||||
[ -n "$running" ] && {
|
||||
status_led="$running"
|
||||
status_led_on
|
||||
}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
set_state() {
|
||||
[ -n "$boot" -o -n "$failsafe" -o -n "$running" -o -n "$upgrade" ] && set_led_state "$1"
|
||||
}
|
||||
set_state() { :; }
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#
|
||||
# Lookup man 5 ethers for syntax documentation
|
||||
#
|
||||
# Examples :
|
||||
# 02:00:11:22:33:44 OpenWrt.lan
|
||||
# 02:00:11:22:33:44 192.168.1.1
|
||||
@@ -1,8 +1,8 @@
|
||||
root:x:0:
|
||||
daemon:x:1:
|
||||
adm:x:4:
|
||||
tty:x:5:
|
||||
mail:x:8:
|
||||
dialout:x:20:
|
||||
audio:x:29:
|
||||
www-data:x:33:
|
||||
ftp:x:55:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
|
||||
START=10
|
||||
STOP=90
|
||||
STOP=98
|
||||
|
||||
uci_apply_defaults() {
|
||||
. /lib/functions/system.sh
|
||||
@@ -20,35 +20,31 @@ uci_apply_defaults() {
|
||||
boot() {
|
||||
[ -f /proc/mounts ] || /sbin/mount_root
|
||||
[ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
|
||||
[ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
|
||||
|
||||
mkdir -p /var/lock
|
||||
chmod 1777 /var/lock
|
||||
mkdir -p /var/log
|
||||
mkdir -p /var/run
|
||||
mkdir -p /var/log
|
||||
mkdir -p /var/lock
|
||||
mkdir -p /var/state
|
||||
mkdir -p /var/tmp
|
||||
mkdir -p /tmp/.uci
|
||||
chmod 0700 /tmp/.uci
|
||||
touch /var/log/wtmp
|
||||
touch /var/log/lastlog
|
||||
mkdir -p /tmp/resolv.conf.d
|
||||
touch /tmp/resolv.conf.d/resolv.conf.auto
|
||||
ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf
|
||||
touch /tmp/resolv.conf.auto
|
||||
ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
|
||||
grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
|
||||
grep -q bpf /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime,mode=0700 -t bpf bpffs /sys/fs/bpf
|
||||
grep -q pstore /proc/filesystems && /bin/mount -o noatime -t pstore pstore /sys/fs/pstore
|
||||
[ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
|
||||
|
||||
/sbin/kmodloader
|
||||
|
||||
[ ! -f /etc/config/wireless ] && {
|
||||
# compat for bcm47xx and mvebu
|
||||
# compat for brcm47xx and mvebu
|
||||
sleep 1
|
||||
}
|
||||
|
||||
/bin/config_generate
|
||||
uci_apply_defaults
|
||||
sync
|
||||
|
||||
# temporary hack until configd exists
|
||||
/sbin/reload_config
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
START=95
|
||||
boot() {
|
||||
mount_root done
|
||||
rm -f /sysupgrade.tgz && sync
|
||||
rm -f /sysupgrade.tgz
|
||||
|
||||
# process user commands
|
||||
[ -f /etc/rc.local ] && {
|
||||
|
||||
@@ -16,39 +16,21 @@ load_gpio_switch()
|
||||
config_get name "$1" name
|
||||
config_get value "$1" value 0
|
||||
|
||||
[ -z "$gpio_pin" ] && {
|
||||
echo >&2 "Skipping gpio_switch '$name' due to missing gpio_pin"
|
||||
return 1
|
||||
local gpio_path="/sys/class/gpio/gpio${gpio_pin}"
|
||||
# export GPIO pin for access
|
||||
[ -d "$gpio_path" ] || {
|
||||
echo "$gpio_pin" >/sys/class/gpio/export
|
||||
# we need to wait a bit until the GPIO appears
|
||||
[ -d "$gpio_path" ] || sleep 1
|
||||
}
|
||||
|
||||
local gpio_path
|
||||
if [ -n "$(echo "$gpio_pin" | grep -E "^[0-9]+$")" ]; then
|
||||
gpio_path="/sys/class/gpio/gpio${gpio_pin}"
|
||||
|
||||
# export GPIO pin for access
|
||||
[ -d "$gpio_path" ] || {
|
||||
echo "$gpio_pin" >/sys/class/gpio/export
|
||||
# we need to wait a bit until the GPIO appears
|
||||
[ -d "$gpio_path" ] || sleep 1
|
||||
}
|
||||
|
||||
# direction attribute only exists if the kernel supports changing the
|
||||
# direction of a GPIO
|
||||
if [ -e "${gpio_path}/direction" ]; then
|
||||
# set the pin to output with high or low pin value
|
||||
{ [ "$value" = "0" ] && echo "low" || echo "high"; } \
|
||||
>"$gpio_path/direction"
|
||||
else
|
||||
{ [ "$value" = "0" ] && echo "0" || echo "1"; } \
|
||||
>"$gpio_path/value"
|
||||
fi
|
||||
# direction attribute only exists if the kernel supports changing the
|
||||
# direction of a GPIO
|
||||
if [ -e "${gpio_path}/direction" ]; then
|
||||
# set the pin to output with high or low pin value
|
||||
{ [ "$value" = "0" ] && echo "low" || echo "high"; } >"$gpio_path/direction"
|
||||
else
|
||||
gpio_path="/sys/class/gpio/${gpio_pin}"
|
||||
|
||||
[ -d "$gpio_path" ] && {
|
||||
{ [ "$value" = "0" ] && echo "0" || echo "1"; } \
|
||||
>"$gpio_path/value"
|
||||
}
|
||||
{ [ "$value" = "0" ] && echo "0" || echo "1"; } >"$gpio_path/value"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ load_led() {
|
||||
config_get trigger $1 trigger "none"
|
||||
config_get dev $1 dev
|
||||
config_get ports $1 port
|
||||
config_get mode $1 mode
|
||||
config_get_bool default $1 default "0"
|
||||
config_get mode $1 mode "link"
|
||||
config_get_bool default $1 default "nil"
|
||||
config_get delayon $1 delayon
|
||||
config_get delayoff $1 delayoff
|
||||
config_get interval $1 interval "50"
|
||||
@@ -71,10 +71,7 @@ load_led() {
|
||||
"netdev")
|
||||
[ -n "$dev" ] && {
|
||||
echo $dev > /sys/class/leds/${sysfs}/device_name
|
||||
for m in $mode; do
|
||||
[ -e "/sys/class/leds/${sysfs}/$m" ] && \
|
||||
echo 1 > /sys/class/leds/${sysfs}/$m
|
||||
done
|
||||
echo $mode > /sys/class/leds/${sysfs}/mode
|
||||
echo $interval > /sys/class/leds/${sysfs}/interval
|
||||
}
|
||||
;;
|
||||
@@ -113,8 +110,6 @@ load_led() {
|
||||
config_get speed_mask $1 speed_mask
|
||||
[ -n "$speed_mask" ] && \
|
||||
echo $speed_mask > /sys/class/leds/${sysfs}/speed_mask
|
||||
[ -n "$mode" ] && \
|
||||
echo "$mode" > /sys/class/leds/${sysfs}/mode
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
START=10
|
||||
USE_PROCD=1
|
||||
|
||||
validate_system_section() {
|
||||
uci_load_validate system system "$1" "$2" \
|
||||
validate_system_section()
|
||||
{
|
||||
uci_validate_section system system "${1}" \
|
||||
'hostname:string:OpenWrt' \
|
||||
'conloglevel:uinteger' \
|
||||
'buffersize:uinteger' \
|
||||
@@ -14,7 +15,11 @@ validate_system_section() {
|
||||
}
|
||||
|
||||
system_config() {
|
||||
[ "$2" = 0 ] || {
|
||||
local cfg="$1"
|
||||
|
||||
local hostname conloglevel buffersize timezone zonename
|
||||
|
||||
validate_system_section "${1}" || {
|
||||
echo "validation failed"
|
||||
return 1
|
||||
}
|
||||
@@ -22,20 +27,20 @@ system_config() {
|
||||
echo "$hostname" > /proc/sys/kernel/hostname
|
||||
[ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
|
||||
echo "$timezone" > /tmp/TZ
|
||||
[ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/${zonename// /_}" ] \
|
||||
&& ln -sf "/usr/share/zoneinfo/${zonename// /_}" /tmp/localtime \
|
||||
&& rm -f /tmp/TZ
|
||||
[ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && \
|
||||
ln -sf "/usr/share/zoneinfo/$zonename" /tmp/localtime && rm -f /tmp/TZ
|
||||
|
||||
# apply timezone to kernel
|
||||
hwclock -u --systz
|
||||
date -k
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
config_load system
|
||||
config_foreach validate_system_section system system_config
|
||||
config_foreach system_config system
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "system"
|
||||
procd_add_validation validate_system_section
|
||||
}
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
|
||||
STOP=90
|
||||
|
||||
restart() {
|
||||
:
|
||||
}
|
||||
|
||||
STOP=99
|
||||
stop() {
|
||||
sync
|
||||
/bin/umount -a -d -r
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# lookup table for ematch kinds
|
||||
1 cmp
|
||||
2 nbyte
|
||||
3 u32
|
||||
4 meta
|
||||
7 canid
|
||||
8 ipset
|
||||
9 ipt
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
[ -e /tmp/.failsafe ] && export FAILSAFE=1
|
||||
|
||||
[ -f /etc/banner ] && cat /etc/banner
|
||||
@@ -12,13 +13,18 @@ export PATH="%PATH%"
|
||||
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
|
||||
export HOME=${HOME:-/root}
|
||||
export PS1='\u@\h:\w\$ '
|
||||
export ENV=/etc/shinit
|
||||
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
export PS1='\[\e]0;\u@\h: \w\a\]'$PS1
|
||||
;;
|
||||
esac
|
||||
[ "$TERM" = "xterm" ] && export PS1='\[\e]0;\u@\h: \w\a\]'$PS1
|
||||
|
||||
[ -x /bin/more ] || alias more=less
|
||||
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
|
||||
|
||||
alias ll='ls -alF --color=auto'
|
||||
|
||||
[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
|
||||
|
||||
[ -x /usr/bin/arp -o -x /sbin/arp ] || arp() { cat /proc/net/arp; }
|
||||
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
|
||||
|
||||
[ -n "$FAILSAFE" ] || {
|
||||
for FILE in /etc/profile.d/*.sh; do
|
||||
@@ -38,3 +44,12 @@ in order to prevent unauthorized SSH logins.
|
||||
--------------------------------------------------
|
||||
EOF
|
||||
fi
|
||||
|
||||
service() {
|
||||
[ -f "/etc/init.d/$1" ] || {
|
||||
echo "service "'"'"$1"'"'" not found, the following services are available:"
|
||||
ls "/etc/init.d"
|
||||
return 1
|
||||
}
|
||||
/etc/init.d/$@
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "${ACTION}" = "released" ] || exit 0
|
||||
|
||||
if [ "$SEEN" -ge 5 ]
|
||||
then
|
||||
echo "REBOOT" > /dev/console
|
||||
sync
|
||||
reboot
|
||||
fi
|
||||
|
||||
return 0
|
||||
@@ -23,7 +23,6 @@ reload() {
|
||||
restart() {
|
||||
trap '' TERM
|
||||
stop "$@"
|
||||
trap - TERM
|
||||
start "$@"
|
||||
}
|
||||
|
||||
@@ -62,24 +61,19 @@ depends() {
|
||||
return 0
|
||||
}
|
||||
|
||||
ALL_HELP=""
|
||||
ALL_COMMANDS="boot shutdown depends"
|
||||
extra_command() {
|
||||
local cmd="$1"
|
||||
local help="$2"
|
||||
|
||||
local extra="$(printf "%-16s%s" "${cmd}" "${help}")"
|
||||
ALL_HELP="${ALL_HELP}\t${extra}\n"
|
||||
ALL_COMMANDS="${ALL_COMMANDS} ${cmd}"
|
||||
}
|
||||
|
||||
help() {
|
||||
cat <<EOF
|
||||
Syntax: $initscript [command]
|
||||
|
||||
Available commands:
|
||||
start Start the service
|
||||
stop Stop the service
|
||||
restart Restart the service
|
||||
reload Reload configuration files (or restart if service does not implement reload)
|
||||
enable Enable service autostart
|
||||
disable Disable service autostart
|
||||
$EXTRA_HELP
|
||||
EOF
|
||||
echo -e "$ALL_HELP"
|
||||
}
|
||||
|
||||
# for procd
|
||||
@@ -100,27 +94,15 @@ service_data() {
|
||||
}
|
||||
|
||||
service_running() {
|
||||
local instance="${1:-*}"
|
||||
|
||||
procd_running "$(basename $initscript)" "$instance"
|
||||
return 0
|
||||
}
|
||||
|
||||
${INIT_TRACE:+set -x}
|
||||
|
||||
extra_command "start" "Start the service"
|
||||
extra_command "stop" "Stop the service"
|
||||
extra_command "restart" "Restart the service"
|
||||
extra_command "reload" "Reload configuration files (or restart if service does not implement reload)"
|
||||
extra_command "enable" "Enable service autostart"
|
||||
extra_command "disable" "Disable service autostart"
|
||||
extra_command "enabled" "Check if service is started on boot"
|
||||
|
||||
. "$initscript"
|
||||
|
||||
[ -n "$USE_PROCD" ] && {
|
||||
extra_command "running" "Check if service is running"
|
||||
extra_command "status" "Service status"
|
||||
extra_command "trace" "Start with syscall trace"
|
||||
EXTRA_COMMANDS="${EXTRA_COMMANDS} running trace"
|
||||
|
||||
. $IPKG_INSTROOT/lib/functions/procd.sh
|
||||
basescript=$(readlink "$initscript")
|
||||
@@ -148,9 +130,6 @@ extra_command "enabled" "Check if service is started on boot"
|
||||
procd_lock
|
||||
stop_service "$@"
|
||||
procd_kill "$(basename ${basescript:-$initscript})" "$1"
|
||||
if eval "type service_stopped" 2>/dev/null >/dev/null; then
|
||||
service_stopped
|
||||
fi
|
||||
}
|
||||
|
||||
reload() {
|
||||
@@ -165,17 +144,8 @@ extra_command "enabled" "Check if service is started on boot"
|
||||
running() {
|
||||
service_running "$@"
|
||||
}
|
||||
|
||||
status() {
|
||||
if eval "type status_service" 2>/dev/null >/dev/null; then
|
||||
status_service "$@"
|
||||
else
|
||||
_procd_status "$(basename ${basescript:-$initscript})" "$1"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
ALL_COMMANDS="${ALL_COMMANDS} ${EXTRA_COMMANDS}"
|
||||
ALL_HELP="${ALL_HELP}${EXTRA_HELP}"
|
||||
ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}"
|
||||
list_contains ALL_COMMANDS "$action" || action=help
|
||||
$action "$@"
|
||||
|
||||
@@ -29,8 +29,8 @@ kerberos 88/tcp kerberos5 krb5 kerberos-sec
|
||||
kerberos 88/udp kerberos5 krb5 kerberos-sec
|
||||
pop3 110/tcp
|
||||
pop3 110/udp
|
||||
sunrpc 111/tcp rpcbind
|
||||
sunrpc 111/udp rpcbind
|
||||
sunrpc 111/tcp
|
||||
sunrpc 111/udp
|
||||
auth 113/tcp ident
|
||||
sftp 115/tcp
|
||||
nntp 119/tcp
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
[ -x /bin/more ] || [ -x /usr/bin/more ] || alias more=less
|
||||
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
|
||||
|
||||
alias ll='ls -alF --color=auto'
|
||||
|
||||
[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
|
||||
|
||||
[ -x /usr/bin/arp -o -x /sbin/arp ] || arp() { cat /proc/net/arp; }
|
||||
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
|
||||
|
||||
service() {
|
||||
if [ -f "/etc/init.d/$1" ]; then
|
||||
/etc/init.d/$@
|
||||
else
|
||||
echo "Usage: service <service> [command]"
|
||||
if [ -n "$1" ]; then
|
||||
echo "Service "'"'"$1"'"'" not found, the following services are available:"
|
||||
else
|
||||
echo "The following services are available:"
|
||||
fi
|
||||
for F in /etc/init.d/* ; do
|
||||
printf "%-30s\t%10s\t%10s\n" "$F" \
|
||||
$( $($F enabled) && echo "enabled" || echo "disabled" ) \
|
||||
$( [ "$(ubus call service list "{ 'verbose': true, 'name': '$(basename $F)' }" \
|
||||
| jsonfilter -q -e "@['$(basename $F)'].instances[*].running" | uniq)" = "true" ] \
|
||||
&& echo "running" || echo "stopped" )
|
||||
done;
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
[ -n "$KSH_VERSION" -o \! -s "$HOME/.shinit" ] || . "$HOME/.shinit"
|
||||
[ -z "$KSH_VERSION" -o \! -s "$HOME/.mkshrc" ] || . "$HOME/.mkshrc"
|
||||
@@ -8,8 +8,6 @@ fs.suid_dumpable=2
|
||||
fs.protected_hardlinks=1
|
||||
fs.protected_symlinks=1
|
||||
|
||||
net.core.bpf_jit_enable=1
|
||||
|
||||
net.ipv4.conf.default.arp_ignore=1
|
||||
net.ipv4.conf.all.arp_ignore=1
|
||||
net.ipv4.ip_forward=1
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
ppwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/passwd)"
|
||||
spwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/shadow)"
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$(uci -q get network.globals.ula_prefix)" != "auto" ] && exit 0
|
||||
|
||||
r1=$(dd if=/dev/urandom bs=1 count=1 |hexdump -e '1/1 "%02x"')
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
for file in $(grep -sl Require-User /usr/lib/opkg/info/*.control); do
|
||||
file="${file##*/}"
|
||||
file="${file%.control}"
|
||||
add_group_and_user "${file}"
|
||||
done
|
||||
|
||||
exit 0
|
||||
11
package/base-files/files/etc/uci-defaults/13_fix_group_user
Normal file
11
package/base-files/files/etc/uci-defaults/13_fix_group_user
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
for file in `grep -sl Require-User /usr/lib/opkg/info/*.control`; do
|
||||
file="${file##*/}"
|
||||
file="${file%.control}"
|
||||
add_group_and_user "${file}"
|
||||
done
|
||||
|
||||
exit 0
|
||||
125
package/base-files/files/lib/functions.sh
Normal file → Executable file
125
package/base-files/files/lib/functions.sh
Normal file → Executable file
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2006-2014 OpenWrt.org
|
||||
# Copyright (C) 2006 Fokus Fraunhofer <carsten.tittel@fokus.fraunhofer.de>
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
@@ -16,22 +17,6 @@ NO_EXPORT=1
|
||||
LOAD_STATE=1
|
||||
LIST_SEP=" "
|
||||
|
||||
# xor multiple hex values of the same length
|
||||
xor() {
|
||||
local val
|
||||
local ret="0x$1"
|
||||
local retlen=${#1}
|
||||
|
||||
shift
|
||||
while [ -n "$1" ]; do
|
||||
val="0x$1"
|
||||
ret=$((ret ^ val))
|
||||
shift
|
||||
done
|
||||
|
||||
printf "%0${retlen}x" "$ret"
|
||||
}
|
||||
|
||||
append() {
|
||||
local var="$1"
|
||||
local value="$2"
|
||||
@@ -69,7 +54,7 @@ config () {
|
||||
local cfgtype="$1"
|
||||
local name="$2"
|
||||
|
||||
export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$((CONFIG_NUM_SECTIONS + 1))
|
||||
export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$(($CONFIG_NUM_SECTIONS + 1))
|
||||
name="${name:-cfg$CONFIG_NUM_SECTIONS}"
|
||||
append CONFIG_SECTIONS "$name"
|
||||
export ${NO_EXPORT:+-n} CONFIG_SECTION="$name"
|
||||
@@ -92,7 +77,7 @@ list() {
|
||||
|
||||
config_get len "$CONFIG_SECTION" "${varname}_LENGTH" 0
|
||||
[ $len = 0 ] && append CONFIG_LIST_STATE "${CONFIG_SECTION}_${varname}"
|
||||
len=$((len + 1))
|
||||
len=$(($len + 1))
|
||||
config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value"
|
||||
config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len"
|
||||
append "CONFIG_${CONFIG_SECTION}_${varname}" "$value" "$LIST_SEP"
|
||||
@@ -106,33 +91,21 @@ config_unset() {
|
||||
# config_get <variable> <section> <option> [<default>]
|
||||
# config_get <section> <option>
|
||||
config_get() {
|
||||
case "$2${3:-$1}" in
|
||||
*[!A-Za-z0-9_]*) : ;;
|
||||
*)
|
||||
case "$3" in
|
||||
"") eval echo "\"\${CONFIG_${1}_${2}:-\${4}}\"";;
|
||||
*) eval export ${NO_EXPORT:+-n} -- "${1}=\${CONFIG_${2}_${3}:-\${4}}";;
|
||||
esac
|
||||
;;
|
||||
case "$3" in
|
||||
"") eval echo "\${CONFIG_${1}_${2}:-\${4}}";;
|
||||
*) eval export ${NO_EXPORT:+-n} -- "${1}=\${CONFIG_${2}_${3}:-\${4}}";;
|
||||
esac
|
||||
}
|
||||
|
||||
# get_bool <value> [<default>]
|
||||
get_bool() {
|
||||
local _tmp="$1"
|
||||
case "$_tmp" in
|
||||
1|on|true|yes|enabled) _tmp=1;;
|
||||
0|off|false|no|disabled) _tmp=0;;
|
||||
*) _tmp="$2";;
|
||||
esac
|
||||
echo -n "$_tmp"
|
||||
}
|
||||
|
||||
# config_get_bool <variable> <section> <option> [<default>]
|
||||
config_get_bool() {
|
||||
local _tmp
|
||||
config_get _tmp "$2" "$3" "$4"
|
||||
_tmp="$(get_bool "$_tmp" "$4")"
|
||||
case "$_tmp" in
|
||||
1|on|true|yes|enabled) _tmp=1;;
|
||||
0|off|false|no|disabled) _tmp=0;;
|
||||
*) _tmp="$4";;
|
||||
esac
|
||||
export ${NO_EXPORT:+-n} "$1=$_tmp"
|
||||
}
|
||||
|
||||
@@ -154,7 +127,7 @@ config_foreach() {
|
||||
[ -z "$CONFIG_SECTIONS" ] && return 0
|
||||
for section in ${CONFIG_SECTIONS}; do
|
||||
config_get cfgtype "$section" TYPE
|
||||
[ -n "$___type" ] && [ "x$cfgtype" != "x$___type" ] && continue
|
||||
[ -n "$___type" -a "x$cfgtype" != "x$___type" ] && continue
|
||||
eval "$___function \"\$section\" \"\$@\""
|
||||
done
|
||||
}
|
||||
@@ -173,33 +146,28 @@ config_list_foreach() {
|
||||
while [ $c -le "$len" ]; do
|
||||
config_get val "${section}" "${option}_ITEM$c"
|
||||
eval "$function \"\$val\" \"\$@\""
|
||||
c="$((c + 1))"
|
||||
c="$(($c + 1))"
|
||||
done
|
||||
}
|
||||
|
||||
default_prerm() {
|
||||
local root="${IPKG_INSTROOT}"
|
||||
local pkgname="$(basename ${1%.*})"
|
||||
local ret=0
|
||||
local name
|
||||
|
||||
if [ -f "$root/usr/lib/opkg/info/${pkgname}.prerm-pkg" ]; then
|
||||
( . "$root/usr/lib/opkg/info/${pkgname}.prerm-pkg" )
|
||||
ret=$?
|
||||
fi
|
||||
name=$(basename ${1%.*})
|
||||
[ -f "$root/usr/lib/opkg/info/${name}.prerm-pkg" ] && . "$root/usr/lib/opkg/info/${name}.prerm-pkg"
|
||||
|
||||
local shell="$(command -v bash)"
|
||||
for i in $(grep -s "^/etc/init.d/" "$root/usr/lib/opkg/info/${pkgname}.list"); do
|
||||
local shell="$(which bash)"
|
||||
for i in `cat "$root/usr/lib/opkg/info/${name}.list" | grep "^/etc/init.d/"`; do
|
||||
if [ -n "$root" ]; then
|
||||
${shell:-/bin/sh} "$root/etc/rc.common" "$root$i" disable
|
||||
else
|
||||
if [ "$PKG_UPGRADE" != "1" ]; then
|
||||
"$i" disable
|
||||
fi
|
||||
"$i" stop
|
||||
"$i" stop || /bin/true
|
||||
fi
|
||||
done
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
add_group_and_user() {
|
||||
@@ -240,7 +208,6 @@ add_group_and_user() {
|
||||
default_postinst() {
|
||||
local root="${IPKG_INSTROOT}"
|
||||
local pkgname="$(basename ${1%.*})"
|
||||
local filelist="/usr/lib/opkg/info/${pkgname}.list"
|
||||
local ret=0
|
||||
|
||||
add_group_and_user "${pkgname}"
|
||||
@@ -255,28 +222,24 @@ default_postinst() {
|
||||
rm -fR $root/rootfs-overlay/
|
||||
fi
|
||||
|
||||
if [ -z "$root" ]; then
|
||||
if grep -m1 -q -s "^/etc/modules.d/" "$filelist"; then
|
||||
kmodloader
|
||||
fi
|
||||
|
||||
if grep -m1 -q -s "^/etc/sysctl.d/" "$filelist"; then
|
||||
/etc/init.d/sysctl restart
|
||||
fi
|
||||
|
||||
if grep -m1 -q -s "^/etc/uci-defaults/" "$filelist"; then
|
||||
[ -d /tmp/.uci ] || mkdir -p /tmp/.uci
|
||||
for i in $(grep -s "^/etc/uci-defaults/" "$filelist"); do
|
||||
( [ -f "$i" ] && cd "$(dirname $i)" && . "$i" ) && rm -f "$i"
|
||||
done
|
||||
uci commit
|
||||
fi
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
if [ -z "$root" ] && grep -q -s "^/etc/modules.d/" "/usr/lib/opkg/info/${pkgname}.list"; then
|
||||
kmodloader
|
||||
fi
|
||||
|
||||
local shell="$(command -v bash)"
|
||||
for i in $(grep -s "^/etc/init.d/" "$root$filelist"); do
|
||||
if [ -z "$root" ] && grep -q -s "^/etc/uci-defaults/" "/usr/lib/opkg/info/${pkgname}.list"; then
|
||||
. /lib/functions/system.sh
|
||||
[ -d /tmp/.uci ] || mkdir -p /tmp/.uci
|
||||
for i in $(sed -ne 's!^/etc/uci-defaults/!!p' "/usr/lib/opkg/info/${pkgname}.list"); do (
|
||||
cd /etc/uci-defaults
|
||||
[ -f "$i" ] && . ./"$i" && rm -f "$i"
|
||||
) done
|
||||
uci commit
|
||||
fi
|
||||
|
||||
[ -n "$root" ] || rm -f /tmp/luci-indexcache 2>/dev/null
|
||||
|
||||
local shell="$(which bash)"
|
||||
for i in $(grep -s "^/etc/init.d/" "$root/usr/lib/opkg/info/${pkgname}.list"); do
|
||||
if [ -n "$root" ]; then
|
||||
${shell:-/bin/sh} "$root/etc/rc.common" "$root$i" enable
|
||||
else
|
||||
@@ -334,10 +297,10 @@ group_add_next() {
|
||||
echo $gid
|
||||
return
|
||||
fi
|
||||
gids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/group)
|
||||
gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
|
||||
gid=65536
|
||||
while echo "$gids" | grep -q "^$gid$"; do
|
||||
gid=$((gid + 1))
|
||||
while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do
|
||||
gid=$((gid + 1))
|
||||
done
|
||||
group_add $1 $gid
|
||||
echo $gid
|
||||
@@ -346,8 +309,8 @@ group_add_next() {
|
||||
group_add_user() {
|
||||
local grp delim=","
|
||||
grp=$(grep -s "^${1}:" ${IPKG_INSTROOT}/etc/group)
|
||||
echo "$grp" | cut -d: -f4 | grep -q $2 && return
|
||||
echo "$grp" | grep -q ":$" && delim=""
|
||||
[ -z "$(echo $grp | cut -d: -f4 | grep $2)" ] || return
|
||||
[ -n "$(echo $grp | grep ":$")" ] && delim=""
|
||||
[ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd
|
||||
sed -i "s/$grp/$grp$delim$2/g" ${IPKG_INSTROOT}/etc/group
|
||||
[ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd
|
||||
@@ -362,10 +325,10 @@ user_add() {
|
||||
local shell="${6:-/bin/false}"
|
||||
local rc
|
||||
[ -z "$uid" ] && {
|
||||
uids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/passwd)
|
||||
uids=$(cat ${IPKG_INSTROOT}/etc/passwd | cut -d: -f3)
|
||||
uid=65536
|
||||
while echo "$uids" | grep -q "^$uid$"; do
|
||||
uid=$((uid + 1))
|
||||
while [ -n "$(echo "$uids" | grep "^$uid$")" ] ; do
|
||||
uid=$((uid + 1))
|
||||
done
|
||||
}
|
||||
[ -z "$gid" ] && gid=$uid
|
||||
@@ -384,4 +347,4 @@ board_name() {
|
||||
[ -e /tmp/sysinfo/board_name ] && cat /tmp/sysinfo/board_name || echo "generic"
|
||||
}
|
||||
|
||||
[ -z "$IPKG_INSTROOT" ] && [ -f /lib/config/uci.sh ] && . /lib/config/uci.sh
|
||||
[ -z "$IPKG_INSTROOT" -a -f /lib/config/uci.sh ] && . /lib/config/uci.sh
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user