Kernel Headers (rooter)

Hi,

The first driver I need can't be compiled, I don't know why:

but it can be installed like this:

sudo apt install rtl8812au-dkms

The second driver compiles easily

Just tried to select "generic" as subtarget but also no luck. I get this error:

i486-openwrt-linux-musl-gcc: error: elf32: No such file or directory
i486-openwrt-linux-musl-gcc: error: unrecognized command line option '-f'
Makefile:281: recipe for target 'common/x86/cpu-a.o' failed
make[4]: *** [common/x86/cpu-a.o] Error 1
make[4]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-i386_pentium4_musl/x264-snapshot-20190324-2245'
Makefile:83: recipe for target '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-i386_pentium4_musl/x264-snapshot-20190324-2245/.built' failed
make[3]: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-i386_pentium4_musl/x264-snapshot-20190324-2245/.built] Error 2
make[3]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/feeds/packages/libs/libx264'
time: package/feeds/packages/libx264/compile#77.20#2.14#81.39
package/Makefile:111: recipe for target 'package/feeds/packages/libx264/compile' failed
make[2]: *** [package/feeds/packages/libx264/compile] Error 2
make[2]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
package/Makefile:107: recipe for target '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-i386_pentium4_musl/stamp/.package_compile' failed
make[1]: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-i386_pentium4_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/include/toplevel.mk:225: die Regel für Ziel „world“ scheiterte
make: *** [world] Fehler 2

The "generic" build was fresh.

Is your "rooter-master" patch set compatible with 19.07.2 ??
The patches are likely tailored to a certain version.

I have no experience with "rooter" but sounds suspicisous that rooter-master" would be targeting semi-ancient 19.07.2

You might receive better help from the rooter site, as your problems likely stem from their patches...

1 Like

Hi,

according to the description it is compatible.

As far as I understand the rooter-master patch contains the “Rooter” packages. If I don’t select them in “make menuconfig” I get the original OpenWrt build.

The whole build system is OpenWrt and as far as I understand I am not getting an error from Rooter, but I am not sure, I am not a developer.

I will try to make a clean OpenWrt build without Rooter…

Just changed to Ubuntu 18.04 from Mint 18 and tried a clean build. This time I get other errors.

Is it possible that active work on github causes this? I didn’t change anything in the fresh build on Ubuntu but I still get other errors. Yesterday I got the same errors as on Linux Mint.

907-2/tmp/dl/vpnc-0.5.3.r550.tar.gz && mv /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/tmp/dl/vpnc-0.5.3.r550.tar.gz /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/dl/ && rm -rf vpnc-0.5.3.r550;     '
Checking out files from the svn repository...
/bin/sh: 1: svn: not found
/bin/sh: 1: svn: not found
Makefile:94: recipe for target '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/dl/vpnc-0.5.3.r550.tar.gz' failed
make[3]: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/dl/vpnc-0.5.3.r550.tar.gz] Error 127
make[3]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/feeds/packages/net/vpnc'
time: package/feeds/packages/vpnc/compile#0.14#0.02#0.20
package/Makefile:111: recipe for target 'package/feeds/packages/vpnc/compile' failed
make[2]: *** [package/feeds/packages/vpnc/compile] Error 2
make[2]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
package/Makefile:107: recipe for target '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/stamp/.package_compile' failed
make[1]: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/include/toplevel.mk:225: recipe for target 'world' failed
make: *** [world] Error 2

Can someone please look at the build script below, can this cause the errors? This is the only change between the Rooter and the OpenWrt build. With Rooter I have a script, with OpenWrt I start “make”.

#!/bin/sh



# automatic build maker



#build version

#

# Date of the build

#



DATE="2020-01-12"



NAME="GoldenOrb_"

CODE=$NAME$DATE

rm -rf ./files

mkdir -p ./files/etc



echo 'CODENAME="'"$CODE"'"' > ./files/etc/codename



echo "                            <model>" > ./files/etc/header_msg

echo "/img/header.png" >> ./files/etc/header_msg

echo "/img/rosy.jpg" >> ./files/etc/header_msg



BASE="openwrt-"

BASEO="openwrt-ar71xx-generic-tl-"

BASEQ="openwrt-ar71xx-generic-"

ENDO="-squashfs-factory"

ENDU="-squashfs-sysupgrade"



TYP="-GO"

END=$TYP$DATE



#

# change name of configuration file to match the desired router

#



#cp ./configfiles/.config_name ./.config



DNS=$(cat "./.config" | grep "CONFIG_PACKAGE_dnsmasq-full=y")

if [ ! -z $DNS ]; then

	sed -i -e 's/CONFIG_PACKAGE_dnsmasq=y/# CONFIG_PACKAGE_dnsmasq is not set/g' ./.config

fi

WPAD=$(cat "./.config" | grep "CONFIG_PACKAGE_wpad-basic=y")

if [ ! -z $WPAD ]; then

	sed -i -e 's/CONFIG_PACKAGE_wpad-basic=y/# CONFIG_PACKAGE_wpad-basic is not set/g' ./.config

fi

