Kernel Headers (rooter)

"sudo make" is always wrong.
OpenWrt build system will fail with that.

1 Like

Thanks, I learned that the hard way... :slight_smile:

In the "Makefile" of the driver is this section:

ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
SUBARCH := $(shell uname -m | sed -e "s/i.86/i386/; s/ppc64le/powerpc/; s/ppc/powerpc/; s/armv.l/arm/; s/aarch64/arm64/;")
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/toolchain/
KVER  := $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
STAGINGMODDIR := /lib/modules/$(KVER)/kernel/drivers/staging
endif

According to the description in the "CROSS_COMPILE ?=" part I should enter the "toolchain" directory, which I did.
When I start “make” it goes to the directory, then changes to the “gcc” directory where I get a permission denied, but I don't understand why. Everything belongs so the same user, the permissions are all set automatically...

Anyone an Idea?

Thanks

Other Question…
I have an USB Wifi with a RTL8812AU chip. I have compiled the image with that driver (it’s included in OpenWrt), when I go to Software it tells me the driver is Installed.

As you can see in the Image above it gets recognized but it’s not active and I don’t know why.
If I could get this to work, I don’t have to cross compile.
What could I do to activate this Wifi?

Thanks

I found out that there is an error in the driver:

The is a patch but where do I have to put it?
I don't get it...

Anyone an idea?

Thanks

Once you launch the compilation using root or sudo, the ownership and permissions will all be messed, and it's better to start over again from scratch.

I have to copy this:

First manually copy compat-wireless "Module.symvers" located in build_dir/target.../linux-.../compat-wireless into the folder "staging_dir/target.../usr/include/mac80211/Module.symvers" as to allow proper linking

but I cant find the compat-wireless directory..

Anyone an idea?

Thanks

Well, that didn't work out at all....
Now the Wifi Stick gets recognized nut once but twice and none of them is working...
What did I do wrong?
Where is my mistake?

Trying to make an image with the newest sources. For fun and because I can't get the drivers in the old version to work.
Is this something I can fix?

. /home/lordrayden/OpenWrtnew/Rooternew/rooternew/include/shell.sh; xzcat /home/lordrayden/OpenWrtnew/Rooternew/rooternew/dl/uhttpd-2020-10-04-14a3cb42.tar.xz | tar -C /home/lordrayden/OpenWrtnew/Rooternew/rooternew/build_dir/target-x86_64_musl/uhttpd-2020-10-04-14a3cb42/.. -xf -
[ ! -d ./src/ ] || cp -fpR ./src/. /home/lordrayden/OpenWrtnew/Rooternew/rooternew/build_dir/target-x86_64_musl/uhttpd-2020-10-04-14a3cb42

