Configure 802.11 on build system

Hello all,
I am building the firmware from the source. I dont want to use image builder.
I followed this guide

I have added my custom config files /files/etc/config/wireless and /files/etc/config/network
How should i write the configuration inside these files?

For example i know the configuration of mesh. should I just add the below content inside
/files/etc/config/wireless file or do i have to follow some other format.

config wifi-iface 'mesh'
        option device 'radio0'
        option mode 'mesh'
        option mesh_id 'RTLS'
        option encryption 'none'
        option mesh_fwding '1'
        option ifname 'mesh0'
        option mesh_rssi_threshold '0

Also I have to add packages like wpad-mesh-openssl and remove wpad-mini,wpad-basic. How do I do that ?
I could not find options on make menuconfig to remove or add packages.

I am very new to this field. sorry if my doubts sounds silly.

Please help. Thanks in advance.

Did you read the help at the top of the menuconfig screen? "Y" includes packages (those have a "*" next to them), "N" excludes, "M" should build it as a package but you would have to install it as a separate step. wpad-* packages are in the Network section.

1 Like

I've already answered your question in the thread you started two days ago

Why not? Most of the time, you don't need to rebuild everything from source, but can use the pre-built sources - and the ImageBuilder can even build packages for you if needed (e.g. you include a repo of 3rd party packages that are source only).

You shouldn't. Those files will overwrite the defaults, which can cause a number of issues with your final image. You can quite possibly remove sections due to an unforeseen override that are crucial for WiFi/networking.

Instead, you should use the already recommended uci-defaults approach, which allows you to create a "run on first boot" script that is built into your image.

Again, ImageBuilder is your friend. Specifically, if you want to remove wpad-mini and wpad-basic, and add wpad-mesh-openssl instead, you'd do the following:

make PROFILE="your_router-profile" PACKAGES="-wpad-mini -wpad-basic +wpad-mesh-openssl"

menuconfig makes things easier AND harder at the same time. On one hand it gives you package descriptions, categorisation, et cetera... On the other hand, it makes "simple" things like excluding a package a bit more cumbersome, since you have to know the category and subcategory of the package, and so on.

Again, just do it with ImageBuilder and uci-defaults scripts. Latter are literally just regular shell scripts that execute commands as if you were accessing the router through SSH/Telnet.

1 Like

Remember, you can use / inside of menuconfig to do a case-insensitive search, which will show you where it's at in the menuconfig (and the deps) :slight_smile:

Thank you so much for your help.
I am getting errors while adding the packages

Collected errors:
 * opkg_install_cmd: Cannot install package +luci.
 * opkg_install_cmd: Cannot install package +luci-app-wireguard.
make[2]: *** [Makefile:158: package_install] Error 255
make[1]: *** [Makefile:118: _call_image] Error 2
make: *** [Makefile:208: image] Error 2

I have no clue why i am getting these errors. I am getting similar errors for all packages

Try without the + signs, I've had similar happen before, and can't say why it is happening.

So again, the command will be:

make PROFILE="your_router-profile" PACKAGES="-wpad-mini -wpad-basic wpad-mesh-openssl luci luci-app-wireguard"

This worked but ended up getting different error

check_conflicts_for: The following packages conflict with wpad-basic-wolfssl:
 * check_conflicts_for: 	wpad-mesh-openssl * 
 * opkg_install_cmd: Cannot install package wpad-basic-wolfssl.
make[2]: *** [Makefile:158: package_install] Error 255
make[1]: *** [Makefile:118: _call_image] Error 2
make: *** [Makefile:208: image] Error 2

How do i remove these conflicts

Also I want to include ipref package. I am getting error for that aswell.

Collected errors:
 * opkg_install_cmd: Cannot install package ipref.
make[2]: *** [Makefile:158: package_install] Error 255
make[1]: *** [Makefile:118: _call_image] Error 2
make: *** [Makefile:208: image] Error 2

Please help:

To remove conflicts you need to remove the dependency.

Removing a dependency is done by adding a - before the package name in the PACKAGES parameter of the command. E.g. when you write PACKAGES="-wpad-mini -wpad-basic wpad-mesh-openssl", you're telling the build system to remove wpad-mini and wpad-basic and use wpad-mesh-openssl instead.

Same applies here. You're adding wpad-mesh-openssl, so you need to remove wpad-basic-wolfssl.

As for the iperf stuff... Try to not make a typo in the package name, ipref does not exist, but iperf does :wink:

Stupid me. Thank you so much. Installed all the packages I wanted

but why do i keep getting error 2 for most of the things.
make image FILES=files/
even for this i keep getting

[mktplinkfw2] rootfs offset aligned to 0x2091636
[mktplinkfw2] *** error: images are too big
make[3]: *** [Makefile:232: /home/apoorvamanjunath/Downloads/openwrt-imagebuilder-ramips-mt76x8.Linux-x86_64/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-tplink_tl-wr840n-v5-squashfs-sysupgrade.bin] Error 255
make[2]: *** [Makefile:172: build_image] Error 2
make[1]: *** [Makefile:120: _call_image] Error 2
make: *** [Makefile:208: image] Error 2

As the error message states, your image is too big - you're including too many packages, most likely. The TL-WR840N v5 only has a 4MB flash - it's very restrictive for OpenWrt usage, and most devices using this size of flash have been dropped from support.

1 Like

I am using omega2+ device. I dont think there should be any problem with respect to this board.

Thank you so much for your help. The firmware if built nicely and working properly.
It was a great help from you guys. :grinning:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.