Obtaining uboot source for MPC8131E-RDB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Obtaining uboot source for MPC8131E-RDB

5,904 Views
TedMarshall
Contributor II
Hi All.

I found this thread which shows how to extract the kernel source out of the LTIB using --configure and "Leave the sources after building" - very useful.  I also need to get the sources for uboot.  I also need to get the uboot sources.  I tried the same thing while forcing a uboot build (selected a different flavor) but the u-boot-... tree was not left in rpm/BUILD or anywhere else.

Anyone know how to preserve the uboot sources?

Thanks
http://forums.freescale.com/freescale/board/message?board.id=MCUCOMM&message.id=778" target="_blank
0 Kudos
Reply
11 Replies

3,925 Views
TedMarshall
Contributor II
Bump.  Anyone have any ideas before I start digging through the ltib Perl script?
0 Kudos
Reply

3,925 Views
TedMarshall
Contributor II

I'm replying to my own thread with the answer I found, for anyone else with this problem.

 

To obtain the u-boot sources:

   ./ltib -m prep -p u-boot -l

Similar for the kernel:

    ./ltib -m prep -p kernel -l

 

I came across Freescale's App Note AN3765, "Porting Linux for the MPC5121e" and found it to be very useful, even though it's for a different chip.

0 Kudos
Reply

3,925 Views
bbjh1
Contributor I

Hi Ted,

 

I know it is been a while since you posted this message, but I just started working on the mpc5121e. I am trying to install LTIB. I followed all the steps and I am facing a problem and I am hoping you can help me. I am trying to turn on the LEDs on the ADS5121 board, the only connection available for me is the serial modem and the ehternet cable. I know that the easiest way to turn on the led is using the USB Tap, but it's kinda expensive and I don't think the school will pay for it. So my only solution is to use linux modules and try to create a driver. I was wondering if you can help me and tell me how to do that and how can I load my code on the board so that I can turn on the LED.

Thank you very much.

0 Kudos
Reply

3,925 Views
abartky
Contributor IV

bbjh1,

 

Some time ago I updated the open source ptpd code from SourceForge.net to support version 2 PTP, 802.1AS and also MPC831x hardware timestamping.  I just recently open sourced that code for free usage under a GPL license.  As part of that project, I wrote an LED driver to manipulate the MPC8313E-RDB board from a Linux User application.

 

The file is ledlib.c and is pretty much fully self contained. 

 

The main page for the PTP version 2 daemon (ptpv2d) is at: http://code.google.com/p/ptpv2d/

 

You can navigate to the source code page and then and do checkout or browse code down to the application/src/dep directory where you'll find ledlib.c

 

For a direct link you can use this link: http://ptpv2d.googlecode.com/svn/trunk/ptpv2d-1a0/application/src/dep/ledlib.c

 

You should be able to adapt this code for you usage.  I took a quick look at the ADS5121 spec and the base address is 0x60000000 with an offset of 0x011 for a register to turn off and on the LEDs.

 

Hope this helps and good luck on your project.

 

Alan

0 Kudos
Reply

3,925 Views
bbjh1
Contributor I

Thank you guys for your quick reply.

 

Alan thank you for providing me with the code. So should I use u-boot to load this code? I know my questions are for beginners but I have no background in embedded systems, especially embedded Linux and I have no one around me who can help me! Thank you again.

0 Kudos
Reply

3,925 Views
abartky
Contributor IV

bbjh1,

 

At least when it comes to my code, it was written for a linux application environment so if you wanted to use it "as is" you'd also need a small main.c program file, compile and build it for Linux and then download the binary program file as part of your Linux build.

 

I did all this on the MPC8313 board and for that board, I don't rembmer where I got it, but there was a guide on how to build linux under LTIB, and also how to add a simple program.  I would hope the ADS5121 would have the same guides on how to do this.

 

