[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] Compiling uClinux on MicroBlaze



Hi Ashish,
I hope this answers your questions.

>About opb_timer
>-----------------
>When I had no opb_timer in EDK why the linux compilation
>complained about it? Clearly it should have known this
>from auto-config.in file that there is no need to complain
>about something that's not present in the hardware definition.

>About missing timer interrupt entires
>-----------------
>When I did add the timer opb_timer, why did I not get
>the XILINX_TIMER_0_IRQ set in auto-config.in. In fact
>it still doesn't exist there, I've entered the value
>in autoconfig.h file as I pointed out earlier.

The obp_timer is a requirement for uClinux, that's why it was complaining. It can be defined as the main hardware timer. You should make sure you also have an interrupt controller if you don't have one already.

Here is a screen shot of my own timer and interrupt controller:
http://www.gameboysandrobots.com/files/images/timer%26interrupt.html


>About the 'ln' error.
>---------------------
>I understand that people had patched up the Makefile to
>avoid getting link errors that I found the fix for by
>commenting, but these patches were provided in 2005, so
>when I got the uClinux-dist and uClinux-2.4.x yesterday
>why didn't they reflected the correct patches?

I guess my question is where did you get the uClinux-dist and uClinux-2.4.x files? It does seem a little silly that these changes aren't reflected in the latest version.

Is your uClinux image.bin booting yet?

On 3/21/07, Ashish Darbari <ashish@xxxxxxxxxxxxxxx> wrote:
Hi Jose.

Many thanks for your message. I looked into what you pointed out and
here is a decription
of what happened. I got the image.bin file generated finally but not
without going
through a bumpy patch.

To begin, I had no timer in EDK. Didn't see anything like opb_timer in
the system
assembly. So in EDK 8.1 (with the recent patches) I added opb_timer, and
checked
the option 'Only one timer'.

Then re-compiled the libraries to generate the auto-config.in
and copied it back to the path to uclinux-auto.

Then did a 'make clean oldconfig dep', followed by

'make xconfig' (followed all the steps in the Xilinx App Notes)

At this stage I didn't see any of the old messages and infact
I notice
#define CONFIG_XILINX_TIMER_0_BASEADDR 0xFFFFFFFF
in my autoconf.h file.


Then did a 'make'. Now I got the error complaining
about CONFIG_XILINX_TIMER_0_IRQ being undeclared.

So this time around I hacked the linux/autoconfig.h to add

#define CONFIG_XILINX_TIMER_0_IRQ (0)

Then did a 'make'.

This time the compile process went-on for a while till I got
an error of the sort:

/dev/null 2>&1 || exit 0
Making symlinks in include/
Making include/c++ symlink to compiler c++ includes
sed: -e _expression_ #2, char 21: Unknown command: ``Q''
ln: `3.4.1': File exists
make[2]: *** [all] Error 1
make[2]: Leaving directory
`/home/ashish/uClinux-dist/include'
make[1]: *** [all] Error 2
make[1]: Leaving directory

I noticed that there was a fix for this posted on the mailing list
(http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2006/09/msg00007.html)
to comment out the portion in uClinux/include/Makefile
which I did, and finally obtained the image.bin file.

I have several questions/doubts: Perhaps these will enable me understand
the process better.

About opb_timer
-----------------

When I had no opb_timer in EDK why the linux compilation
complained about it? Clearly it should have known this
from auto-config.in file that there is no need to complain
about something that's not present in the hardware definition.

About missing timer interrupt entires
-------------------------------------

When I did add the timer opb_timer, why did I not get
the XILINX_TIMER_0_IRQ set in auto-config.in . In fact
it still doesn't exist there, I've entered the value
in autoconfig.h file as I pointed out earlier.

About the 'ln' error.
---------------------

I understand that people had patched up the Makefile to
avoid getting link errors that I found the fix for by
commenting, but these patches were provided in 2005, so
when I got the uClinux-dist and uClinux-2.4.x yesterday
why didn't they reflected the correct patches?


Thanks
Ashish
---------------------------------------------------------------------------------------

