So, i am running Frank’s image bpi-r4_bookworm_6.9.0-main.img.gz. I got a MT7925 wifi 7 card. But this kernel doesn’t have mt7925 modules. So, i need to compile a new kernel with new config.
Is it really necessary to build a full system image just to change kernels? Can’t i just build and boot a new kernel on the current image i am using?
Assuming, i can just change the kernel, what are the steps for doing so and activating the new card? Do i need to edit device files or something like that?
No we do not have rss/lro running on mainline code
You can use on of my debian/ubuntu images and use build.sh to install the kernel,just add fit= to uEnv.txt like shown when install option was choosen (build.sh shows the full line and asks you to open the file)
Ok, i managed to create all the necessary dirs, mount the card* so the build.sh finds it. Also added sudo in line 449 of build.conf, so cp doesn’t fail with perrmission denied.
However:
uImage:
/media/user/BPI-BOOT/6.10.0-rc1.itb
syncing sd-card...this will take a while
run 'watch -n 1 grep -e Dirty: /proc/meminfo' to show progress
using bootfile /media/user/BPI-BOOT//uEnv.txt
by default this kernel-/dtb-file will be loaded (kernel-var in uEnv.txt):
kernel:
dtb:
change needed to boot new kernel (kernel=6.10.0-rc1/fit=6.10.0-rc1.itb)!
open boot config file (uEnv/extlinux.conf) [yn]? y
edit uEnv.txt on sd-card
file /media/user/BPI-BOOT//uEnv.txt not writable by user using sudo...
Then it opens the empty file with vi, but i have no idea what to write there.
.|
* For the uninformed:
mkdir -p /media/user/BPI-BOOT
mkdir -p /media/user/BPI-ROOT
chown -R user:user /media/user/
mount /dev/mmcblk0p5 /media/user/BPI-BOOT
mount /dev/mmcblk0p6 /media/user/BPI-ROOT
Pardon my ignorance, so the file should only have this on it?
kernel=6.10.0-rc1/fit=6.10.0-rc1.itb
So, BTW, which branch do you recommend, 6.10-rc or 6.10-rsslro? rsslro contains fixes for the sfp ports, but 6.10rc might have improvements for the MT7925 wifi card, correct? If that’s true, that means i’ll have to pick which fixes i prefer.
Well, you said above that 6.10-rc does not contain rss/lro stuff for proper 10G speed. But i can live with that, for now having the wifi card working properly is priority.
Wifi card support is also on going…we had to wait for an updated firmware i’ve got last week for testing and got the be14v1 this week (not yet found time to insert it).
So do not expect too much, i’ve tested with the v0 version and got all interfaces up without running hostapd on it…much more than with public firmware from sdk.
If you already have a card or maybe someone else i can add patch and firmware to 6.10 tree for more testing…need to get/create a hostapd config for r4/be14 as next step,but also working on uboot ofupstream in limited freetime.
edit: i see that there are much patches in Mailinglist for MT7925 which not have been in 6.10…maybe in next (6.11)…
Yeah, i got a mt7925. Even tough i do plan to get the banana wifi7 card later. Maybe i’ll copy the new mt7925 files to see if it compiles with 6.10.rc.
BTW, so you’re running Debian and not openwrt like most people here. Does hostapd support wifi7 already? Or how do you plan to run wifi7?
Ok my procedure for MT7925. In case it helps someone.
Even tough with latest compiled hostapd, it is kind of unstable. Note: I had to get an adapter to get the card in the mpcie slot. https://www.aliexpress.com/item/1005006626211720.html (option A). Used some antennas lying around.
At first, it wasn’t working because of lame stuff on my part… Somehow, i touched the boot switch and changed it to all up so of course, it didn’t boot from sd
If something wrong, just ask me. I do as root. So i commented out the first lines in build.sh.
### KERNEL for installing in a sd card with an already installed image. 6.9 dango or something. The usual compilation packages needed of course.
# will take a while to fully download
git clone -b 6.10-rc https://github.com/frank-w/BPI-Router-Linux.git
cd BPI-Router-Linux
sed -i s/"board=bpi-r2"/"#board=bpi-r2"/g build.conf
sed -i s/"#board=bpi-r4"/"board=bpi-r4"/g build.conf
# with card inserted on the compilation machine
mkdir -p /media/root/BPI-BOOT
mkdir -p /media/root/BPI-ROOT
mount /dev/disk/by-label/BPI-BOOT /media/root/BPI-BOOT/
mount /dev/disk/by-label/BPI-ROOT /media/root/BPI-ROOT
./build.sh importconfig
echo -e "CONFIG_MT792x_LIB=m\nCONFIG_MT7921_COMMON=m\nCONFIG_MT7921E=m\nCONFIG_MT7925_COMMON=m\nCONFIG_MT7925E=m" >> ../build/.config
git config --global --add safe.directory $PWD
./build.sh #Choose 2 - Install in SD
# open boot config file (uEnv/extlinux.conf) [yn]? y
# write and save fit=6.10.0-rc1.itb
#### FULL IMAGE
# previous steps but then these options:
./build.sh # CHOOSE 1 - PACK
cd ..
git clone https://github.com/frank-w/BPI-Router-Images
cp SD/bpi-r4_6.10.0-rc1.tar.gz BPI-Router-Images/
cd BPI-Router-Images/
echo -e "imgfile=bpi-r4_sdmmc.img.gz\nskipkerneldownload=1\nkernelfile=bpi-r4_6.10.0-rc1.tar.gz" > sourcefiles_bpi-r4.conf
./buildimg.sh bpi-r4 bookworm
gunzip -c bpi-r4_bookworm_6.10.0-rc1.img.gz | dd bs=1M status=progress conv=notrunc,fsync of=/dev/mmcblk0
Right now, not perfect AP work, sometimes kind of unstable. But i don’t have much time available to keep testing. Ah, the sfp single mode bidi modules just arrived, will report if they work.
Yes,there are still many patches missing (pinctrl,network,dts) in mainline. These are in my 6.10-main which is also built by my ci and can then be taken by my images script when kernelversion in script is updated…but have not verified it yet.
Do you have any specific patches for the wireless meditek drivers? Maybe i can just copy the updated mt7925 files from torvalds tree to yours 6.10 to see if it compiles.
@frank-w I just fetched the 6.12-rc files from repo, added some options to the config file. Ran ./build.sh. I’m getting out of memory errors every time i try to compile the kernel. This is a different VM than the one i used before. Still, i added the necesssary compiler stuff. Any ideas? The VM has 40GB of RAM. Still throws out of memory errors.
(i also notice there isn’t a …/build directory like before.)