Applying ./patches/900-post.patch using plaintext: 
patching file client.c
Hunk #1 FAILED at 194.
1 out of 1 hunk FAILED -- saving rejects to file client.c.rej
Patch failed!  Please fix ./patches/900-post.patch!
make[3]: *** [Makefile:119: /home/lordrayden/OpenWrtnew/Rooternew/rooternew/build_dir/target-x86_64_musl/uhttpd-2020-10-04-14a3cb42/.prepared_4e48d66191a0e5de833e36542d4419ee_6664517399ebbbc92a37c5bb081b5c53] Error 1
make[3]: Leaving directory '/home/lordrayden/OpenWrtnew/Rooternew/rooternew/package/network/services/uhttpd'
time: package/network/services/uhttpd/compile#0.41#0.13#0.55
make[2]: *** [package/Makefile:113: package/network/services/uhttpd/compile] Error 2
make[2]: Leaving directory '/home/lordrayden/OpenWrtnew/Rooternew/rooternew'
make[1]: *** [package/Makefile:107: /home/lordrayden/OpenWrtnew/Rooternew/rooternew/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/lordrayden/OpenWrtnew/Rooternew/rooternew'
make: *** [/home/lordrayden/OpenWrtnew/Rooternew/rooternew/include/toplevel.mk:236: world] Fehler 2

What is interesting I didn’t select "uhttpd" I want “luci” with "nginx" but "uhttpd" gets selected automatically.

Thanks

What am I not getting here?
As I said above, I am trying to build pure OpenWrt with the newest sources. After a few errors I managed to build an image or I almost managed to build an image.
I get the following error:

dd if=/home/lordrayden/OpenWrtnew/Rooternew/openwrt/build_dir/target-x86_64_musl/linux-x86_64/root.ext4 >> /home/lordrayden/OpenWrtnew/Rooternew/openwrt/build_dir/target-x86_64_musl/linux-x86_64/tmp/openwrt-x86-64-generic-ext4-rootfs.img.gz
204800000+0 records in
204800000+0 records out
104857600000 bytes (105 GB, 98 GiB) copied, 753.932 s, 139 MB/s
dd if=/home/lordrayden/OpenWrtnew/Rooternew/openwrt/build_dir/target-x86_64_musl/linux-x86_64/tmp/openwrt-x86-64-generic-ext4-rootfs.img.gz of=/home/lordrayden/OpenWrtnew/Rooternew/openwrt/build_dir/target-x86_64_musl/linux-x86_64/tmp/openwrt-x86-64-generic-ext4-rootfs.img.gz.new bs=104857600000 conv=sync
dd: memory exhausted by input buffer of size 104857600000 bytes (98 GiB)
make[5]: *** [Makefile:153: /home/lordrayden/OpenWrtnew/Rooternew/openwrt/build_dir/target-x86_64_musl/linux-x86_64/tmp/openwrt-x86-64-generic-ext4-rootfs.img.gz] Error 1
make[5]: Leaving directory '/home/lordrayden/OpenWrtnew/Rooternew/openwrt/target/linux/x86/image'
make[4]: *** [Makefile:24: install] Error 2
make[4]: Leaving directory '/home/lordrayden/OpenWrtnew/Rooternew/openwrt/target/linux/x86'
make[3]: *** [Makefile:13: install] Error 2
make[3]: Leaving directory '/home/lordrayden/OpenWrtnew/Rooternew/openwrt/target/linux'
time: target/linux/install#244.38#493.71#916.88
make[2]: *** [target/Makefile:25: target/linux/install] Error 2
make[2]: Leaving directory '/home/lordrayden/OpenWrtnew/Rooternew/openwrt'
make[1]: *** [target/Makefile:19: /home/lordrayden/OpenWrtnew/Rooternew/openwrt/staging_dir/target-x86_64_musl/stamp/.target_install] Error 2
make[1]: Leaving directory '/home/lordrayden/OpenWrtnew/Rooternew/openwrt'
make: *** [/home/lordrayden/OpenWrtnew/Rooternew/openwrt/include/toplevel.mk:236: world] Fehler 2

I don't get it, the old version builds without this problem and it is the same size.
I increased RAM on the virtual machine to 24G (I can't give it more because I only have 32G in my host). I also increased the SWAP File to 20G and the virtual harddisk to 400G which of 200G are free.
I still get this error.
What do I have to do to fix that?

Thank You

Something seriously wrong, if you build tries to copy 98 GB data into the image.

Perhaps you should first practice a bit with the vanilla plain OpenWrt, without any additional patches. Then maybe add just the one wifi driver, without anythign else.

98GB is about right, I think.
In "make menuconfig" you can set the size of the two partitions, one of my partitions is 100GB, I am building for a PC and setting the partition to the right size from the beginning saves me the trouble of resizing it afterwards.

What I don’t get is why the old 19 build does everything without problems but the new build has a problem, in both build the second partition is 100GB...

Hmmm, very interesting.
I had to give the SWAP File 150G, the hard disk 700G, an 24G RAM to run the image creation. After about 10 hours I stopped it (talking just about the image creation, compiling was done hours ago).
Then I had to go to “make menuconfig” and shrink my second partition to 10G. After that, the image creation was successful. Now I have to get it to my router PC, increase the partition size and test it.
I still find it interesting that version 19 has no problems like that, it just creates the 100G image in a few minutes (exactly the same setting in “make menuconfig”, I checked)… I’m talking pure OpenWrt, not Rooter.

OK, I officially give up.
In the new version I still don’t have working drivers, I can’t cross compile them because they just won’t compile.
What would be the best Wifi PCIE Card or Wifi USB Stick to work with Openwrt out of the box (no compiling just “plug & play”).
I need two of them. Preferably one with antennas for wider range and one just a usb stick.
Thanks

For hardware recommendations please open a new topic in the Hardware Questions and Recommendations category of this forum.

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