Skip to content

Commit

Permalink
Merge branch 'feature_devicepackages' (PR #863)
Browse files Browse the repository at this point in the history
Allows to define packages to be added / remove from the packagelist on a
per router basis. This gives a way to do something similar to OpenWrt
devicepackages, to adapt to router specific requirements.

The initial usecase is handling of ath10k-wave1 chips (#696), but also
turned out be handy for xDSL (#838) and others.
  • Loading branch information
SvenRoederer committed Jul 18, 2021
2 parents 30caf85 + b80e691 commit abd232b
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ patches/ - patches against OpenWrt / individual feeds
openwrt - patches for OpenWrt-core
packages/$(FEED) - patches for each feed used (closely relates to definitons in modules)
packagelists/ - Package Lists
profile-packages.txt - allows to specify packages on a per router basis. Allows to add and remove
packages defined by default OpenWrt list and out package list.
profiles/ - List of router profiles for each target - profile names match the OpenWrt
board definition
Makefile - Does all the stuff. Cloning and Updating OpenWrt, patching, running make
Expand Down
2 changes: 2 additions & 0 deletions configs/ath79-generic.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_generic=y
CONFIG_PACKAGE_ath10k-firmware-qca988x=m
CONFIG_PACKAGE_ath10k-firmware-qca9887=m
CONFIG_PACKAGE_ath10k-firmware-qca9888=m
CONFIG_PACKAGE_ath10k-firmware-qca988x-ct=m
CONFIG_PACKAGE_ath10k-firmware-qca9887-ct=m
CONFIG_PACKAGE_ath10k-firmware-qca9888-ct=m
1 change: 1 addition & 0 deletions configs/ath79-nand.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_nand=y
CONFIG_PACKAGE_ath10k-firmware-qca9887=m
CONFIG_PACKAGE_ath10k-firmware-qca9887-ct=m
CONFIG_PACKAGE_block-mount=m
2 changes: 2 additions & 0 deletions configs/ipq40xx-generic.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
CONFIG_TARGET_ipq40xx=y
CONFIG_TARGET_ipq40xx_generic=y
CONFIG_PACKAGE_ath10k-firmware-qca9884=m
CONFIG_PACKAGE_ath10k-firmware-qca9884-ct=m
1 change: 1 addition & 0 deletions configs/ramips-mt7621.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt7621=y
CONFIG_TARGET_ROOTFS_INITRAMFS=y
# CONFIG_PACKAGE_kmod-ath9k-htc is not set
CONFIG_PACKAGE_block-mount=m
58 changes: 58 additions & 0 deletions packagelists/profile-packages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# this file lists a profile which should get special modules installed / removed
# this will usually apply only to hardware drivers
# profiles not listed here, will get the
# * default packages based on OpenWrts device-specific choice
# * the packagelist we a currently building for
#
# Format: <boardname>:[-]package [package ...]

# ath10k Wave1 chips (AP and 802.11s in parallel with Caldera Tech drivers - Issue #696)
dlink_dir-859-a1;-kmod-ath10k-ct-smallbuffers -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
elecom_wrc-1750ghbk2-i;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
engenius_ecb1750;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
engenius_epg5000;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
engenius_ews511ap;-kmod-ath10k-ct -ath10k-firmware-qca9887-ct kmod-ath10k ath10k-firmware-qca9887
glinet_gl-ar750:-kmod-ath10k-ct -ath10k-firmware-qca9887-ct kmod-ath10k ath10k-firmware-qca9887
glinet_gl-ar750s-nor:-kmod-ath10k-ct -ath10k-firmware-qca9887-ct kmod-ath10k ath10k-firmware-qca9887
glinet_gl-ar750s-nor-nand:-kmod-ath10k-ct -ath10k-firmware-qca9887-ct kmod-ath10k ath10k-firmware-qca9887
glinet_gl-e750:-kmod-ath10k-ct -ath10k-firmware-qca9887-ct kmod-ath10k ath10k-firmware-qca9887
glinet_gl-x750;-kmod-ath10k-ct -ath10k-firmware-qca9887-ct kmod-ath10k ath10k-firmware-qca9887
iodata_wn-ac1167dgr;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
iodata_wn-ac1600dgr;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
iodata_wn-ac1600dgr2;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
netgear_r7800:kmod-ath10k -kmod-ath10k-ct ath10k-firmware-qca9984 -ath10k-firmware-qca9984-ct
nec_wg1200cr;-kmod-ath10k-ct -ath10k-firmware-qca9888-ct kmod-ath10k ath10k-firmware-qca9888
nec_wg800hp;-kmod-ath10k-ct-smallbuffers -ath10k-firmware-qca9887-ct kmod-ath10k ath10k-firmware-qca9887
ocedo_koala;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
openmesh_om5p-ac-v2;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
tplink_archer-a7-v5;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
tplink_archer-c2-v3;-kmod-ath10k-ct-smallbuffers -ath10k-firmware-qca9887-ct kmod-ath10k ath10k-firmware-qca9887
tplink_archer-c25-v1;-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9887-ct ath10k-firmware-qca9887
tplink_archer-c5-v1;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
tplink_archer-c58-v1;-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888
tplink_archer-c6-v2;-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888
tplink_archer-c60-v1;-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888
tplink_archer-c60-v2;-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888
tplink_archer-c60-v3;-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888
tplink_archer-c7-v2;-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x
tplink_archer-c7-v5;-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x
tplink_archer-d50-v1;-kmod-ath10k-ct-smallbuffers -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
tplink_eap225-outdoor-v1:-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888
tplink_re350k-v1;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
tplink_re450-v2;-kmod-ath10k-ct-smallbuffers -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
ubnt_nanobeam-ac;-kmod-ath10k-ct-smallbuffers -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
ubnt_nanostation-ac;-kmod-ath10k-ct-smallbuffers -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
ubnt_nanostation-ac-loco;-kmod-ath10k-ct-smallbuffers -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
ubnt_unifiac-lr;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
ubnt_unifiac-lite;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
ubnt_unifiac-mesh;-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x
ubnt_unifiac-mesh-pro;-kmod-ath10k-ct -ath10k-firmware-qca988x-ct kmod-ath10k ath10k-firmware-qca988x
yuncore_a770;-kmod-ath10k-ct -ath10k-firmware-qca9887-ct kmod-ath10k ath10k-firmware-qca9887
yuncore_a782;-kmod-ath10k-ct -ath10k-firmware-qca9888-ct kmod-ath10k ath10k-firmware-qca9888

# boards with mass-storage (SATA, SD-cards) will benefit from additional packages
mikrotik_routerboard-750gr3:block-mount kmod-fs-f2fs kmod-sdhci-mt7620

# boards with integrated DSL-port need additional hardware-support (see Issue #838)
avm_fritz7360sl:luci-proto-ipv6 luci-proto-ppp ppp ppp-mod-pppoe

12 changes: 11 additions & 1 deletion scripts/assemble_firmware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,22 @@ info "Extract image builder $IB_FILE"
tar xf "$IB_FILE" --strip-components=1 -C "$TEMP_DIR"

for profile in $PROFILES ; do
info "Building a profile for $profile"
info "Building an image for $profile"

# profiles can have a suffix. like 4mb devices get a smaller package list pro use case
# UBNT:4MB -> profile "UBNT" suffix "4MB"
suffix="$(echo $profile | cut -d':' -f 2)"
profile="$(echo $profile | cut -d':' -f 1)"

if [ -e "${PKGLIST_DIR}/profile-packages.txt" ] ; then
model_packages="$(grep ^$profile ${PKGLIST_DIR}/profile-packages.txt | cut -d':' -s -f 2 | tr -t '\n' ' ')"
# this is compatibility for WeimarNetz-stype definitons
if [ -z "${model_packages}" ]; then
model_packages="$(grep ^$profile ${PKGLIST_DIR}/profile-packages.txt | cut -d';' -s -f 2| tr -t '\n' ' ')"
fi
info "we include these extra packages: $model_packages"
fi

for usecase in $USECASES ; do
package_list=""
packages=""
Expand All @@ -168,6 +177,7 @@ for profile in $PROFILES ; do
info "Using package list $package_list"

packages=$(parse_pkg_list_file "${PKGLIST_DIR}/${package_list}.txt")
packages="${packages} ${model_packages}"

if [ -z "${packages}" ] ; then
info "skipping this usecase, as package list is empty"
Expand Down

0 comments on commit abd232b

Please sign in to comment.