LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 03-10-2015, 05:34 AM   #1
jayanidharmesh
LQ Newbie
 
Registered: Feb 2015
Posts: 8

Rep: Reputation: Disabled
U-Boot for RPi (Need help)


Hello everyone,

This is my second post on LQ. I am very happy

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

I am building U-Boot for Raspberry Pi (Model B) based on http://elinux.org/RPi_U-Boot this link.

Links contains the steps to build U-Boot. I have performed this steps but after building "uboot.bin" file are created this file i am booting in Raspberry pi board with the pidora but it halt in below image (Attached)...

Please help me what can i do OR what i have to do for that ???

Thanks in advance......
Attached Thumbnails
Click image for larger version

Name:	20150308_173303.jpg
Views:	61
Size:	250.5 KB
ID:	17760  
 
Old 03-11-2015, 12:17 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,876
Blog Entries: 13

Rep: Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929
At the point where it says "Hit any key to stop autoboot", hit a key and then follow the instructions in that reference as to how to configure U-Boot to boot the kernel you have. It matters if the kernel is off the SD card, internal MMC or if you choose to TFTP the kernel from a network server. I believe also "help" at the U-Boot prompt will show you some commands available.
 
Old 03-15-2015, 01:12 PM   #3
jayanidharmesh
LQ Newbie
 
Registered: Feb 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
At the point where it says "Hit any key to stop autoboot", hit a key and then follow the instructions in that reference as to how to configure U-Boot to boot the kernel you have. It matters if the kernel is off the SD card, internal MMC or if you choose to TFTP the kernel from a network server. I believe also "help" at the U-Boot prompt will show you some commands available.
Sir,

Thank you very much for your giving reply...

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

I am building u-boot of above link...

now command prompt uboot> is came but the keyboard and mouse not working
So you have any idea about that ?
I am using "stephen swarren's source" from github.

Thanks.
Attached Thumbnails
Click image for larger version

Name:	20150308_180209.jpg
Views:	36
Size:	251.1 KB
ID:	17793  
 
Old 03-16-2015, 08:00 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,876
Blog Entries: 13

Rep: Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929
I don't have many ideas except to retry from scratch what you started doing. Further to just validate the hardware by loading a known good uBoot and kernel on the Pi, they have a default setup.

What I think is that something has changed between your first attempt and now because it went further before and you didn't note problems with the keyboard. If the keyboard is not detected, I'd verify that it works in conjunction with this board in a normal boot setting. Then just try to replace uBoot by rebuilding the default uBoot.

You have the Linaro tools for cross compilation installed?
 
Old 03-17-2015, 02:13 AM   #5
jayanidharmesh
LQ Newbie
 
Registered: Feb 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
I don't have many ideas except to retry from scratch what you started doing. Further to just validate the hardware by loading a known good uBoot and kernel on the Pi, they have a default setup.

What I think is that something has changed between your first attempt and now because it went further before and you didn't note problems with the keyboard. If the keyboard is not detected, I'd verify that it works in conjunction with this board in a normal boot setting. Then just try to replace uBoot by rebuilding the default uBoot.

You have the Linaro tools for cross compilation installed?

I don't have linaro tool for cross compilation. I am using own toolchain (Croostool-ng).

Is there any way to enable any option to run the usb on Pi. eg: in menuconfig ? if yes, so where can i change the option ?

Thanks
 
Old 03-17-2015, 06:52 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,876
Blog Entries: 13

Rep: Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929
Quote:
Originally Posted by jayanidharmesh View Post
I don't have linaro tool for cross compilation. I am using own toolchain (Croostool-ng).

Is there any way to enable any option to run the usb on Pi. eg: in menuconfig ? if yes, so where can i change the option ?

Thanks
Have you validated that this toolchain properly compiles code which will run on the Pi processor?
 
Old 03-19-2015, 05:00 AM   #7
jayanidharmesh
LQ Newbie
 
Registered: Feb 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Have you validated that this toolchain properly compiles code which will run on the Pi processor?
I have completely builded toolchain. but i don't know how to test the toolchain on Pi

can you please tell me how can i test this builded toolchain on Pi ?
 
Old 03-19-2015, 08:01 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,876
Blog Entries: 13

Rep: Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929
Quote:
Originally Posted by jayanidharmesh View Post
I have completely builded toolchain. but i don't know how to test the toolchain on Pi

can you please tell me how can i test this builded toolchain on Pi ?
Short answer is to build a simple C program using that toolchain and try to run the resulting binary on the Raspberry Pi.

Longer answer is because I suspect that you might not fully understand my question.

The intention of having a "toolchain" which is a general phrase is to have a cross compilation set of tools to build Raspberry Pi compatible programs. I do not know the toolchain which you have referenced, but instead do know of, and have used, the Linaro toolchain. Therefore this is why I asked if you have validated that this toolchain you have is valid.

What is cross compilation and why would you need it? Firstly you likely have an Intel or Intel compatible machine where you run another version of Linux and wish to communicate with your Pi and also wish to build programs, such as U-boot to run on your Pi. If that guess of what type of machine you have is correct, then you have an 80x86 based machine, or in short terms, an x86 architecture. This would be very normal too.

The Raspberry Pi is not an x86 architecture, but instead an ARM based architecture. There are a variety of different ARM architectures, quite a few actually.

