I am trying to compile a wifi driver on my OpenWrt runing on my pc. I have installed bash, make, gcc, automake. When I start make I get the following error:
/lib/modules/4.14.167/build: No such file or directory.
I asume that is because I dont have Kernel Headers installed but the question ist how do I install them?
There are no kernel headers packaged, nor enough of a buildsystem available at runtime even if you had them.
If you do need to build kernel module, you must cross-compile them through the buildsystem (or SDK), OpenWrt isn't self hosting and doesn't provide the necessary bits and pieces at runtime (while your x86 system might be different, >98% of all devices running OpenWrt wouldn't have the space for doing so in the first place).
thank you for you answer.
Is there maybe a step by step Instruction for diong that?
I have compiled drivers on linux but I never had a buildsystem for anything....
Hi,
I am using the Rooter Software on a PC which I use as router.
I have two Wi-Fi „USB Cards“ for which I need to compile the driver. As I found out the only way to do that is to setup a build system.
I did that as described, Linux Mint 18 in a virtual machine. I wanted also to upgrade my Rooter software so I went with “BUILD SYSTEM FOR ROOTER USING OPENWRT 19.07.2“
Everything went fine (at least I think so) but when I execute the script I get a error. I then tried 18.06.7 but I get the same error.
This is what I get when I execute the script:
checking whether mknod can create fifo without root privileges... configure: error: in `/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/host/tar-1.32':
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
See `config.log' for more details
Makefile:31: recipe for target '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/host/tar-1.32/.configured' failed
make[3]: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/host/tar-1.32/.configured] Error 1
make[3]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/tools/tar'
time: tools/tar/compile#9.80#2.18#21.53
tools/Makefile:157: recipe for target 'tools/tar/compile' failed
make[2]: *** [tools/tar/compile] Error 2
make[2]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
tools/Makefile:155: recipe for target '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/stamp/.tools_compile_yyyyynnyyynyyyyynyynnyyyynyyyyyyyyyyyyyyyyyynynnyyynnyyy' failed
make[1]: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/stamp/.tools_compile_yyyyynnyyynyyyyynyynnyyyynyyyyyyyyyyyyyyyyyynynnyyynnyyy] 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
“die Regel für Ziel „world“ scheiterte” is german and means “the rule for the Target “world” has failed” Error 2.
What can I do?
Can someone help me?
Thanks
LordRayden
P.S. Rooter is OpenWrt with some extra packages, the whole buildsystem is from OpenWrt.
tried that, then I cannot start the build script. It stops immediately with a permission error...
Some other idea maybe?
I also tried to build the system with Ubuntu 18.04 but I get the same error. I thought maybe the script fails because something is missing in the OS but no. I’m also setting up Debian, just in case (those are the three recommended distros)….
Is there a way disable "newt"?
Maybe I can edit a config file to disable it?
As far as I can see "newt" and "whiptail" belong together so if I disable the first the second should be disabled to?
Just tried to editing the .config file and uncommenting "newt" but I still get the same error.
Do I have to start over every time I change something like that?
If I am not mistaken, this is filing while building the tool chain, which is used to build the packages that make OpenWrt, thus you cannot just disable any part of this.
Either there is something wrong with your build environment, or there is something wrong with the Rooter sources.
The Router ist a PC, SO Target is x86 and the Subtarget is x86_64. Then I select the wireless drivers and leave everything else by default. I just want to get a test build to see if the two wireless drivers I need are working on the router PC. After that I wanted to build a Image like I want it. But I always get the error. The Build enviroment is setuo by a script.
#!/bin/sh
all commands involving downloads are run twice to ensure all files are downloaded
uncomment the two lines below if you are using Linux Mint 18
sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl quilt
sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl quilt
uncomment the two lines below if you are using Ubuntu 18.04.1
#sudo apt -y install build-essential libncurses5-dev python unzip gawk git curl
#sudo apt -y install build-essential libncurses5-dev python unzip gawk git curl
uncomment the two lines below if you are using Debian
#sudo apt install build-essential git unzip ncurses-dev libz-dev libssl-dev openssl-1.0-dev python python3-dev python3.5 libelf-dev subversion gettext gawk wget curl rsync perl
#sudo apt install build-essential git unzip ncurses-dev libz-dev libssl-dev openssl-1.0-dev python python3-dev python3.5 libelf-dev subversion gettext gawk wget curl rsync perl
other versions of Linux will need different dependancies added in order to work
git clone https://git.openwrt.org/openwrt/openwrt.git rooter1907-2
git clone https://git.openwrt.org/openwrt/openwrt.git rooter1907-2
cp rooter-master.tar.gz ./rooter1907-2
cd rooter1907-2
git fetch --tags
git tag -l
git checkout v19.07.2
./scripts/feeds update -a
./scripts/feeds update -a
./scripts/feeds install -a
untar the rooter-master.tgz into the new build directory
tar -zxvf ../rooter-master.tar.gz -C ./
I don't know what could go wrong there. After everything is setup I do "make menuconfig" and after that I start the make script...
If you share a link to the driver sources, I'll have a go at it. I recently had to do this (cross-compile a kernel driver) for a different platform. I'll try to share any insight.