Jose Torres wrote:
> Hi Ashish,
> Do you have a timer peripheral added to your hardware in the EDK?
>
> If so,
> Look in the header file of microblaze_time.h to see if there are any
> includes for a configuration file. Time should use an include that
> uses xparameters.h to get the CONFIG_XILINX_TIMER_0_BASEADDR. I am not
> sure what it would use.
> Goto back one directory from the include folder to the linux directory.
> Open the config.h file.
> If you see another include for autoconf.h goto that file if not please
> post it here. Or determine if it is defining that symbol properly.
> My autoconf.h contains:
> #define CONFIG_XILINX_TIMER_0_BASEADDR 0x41C40000
> Of course yours will be a different address according to your hardware.
>
> If not, you will simply need to add one.
>
> Can anyone provide steps as to how to modify the defines without
> Petalinux?
>
> Hope that helps Ashish. Best of luck.
>
>
>
>
>
> On 3/20/07, * Ashish Darbari* <ashish@xxxxxxxxxxxxxxx
> <mailto:ashish@xxxxxxxxxxxxxxx >> wrote:
>
>     I downloaded the uClinux-dist and uClinux-2.4.x form the cvs
>     repository
>     today from uClinux.org and
>     have followed the notes on compiling uClinux on Microblaze provided by
>     Xilinx XAPP730(v1.2).
>     ( www.xilinx.com/bvdocs/appnotes/*xapp730*.pdf
>     < http://www.xilinx.com/bvdocs/appnotes/*xapp730*.pdf>)
>
>     Am using Virtex II Pro Board, and have followed all the instructions
>     rather faithfully in the manual
>     --- after doing a 'make dep' I get no error, but I get the following
>     error once I do 'make'.
>
>     Am I doing something silly somewhere?
>
>     Thanks for help.
>
>     Ashish
>
>     -------------------------------------------------------------------------------------------------------
>
>     In file included from time.c:26:
>     /home/ashish/uClinux/src/uClinux-2.4.x/include/asm/microblaze_timer.h:2
>     5:2: #error No timer peripheral specified
>     time.c: In function `timer_interrupt':
>     time.c:55: error: `CONFIG_XILINX_TIMER_0_BASEADDR' undeclared
>     (first use
>     in this functio                                  n)
>     time.c:55: error: (Each undeclared identifier is reported only once
>     time.c:55: error: for each function it appears in.)
>     time.c: In function `do_gettimeofday':
>     time.c:121: warning: the address of `mach_gettimeoffset', will always
>     evaluate as `true'
>     time.c: In function `do_settimeofday':
>     time.c:148: warning: the address of `mach_gettimeoffset', will always
>     evaluate as `true'
>     make[2]: *** [time.o] Error 1
>     make[2]: Leaving directory
>     `/home/ashish/uClinux/src/uClinux-2.4.x/arch
>     /microblaze/kernel'
>     make[1]: *** [_dir_arch/microblaze/kernel] Error 2
>     make[1]: Leaving directory `/home/ashish/uClinux/src/uClinux- 2.4.x'
>     make: *** [linux] Error 1
>     [ashish@localhost uClinux-dist]$
>
>
>
>     ___________________________
>     microblaze-uclinux mailing list
>     microblaze-uclinux@xxxxxxxxxxxxxx
>     <mailto:microblaze-uclinux@xxxxxxxxxxxxxx>
>     Project Home Page :
>     http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
>     <http://www.itee.uq.edu.au/%7Ejwilliams/mblaze-uclinux>
>     Mailing List Archive :
>     http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>     < http://www.itee.uq.edu.au/%7Elistarch/microblaze-uclinux/>
>
>
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Jose A. Torres
> Multi Disciplinary Robotics Club
> Multi Agent Bio-Robotics Lab (09-1100)
> Kate Gleason College of Engineering
> Rochester Institute of Technology
>
> http://mdrc.rit.edu
> http://gameboysandrobots.com
>
> Email: jat5737@xxxxxxx <mailto:jat5737@xxxxxxx>
> Lab phone:(585) 475-7208
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/




--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jose A. Torres
Treasurer
Multi Disciplinary Robotics Club
Multi Agent Bio-Robotics Lab (09-1100)
Kate Gleason College of Engineering
Rochester Institute of Technology

http://mdrc.rit.edu
http://gameboysandrobots.com

Email: jat5737@xxxxxxx
Cellphone:(585) 230-5709
Lab phone:(585) 475-7208
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~