As far as Uboot goes, if all you want to do is blink the LEDs for a test, I believe Uboot allows you to read and write to an address on the command line.  That would at least give you a starting point to try out the LEDs on the board by just typing a write command, address and value to make sure you can do something simple wihout having to load up a full LInux program.

 

Hope this helps.

 

Best regards,

 

Alan

0 Kudos
Reply

3,925 Views
bbjh1
Contributor I

Hi Alan

 

I am sorry to bother you with my questions. After I installed Linux BSP for the ADS5121 board, I tried to load the uImage file on the board using NFS. But for some reason I was not able. Attached is the output. If you have time and you can help me I would really appreciate it. Thank you so much.

 

Enclosed:

 

- nfs server.txt : to check that the nfs server is functioning well.

- u-boot.txt : print the env in u-boot.

- nfs_run.txt : the output during NFS boot.

 

P.S. please use Wordpad to view the files.

 

Thank you so much for your help.

 

bbjh1

0 Kudos
Reply

3,925 Views
abartky
Contributor IV

bbjh1,

 

A couple of points.

 

When it comes to looking at the files, I hopefully will find some time, maybe this weekend as obviously I'm providing free advice on this board and now to you in particular.

 

When it comes to trying to get NFS running and you've mentioned that you are a newbie, first piece of quick advice is that I woudn't recommend trying to do your first project booting uboot and NFS.  There are lots of things you have to get right as far as building the image, getting the NFS server setup correctly and also setting up the U-boot configuration.  I would highly recommend that instead if you are using LTIB and U-boot, you start by building loadable images and use TFTP to download those images to the target board.  I've not used the ADS board, but I assume the settings are similar.  You can search for my posts on the MPC8313 board and Uboot as I've given examples on how to configure uboot for this type of operation.  I would also highly recommend that initially you test with a back to back ehternet cable to your TFTP server rather than going through a network.  That will also help you isolate configuration problems versus network issues.

 

Lastly when it comes to this board, it is generally not appropriate to keep tagging on to the same subject with different problems.  Not booting from NFS is different from turning on LEDs which was different from the original topic that you tageed onto.  The appropriate use of the board is to first search for related topics (I know there are other posts on NFS) and then if you can't find it, start a new post or question.  This way when other people are looking for data on this board (example on controlling LEDs) they have a better chance at finding the data assuming as the data should be related to the subject of the post thread.   Also I hope you notice that you can also at least change the subject of the message on replies as I have done even with this reply.  That will also let the casual reader who gets email to see if they are interested in the subject matter or not as far as deciding to read the message.

 

Also one more option for this reply.  The board also lets you click on a contributors name such that you can also send private email.  This way if you believe you really need to just ask an individual person for help, you can send them a private email instead.

 

Best regards,

 

Alan

0 Kudos
Reply

3,925 Views
bbjh1
Contributor I

Alan,

 

Thank you for your help and your advice. I will try to fix my configuration settings and will contact you if I need further assistance.

Again thank you for your help.

 

bbjh1

0 Kudos
Reply

3,925 Views
bbjh1
Contributor I

Alan,

 

Thank you for your quick reply!! I really appreciate your patience with me. It is getting little bit annoying working on this board and dealing with the freescale support because they take so long to get back to me. Anyways, I will try your solution and hopefully it will work.

Thank you again.

0 Kudos
Reply

3,925 Views
TedMarshall
Contributor II

This is a bit off topic and I'm not familiar with the 5121e but the quick and easy way to access I/O registers is to use mmap(2) on /dev/mem from a user-space program (you need read/write access to /dev/mem, of course).

 

This uses prysical memory addresses so you don't need to know where the register is in kernal mapped memory (or if it is even mapped).  However, if the 5121e is like the 8313, you do need to know what the kernel initialization (or is it pre-initialized by u-boot, I don't remember) sets in IMMR so you know where the registers are mapped in physical memory.  On the 8313, it uses 0xE0000000.

 

I hope this helps.

0 Kudos
Reply