Building RaLink RT2860 WiFi Network driver (kernel 3.0.4 x64) - build

I have a problem to build the rt2860 wifi driver.
Its the first time i have to do this.
I downloaded the driver from the RaLink website, modified it and then i ran make as root.
root:2010_07_16_RT2860_Linux_STA_v2.4.0.0/ $ make
make -C tools
make[1]: Entering directory `/home/root/2010_07_16_RT2860_Linux_STA_v2.4.0.0/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/home/root/2010_07_16_RT2860_Linux_STA_v2.4.0.0/tools'
/home/root/2010_07_16_RT2860_Linux_STA_v2.4.0.0/tools/bin2h
cp -f os/linux/Makefile.6 /home/root/2010_07_16_RT2860_Linux_STA_v2.4.0.0/os/linux/Makefile
make -C /lib/modules/3.0.4/build SUBDIRS=/home/root/2010_07_16_RT2860_Linux_STA_v2.4.0.0/os/linux modules
make[1]: Entering directory `/lib/modules/3.0.4/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/3.0.4/build'
make: *** [LINUX] Error 2
This error message makes me assume, that there should be a makefile with a target named 'modules'. The build folder is absolutely empty... what to do now? Should i get the specific kernel sources and place them into /lib/modules/3.x.x/build/?
EDIT:
I also downloaded the firmware files and
my distri. is Crux.
root:~/ $ grep -i rt2800pci /boot/linux-3.0.4-x64
# CONFIG_RT2800PCI is not set
root:~/ $ for BUSID in $(lspci | awk '{ IGNORECASE=1 } /net/ { print $1 }'); do lspci -s $BUSID -m; lspci -s $BUSID -n; done
03:00.0 "Network controller" "RaLink" "RT2860" "Unknown vendor 1a3b" "Device 1059"
03:00.0 0280: 1814:0781

There rt2xx-based devices are already supported in the mainline kernel quite well, so there's no need to download anything from the RaLink website. The kernel module for the RT2860 is "rt2800pci".
You can either run menuconfig, select this driver as a module and rebuild OR you can use the compat-wireless package.
EDIT: You will also need the firmware for it (rt2860.bin). You can get it from the firmware-ralink Debian package.

I'm using debian-sid on a eeepc1000 that has a ralink as well.
when i was on the 2.6 kernels, i had to add all in-kernel drivers for ralink to the blacklist, and compile that.
when i upgraded to kernel 3.2 it was a mess. i had some new module in the kernel that was not affected by the blacklist somewhat working with the card... my AP got only 10% signal or so, and it was messy...
after upgrading the debian package (from linux-image-3.2.0-3 to 3.2.0-4) the support was completely gone.
i got it back by removing the blacklist. the modules i'm using now are rt2x00pci,rt2800lib,rt2800pci
so, if you compiled the drivers on 2.6 and added the blacklists... simply remove the blacklists and ignore whatever you had compiled (the STA drivers... they will not even be probed if the ones in the kernel work for you. but if they are being probed, add the STA ones to the blacklist)
I honestely do not know hows the support on 3.0, but on 3.2 it's as good as it was on 2.6 with the ra drivers.

Related

hit roadblock while trying to compile lua for emscripten usage, using windows, "unable to find ar rcu"

i've been stuck on this problem for hours, without finding any solutions. I'm currently trying to compile lua 5.3.4 for Emscripten for use in my project. ive hit a roadblock thought, I need to compile it to a liblua.a file which ill later use when doing the emcc command line. but theres problems. heres the console output and what i do. ive gotten it to output .o files already. how do i put these in the .a (since i assume thats what its doing)
E:\code\liblua>make generic CC="emcc -s WASM=1"
cd src && make generic
make[1]: se ingresa al directorio `E:/code/liblua/src'
ar rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o 1lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o
process_begin: CreateProcess(NULL, ar rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o, ...) failed.
make (e=2): El sistema no puede encontrar el archivo especificado. (system cannot find the specified file)
make[1]: *** [liblua.a] Error 2
make[1]: se sale del directorio `E:/code/liblua/src'
make: *** [generic] Error 2
what it says is that it cant find ar rcu, how do i use it on my system?
for reference, the system im trying to use can be found here https://github.com/vvanders/wasm_lua if its required
It looks like the makefile requires Un*x tools so I suggest:
Install Windows Subsystem for Linux 2 (WSL2).
Install the Ubuntu 20.04 distribution in WSL2.
Start a bash shell by double clicking the Ubuntu 20.04 LTS icon.
From the bash shell, install the tools needed. A minimal set for this whould be:
sudo apt install g++ binutils make libc-bin
... or for a more complete set of packages:
sudo apt install build-essential
Unpack the lua distribution (as yourself, not the root user) somewhere in your home directory and try building.

