I'm having a problem installing a driver for my Silabs USB to UART bridge.
I download my driver from here:
http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
I'm running Ubuntu 12.04 32bit Kernel Linux 3.5.0-27-generic
The instructions say that make (your cp2010x driver)
cp cp2010x.ko to /libmodules/<kernel>/kernel/driver/usb/serial
insmod /libmodules/<kernel>/kernel/driver/usb/serial/usbserial.ko
insmod xp2010x.ko
However, I get this error when I try to call make:
root#grace:/home/admin/Desktop/usb# make
make -C /lib/modules/3.5.0-27-generic/build M=/home/admin/Desktop/usb modules
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-27-generic'
CC [M] /home/admin/Desktop/usb/cp210x.o
/home/admin/Desktop/usb/cp210x.c:164:12: error: ‘usb_serial_probe’ undeclared here (not in a function)
/home/admin/Desktop/usb/cp210x.c:165:16: error: ‘usb_serial_disconnect’ undeclared here (not in a function)
/home/admin/Desktop/usb/cp210x.c: In function ‘cp210x_init’:
/home/admin/Desktop/usb/cp210x.c:989:2: error: implicit declaration of function ‘usb_serial_register’ [-Werror=implicit-function-declaration]
/home/admin/Desktop/usb/cp210x.c:996:3: error: implicit declaration of function ‘usb_serial_deregister’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [/home/admin/Desktop/usb/cp210x.o] Error 1
make[1]: *** [_module_/home/admin/Desktop/usb] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-27-generic'
make: *** [all] Error 2
I am new to Linux. I've Googled the error a lot but I can't find any answers that works.
According to this forum post, those drivers have actually been a part of the kernel since March 2009. You can see the file at drivers/usb/serial/cp210x.c (here is a link to the file in the latest stable version of the kernel).
Related
I'm a beginner at Linux Kernel. Now I'm trying to write a module to set page table by myself.
My computer is x86 and the kernel version is 5.4.0.
First I use the kernel parameter memmap to reserve some memory, then I try to set page table for the reserved memory.
I use pud_alloc in my code and include <linux/mm.h>, but then I see this error:
ERROR: "__pud_alloc" [/root/sun_fs/sunfs.ko] undefined!
ERROR: "init_mm" [/root/sun_fs/sunfs.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make[1]: *** [Makefile:1670: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-65-generic'
make: *** [Makefile:9: default] Error 2
Both __pud_alloc and init_mm are undefined.
I find __pud_alloc is declared in /include/linux/mm.h and defined in mm/memory.c. But why I can't use it?
Do I have another way to set page table manually?
I am using opencv with python on raspberry pi so according to tutorials on the internet I need the V4L2 driver. I'm following this tutorial to install the driver https://www.ics.com/blog/raspberry-pi-camera-module#.VAaCHqM0_YQ
However when I compile I get this error. I don't know what's the problem and have never ran into this problem before. How do I fix this. Thanks.
make[3]: Entering directory '/home/pi/v4l-utils/utils/v4l2-compliance'
CXX v4l2-test-input-output.o
v4l2-test-input-output.cpp: In function ‘int checkInput(node*, const v4l2_input&, unsigned int)’:
v4l2-test-input-output.cpp:368:3: error: expected primary-expression before ‘.’ token
v4l2-test-input-output.cpp:369:3: error: expected primary-expression before ‘.’ token
v4l2-test-input-output.cpp: In function ‘int checkOutput(node*, const v4l2_output&, unsigned int)’:
v4l2-test-input-output.cpp:733:3: error: expected primary-expression before ‘.’ token
v4l2-test-input-output.cpp:734:3: error: expected primary-expression before ‘.’ token
Makefile:438: recipe for target 'v4l2-test-input-output.o' failed
make[3]: *** [v4l2-test-input-output.o] Error 1
make[3]: Leaving directory '/home/pi/v4l-utils/utils/v4l2-compliance'
Makefile:373: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/pi/v4l-utils/utils'
Makefile:470: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pi/v4l-utils'
Makefile:398: recipe for target 'all' failed
make: *** [all] Error 2
The line numbers have changed somewhat in the 2+ years since this question was posted. It could have easily had more bugs back then with Raspbian 7 Wheezy on a Raspberry Pi 2 or classic Pi.
One correction to the webpage would be that it's better to run ./bootstrap.sh rather than autoreconf. I also write libjpeg-dev to avoid dependency problems with the too-specific libjpeg62-dev. Then the build and installation works fine today on Raspbian 9 Stretch (gcc 6.3):
sudo apt-get install autoconf gettext libtool libjpeg-dev
git clone git://git.linuxtv.org/v4l-utils.git
cd v4l-utils
./bootstrap.sh
./configure
make
sudo make install
I am trying to compile GCC for Cygwin with support for targeting i386-elf so I can compile some simple OSes (search Benu, by l30nard0, on Github). I've successfully compiled the binutils for i386-elf, and compiled all of GCC's floating-point numbers dependencies.
Problem is, it says windows.h can not be found. I do have w32api successfully installed, and tried including each of those one at a time in the include path for GCC, but none of them work. If I try any of them, I get so many errors and warnings that not all will show up in the Cygwin console. The dozens upon dozens of warnings are most if not all unused parameter.
Does anyone know where the problem might lie?
I've wasted the last three entire days of my life trying to get Linux Mint set up with everything I want, but for reasons I shan't go into I gave up on that. I'd love to be able to get just one thing to work so I can enjoy my life again. :) Thanks!
BTW: The configure arguments I used were --target=i386-elf --enable-threads=win32 --enable-languages=c,c++ Was I supposed to use --enable-targets instead?
And here's part of the log:
In file included from ../../../gcc/libgcc/gthr.h:150:0,
from ../../../gcc/libgcc/unwind-dw2.c:38:
./gthr-default.h:541:21: fatal error: windows.h: No such file or directory
compilation terminated.
../../../gcc/libgcc/static-object.mk:17: recipe for target 'unwind-dw2.o' failed
make[2]: *** [unwind-dw2.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ../../../gcc/libgcc/gthr.h:150:0,
from ../../../gcc/libgcc/unwind-dw2-fde.c:38:
./gthr-default.h:541:21: fatal error: windows.h: No such file or directory
compilation terminated.
../../../gcc/libgcc/static-object.mk:17: recipe for target 'unwind-dw2-fde.o' failed
make[2]: *** [unwind-dw2-fde.o] Error 1
make[2]: Leaving directory '/home/Sean/gccbuild/i386-elf/libgcc'
Makefile:10055: recipe for target 'all-target-libgcc' failed
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory '/home/Sean/gccbuild'
Makefile:870: recipe for target 'all' failed
make: *** [all] Error 2
Remove the --enable-threads=win32 flag; it is intended to specify thread support on the target system, not the build system.
I have download and extracted u-boot-1.1.6 on Ubuntu Linux. I just want to compile the source code using GCC (not targeting cross compilation for any embedded platform).
I tried running the provided MAKEALL makefile but "powerpc-linux-gcc : Not Found" is happening.
My understanding is irrespective of platform the source code should compile.
What are the necessary makefile and environment changes I need to do for compilation on x86?
I have taken the recent code. Still facing some issues
I have followed following steps to compile it on x86.
make clean;
make coreboot-x86_config
./MAKEALL -C x86
In step 3 I observed following:
ravitiwari#RAVI-HP-Pavilion-dv2000-GJ175PA-ACJ:~/u-boot-2013.04$ make clean
ravitiwari#RAVI-HP-Pavilion-dv2000-GJ175PA-ACJ:~/u-boot-2013.04$ make coreboot-x86_config
Configuring for coreboot-x86 - Board: coreboot, Options: SYS_TEXT_BASE=0x01110000
ravitiwari#RAVI-HP-Pavilion-dv2000-GJ175PA-ACJ:~/u-boot-2013.04$ ./MAKEALL -C x86
Configuring for coreboot-x86 - Board: coreboot, Options: SYS_TEXT_BASE=0x01110000
make[1]: ** [interrupts.o] Error 127
make: ** [arch/x86/cpu/libx86.o] Error 2
make[1]: ** [coreboot.o] Error 127
make: ** [arch/x86/cpu/coreboot/libcoreboot.o] Error 2
make[1]: ** [bootm.o] Error 127
make: ** [arch/x86/lib/libx86.o] Error 2
size: './u-boot': No such file
/bin/bash: sparse: command not found
make[1]: ** [interrupts.o] Error 127
make: ** [arch/x86/cpu/libx86.o] Error 2
make: ** Waiting for unfinished jobs....
/bin/bash: sparse: command not found
make[1]: ** [coreboot.o] Error 127
make: ** [arch/x86/cpu/coreboot/libcoreboot.o] Error 2
/bin/bash: sparse: command not found
make[1]: ** [bootm.o] Error 127
make: ** [arch/x86/lib/libx86.o] Error 2
make: INTERNAL: Exiting with 4 jobserver tokens available; should be 3!
--------------------- SUMMARY ----------------------------
Boards compiled: 1
Boards with errors: 1( coreboot-x86 )
make clean; make coreboot-x86_config; make
is more likely to be useful to you.
In my experience, u-boot is built for a single specific embedded platform. That would be true even when your host is x86, so you have /usr/bin/gcc already installed.
What you stumbled on (I see it by running ./MAKEALL at top level) wants to build ALL of the embedded platforms available. But it will still build specific platforms, that is inherent to U-Boot mission. It defaulted to using powerpc toolchain (powerpc-linux-gcc) rather than the x86 toolchain. My suggestion instead chooses a specific x86-based platform, and builds it. You will see various compilation outputs at console, showing what's going on.
MAKEALL would build, then throw away build results, for multiple other platforms first. You could do
.MAKEALL -c x86
but that hides compilation outputs. For other CPU you'd need appropriate cross compiler installed.
I am trying to compile the Linux kernel on my Ubuntu machine
But I am getting the following error. I've searched on Google but have not been able to find any error related to this.
drivers/platform/x86/intel_scu_ipc.c: In function ‘pwr_reg_rdwr’:
drivers/platform/x86/intel_scu_ipc.c:175: error: ‘MRST_CPU_CHIP_PENWELL’ undeclared (first use in this function)
drivers/platform/x86/intel_scu_ipc.c:175: error: (Each undeclared identifier is reported only once
drivers/platform/x86/intel_scu_ipc.c:175: error: for each function it appears in.)
drivers/platform/x86/intel_scu_ipc.c: In function ‘intel_scu_ipc_init’:
drivers/platform/x86/intel_scu_ipc.c:741: error: implicit declaration of function ‘mrst_identify_cpu’
make[3]: *** [drivers/platform/x86/intel_scu_ipc.o] Error 1
make[2]: *** [drivers/platform/x86] Error 2
make[1]: *** [drivers/platform] Error 2
make: *** [drivers] Error 2
It is highly likely that you are building the kernel with a configuration that has a mistake. It happens occasionally; there are hundreds of configuration options, and they can't all be checked.
The first thing you want to do is confirm that you are able to build at least some configuration. So, just build a default configuration. This is primarily to rule out operator error:
make distclean
make defconfig
make
If that fails there may be problems with your setup / environment. Try an older kernel, and report back here. If you are able to build the default configuration then you should report the failed configuration to the Linux Kernel Mailing List
http://www.lkml.org
From there they will be able to help you, tell you to wait, or direct you to a subsystem maintainer for the failed driver.