WPAD=$(cat "./.config" | grep "CONFIG_PACKAGE_wpad=y")

if [ ! -z $WPAD ]; then

	sed -i -e 's/CONFIG_PACKAGE_wpad-mini=y/# CONFIG_PACKAGE_wpad-mini is not set/g' ./.config

fi



make V=sc



#

# this part of the script does the copying, renaming and zipping of the image file(s)

#

# copy the section from imagecopy for your router

#


Thanks

P.S. The only reason for me to use Rooter is because it automatically detects and configures almost every USB LTE Modem.

/bin/sh: 1: svn: not found
/bin/sh: 1: svn: not found

Installed Subversion..
Trying again

configure: error: no acceptable Java compiler found in $PATH
Makefile:94: recipe for target '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/classpath-0.99/.configured_68b329da9893e34099c7d8ad5cb9c940' failed

Installing Java:
sudo apt-get install openjdk-8-jdk

Trying again

Now I'm getting confused...

I get this error:

configure: WARNING: I have to compile Test.class from scratch
checking if jamvm works... configure: error: The Java VM jamvm failed (see config.log, check the CLASSPATH?)
Makefile:94: recipe for target '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/classpath-0.99/.configured_68b329da9893e34099c7d8ad5cb9c940' failed
make[3]: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/classpath-0.99/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1
make[3]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/feeds/packages/libs/classpath'
time: package/feeds/packages/classpath/compile#6.64#1.71#11.64
package/Makefile:111: recipe for target 'package/feeds/packages/classpath/compile' failed
make[2]: *** [package/feeds/packages/classpath/compile] Error 2
make[2]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
package/Makefile:107: recipe for target '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/stamp/.package_compile' failed
make[1]: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/include/toplevel.mk:225: recipe for target 'world' failed
make: *** [world] Error 2

This confuses me a little, in "make menuconfig" I deselected java, it's not on "M" it's deselected but still I need Java to compile?

Everything I can find about "CLASSPATH" is that it's outdated, no one uses it anymore and that I should not set a "CLASSPATH".

Problem is, I have to set it to fix the error but how and where and to what directory?
I have added "export CLASSPATH=/home/lordrayden/java" to "etc/enviroment" but no luck, then I added the same line in ".bashrc" and still no luck. That means either that I have the wrong directory or I am adding it in the wrong place.

Someone an idea?

Thanks

P.S. echo ${CLASSPATH} returns the directory I added and the directory exists…

There is something wrong...
java is not needed for building the normal OpenWrt, and the "classpath" package has actually been removed from master by https://github.com/openwrt/packages/commit/27f871473d38e2ab9ce987c4fcdeb69947b8a0c0 as it was broken for a long time.
(But I have no idea about rooter and its requirements)

There is no "active work" regarding the stable 19.0 branch.

Ps.
I just built normal OpenWrt 19.07.x for my old WNDR3700v2. Build worked quite normally in Ubuntu 20.04.
OpenWrt 19.07-SNAPSHOT r11214-f4286d7bc2

The first driver, rtl8812au, is available in the OpenWrt package database with the name rtl8812au-ct. It can be selected for building from source under "Kernel Modules > Wireless Drivers".

The second driver, I did not have much success building against the latest snapshot:

output
$ make KSRC=../openwrt_org/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.67 -j`nproc`      
make ARCH=x86_64 CROSS_COMPILE= -C ../openwrt_org/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.67 M=/home/jordan/code/rtl8188eus  modules
make[1]: Entering directory '/home/jordan/code/openwrt_org/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.67'
  CC [M]  /home/jordan/code/rtl8188eus/core/rtw_cmd.o                                                    
  CC [M]  /home/jordan/code/rtl8188eus/core/rtw_security.o                                               
  CC [M]  /home/jordan/code/rtl8188eus/core/rtw_debug.o                                                  
  CC [M]  /home/jordan/code/rtl8188eus/core/rtw_io.o
...
  LD [M]  /home/jordan/code/rtl8188eus/8188eu.o
  Building modules, stage 2.
  MODPOST 1 modules                                 
ERROR: "cfg80211_mgmt_tx_status" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "wiphy_apply_custom_regulatory" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "ieee80211_frequency_to_channel" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_rx_mgmt" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "__cfg80211_alloc_reply_skb" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_new_sta" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_inform_bss_frame_data" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "ieee80211_get_channel" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_unlink_bss" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_connect_done" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_put_bss" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_roamed" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_scan_done" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_ibss_joined" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_michael_mic_failure" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_disconnected" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "__cfg80211_send_event_skb" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_get_bss" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "wiphy_new_nm" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "wiphy_free" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_ready_on_channel" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_ch_switch_notify" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "wiphy_unregister" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_del_sta_sinfo" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_vendor_cmd_reply" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_remain_on_channel_expired" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "wiphy_register" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "__cfg80211_alloc_event_skb" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make[1]: *** [Makefile:1642: modules] Error 2
make[1]: Leaving directory '/home/jordan/code/openwrt_org/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.67'
make: *** [Makefile:2059: modules] Error 2

