AnsweredAssumed Answered

How to port uclinux on blackfin ?

Question asked by krvinit.10 on Feb 2, 2012
Latest reply on Aug 27, 2012 by amcl
Branched to a new discussion

As i new with this uclinux and blackfin. I want to know how to port uclinux on blackfin?

 

I am host pc is Linux (Ubuntu), i had installed tool chain by following http://docs.blackfin.uclinux.org/doku.php?id=toolchain:installing

 

Installing Packages on a Debian-based distro

 

 

 

  You can try using the update repository to install things, in three simple steps. (coLinux users, who are using the coLinux install from this site can skip steps one and two, since this is installed by default):

 

     Install the ADI key: $ wget http://download.analog.com/27516/distros/debian/apt.key $ sudo apt-key add apt.key

 

     Add this line to /etc/apt/sources.list.d/blackfin.sources.list by: $ sudo su - # mkdir -p /etc/apt/sources.list.d # cd /etc/apt/sources.list.d # echo deb http://download.analog.com/27516/distros/debian stable main > blackfin.sources.list

 

     Update all your local cache files:$ sudo apt-get update

 

     Then install the toolchain tuple you're interested in:$ sudo apt-get install blackfin-toolchain-uclinux blackfin-toolchain-linux-uclibc

 

after that i set the environment  path variable by

 

$ export PATH=$PATH:/opt/uClinux/bfin-uclinux/bin:/opt/uClinux/bfin-linux-uclibc/bin

 

after that i compiled a small C code using this tool chain, n got .o and .gdb file.

 

first i want run image of uclinux on simulator, so downloaded skyeye 1.2.4

 

after untar,

 

while doing "make" on skyeye,

 

root@ubuntu:/opt/uClinux/skyeye-1.2.4# make

 

--------------------------- NOTICE ------------------------------

 

If you always get error, please run "make NO_CHECK=1" instead.

 

-----------------------------------------------------------------

 

Checking whether host is big endian ... no

 

Checking gcc ... OK ( gcc version: 4.4.3 )

 

Checking whether the compiler supports x86 asm ... FAILED

 

 

 

*** It seems that the compiler don't support inline x86 AT&T ASM codes.

 

*** Run "make NO_DBCT=1" instead to ignore it.

 

 

 

make: *** [check] Error 1

 

 

 

 

 

 

 

root@ubuntu:/opt/uClinux/skyeye-1.2.4# ^C

 

root@ubuntu:/opt/uClinux/skyeye-1.2.4# make NO_CHECK=1

 

gcc -c device/nandflash/nandflash_smallblock.c -o binary/nandflash_smallblock.o -g -O2 -D_FILE_OFFSET_BITS=64 -DSTANDALONE -DDEFAULT_INLINE=0 -DMODET  -DMODET -I arch/arm -I arch/arm/common -I arch/arm/common/mmu -I arch/arm/mach -I arch/bfin/common -I arch/bfin/mach -I arch/coldfire/common -I arch/ppc/common -I device -I device/net -I device/lcd -I device/flash -I device/uart -I device/nandflash -I utils -I utils/share -I utils/main -I utils/config -I utils/debugger  -DARM  -I. -DGTK_LCD

 

device/nandflash/nandflash_smallblock.c: In function ‘nandflash_sb_setup’:

 

device/nandflash/nandflash_smallblock.c:521: warning: incompatible implicit declaration of built-in function ‘free’

 

device/nandflash/nandflash_smallblock.c:528: warning: incompatible implicit declaration of built-in function ‘free’

 

device/nandflash/nandflash_smallblock.c:550: warning: incompatible implicit declaration of built-in function ‘free’

 

device/nandflash/nandflash_smallblock.c:555: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘__off64_t’

 

device/nandflash/nandflash_smallblock.c:559: warning: incompatible implicit declaration of built-in function ‘free’

 

device/nandflash/nandflash_smallblock.c:539: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result

 

device/nandflash/nandflash_smallblock.c: In function ‘nandflash_sb_uninstall’:

 

device/nandflash/nandflash_smallblock.c:612: warning: incompatible implicit declaration of built-in function ‘free’

 

In file included from /usr/include/fcntl.h:205,

 

                 from device/nandflash/nandflash_smallblock.c:19:

 

In function ‘open’,

 

    inlined from ‘nandflash_sb_setup’ at device/nandflash/nandflash_smallblock.c:519:

 

/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments

 

make: *** [binary/nandflash_smallblock.o] Error 1

 

 

 

 

 

 

 

 

 

root@ubuntu:/opt/uClinux/skyeye-1.2.4# make NO_DBCT=1

 

--------------------------- NOTICE ------------------------------

 

If you always get error, please run "make NO_CHECK=1" instead.

 

-----------------------------------------------------------------

 

Checking whether host is big endian ... no

 

Checking gcc ... OK ( gcc version: 4.4.3 )

 

Checking bfd library ... FAILED

 

 

 

*** It seems that you don't have bfd library.

 

*** Run "make NO_BFD=1" instead to ignore it.

 

 

 

make: *** [check] Error 1

 

 

 

I want to know how to port uclinux on blackfin. The tool chain which is i had installed is right one..?? which uclinux  version is better to use? which uboot i have to use? Is uboot is required for running the uclinux on simulator? and how to make image of uclinux.? which  filesystem is required for porting?

 

Tell me the procedure and guide me in this because in not handy with this uclinux and blackfin.

Outcomes