Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ VERBOSE=1 # Same as -V
SILENT=1 # Same as -s
OPENWRT_TAG=v22.03.3 # It would check out and use the openwrt tag before the build
GIT_OPENWRT="https://github.com/openwrt/openwrt" # It would use this URL to clone openwrt
INCLUDE_PACKAGES_M="" # add packages in build config to be compiled as module package i.e i2c-tools libi2c
INCLUDE_PACKAGES_Y="" # add packages in build config to be compiled as built-in package i.e i2c-tools libi2c
```

## All files specific to custom dist are placed under dir `onion`
Expand Down
8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ build_model_firmware() {
"$OPENWRT_DIR"/scripts/feeds update -a -f
"$OPENWRT_DIR"/scripts/feeds install -a -f

for pkg in $INCLUDE_PACKAGES_M; do
echo "CONFIG_PACKAGE_${pkg}=m" >> $OPENWRT_DIR/.config
done

for pkg in $INCLUDE_PACKAGES_Y; do
echo "CONFIG_PACKAGE_${pkg}=y" >> $OPENWRT_DIR/.config
done

do_run make -C "$OPENWRT_DIR" defconfig

if [ "$VERBOSE" == "1" ]; then
Expand Down
2 changes: 2 additions & 0 deletions profile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ OEM=onion
DEV_CLEAN_SKIP=1
VERBOSE=0
SILENT=0
INCLUDE_PACKAGES_M="i2c-tools"
INCLUDE_PACKAGES_Y=""