Q: arm-elf-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mlittle-endian -mtune=arm710 -march=armv3 -msoft-float -fno-builtin -nostdinc -D_LIBC -I../../../../include -I. -fstrict-aliasing -Os -O2 -g -fomit-frame-pointer -fno-common -fno-builtin -Wall -DEMBED -isystem /usr/local/lib/gcc-lib/arm-elf/2.95.3/include -DNDEBUG -c syscall.c -o syscall.o cc1: warning: -g with -fomit-frame-pointer may not give sensible debugging syscall.c: In function `syscall': syscall.c:40: `__NR_syscall' undeclared (first use in this function) syscall.c:40: (Each undeclared identifier is reported only once syscall.c:40: for each function it appears in.) make[6]: *** [syscall.o] Error 1 make[6]: Leaving directory `/root/Desktop/uclinuxkernel/uClibc/libc/sysdeps/linux/arm' make[5]: *** [arm] Error 2 make[5]: Leaving directory `/root/Desktop/uclinuxkernel/uClibc/libc/sysdeps/linux' make[4]: *** [_dir_linux] Error 2 make[4]: Leaving directory `/root/Desktop/uclinuxkernel/uClibc/libc/sysdeps' make[3]: *** [_dir_sysdeps] Error 2 make[3]: Leaving directory `/root/Desktop/uclinuxkernel/uClibc/libc' make[2]: *** [_dir_libc] Error 2 make[2]: Leaving directory `/root/Desktop/uclinuxkernel/uClibc' make[1]: *** [all] Error 2 make[1]: Leaving directory `/opt/uClinux-dist/lib' make: *** [lib_only] Error 2 Answer: /opt/uClinux-dist/uClibc/libc/sysdeps/linux/arm/syscal.c add include file: #include <asm-arm/unistd.h>
Q: config/autoconf.h: No such file or directory A: #include <config/autoconf.h>=====> #include <linux/autoconf.h> ABOUT ./uClibc/include/paths.h ./uClibc/libc/sysdeps/linux/common/syscalls.c ------------------------------------------------ Q: romfs-inst.sh libpam/libpam.so /lib/libpam.so.0 cp: cannot create regular file `/root/uClinux-dist/romfs/lib/libpam.so.0': No such file or directory make[2]: *** [romfs] Error 1 Answer: mkdir -p romfs/lib/ ------------------------------------------------ Q: ioperm.c:104: `BUS_ISA_PORT_SHIFT' undeclared (first use in this function) ioperm.c:104: initializer element is not constant ioperm.c:104: (near initialization for `ioshift_name[2]') make[6]: *** [ioperm.o] Error 1 make[6]: Leaving directory `/root/uClinux-dist/uClibc/libc/sysdeps/linux/arm' make[5]: *** [arm] Error 2 Answer: cd uClibc make menuconfig ARCH=armnommu CROSS=arm-elf- cd ..
------------------------------------------------ Q: arm-elf-ld -p -X -T arch/armnommu/vmlinux.lds arch/armnommu/kernel/head-armv.o arch/armnommu/kernel/init_task.o init/main.o init/version.o init/do_mounts.o --start-group arch/armnommu/kernel/kernel.o arch/armnommu/mm/mm.o arch/armnommu/mach-S3C44B0X/S3C44B0X.o kernel/kernel.o mmnommu/mmnommu.o fs/fs.o ipc/ipc.o drivers/serial/serial.o drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/net/appletalk/appletalk.o drivers/media/media.o net/network.o arch/armnommu/lib/lib.a /root/uClinux-dist/linux-2.4.x/lib/lib.a /usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a --end-group -o linux fs/fs.o(.data+0x1378): multiple definition of `romfs_file_operations' romfs.o(.data+0x80): first defined here make[1]: *** [linux] Error 1 make[1]: Leaving directory `/root/uClinux-dist/linux-2.4.x' make: *** [linux] Error 1
Answer: vi ~/uClinux-dist/linux-2.4.x/fs/romfs/inode.c /* Mapping from our types to the kernel */
static struct address_space_operations romfs_aops = { readpage: romfs_readpage };
static struct file_operations romfs_dir_operations = { read: generic_read_dir, readdir: romfs_readdir, };
static(此处没有) struct file_operations romfs_file_operations = { read: generic_file_read, mmap: generic_file_mmap, #ifdef MAGIC_ROM_PTR romptr: romfs_romptr, #endif ------------------------------------------------ Q: I get the following error message: qc-driver.c:51: linux/version.h: No such file or directory qc-driver.c:52: parse error or .../include/linux/config.h:4: linux/autoconf.h: No such file or directory or sed: can't read /usr/src/linux/Makefile: No such file or directory or Makefile:26: /usr/src/linux/.config: No such file or directory
A: You must install Linux kernel source code corresponding to the kernel you will be running with the camera driver. The source must be configured and depencies must have been created. Typically you can just install the kernel source package that comes with your distribution. If you're instead using virgin kernel in /usr/src/linux-x.y.zz, you must first copy kernel configuration file to /usr/src/linux-x.y.zz/.config, then go to the directory and run "make oldconfig" and "make dep". This should create the missing linux/version.h file. Some more help for Redhat/Mandrake users:
If you get a lot of errors on mandrake or red hat when you do a make, it may be because you didn't install a full development version, meaning your kernel sources are not there. This worked for me
urpmi kernel-source urpmi kernel-headers urpmi kernel-doc
urpmi is your friend, it will find the CD that it needs to get this. Some rpms may be installed already, big deal, do this then do a make, it worked on mandrake 8.2!
------------------------------------------------------------ Q: And finally, I look for /dev/video* (to set the videodev on gnomemeeting) and I haven't any videodevice.
A: mknod /dev/video0 c 81 0 chmod a+r /dev/video0 ln -s /dev/video0 /dev/video
------------------------------------------------------------ Q: quickcam.c:2099: too few arguments to function `remap_page_range_R2baf18f2' Damian Ivereigh posted a patch to be able to compile the driver for RedHat 9.0 but I don't know how to do A: Due to qc-usb 0.5.1, this should be now fixed. If you still encounter this problem, and if you're using qc-usb, just compile it with command USER_OPT=-DHAVE_VMA=1 make all Otherwise (if you're using older qce-ga): 1. Download qce-ga-0.40d.tar.gz package and save the patch wget http://~tuukkat/quickcam/qce-gq-rh9.patch
wget http://~tuukkat/quickcam/qce-ga-0.40d.tar.gz
2. Extract the package: tar xvfz qce-ga-0.40d.tar.gz 3. Enter the source directory cd qce-ga-0.40d 4. Apply the patch: patch -s -p1 < ../qce-gq-rh9.patch 5. patch complains that the patch is reversed. Answer yes: Reversed (or previously applied) patch Assume -R? [n] y 6. Then compile and install the driver normally make ./quickcam.sh
------------------------------------------------------------ Q: I don't have permissions for /dev/video? A: Easiest way to add permissions is to do chmod a+rw /dev/video? as root. Altenatively, especially on Debian, users belonging to the "video" group can access video devices. In this case, you might instead prefer issuing addgroup video as root and then login as normal user. Check in which groups your are in with id -a
------------------------------------------------------------ Q: My log files keep filling up (but the driver works fine)! A: use "qcset debug=0" to disable all possible messages. If it doesn't help, send e-mail to mailing lists showing the exact error message that fills your logs. (especially "frame lost" message is uninteresting, it is known to happen with some programs and will be fixed later.
------------------------------------------------------------ Q: quickcam.o: kernel-module version mismatch quickcam.o was compiled for kernel version 2.4.18 while this kernel is version 2.4.18-686-smp. A: Then edit "Makefile" in the kernel source directory and change the line 4 from EXTRAVERSION = to EXTRAVERSION = -686-smp --or if this doesn't help-- Go to /usr/src/linux-2.4/include/linux/version.h and change the UTS_RELEASE to match the output of "uname -r" on the command line (should be 2.4.18-686-smp). Then recompile the module and then the insmod will work perfectly :) [from Mark]
------------------------------------------------------------ Q: I want to reverse engineer an USB camera. How? A: Run *ugh* Windoze *cough* drivers with a USB stream capture program, like Then send the same commands to the camera from Linux.
------------------------------------------------------------ Q: I added IEEE1394 card and now Quickcam doesn't work? A: The card driver overwrites /dev/video0..2, use insmod ./quickcam.o video_nr=3 and then /dev/video3 with Quickcam. Create /dev/video3 with mknod if necessary. (from Makarand) ------------------------------------------------------------- QError: >make[2]: Entering directory `/opt/uClinux-dist/uClibc' >Rules.mak:25: Config: No such file or directory >You didn't read the README, did you... =) >Choose a configuration file in extras/Config/ and then run > ln -s ./extra/Configs/Config.<arch> ./Config
A:
The solution to this seems obvious. I "cp ./vendors/Lineo/uCdimm/config.uClibc ./vendors/Lineo/uCsimm" and make again with the same settings as above. The library compile bombs out a little further along... ------------------------------------------------ Q: >m68k-elf-gcc -Wall -fno-builtin -nostdinc -m68000 -nostdinc > -I../../../../include > -I/usr/local/lib/gcc-lib/m68k-elf/2.95.3/include -I. > -D_LIBC -m68000 -O2 -g -fomit-frame-pointer -DCONFIG_LINEO > -fno-builtin -msep-data -DEMBED > -I/opt/uClinux-dist/lib/uClibc/include -I/opt/uClinux-dist > -Dlinux -D__linux__ -D__uClinux__ -Dunix > -I/opt/uClinux-dist/linux-2.4.x/include -DNDEBUG > -DL_ioperm syscalls.c -c -o ioperm.o >syscalls.c:767: sys/io.h: No such file or directory >make[6]: *** [ioperm.o] Error 1
A: recent posting suggests a solution. Rather than copy individual missing files, I untared an older uClibc-snapshot into "./uClibc" and then overcopied with the uClibc-0.9.10 tree. The make goes further still and stops with... use the uClib of uClinux-dist-20050311.tar.gz replace it,because I can make it in that. ----------------------------------------------------- Q: >m68k-elf-gcc -Wall -fno-builtin -c crti.S -o crti.o >cp crti.o ../../../../lib/ >cp: cannot create regular file > `../../../../lib/crti.o': No such file or directory >make[6]: *** [crti.o] Error 1
A: Now I'm lost. I made a wild guess which is probably wrong and created a directory called ./uClibc/lib and recompiled... ------------------------------------------------ Q: >make[6]: Entering directory > `/opt/uClinux-dist/uClibc/libc/sysdeps/linux/m68k' >m68k-elf-gcc -Wall -fno-builtin -nostdinc -m68000 > -nostdinc -I../../../../include > -I/usr/local/lib/gcc-lib/m68k-elf/2.95.3/include -I. > -D_LIBC -m68000 -O2 -g -fomit-frame-pointer -DCONFIG_LINEO > -fno-builtin -msep-data -DEMBED > -I/opt/uClinux-dist/lib/uClibc/include -I/opt/uClinux-dist > -Dlinux -D__linux__ -D__uClinux__ -Dunix > -I/opt/uClinux-dist/linux-2.4.x/include -DNDEBUG -c __longjmp.S > -o __longjmp.o >../../../../include/bits/setjmp.h: Assembler messages: >../../../../include/bits/setjmp.h:25: Error: > Unknown operator -- statement `typedef struct' ignored etc
A: My host system is RH7.2 and I've installed m68k-elf-tools-20020218.tar.gz under "/" and uClinux-dist-20020306.tar.gz under "/opt". ------------------------------------------------------------ Q: /bin/sh: ucfront-gcc: command not found A: /*intrenet A I think you have'nt installed the toolchain properly. Simply type arm-linux-gcc in one linux console. if still gives the error "command not found",reinstall the toolchain. If it still doesn't work, you may have to modify the PATH environmental varaiable to include the toolchain's path to it.*/ My methods: 1 vi ./tools/ucfront/Makefile
HOSTCC ?= cc
SRC=ucfront.c args.c util.c execute.c vasprintf.c
ucfront: $(SRC) $(HOSTCC) -g -Werror -m32 -Wall -DHAVE_MKSTEMP -o $@ $(SRC)
clean: $(RM) -f *.o ucfront core tags
ucfront.1: ucfront.yo -yodl2man -o ucfront.1 ucfront.yo 2. cd ./tools/ucfront/; make;cd ../.. ---------------------------------------------- Q: arch/armnommu/lib/lib.a /root/uClinux-dist/linux-2.4.x/lib/lib.a /usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a --end-group -o linux /usr/local/bin/arm-elf-ld.real: cannot open romfs.o: No such file or directory make[1]: *** [linux] Error 1
A: cp ./linux-2.4.x/fs/romfs/romfs.o ./linux-2.4.x/
Q: s/fs.o(.data+0x15f0): In function `sys_open': /curret1/uClinux-dist/linux-2.4.x/fs/open.c:805: multiple definition of `romfs_file_operations' romfs.o(.data+0x80):/curret1/uClinux-dist/linux-2.4.x/fs/romfs/inode.c:107:第一次在此定义first defined make[1]: *** [linux] 错误 1 make[1]: Leaving directory `/curret1/uClinux-dist/linux-2.4.x
make: *** [linux] 错误 1 Answer: 在 ~/uClinux-dist/linux-2.4.x/fs/romfs/inode.c的 static(这地方没有加上) struct file_operations romfs_file_operations = {
read: generic_file_read,
mmap: generic_file_mmap,
#ifdef MAGIC_ROM_PTR
.......................
加上static 问题就解决了,终于在images下生成了 linux.data 编译后的内核中的data,init段,一般在sdram中,可读写 linux.text 编译后的内核中的text段,一般放在flash中,只读 romfs.img 内核加载是的根文件系统 image.bin 上面3个文件顺序连接而成(linux.text+linux.data+romfs.img) image.ram 没有压缩国的内核,必须在ram里运行,同过板子的boodloader将他下载到指定位置后
|