fatal error while compiling pybind11 test cases on raspbian

Following this question, I'm now trying to compile the pybind11 test cases as instructed here on a Raspberry Pi. What I have done so far:
installed Raspbian Raspbian Buster Lite from the official page
updated/upgraded all packages
updated/upgraded python packages following the instructions here
compiled and installed pybind11 following the instructions here
my environment is:
Raspbian buster version 10
python 3.7.3
pip 20.0.2
gcc 8.3.0
Then running the command make check -j 4 the compiler stops at:
[ 68%] Building CXX object CmakeFiles/pybind11_tests.dir/test_numpy_dtypes.cpp.o
and the errors are:
c++: fatal error: Killed signal terminated program cplusplus
compilation terminated.
make[3]: *** [CMakeFiles/pybind11_tests.dir/build.make:297: CMakeFiles/pybind11_tests.dir/test_local_bindings.cpp.o] Error 1
make[3]: *** waiting for unfinished jobs...
make[2]: *** [CMakeFiles/Makefile2:110: CMakeFiles/pybind11_tests.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:191: CMakeFile/check.dir/rule] Error 2
make: *** [Makefile:157: check] Error 2
I would appreciate it if you could help me understand what is the problem and how I can solve it.
Doing more research and using the right keyword query, it seems this issue has nothing to do with bypynd11 or Raspbian for that matter. The issue seems to be with memory overflow as described in numerous posts before (including here and here). The solution might be to use fewer parallel processes -j <n> where n < 4, or do not use it at all as suggested here. For example, I tested the
make check -j 3
and it works. Or alternatively to create a swape file as described here.
Yes you have to create first swap file. After that you can do it. Acctually swap file will increase yor ram memory. It will use rom space for ram performance.
Please go through with below link it would help you.
https://youtu.be/Cr5mDFxvsb0

Building VirtualBox without GUI or Guest Additions

