Context
Hi all,
Firstly, the reason I want (need) to switch to a self-compiled OpenWrt is because I seemingly need to make some kernel option changes.
I am using a DL-WRX36 and would like to get BLE working. The device doesn't have BLE, so I am using an nRF52840 dongle with appropriate firmware. I ended up getting stuck being unable to enable the dongle through hciconfig
:
root@OpenWrt:~# hciconfig
hci0: Type: Primary Bus: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 27:7 SCO MTU: 0:0
DOWN
RX bytes:254 acl:0 sco:0 events:22 errors:0
TX bytes:99 acl:0 sco:0 commands:22 errors:0
# Got this bit wrong, see first replies
root@OpenWrt:~# hciconfig hci 0 up
Warning: unknown command - "0"
Can't init device hci0: Address not available (99)
There was a surprising amount of similar issues online. But, after exhausting the fixes to most of them, I was left with only the most annoying fixes to try. This post, and a couple others, reference some options that should be enabled in the Linux kernel to get BLE mesh working. These options being:
CONFIG_CRYPTO_USER
CONFIG_CRYPTO_USER_API
CONFIG_CRYPTO_USER_API_AEAD
CONFIG_CRYPTO_USER_API_HASH
CONFIG_CRYPTO_AES
CONFIG_CRYPTO_CCM
CONFIG_CRYPTO_AEAD
CONFIG_CRYPTO_CMAC
If someone knows how to correct this issue without touching the kernel, that would be perfect.
Not so easy
Naively, I quickly went back to my machine, cloned the openwrt repository, made the changes to the kernel following these steps, compiled, and flashed to a DL-WRX36 router (I thankfully have 2 to play around with).
I quickly realised I couldn't install kernel modules using opkg
like I used to. I am now having issues getting these 'baked' into the image I compile.
Setup
Being new to OpenWrt, making changes to the image and compiling it is not the smooth process I would like it to be. I am having a few issues finding what I need to do to get my desired image.
Here are the changes I have made to a freshly cloned repository:
- Move to tag v23.5.02
make menuconfig
to select target, subtarget, etc../scripts/feeds update
- Edit
target/linux/ipq807/config-5.15
to include listed kernel options
Here is where I first tried to compile the image, only to later find out about kmod
requirements. Coming back, I realise I need to now select all of my required kmod
s in make menuconfig
- but they are not there!
Here is a list of kmod
packages from my old system that I would like to try include with my new one (some are probably redundant from testing):
kmod-bluetooth kmod-nf-ipt6
kmod-crypto-ecb kmod-nf-nat6
kmod-crypto-ecdh kmod-nft-compat
kmod-crypto-kpp kmod-nft-compat
kmod-fs-vfat kmod-nls-cp437
kmod-hid kmod-nls-iso8859-1
kmod-input-core kmod-nls-utf8
kmod-input-evdev kmod-regmap-core
kmod-ip6tables-extra kmod-scsi-core
kmod-ip6tables kmod-tun
kmod-ipt-conntrack kmod-usb-acm
kmod-ipt-core kmod-usb-ehci
kmod-ipt-extra kmod-usb-ohci
kmod-ipt-ipset kmod-usb-storage
kmod-ipt-nat kmod-usb-uhci
kmod-ipt-nat6 kmod-usb2
kmod-nf-ipt
So, unless I am mistaken, my problem is with my feeds. If the kmod
packages are not appearing, then I simply need to include the feed(s) that contain them. But where are they?
It didn't help looking at /etc/opkg/distfeeds.conf
in the old system, since these are all compiled .ipk
s, when I need an appropriate git repository.
I played around a bit with branches and commits, but ultimately my feeds.conf
does not differ from feeds.conf.default
. Is it expected behavior for them to not to be included in the default feeds?
# feeds.conf.default
# I am guessing the commit hashes are from when I checked out this tag?
src-git packages https://git.openwrt.org/feed/packages.git^8e3a1824645f5e73ec44c897ac0755c53fb4a1f8
src-git luci https://git.openwrt.org/project/luci.git^7739e9f5b03b830f51d53c384be4baef95054cb3
src-git routing https://git.openwrt.org/feed/routing.git^83ef3784a9092cfd0a900cc28e2ed4e13671d667
src-git telephony https://git.openwrt.org/feed/telephony.git^9746ae8f964e18f04b64fbe1956366954ff223f8
Oh, and I found some mentions of Image Builder, can this help me with my problem? This looks like a whole other system, and I would rather stick with the openwrt
repository I am familiar with - so long as my problem can be solved without too much difficultly that is.
On a similar note, how do I bake LuCi and it's kmod
dependencies into my image? Trying to install LuCi is where I found my issue with kmod
s.
Cheers
: )