What makes a cross compilation is that the tools installed to perform compilation are configured to compile "on" an x86 architecture, but produce a resultant program binary which runs on the designated ARM architecture. In this case intended for the Raspberry Pi particular ARM architecture.

Therefore a good thing to do would be to verify that the installed toolchain has been properly configured and when it compiles something simple like a "Hello World" example, that it produces a binary result which works properly on the Pi.

Otherwise the toolchain is either an incorrect toolchain for the desired case, or it is installed/configured improperly.
 
Old 03-21-2015, 01:46 AM   #9
jayanidharmesh
LQ Newbie
 
Registered: Feb 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Short answer is to build a simple C program using that toolchain and try to run the resulting binary on the Raspberry Pi.

Longer answer is because I suspect that you might not fully understand my question.

The intention of having a "toolchain" which is a general phrase is to have a cross compilation set of tools to build Raspberry Pi compatible programs. I do not know the toolchain which you have referenced, but instead do know of, and have used, the Linaro toolchain. Therefore this is why I asked if you have validated that this toolchain you have is valid.

What is cross compilation and why would you need it? Firstly you likely have an Intel or Intel compatible machine where you run another version of Linux and wish to communicate with your Pi and also wish to build programs, such as U-boot to run on your Pi. If that guess of what type of machine you have is correct, then you have an 80x86 based machine, or in short terms, an x86 architecture. This would be very normal too.

The Raspberry Pi is not an x86 architecture, but instead an ARM based architecture. There are a variety of different ARM architectures, quite a few actually.

What makes a cross compilation is that the tools installed to perform compilation are configured to compile "on" an x86 architecture, but produce a resultant program binary which runs on the designated ARM architecture. In this case intended for the Raspberry Pi particular ARM architecture.

Therefore a good thing to do would be to verify that the installed toolchain has been properly configured and when it compiles something simple like a "Hello World" example, that it produces a binary result which works properly on the Pi.

Otherwise the toolchain is either an incorrect toolchain for the desired case, or it is installed/configured improperly.

Hello,

Thank you for reply.

-------------------------
https://www.youtube.com/watch?v=3YyH4q9lIAY
I am following this link for building toolchain.

I have configured the toolchain on X86 host machine and my target is ARM (Pi).


After builded toolchain, i have also Test the "Hello world!" program on x86 with that toolchain also this video contains compiling and run that program. i have also tried that.

after compiling hello.c....

Command: $ file hello

the output is:
ELF 32-bit LSB executable,ARM, version 1 (SYSV), Dynamically linked (uses shared libs), not stripped

so finally, is this toolchain run on Pi. how can it be tested on Pi ?

Thanks
Attached Thumbnails
Click image for larger version

Name:	screenshot toolchain.jpg
Views:	24
Size:	68.6 KB
ID:	17844  

Last edited by jayanidharmesh; 03-21-2015 at 04:54 AM.
 
Old 03-23-2015, 07:00 AM   #10
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,876
Blog Entries: 13

Rep: Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929
The toolchain doesn't run on the Pi.

The toolchain runs on your x86 machine.

Binary programs created by the toolchain run on the Pi.

The resultant hello you made should run on the Pi.

Copy it over to the Pi and attempt to run it.

This would validate that the toolchain is properly configured and working correctly.
 
Old 03-27-2015, 02:01 AM   #11
jayanidharmesh
LQ Newbie
 
Registered: Feb 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
The toolchain doesn't run on the Pi.

The toolchain runs on your x86 machine.

Binary programs created by the toolchain run on the Pi.

The resultant hello you made should run on the Pi.

Copy it over to the Pi and attempt to run it.

This would validate that the toolchain is properly configured and working correctly.
Hello,

I have copied binary on Pi and it will RUN Successfully on Pi Board.

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

Now i want U-boot. after building uboot and when it run on board but the keyboard and mouse (USB) not runnning.

can you have any ideas ??

Thanks
 
Old 03-27-2015, 01:46 PM   #12
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,876
Blog Entries: 13

Rep: Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929
Can you load a known good uBoot and be able to use the keyboard?

Can you build a default uBoot and also be able to use the keyboard?

If you can use a Pi supported uBoot and that works, and I presume it would work. Then the next step would be to try and build the exact same version of uBoot from source, using your toolkit. Example, break into the boot by hitting any key and get the version. Then download that source version of uBoot and build it without any modifications. Try that result. If that doesn't work, then all I can say is that while your toolchain may work, something is not working fully, or you are linking with libraries which are different than what you need for the Pi.

My personal experience is that I've used the Linaro toolset to build uBoot for the BeagleBoard Black and it worked fine. Linaro is free, and supports the Pi.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
RPi, Rasbian, how to start transmission on boot? bigwheel Linux - Embedded & Single-board computer 9 02-23-2015 10:07 AM
LXer: Mini-PC taps RPi Compute Module and supports RPi 2 LXer Syndicated Linux News 0 02-22-2015 04:03 PM
Are your RPi stable? ChrisAbela Linux - Embedded & Single-board computer 12 06-30-2014 01:25 PM
RPi - SMS gateway hb21l6 Linux - Hardware 4 08-03-2013 06:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 01:23 AM.

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