I'm trying to build VirtualBox 5.2.18 on Ubuntu Server LTS 18.04 64-bit. I want to build it without any GUI components and without Guest Additions, as I want to avoid installing any unnecessary dependencies. I am using the following options when configuring:
./configure --build-headless --disable-qt --disable-alsa --disable-pulse --disable-opengl --disable-sdl-ttf --disable-libvpx --disable-docs
Although there is an option to only build the Guest Additions (--only-additions), there doesn't seem to be an option passable to configure to skip building Guest Additions. Is there a way to skip building Guest Additions, or perhaps to ignore any build-time errors related to building Guest Additions?
I found a solution in https://forums.virtualbox.org/viewtopic.php?t=33090&start=0, which contains more useful details. One can build VirtualBox without GUI or Guest Additions by adding the following lines to LocalConfig.kmk in the root of the development tree:
VBOX_WITHOUT_ADDITIONS = 1
VBOX_WITH_HEADLESS = 1
VBOX_WITH_VRDP=
VBOX_WITH_VRDP_VIDEO_CHANNEL=
VBOX_WITH_VRDP_AUTHMOD=
VBOX_WITH_VRDP_RDESKTOP=
VBOX_WITH_VBOXFB=
VBOX_WITH_KCHMVIEWER=
VBOX_WITH_TESTSUITE=
VBOX_WITH_TESTCASES=
VBOX_WITH_SHARED_FOLDERS=
VBOX_WITH_SHARED_CLIPBOARD=
VBOX_WITH_VNC =
VBOX_X11_SEAMLESS_GUEST=
VirtualBox can then be built by executing the following in the root folder:
./configure --build-headless --disable-qt --disable-alsa --disable-pulse --disable-opengl --disable-sdl-ttf --disable-libvpx --disable-docs
source env.sh
kmk
It is unclear which of the options is necessary for skipping the building of the guest additions (in either LocalConfig.kmk or those passed to ./configure).
When kmk packing is executed, the following error message might appear:
kmk: *** No rule to make target `.../out/linux.amd64/release/bin/additions/VBoxGuestAdditions.iso',
needed by `.../out/linux.amd64/release/obj/Installer/linux/archive/additions/VBoxGuestAdditions.iso'.
Stop.
This error can be avoided by executing a touch command before kmk packing (this fix was obtained from https://forums.virtualbox.org/viewtopic.php?f=10&t=41598&p=187420&hilit=VBoxGuestAdditions#p187420):
kmk
mkdir -p out/linux.amd64/release/bin/additions/
touch out/linux.amd64/release/bin/additions/VBoxGuestAdditions.iso
kmk packing
The mkdir command was added before touch because touch might fail if the directory out/linux.amd64/release/bin/additions/ did not exist.
Some errors might come up during installation of VirtualBox-*.run, but it should successfully completely. However, if you try to execute VBoxManage, you might get the following error:
Could not find VirtualBox installation. Please reinstall.
This arises most probably because the executable file VirtualBox was not found in the installation folder (usually /opt/VirtualBox). The file VirtualBox is the GUI component which was not built. We can bypass the error by editing VBox.sh in the installation folder, and changing the line
elif test -f "${MY_DIR}/VirtualBox" && test -x "${MY_DIR}/VirtualBox"; then
to
elif test -f "${MY_DIR}/VBoxHeadless" && test -x "${MY_DIR}/VBoxHeadless"; then
VirtualBox should now run without any problems.

Building U-Boot is failing

I am trying to build u-boot
Toolchain:
http://web.archive.org/web/20130823131954/http://www.angstrom-distribution.org/toolchains/
U-boot: git.denx.de
I am following this site to build this u-boot
http://beagleboard.org/linux
It says to put cross compiler path before building.
export PATH=/usr/local/angstrom/arm/bin:$PATH
1) I can see angstrom folder in /usr/local. Also I think that we need the toolchain's actual place of binaries. Let suppose in /home/myhome/BBB/angtrom_x_y_z/usr/local/angstrom/arm/bin
So which path actually i should export?
2)I have tried to put both paths, but I am getting errors.
3)I have downloaded three toolchains
angstrom-2011.03-i686-linux-armv5te-linux-gnueabi-toolchain
angstrom-2011.03-x86_64-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3
angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3
1st gives errors as
CROSS_COMPILE=arm-angstrom-linux-gnueabi- make am335x_evm
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
GEN include/autoconf.mk
arm-angstrom-linux-gnueabi-gcc: 0: No such file or directory
arm-angstrom-linux-gnueabi-gcc: unrecognized option '-G'
cc1: error: unrecognized command line option "-mabicalls"
make[1]: *** [include/autoconf.mk] Error 1
make: *** No rule to make target `am335x_evm'. Stop.
second one is I think for 64 bit processor, I have i386 one, so it also doesn't worked
Third one is corrupted.
Can anybody tell me how to compile it as the site says. Maybe the site is outdated but still if anybody can tell me a straightforward way how to do this.
It looks like Angstorm toolchian is too old to deal with recent U-Boot. I tried your procedure and get other errors. I'm not sure why you try to use that old toolchain and if you have to use it. But I quickly check Linaro toolchain gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux, which I use for boards like Cubietruck and A20-OLinuXino-MICRO and it works fine.
git clone git://git.denx.de/u-boot.git
cd u-boot
export PATH=${PATH}:${PATH_TO_TOOLCHAIN}/gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux/bin
CROSS_COMPILE=arm-linux-gnueabihf- make am335x_evm_defconfig
CROSS_COMPILE=arm-linux-gnueabihf- make -j$(nproc)

Can't build LLVM examples | unknown component name: jit

I have built LLVM & Clang according to the docs here.
The steps were
export SRC_DIR=/work/llvm
export BUILD_DIR=/work/make_llvm
cd $BUILD_DIR
$SRC_DIR/configure --prefix=/work/my_llvm
make -j 4
make install
My PATH does have /work/my_llvm/bin at the front.
Then I cd $BUILD_DIR/examples and type make to which the system responds,
llvm-config: unknown component name: jit
make[1]: Entering directory `/work/make_llvm/examples/BrainF'
/work/llvm/Makefile.rules:1071: *** llvm-config --libs failed. Stop.
make[1]: Leaving directory `/work/make_llvm/examples/BrainF'
make: *** [BrainF/.makeall] Error 2
Seems like there's not JIT support, or llvm-config can't find it. But LLVM compiles with JIT support enabled by default according configure --help, and I see at least one JIT related library called libLLVMMCJIT.a in /work/my_llvm/lib.
How do I build the LLVM examples?
The legacy JIT component has been removed from upstream LLVM just this week (and all its uses switched to MCJIT). I recall seeing reports of problems with the examples on the mailing list, but they were fixed. Is this a fresh check-out of LLVM or an older one? If it's a fresh check-out, you should send a note to llvmdev# or open a bug about it, because it would mean this example was left behind.