uClinux 内核编译常见错误及解决方法(zt)

STM32-printf重定向串口输出 声明 本文内容转载至https://www.mculover666.cn/posts/2251182441/ 1.printf与fputc printf 定义在 <stdio.h> 头文件中,如下: int printf(const char *format, ...); printf 函数根据 format 字符串给出的格式打印输出到 stdout(标准输出)中,当然,printf 函数是不会一个字符一个字符去输出,它会调用更底层的 I/O 函数:fputc去逐个字符打印。 fputc 也定 阅读详情
uClinux 内核编译常见错误及解决方法(uClinux kernel compile Troubleshooting)


    uClinux kernel compile Troubleshooting V 0.1
    chinajz
    c_xvidtune@hotmail.com
    http://spaces.msn.com/chinajz/

    ===============================================
    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
    A
    /opt/uClinux-dist/uClibc/libc/sysdeps/linux/arm/syscal.c
    add include file:
    ln -s /opt/uClinux-dist/linux-2.6.x/include/asm-arm ./uClibc/include/

    #include <asm-arm/unistd.h>
    ===========================================================
    In file included from /opt/uClinux-dist/lib/libgmp/mpn/generic/dump.c:26:
    /opt/uClinux-dist/uClibc/include/stdio.h:693: parse error before `fpos_t'
    /opt/uClinux-dist/uClibc/include/stdio.h:698: parse error before `*'
    make[3]: *** [dump.o] Error 1
    make[3]: Leaving directory `/opt/uClinux-dist/lib/libgmp/mpn'
    make[2]: *** [mpn/libmpn.a] Error 2
    make[2]: Leaving directory `/opt/uClinux-dist/lib/libgmp'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/opt/uClinux-dist/lib'
    make: *** [lib_only] Error 2


    vi /opt/uClinux-dist/uClibc/include/stdio.h
    ......
    /* This define avoids name pollution if we're using GNU stdarg.h */
    # define __need___va_list
    #include <stdarg.h>

    /* The type of the second argument to `fgetpos' and `fsetpos'.  */
    /*__BEGIN_NAMESPACE_STD
    #ifndef __USE_FILE_OFFSET64
    typedef __STDIO_fpos_t fpos_t;
    #else
    typedef __STDIO_fpos64_t fpos_t;
    #endif
    __END_NAMESPACE_STD
    #ifdef __USE_LARGEFILE64
    typedef __STDIO_fpos64_t fpos64_t;
    #endif*/
    #ifndef __USE_FILE_OFFSET64
    typedef _UC_fpos_t fpos_t;
    #else
    typedef _UC_fpos64_t fpos_t;
    #endif
    #ifdef __USE_LARGEFILE64
    typedef _UC_fpos64_t fpos64_t;
    #endif
    ....

    Q
    arm-elf-strip -x -R .note -R .comment __syscall_setgroups.o
    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 -DL__reboot syscalls.c -c -o _reboot.o
    syscalls.c:1007: config/autoconf.h: No such file or directory
    make[6]: *** [_reboot.o] Error 1
    make[6]: Leaving directory `/opt/uClinux-dist/uClibc/libc/sysdeps/linux/common'
    make[5]: *** [common] Error 2
    make[5]: Leaving directory `/opt/uClinux-dist/uClibc/libc/sysdeps/linux'
    make[4]: *** [_dir_linux] Error 2
    make[4]: Leaving directory `/opt/uClinux-dist/uClibc/libc/sysdeps'
    make[3]: *** [_dir_sysdeps] Error 2
    make[3]: Leaving directory `/opt/uClinux-dist/uClibc/libc'
    make[2]: *** [_dir_libc] Error 2
    make[2]: Leaving directory `/opt/uClinux-dist/uClibc'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/opt/uClinux-dist/lib'
    make: *** [lib_only] Error 2
    A
    syscalls.c:1007===> #include <linux/autoconf.h>
    -------------------------------------------------
    Q
    arch=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 -DL___glibc_strerror_r wstring.c -c -o __glibc_strerror_r.o
    cc1: warning: -g with -fomit-frame-pointer may not give sensible debugging
    wstring.c:1574: `__glibc_strerror_r' undeclared here (not in a function)
    wstring.c:1574: warning: type defaults to `int' in declaration of `__strerror_r'
    wstring.c:1575: `__glibc_strerror_r' undeclared here (not in a function)
    wstring.c:1575: warning: type defaults to `int' in declaration of `_glibc_strerror_r'
    wstring.c:1575: `_glibc_strerror_r' redeclared as different kind of symbol
    ../../include/string.h:260: previous declaration of `_glibc_strerror_r'
    wstring.c: In function `__glibc_strerror_r':
    wstring.c:1579: warning: implicit declaration of function `__xpg_strerror_r'
    make[4]: *** [__glibc_strerror_r.o] Error 1
    make[4]: Leaving directory `/opt/uClinux-dist/uClibc/libc/string'
    make[3]: *** [_dir_string] Error 2
    make[3]: Leaving directory `/opt/uClinux-dist/uClibc/libc'
    make[2]: *** [_dir_libc] Error 2
    make[2]: Leaving directory `/opt/uClinux-dist/uClibc'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/opt/uClinux-dist/lib'
    make: *** [lib_only] Error 2
    A
    /* Copyright (C) 2002 Manuel Novoa III
    *
    * This library is free software; you can redistribute it and/or
    * modify it under the terms of the GNU Library General Public
    * License as published by the Free Software Foundation; either
    * version 2 of the License, or (at your option) any later version.
    *
    * This library is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    * Library General Public License for more details.
    *
    * You should have received a copy of the GNU Library General Public
    * License along with this library; if not, write to the Free
    * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    */

    /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
    *
    * Besides uClibc, I'm using this code in my libc for elks, which is
    * a 16-bit environment with a fairly limited compiler. It would make
    * things much easier for me if this file isn't modified unnecessarily.
    * In particular, please put any new or replacement functions somewhere
    * else, and modify the makefile to use your version instead.
    * Thanks. Manuel
    *
    * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! */

    /* Dec 20, 2002
    * Initial test implementation of strcoll, strxfrm, wcscoll, and wcsxfrm.
    * The code needs to be cleaned up a good bit, but I'd like to see people
    * test it out.
    *
    * Sep 11, 2003
    * Patch by Atsushi Nemoto <anemo@mba.ocn.ne.jp> to do arch-required
    * mapping of signal strings (alpha, mips, hppa, sparc).
    */

    #define _STDIO_UTILITY
    #define _GNU_SOURCE
    #include <string.h>
    #include <strings.h>
    #include <stdio.h>
    #include <limits.h>
    #include <ctype.h>
    #include <stdlib.h>
    #include <errno.h>
    #include <signal.h>
    #include <assert.h>
    #include <locale.h>

    #ifdef WANT_WIDE
    #include <wchar.h>
    #include <wctype.h>
    #include <bits/uClibc_uwchar.h>

    #define Wvoid wchar_t
    #define Wchar wchar_t
    #define Wuchar __uwchar_t
    #define Wint wchar_t

    #else

    #define Wvoid void
    #define Wchar char
    typedef unsigned char __string_uchar_t;
    #define Wuchar __string_uchar_t
    #define Wint int

    #endif

    /**********************************************************************/
    /* NOTE: If we ever do internationalized syserr messages, this will
    * have to be changed! */

    #define _SYS_NERR 125
    #if defined(__mips__) || defined(__sparc__)
    /* sparce and mips have an extra error entry, as EDEADLK and EDEADLOCK have
    * different meanings on those platforms. */
    #undef _SYS_NERR
    #define _SYS_NERR 126
    #endif

    #ifdef __UCLIBC_HAS_ERRNO_MESSAGES__
    #define _SYS_ERRMSG_MAXLEN 50
    #else /* __UCLIBC_HAS_ERRNO_MESSAGES__ */
    #define _SYS_ERRMSG_MAXLEN 0
    #endif /* __UCLIBC_HAS_ERRNO_MESSAGES__ */


    extern const char _string_syserrmsgs[];

    #define _SYS_NSIG 32

    #ifdef __UCLIBC_HAS_SIGNUM_MESSAGES__
    #define _SYS_SIGMSG_MAXLEN 25
    #else /* __UCLIBC_HAS_SIGNUM_MESSAGES__ */
    #define _SYS_SIGMSG_MAXLEN 0
    #endif /* __UCLIBC_HAS_SIGNUM_MESSAGES__ */

    extern const char _string_syssigmsgs[];


    #if _SYS_ERRMSG_MAXLEN < __UIM_BUFLEN_INT + 14
    #define _STRERROR_BUFSIZE (__UIM_BUFLEN_INT + 14)
    #else
    #define _STRERROR_BUFSIZE _SYS_ERRMSG_MAXLEN
    #endif

    #if _SYS_SIGMSG_MAXLEN < __UIM_BUFLEN_INT + 15
    #define _STRSIGNAL_BUFSIZE (__UIM_BUFLEN_INT + 15)
    #else
    #define _STRSIGNAL_BUFSIZE _SYS_SIGMSG_MAXLEN
    #endif

    /**********************************************************************/
    -------------------------------------

    .PHONY: dummy subdirs release distclean clean config oldconfig menuconfig

    1) You should use the current CVS, or daily snapshot version of
    uClibc, which addresses this problem.

    2) You should NOT be directly using linux 2.6.x kernel header
    files. You should instead using the sanitized:
    http://ep09.pld-linux.org/~mmazur/linux-libc-headers/
    from:http://www.uclibc.org/lists/uclibc/2004-October/010202.html
    --------------------------------------------------------
    cc1: warning: -g with -fomit-frame-pointer may not give sensible debugging
    In file included from gmon.c:38:
    ../../../../include/stdio.h:75: parse error before `fpos_t'
    ../../../../include/stdio.h:75: warning: type defaults to `int' in declaration of `fpos_t'
    ../../../../include/stdio.h:75: warning: data definition has no type or storage class
    ../../../../include/stdio.h:80: parse error before `fpos64_t'
    ../../../../include/stdio.h:80: warning: type defaults to `int' in declaration of `fpos64_t'
    ../../../../include/stdio.h:80: warning: data definition has no type or storage class
    In file included from gmon.c:38:
    ../../../../include/stdio.h:508: parse error before `fpos_t'
    ../../../../include/stdio.h:509: warning: function declaration isn't a prototype
    ../../../../include/stdio.h:511: warning: type defaults to `int' in declaration of `fpos_t'
    ../../../../include/stdio.h:511: parse error before `*'
    ../../../../include/stdio.h:511: warning: function declaration isn't a prototype
    ../../../../include/stdio.h:538: parse error before `fpos64_t'
    ../../../../include/stdio.h:539: warning: function declaration isn't a prototype
    ../../../../include/stdio.h:540: warning: type defaults to `int' in declaration of `fpos64_t'
    ../../../../include/stdio.h:540: parse error before `*'
    ../../../../include/stdio.h:540: warning: function declaration isn't a prototype
    make[6]: *** [gmon.o] Error 1
    make[6]: Leaving directory `/opt/uClinux-dist/uClibc/libc/sysdeps/linux/common'
    make[5]: *** [common] Error 2
    make[5]: Leaving directory `/opt/uClinux-dist/uClibc/libc/sysdeps/linux'
    make[4]: *** [_dir_linux] Error 2
    make[4]: Leaving directory `/opt/uClinux-dist/uClibc/libc/sysdeps'
    make[3]: *** [_dir_sysdeps] Error 2
    make[3]: Leaving directory `/opt/uClinux-dist/uClibc/libc'
    make[2]: *** [_dir_libc] Error 2
    make[2]: Leaving directory `/opt/uClinux-dist/uClibc'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/opt/uClinux-dist/lib'
    A
    vi uClinux-dist/uClibc/libc/sysdeps/linux/common/Makefile
    TOPDIR=../../../../
    include $(TOPDIR)Rules.mak

    CSRC= waitpid.c getdnnm.c gethstnm.c getcwd.c ptrace.c /
    mkfifo.c setegid.c wait.c getpagesize.c seteuid.c /
    wait3.c setpgrp.c getdtablesize.c create_module.c /
    cmsg_nxthdr.c longjmp.c open64.c ftruncate64.c mmap64.c /
    truncate64.c getrlimit64.c setrlimit64.c creat64.c /
    llseek.c pread_write.c _exit.c sync.c getdirname.c /
    sendfile64.c xstatconv.c getdents.c getdents64.c vfork.c /
    ulimit.c ntp_gettime.c
    ifneq ($(strip $(EXCLUDE_BRK)),y)
    CSRC+=sbrk.c
    endif
    ifeq ($(strip $(UCLIBC_PROFILING)),y)
    CSRC+=gmon.c
    endif
    ifeq ($(strip $(UCLIBC_PROPOLICE)),y)
    CSRC+=ssp.c
    endif
    COBJS=$(patsubst %.c,%.o, $(CSRC))

    MSRC=syscalls.c
    MOBJ=$(shell ./list_syscalls.sh)

    OBJ=$(COBJS) $(MOBJ)

    all: $(STR_SYSCALLS) $(OBJ) $(LIBC)

    $(LIBC): ar-target

    ar-target: $(OBJ)
    $(AR) $(ARFLAGS) $(LIBC) $(OBJ)

    $(MOBJ): $(MSRC)
    $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
    $(STRIPTOOL) -x -R .note -R .comment $*.o

    $(COBJS): %.o : %.c
    $(CC) $(CFLAGS) -c $< -o $@
    $(STRIPTOOL) -x -R .note -R .comment $*.o

    headers:
    $(LN) -fs ../libc/sysdeps/linux/common/fpu_control.h $(TOPDIR)/include/

    clean:
    $(RM) *.[oa] *~ core crt[in].* *.S
    ---------------------------------------------
    Q
    make[5]: Entering directory `/root/uClinux-dist/uClibc/libc/misc/mntent'
    arm-elf-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fstrict-aliasing -Os -O2 -g -fomit-frame-pointer -fno-common -fno-builtin -Wall -DEMBED -mlittle-endian -msoft-float -fno-builtin -nostdinc -D_LIBC -I../../../include -I. -I/usr/local/lib/gcc-lib/arm-elf/2.95.3/include -DNDEBUG -c mntent.c -o mntent.o
    In file included from ../../../include/mntent.h:26,
    from mntent.c:4:
    ../../../include/paths.h:35: config/autoconf.h: No such file or directory
    make[5]: *** [mntent.o] Error 1
    make[5]: Leaving directory `/root/uClinux-dist/uClibc/libc/misc/mntent'
    make[4]: *** [_dir_mntent] Error 2
    make[4]: Leaving directory `/root/uClinux-dist/uClibc/libc/misc'
    make[3]: *** [_dir_misc] Error 2
    make[3]: Leaving directory `/root/uClinux-dist/uClibc/libc'
    make[2]: *** [_dir_libc] Error 2
    make[2]: Leaving directory `/root/uClinux-dist/uClibc'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/opt/uClinux-dist/lib'
    make: *** [lib_only] Error 2
    A
    vi ./uClibc/include/paths.h
    35line:config/autoconf.h===>linux/autoconf.h
    ========================================================
    Q(uclib 0.9.28)
    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 -DL___glibc_strerror_r wstring.c -c -o __glibc_strerror_r.o
    cc1: warning: -g with -fomit-frame-pointer may not give sensible debugging
    wstring.c:1574: `__glibc_strerror_r' undeclared here (not in a function)
    wstring.c:1574: warning: type defaults to `int' in declaration of `__strerror_r'
    wstring.c:1575: `__glibc_strerror_r' undeclared here (not in a function)
    wstring.c:1575: warning: type defaults to `int' in declaration of `_glibc_strerror_r'
    wstring.c:1575: `_glibc_strerror_r' redeclared as different kind of symbol
    ../../include/string.h:260: previous declaration of `_glibc_strerror_r'
    wstring.c: In function `__glibc_strerror_r':
    wstring.c:1579: warning: implicit declaration of function `__xpg_strerror_r'
    make[4]: *** [__glibc_strerror_r.o] Error 1
    make[4]: Leaving directory `/root/Desktop/uclinuxkernel/uClibc/libc/string'
    make[3]: *** [_dir_string] 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
    debian:/opt/uClinux-dist#
    A
    use uClibc-0.9.27 same file name replace it
    -------------------------------------------------
    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
    A
    /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
    A
    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
    A
    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

    A
    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://www.ee.oulu.fi/~tuukkat/quickcam/qce-gq-rh9.patch
    wget http://www.ee.oulu.fi/~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 detected! 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 <yourlogin> 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 http://sourceforge.net/projects/usbsnoop/
    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)
    -------------------------------------------------------------
    Error:
>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/


    ===============================================

    参考文档:

    1.http://www.ee.oulu.fi/~tuukkat/quickcam/FAQ
 
生产环境下oracle19c rac恢复节点2 现状:目前节点1数据库集群服务处于正常,节点2服务器由于系统故障无法恢复,确认系统重装。目标:不影响业务的情况下,重新把节点2添加回集群中。 阅读详情

相关推荐

RPN 解析

RPN全称是Region Proposal Network,Region Proposal的中文意思是“区域选取”,也就是“提取候选框”的意思,所以RPN就是用来提取候选框的网络; 1. RPN的意义 RPN第一次出现在世人眼中是在Faster RCNN这个结构中,专门用来提取候选框,在RCNN和Fast RCNN等物体检测架构中,用来提取候选框的方法通常是Selective Se

lanran2的博客 10万+

ubuntu20.04安装完显卡驱动后黑屏问题解决

我开始是在 可视化软件 软件与更新 中安装的显卡驱动,并按照网上教程禁用了nouveau驱动。但在重启过程中,发现电脑黑屏,左上角有横光标闪过。重启过程中,按f2进入bios模式,显卡设置为独立显卡,并关闭安全启动。于是再次按照网上教程,按住ctrl+alt+f1-6,进入tty模式,都没反应。按住组合键ctrl+alt+f3(f1-f6均可)进入字符界面,先输入用户名,再输入密码。4. 检查nouveau驱动是否禁用成功,输入下面代码,没有任何输出说明成功。,找到自己显卡对应linux驱动,下载。

qq_41356740的博客 1万+

VSCode+PlatformIO新建工程卡成狗?3步提速大法实测有效(附镜像源配置)

针对VSCode+PlatformIO新建工程时因依赖下载缓慢导致的加载慢问题,本文提供了三步核心提速方案。通过配置Python环境变量、修改PlatformIO插件设置以使用国内镜像源,并优化pip配置文件,实测可大幅缩短工程创建时间,有效解决创建工程卡顿的痛点。

delta的博客 734

Ubuntu22.04安装视觉环境(CUDA CUDNN TensorRT realsense PCL OpenCV)

CUDA CUDNN TensorRT realsense PCL OpenCV 安装

hunheyufu的博客 8890

STC15单片机实战项目软件开发第四讲 - 按键检测(状态机)

软件开发第四讲 - 按键检测(状态机) 一、工具链接 1、Keil c51 UV4 https://yunpan.360.cn/surl_yrIfYYmeRFk 2、STC-ISP下载软件 https://yunpan.360.cn/surl_yxH4CuUUvI3 二、学习板获取方式 方法1:自己设计PCB,自行打板焊接; 方法2:用群主设计的PCB,自行打板焊接; 方法3:向群主购买,淘宝链接...

硬件家园 3050

流体动力学仿真软件:XFlow_(20).案例研究:声学仿真

在流体动力学仿真软件中,声学仿真是一个重要的应用领域。通过数值模拟,工程师和科研人员可以预测和分析流体系统中的声学现象,如气动噪声、声波传播和声场分布。这些仿真结果对于优化设计、降低噪声水平和提高系统性能具有重要意义。本节将详细介绍如何在流体动力学仿真软件中进行声学仿真,包括声学模型的选择、参数设置、后处理分析等内容,并通过具体的案例来说明这些步骤。

kkchenjj的博客 909

【C编译】报错问题收集

收集一些自己遇到的报错信息及其解决办法,随时更新

qq_43194080的博客 5727

基于python CNN卷积神经网络模型实现6类别垃圾分类 毕业设计 附完整代码数据

基于python CNN卷积神经网络模型实现6类别垃圾分类 毕业设计 附完整代码数据

1671

初学者——常见C语言错误

更好  1、[Note] each undeclared identifier is reported only once for each function it appears in [注]每个未申报的标识符是为每一个函数似乎只报道一次(写错了或多写了标识符) 如:int num【100】     a【0】= 1;   a就是错误,为申明。 2、Error] lvalue req...

weixin_43410934的博客 9351

37、深入解析SCTP与RTP传输协议

本文深入解析了SCTP与RTP两种重要传输协议。SCTP提供可靠的多流数据传输,支持关联管理、选择性确认和错误处理,适用于高可靠性场景;RTP则专注于实时音视频数据的低延迟传输,配合RTCP实现质量监控。文章详细介绍了两种协议的数据结构、工作流程及应用场景,并对比其特性,帮助开发者根据可靠性、实时性和多流需求选择合适的协议。

time3的博客 91

基于YOLOv10的微小目标检测,多头检测器提升小目标检测精度

引入多头检测器助力YOLOv10,暴力提升小目标检测性能

①答疑群聊服务;②YOLO大模型知识问答系统;③计算机视觉论文生成智能体; 2576

make uImage Makefile:617: include/config/auto.conf: No such file or directory Makefile:664: include

这种时候,需要指定内核,它缺少.config文件,你需要去make + 型号

weixin_43568960的博客 6259

fastadmin管理员页面实现手机验证码登录功能-腾讯云短信插件

fastadmin管理员页面实现手机验证码登录功能-腾讯云短信插件

向宇的博客,专注php/web全栈 unity游戏开发,欢迎大家评论纠错 4206

[ZT]S3C44B0开发板移植内核2.6 uclinux记录

S3C44B0开发板移植内核2.6 uclinux记录 Sam Fei (email: samfei@163.com) 最新内核编译 2 这个编译器不支持.incbin的缘故, 下载新的编译器 2 现在注释掉gettimeoffset = s3c44b0x_gettimeoffset后,编译: 3 注释掉MOD_DEC_USE_COUNT和MOD_INC_USE_COUNT 3 2.6.9内核 5

HP Studio 3654

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

each undeclared identifier is reported only once for each function it appears in

each undeclared identifier is reported only once for each function it appears in 意思是:对于每个出现在其中的函数,每个未声明的标识符只报告一次 1.按照百度大多数的做法是,添加完整头文件。 2.但是在我的代码里,却是一个大家都很难想象到的情况。 由于是一个代码demo,代码量少,无意中被我弄好了,居然是一个不知道是不是格式的问题。 原本出错的代码: #include <sys/types.h> #in.

枕上青灯竹书香的博客 2万+

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

linux disk I/O tuning?

原贴地址:http://www.lupaworld.com/441/viewspace_2106.html linux disk I/O tuning?    

最实用的Linux博客 6326

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

字符驱动设备踩坑

1.编译源码出现: ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. WARNING: Symbol version dump /root/linux-3...

weixin_40904220的博客 1015

DeepSeek-R1国产化系统gpu驱动+cuda+ollama+webui可视化离线私有化部署

网上大部分教程都是在线部署,完全离线私有化部署的文章不多,本文介绍从GPU驱动离线安装、cuda离线安装、ollama离线安装、deepseek离线部署、open webui离线安装几个方面,让小白0基础也可以私有化部署大模型deepseek-R1。我使用的设备是银河麒麟V10操作系统,海光CPU,内存128G,三张英伟达T4显卡(每张显存16G)。这里说一下国产化海光芯片c86架构就是源自于x86架构,与intel和amd等x86架构cpu使用并没有区别。

u014073556的博客 3633

内核启动流程分析----配置

目录 1 .config文件 2 配置项 2.1include/linux/autoconf.h 2.2drivers/net/Makefile 2.3include/config/auto.conf 3 总结 1 .config文件 内核在配置的时候,会生成.config文件,我们看一下.config文件的内容。 2 配置项 .config文件里面是有很多的配置项,我们以CONFIG_DM9000=y为例, 我们看一下谁来使用这个配置项,我们在内核目录用中grep搜索一下 ...

C/C++、嵌入式开发、深度学习算法、模型部署与推理优化 1926

解决linux/config.h: No such file or directory

问题:          “linux/config.h: No such file or directory” 原因与解决方法:         原因是2.6.19之后的内核没有了config.h文件,因此直接把对应的include注释掉即可。        或者添加头文件#include

梧桐树 2万+

Linux内核安装-5.9.1为例

Linux笔记 Linux内核的安装.md RToax 2020年10月 1. 准备工作 1.1. 下载 The Linux Kernel Archives Index of /pub/linux/kernel/ 我下载的版本为:linux-5.9.1.tar.xz 1.2. 解压 tar -xf linux-5.9.1.tar.xz 解压后的大小为: du -sh linux-5.9.1/ 1.1G linux-5.9.1/ 1.3. 移动 mv linux-5.9.1 /usr/src/kern

RToax 2184

编译Linux内核(5.5.7版本)

好多次的作业都布置过编译内核的作业,这次Linux内核课程的预备作业又是编译Linux内核,所以把操作的整个过程记录下来。 编译准备工作 下载内核源码文件 从kernel.org下载最新的稳定版kernel5.5.7,然后使用cp linux-5.5.7.tar.xz /usr/src将文件移动到存储文件夹。cd /usr/src进入文件夹,下载文件的后缀名为.tar.xz,所以先xz -d x...

Unbreakablewxk的博客 934

树莓派驱动——hello world

文章目录开发环境树莓派查看内核版本PC下载树莓派内核下载交叉编译工具Tools把交叉编译工具路径加入到环境变量编译树莓派内核编写驱动程序测试 开发环境 PC: Ubuntu 14.04.6 LTS (GNU/Linux 4.4.0-142-generic x86_64) 树莓派: Linux raspberrypi 4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l 树莓派查看内核版本 wyj@raspberrypi:~ $ uname -a

WuYujun's blog 2320

autoconf.h文件找不到

今天第一次编译的时候发现出现如下错误:  ../../linux-2.6.x/include/linux/autoconf.h,no such file or directory 去相应的路径下查看,这个文件果然没有,说明这个文件是中间生成的文件,由于某些原因这个文件没有生成。跟老大确认,有的人会出现这个问题,是因为make kernel的时候有错,导致这个文件没有生成,但是编译器又没有停下来

ofrq_cs_dn的专栏 4747

英语

1.链条 chain 2.数据 data 3.查找 find 4.比较 compare 5.头 head 6.尾巴 tail 7.

小伟的博客 1208

函数简介篇——错误处理函数:errno值、perror()、streeor()、streeor_r()

说明:   本文章旨在总结备份、方便以后查询,由于是个人总结,如有不对,欢迎指正;另外,内容大部分来自网络、书籍、和各类手册,如若侵权请告知,马上删帖致歉。   QQ 群 号:513683159 【相互学习】 内容来源:   《Linux系统编程》 一、错误处理:errno   1.glibc的支持:     glibc对库函数和系统调用的errno提供透明支持。   2.errno值定位错误:     在系统编程中,错误通常通过函数的返回值表示,错误值描述调用函数发生了错误,但不提供原因,可通过特殊的变量

weixin_42645653的博客 1998
上一篇: vi使用手册(zt)
下一篇: OSI七层模型(ZT)
TrueLie
博客等级 码龄24年 85粉丝 23原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值