Skip to content

Commit 69a807a

Browse files
Merge pull request #23 from OnionIoT/Issue-22
[Issue-22]: add i2c-tools in default build config
2 parents 136ff5f + 87e25b3 commit 69a807a

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ VERBOSE=1 # Same as -V
6666
SILENT=1 # Same as -s
6767
OPENWRT_TAG=v22.03.3 # It would check out and use the openwrt tag before the build
6868
GIT_OPENWRT="https://github.com/openwrt/openwrt" # It would use this URL to clone openwrt
69+
INCLUDE_PACKAGES_M="" # add packages in build config to be compiled as module package i.e i2c-tools libi2c
70+
INCLUDE_PACKAGES_Y="" # add packages in build config to be compiled as built-in package i.e i2c-tools libi2c
6971
```
7072

7173
## All files specific to custom dist are placed under dir `onion`

build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,14 @@ build_model_firmware() {
198198
"$OPENWRT_DIR"/scripts/feeds update -a -f
199199
"$OPENWRT_DIR"/scripts/feeds install -a -f
200200

201+
for pkg in $INCLUDE_PACKAGES_M; do
202+
echo "CONFIG_PACKAGE_${pkg}=m" >> $OPENWRT_DIR/.config
203+
done
204+
205+
for pkg in $INCLUDE_PACKAGES_Y; do
206+
echo "CONFIG_PACKAGE_${pkg}=y" >> $OPENWRT_DIR/.config
207+
done
208+
201209
do_run make -C "$OPENWRT_DIR" defconfig
202210

203211
if [ "$VERBOSE" == "1" ]; then

profile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ OEM=onion
88
DEV_CLEAN_SKIP=1
99
VERBOSE=0
1010
SILENT=0
11+
INCLUDE_PACKAGES_M="i2c-tools"
12+
INCLUDE_PACKAGES_Y=""

0 commit comments

Comments
 (0)