It seems that not all symbols are being exported when building the kernel. I checked and these symbols are indeed missing from Module.symvers after building OpenWrt despite having selected kmod-cfg80211 for building.

The module compiles fine against my local kernel (5.8.10-arch1-1). I don't know enough to keep debugging this, sorry.

Thank you for trying, I will look into this.
Apparently, I misunderstood the "cross compiling"
Starting from scratch with ubuntu 20…

Can someone please tell me how I can apply the patch at the bottom of this Page:

Just by typing patch filename.patch doesn’t seem to work and I don’t know the original filename...

Thank You

Assuming you've put the patchfile in your build-root:

patch -i <patchfile.patch>

HI,

I started over with Ubuntu 20. I managed to det rid of CLASSPATH but now I get this error:

make[7]: Entering directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/dnsdist-1.3.3/ext/yahttp/yahttp'
  CXX      reqresp.lo
libtool: Version mismatch error.  This is libtool 2.4.6, but the
libtool: definition of this LT_INIT comes from libtool 2.4.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6
libtool: and run autoconf again.
make[7]: *** [Makefile:479: reqresp.lo] Error 63
make[7]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/dnsdist-1.3.3/ext/yahttp/yahttp'
make[6]: *** [Makefile:433: all-recursive] Error 1
make[6]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/dnsdist-1.3.3/ext/yahttp'
make[5]: *** [Makefile:1251: all-recursive] Error 1
make[5]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/dnsdist-1.3.3'
make[4]: *** [Makefile:923: all] Error 2
make[4]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/dnsdist-1.3.3'
make[3]: *** [Makefile:93: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/dnsdist-1.3.3/.built] Error 2
make[3]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/feeds/packages/net/dnsdist'
time: package/feeds/packages/dnsdist/compile#18.74#4.37#23.77
make[2]: *** [package/Makefile:113: package/feeds/packages/dnsdist/compile] Error 2
make[2]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
make[1]: *** [package/Makefile:107: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
make: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/include/toplevel.mk:227: world] Fehler 2

Is there a way to downgrade libtool or to skip the version check?

Thank You

Your problem happens on packages not in OpenWrt. Please ask for support in the rooters community, this is the wrong place.

Finally!!!
After 48 hours of trial and error I finally did it. I have a working image.
The problem was/is that this is an “old” version of OpenWrt so some stuff can’t compile anymore. I had to deselect some stuff, but the Image is working.
Now I have a working build environment. When I do a new build do I have to start over or can I just change stuff in this environment and start the build script? If I have to start over can I take the “.config” file from this environment?
Now I have to look into the driver stuff because none of my drivers are working. I completely misunderstood the “cross compiling” …
Thanks

LordRayden

Do I really have to start fresh every time I change something?
"make" stops and tells me to start "make distclean" but that command deletes too much.
Is there another way?

Thanks

"distclean" is too much.
"dirclean" would just clear the toolchain and build results but would not remove download sources and config.

With normal openWrt, "make clean" is usually enough and "make dirclean" is needed only when there are complex changes to the toolchain. You never need "make distclean".

But again, we have no idea what changes the "rooter" patches have done to the build system, so you should ask help from the rooter community.

Thank you, I will try "make clean" next.

The changes from Rooter are not a Problem.
Sorry, I have to ask here because the "Rooter" community keeps ignoring my questions.

Thank you very much

Is there a way to manually "sync" make?
When I edit the ".config" file and make changes I get an error that my configuration is out of sync.

make defconfig
( or make menuconfig & save)

Thank You.

I know this is not the right forum for this question but maybe someone had the problem while cross compiling and can help me.

I am trying to cross compile a TP-LINK driver and get the following error:

make ARCH=x86_64 CROSS_COMPILE=/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/toolchain/ -C /lib/modules/5.4.0-48-generic/build M=/home/lordrayden/OpenWrt/rtl8188eus-5.3.9/rtl8188eus-5.3.9  modules
make[1]: Verzeichnis „/usr/src/linux-headers-5.4.0-48-generic“ wird betreten
arch/x86/Makefile:147: CONFIG_X86_X32 enabled but no binutils support
make[1]: execvp: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/toolchain/gcc: Keine Berechtigung
/bin/sh: 1: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/toolchain/gcc: Permission denied
(standard_in) 1: syntax error
  CC [M]  /home/lordrayden/OpenWrt/rtl8188eus-5.3.9/rtl8188eus-5.3.9/core/rtw_cmd.o
/bin/sh: 1: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/toolchain/gcc: Permission denied
make[2]: *** [scripts/Makefile.build:275: /home/lordrayden/OpenWrt/rtl8188eus-5.3.9/rtl8188eus-5.3.9/core/rtw_cmd.o] Fehler 126
make[1]: *** [Makefile:1734: /home/lordrayden/OpenWrt/rtl8188eus-5.3.9/rtl8188eus-5.3.9] Fehler 2
make[1]: Verzeichnis „/usr/src/linux-headers-5.4.0-48-generic“ wird verlassen
make: *** [Makefile:2059: modules] Fehler 2

All directories belong to the same user, even with "sudo make" I get the same “permission denied” error...

Thanks