LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-11-2011, 12:08 AM   #1
utkarshrawat
Member
 
Registered: Jul 2007
Posts: 120

Rep: Reputation: 15
Build Uimage


How to build uimage from my kernel linux-2.6.10_mvl401 ,then need to port on my arm PXA 300 through TFTP .
What all steps I require to do.In which configuration file i should make changes for ethernet for boot
 
Old 03-11-2011, 06:18 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
You haven't really given enough detail to give a concise answer. However, reading between the lines, it sounds like you need to cross-compile and kernel, and then use a boot host to load the kernel in the target using something like PXE.
If so, to build the kernel you will need the kernel sources and cross toolchain that runs on your build host and that is targeted to the particular ARM CPU of your PXA 300. Do you have those?
I isn't clear what you mean by 'port on my ARM through TFTP'. Normally, when TFTP is used, it is to boot a diskless host using only a network. Usually/sometimes, TFTP is used in conjunction with DHCP and a PXE bootloader. Is that what you mean?

--- rod.
 
Old 03-13-2011, 01:08 AM   #3
utkarshrawat
Member
 
Registered: Jul 2007
Posts: 120

Original Poster
Rep: Reputation: 15
I have a PXA 300 board in which I have load uboot. I have a monta vista 4 kernel (linux-2.6.10_mvl401).I need to build the uImage from that kernel(linux-2.6.10_mvl401) ,that uImage I need to port in my PXA 300 board arm processor through ethernet( I have TFTP software to load uImage) .
monta vista 4 kernel (linux-2.6.10_mvl401) supports the PXA300 board .
My Question are
-How should I build uImage from kernel (as I know uImage is built by kernel only).Does It requires uboot also.Since I have load uboot on my target board (PXA)
-U asked about the kernel & cross compiler ,Kernel I have but which cross compiler I require.
-DO I have to configure kernel on ethernet side also .Since ill be loading uImage through tftp software.
 
Old 03-13-2011, 11:27 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Okay, since you haven't really added any information, I will conclude that my original assumptions were correct.
You need a compiler that is compatible with the ARM processor on your PXA target host. This compiler can either run natively on the target host, or can run on a different architecture which we call a build host. If the latter case, then the compiler is called a cross compiler. It sounds like this is the case that applies to you.
If your build host is a conventional Linux PC, then you may be able to acquire a compatible cross toolchain (compiler plus all related software development tools) from the vendor of the target host. If not, you will probably have to build one. To build a cross toolchain, I recommend the use of the crosstool-NG package. You can install crosstool-NG on the build host, and use it to generate a cross toolchain. The cross toolchain can then be used on the build host to build a kernel (and other software) to be run on your target host.
You build the uImage by configuring the kernel build system to use your cross toolchain, and then run 'make uImage' (grotesquely over-simplified recipe). Building kernels is fully independent of any bootloader.
I don't understand what you mean by 'DO I have to configure kernel on ethernet side also'. You will have to configure your kernel to include appropriate drivers for the ethernet hardware on your target board. This is completely independent of what mechanism is used to copy the uImage to the target host.
It isn't clear whether you are asking about booting the new kernel as a diskless host, or whether you want to simply copy the kernel image to some kind of storage on the target host. Since you seem to have a bootloader on the target host, I will guess that it also has local storage. You would normally not use something as primitive as TFTP to copy files from one host to another, although I suppose if that is all you have, then that's what you would do.
Do you have a working kernel and root filesystem on your PXA300 target host, or do you intend to bring up a completely new kernel and other OS components from scratch? If the latter, then I feel compelled to advise you that given your current knowledge level, you should be prepared to spend a good deal of time and effort to accomplish your task.

--- rod.
 
Old 03-13-2011, 01:03 PM   #5
utkarshrawat
Member
 
Registered: Jul 2007
Posts: 120

Original Poster
Rep: Reputation: 15
Thanks for reply

Code:
You need a compiler that is compatible with the ARM processor on your PXA target host.
Yes I have cross compiler(arm-linux-4.1.1) that is compatiable for my board target.

Code:
---Do you have a working kernel and root filesystem on your PXA300 target host. 

---It isn't clear whether you are asking about booting the new kernel as a diskless host, or whether you want to simply copy the kernel image to some kind of storage on the target host
Actually this board is already used for fedora kernel & initrd which is working fine .Now we have to bring up this same board for montavista (kernel 2.6.10) .Ya bootloader is not a problem u-boot is working fine .

Code:
You build the uImage by configuring the kernel build system to use your cross toolchain
How should I do that

Code:
I don't understand what you mean by 'DO I have to configure kernel on ethernet side also'.
What I was thinking that to port uimage & initrd on target I need to configure Ethernet ( I WAS WRONG ) . THis will be done by u-boot itself. so I need not to bother
 
Old 03-13-2011, 01:38 PM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Look in the kernel Makefile. You should find a section where the variable 'CROSS_COMPILE' is defined. Set the values of 'ARCH' to 'arm' (or possibly some variant like 'arm-v4') and 'CROSS_COMPILE' to the file filesystem path of your cross compiler. The name it expects is the full filename, with the suffix 'gcc' removed. For example, if your compiler is installed as
Code:
/usr/local/src/mv-kernel/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc
then the form expected in the Makefile would be
Code:
/usr/local/src/mv-kernel/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
Make will fill in the rest, including for other elements of your toolchain.

The variables can also be assigned on the make commandline.


EDIT:

Better: just use the menuconfig kernel Makefile target to select all options for building the new kernel.
Code:
make ARCH=arm menuconfig
make ARCH=arm
--- rod.

Last edited by theNbomr; 03-13-2011 at 02:27 PM.
 
Old 03-13-2011, 04:25 PM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Okay, now I have to eat my words, and a bit of crow. I guess it turns out that the uImage format is specific to U-boot bootloaders, and requires some sort of utility 'mkimage' to build the compressed kernel image. I assume that this is available somewhere; wherever U-boot is provided. Maybe you already have it; I don't.
Sorry for jumping to the wrong conclusion that kernel building is fully independent of bootloaders. I incorrectly assumed that the uImage format was some flavor of the day for compressed images; one I'd not previously heard of.

--- rod.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] kernel panic when booting linux-2.6.30 uImage on at91rm9200ek board alexf007 Linux - Embedded & Single-board computer 4 07-21-2009 04:04 PM
Can't load UImage aemindia Linux - Kernel 1 06-16-2009 10:35 PM
Last 10% of uImage content is changing each time i build kernel image santa001 Linux - Newbie 2 10-20-2008 07:08 AM
LXer: Build 'em Right, Build 'em Strong, Build 'em Linux LXer Syndicated Linux News 0 10-01-2007 09:51 PM
u-boot and uImage.cc for LDK5910 Anitha Linux - Kernel 0 02-19-2007 09:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration