[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uclinux-dev
Subject:    Re: [uClinux-dev] compile error even after disabling support for
From:       Greg Ungerer <gerg () snapgear ! com>
Date:       2004-05-31 13:01:53
Message-ID: 40BB2CC1.3080108 () snapgear ! com
[Download RAW message or body]

Hi Anand,

anand_12 wrote:
> I am trying to build uClinux for MircoBlaze.I was repeatedly getting a "..In \
>                 function `__xchg':
> ../uClinux-dist/linux-2.4.x/include/asm/system.h:112: unknown register name `r12' \
> in `asm'" during make

If you have truely disabed all mtd based user utilities from your build
then your build would not be traversing into the mtd-utils directory.

In any case, the problem you are having is when the build is trying
to build host based versions of mkfs.jffs and mkfs.jffs2. The build
is quite correctly trying to use the host gcc to do this.

The problem is that it is incorrectly using your dist linux kernel
include files to do it. And these will be configured with the asm
directory of the target. It should be compiling against your host
based configured kernel.

I don't recall what dist version you are using, but somewhere near
the top of user/mtd-utils/Makefile there should be a define for
"MY_CFLAGS", or "BUILD_CFLAGS". Set these so that they use the
host based kernel includes, ie "-I/usr/include".

Regards
Greg



> So I disabled MTD support and then tried to compile but even now it seems to be \
> getting into the mtd-utils directory and reporting the same error(at some other \
> later point though)..the dump is as shown below : 
> -----------------------START----------------------------
> 
> 
> ..#
> ..#make
> ........
> .........
> mb-gcc  -O1 -g   -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED \
> -I/home/svasn/tools/uClinux-dist/lib/uClibc/include \
> -I/home/svasn/tools/uClinux-dist/lib/libm \
> -I/home/svasn/tools/uClinux-dist/lib/libcrypt_old -I/home/svasn/tools/uClinux-dist \
> -fno-builtin -mno-xl-soft-mul -mno-xl-soft-div -mxl-barrel-shift \
> -I/home/svasn/tools/uClinux-dist/linux-2.4.x/include \
> -I/home/svasn/tools/uClinux-dist/lib/zlib -D__USE_BSD  -O1 -g   -Dlinux -D__linux__ \
> -Dunix -D__uClinux__ -DEMBED -I/home/svasn/tools/uClinux-dist/lib/uClibc/include \
> -I/home/svasn/tools/uClinux-dist/lib/libm \
> -I/home/svasn/tools/uClinux-dist/lib/libcrypt_old -I/home/svasn/tools/uClinux-dist \
> -fno-builtin -mno-xl-soft-mul -mno-xl-soft-div -mxl-barrel-shift \
> -I/home/svasn/tools/uClinux-dist/linux-2.4.x/include -Wl,-elf2flt -nostartfiles \
> /home/svasn/tools/uClinux-dist/lib/uClibc/lib/crt0.o -nostdlib \
> -L/home/svasn/tools/uClinux-dist/lib/uClibc/. \
> -L/home/svasn/tools/uClinux-dist/lib/uClibc/lib -L/home/svasn/tools/uClinux-dist/li
b!
> /libm -L/home/svasn/tools/uClinux-dist/lib/libnet \
> -L/home/svasn/tools/uClinux-dist/lib/libdes \
> -L/home/svasn/tools/uClinux-dist/lib/libaes \
> -L/home/svasn/tools/uClinux-dist/lib/libpcap \
> -L/home/svasn/tools/uClinux-dist/lib/libssl \
> -L/home/svasn/tools/uClinux-dist/lib/libcrypt_old \
> -L/home/svasn/tools/uClinux-dist/lib/zlib   fcp.c  -lc \
> /usr/local/microblaze-elf-tools/bin/../lib/gcc-lib/microblaze/2.95.3-4/./../../../../microblaze/lib/libc_hard_shift.a \
> /usr/local/microblaze-elf-tools/bin/../lib/gcc-lib/microblaze/2.95.3-4/./libgcc.a   \
> -o fcp fcp.c:245: warning: #warning "Check for smaller erase regions"
> gcc -I/home/svasn/tools/uClinux-dist/linux-2.4.x/include -o build/erase erase.c
> gcc -I/home/svasn/tools/uClinux-dist/linux-2.4.x/include -o build/eraseall \
> eraseall.c gcc -I/home/svasn/tools/uClinux-dist/linux-2.4.x/include -o \
> build/nftl_format nftl_format.c gcc \
> -I/home/svasn/tools/uClinux-dist/linux-2.4.x/include -o build/nftldump nftldump.c \
> gcc -I/home/svasn/tools/uClinux-dist/linux-2.4.x/include -o build/doc_loadbios \
> doc_loadbios.c gcc -I/home/svasn/tools/uClinux-dist/linux-2.4.x/include -c -o \
> build/doc_loadipl.o doc_loadipl.c In file included from \
> /home/svasn/tools/uClinux-dist/linux-2.4.x/include/asm/bitops.h:10, from \
> /home/svasn/tools/uClinux-dist/linux-2.4.x/include/asm/posix_types.h:19, from \
> /home/svasn/tools/uClinux-dist/linux-2.4.x/include/linux/posix_types.h:46, from \
> /home/svasn/tools/uClinux-dist/linux-2.4.x/include/linux/types.h:15, from \
>                 doc_loadipl.c:32:
> /home/svasn/tools/uClinux-dist/linux-2.4.x/include/asm/system.h: In function \
>                 `__xchg':
> /home/svasn/tools/uClinux-dist/linux-2.4.x/include/asm/system.h:112: unknown \
> register name `r12' in `asm' make[2]: *** [build/doc_loadipl.o] Error 1
> make[2]: Leaving directory `/home/svasn/tools/uClinux-dist/user/mtd-utils'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/svasn/tools/uClinux-dist/user'
> make: *** [subdirs] Error 1
> ..#
> ..#
> ..#
> -------------------------END-------------------------------
> 
> Can anyone tell me what is happening?..I have not made any changes to any Makefiles \
> or config files in the source tree....the distribution is \
> "uClinux-dist-20030909.tar.gz"... 
> For a similar post sometime back from me,I got a response that the compiler being \
> used might be gcc instead of mb-gcc...but why is mb-gcc not being used?.. 
> FYI...this is the content of the 'config.arch' file found on this path : \
> ../uClinux-dist/ 
> ===========================START==========================
> 
> CONSOLE_BAUD_RATE = 57600
> 
> DISABLE_XIP = 1
> DISABLE_SHARED_LIBS = 1
> DISABLE_MOVE_RODATA = 1
> 
> include $(ROOTDIR)/vendors/Xilinx/common/microblaze/config.arch
> 
> =========================END=============================
> 
> 
> and the contents of the "config.arch" found on this path :
> ../uClinux-dist/vendors/Xilinx/common/microblaze/ is 
> 
> =========================START============================
> 
> .EXPORT_ALL_VARIABLES:
> 
> # ARCH = kernel,  TARGET_ARCH = uClibc
> MACHINE       = mbvanilla
> ARCH          = microblaze
> CROSS_COMPILE = mb-
> CROSS         = $(CROSS_COMPILE)
> 
> include $(ROOTDIR)/vendors/Xilinx/common/common-config.arch
> 
> ========================END===============================
> 
> 
> the config options used are :
> 
> Insight/XC2V1K_Microblaze ->  Vendor/Product
> linux-2.4.x               ->  kernel version
> uClibc                    ->  Libc version 
> 
> Thanks and Regards
> V.Anand
> (www.tenet.res.in)
> 
> 
> 
> 
> 
> 
> 
> ****************************************
> 
> -----
> Trouble with windows? Re boot.... 
> Trouble with Linux? Be root....
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev@uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev@uclinux.org
> 

-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@snapgear.com
SnapGear -- a CyberGuard Company            PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic