New IT forum Follow us on Twitter
17 May 2012, 03:52:28 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: DreamPlug tutorial in Linux Format issue 145!
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Custom u-boot?  (Read 1222 times)
apemberton
Full Member
***
Posts: 101


« on: 11 February 2011, 06:04:00 pm »

Although not necessary for my environment (and possible not anyone's) I was just pondering whether anyone had built their own u-boot?

This was brought on by looking at the u-boot wiki - http://www.denx.de/wiki/U-Bootdoc/WebHome and and an implementation at http://thebestechblog.blogspot.com/2010/06/multi-boot-in-embedded-device.html. lots of things in there I had no idea about!

I might have a little play sometime for fun. But I MUST master Postfix etc first!

Logged

Tony Pemberton
sfzhi
Jr. Member
**
Posts: 54


« Reply #1 on: 11 February 2011, 11:54:06 pm »

Since you are asking, yes I have built my own u-boot. It was one of the first things I did when I got my plug. It wasn't really necessary, but when I saw all those kludges with "ping" in the u-boot environment I felt the urge to throw up. So I built the "real" u-boot (not the Marvell one). It wasn't all that difficult even though I didn't have any prior experience with this kind of things.
Logged
apemberton
Full Member
***
Posts: 101


« Reply #2 on: 12 February 2011, 09:29:50 am »

Well I hope you got over your sickness!!   Grin Grin I think my reason for doing so is both curiousity and the desire not to have a 'black box' that just works!  Huh

In my Buffalo Linkstation days (eon's ago), I had to cross-compile a u-boot so that the Marvell Orion core could load Debian. At least there were instructions how to do it in their forum but it was a bit of an education. At that time I did not have a Linux system, only Windows. I needed to ELDK and native sources plus patches I think. Later versions of Linkstation came with a pre-loaded u-boot.
Logged

Tony Pemberton
apemberton
Full Member
***
Posts: 101


« Reply #3 on: 04 July 2011, 09:29:14 am »

Further to my earlier postings, I have been trying to build a new u-boot (u-boot-2011.06) for fun - grrrrr.......!!!!  Smiley The plugcomputer.org wiki/forum pages for U-boot are not paticularly helpful as they are aimed at the base u-boot version 1.1.4 which is several years old.

Whilst there is a sheevaplug configuration (make sheevaplug_config) available and such a compilation compiles fairly cleanly - a lot of set but unused variables - the resultant code will not execute in the expected manner. I have been looking at the variables in the sheevaplug.h and adjusting the memory base away from the default so I don't have to keep using OpenOCD to recover. However, I am confused about the sheevaplug memory layout. I have examined the wiki page ( http://plugcomputer.org/plugwiki/index.php/Addresses_(0x0) and I think the NAND (where u-boot should reside) overlaps the DRAM space. There is NAND at 0x0 to 0x20000000 which contains u-boot at the start, a kernel (uImage, initrd if used) and then the OS (ubuntu, Debian) and the rootfs. However the uImage and so on are loaded into DRAM either from NAND or SHDC (or in my case eSata) to location 0x8000000 and executed with a u-boot bootm command.

I wonder if anyone has a tip for successfully building a modern u-boot for sheevaplug. I have the feeling there is something wrong (untested) with the sheevaplug_config. I had successfully built a Guruplug u-boot (make guruplug_config) using the plugcomputer.org wiki page with all the facilities I wanted.

Logged

Tony Pemberton
apemberton
Full Member
***
Posts: 101


« Reply #4 on: 02 September 2011, 12:13:32 pm »

Further answer to my own question - how vain am I?

I have u-boot-2011.06 with mods patched from http://people.debian.org/~tbm/u-boot/ working on my sheevaplugs. I was able to get most of the options I wanted by customising the sheevaplug.h file and compiling natively. I only once had a problem loading a new u-boot and that was due to my own silly fault. The u-boot is burned into NAND and my environment allows me to load a kernel from eSata, USB, SDHC(mmc) or NAND in order. The silliest thing that threw me was the change from 'arcNumber' (2678) to 'machid' (a76).

So I'm now a happy(ish) bunny until the next u-boot change!

I am also running Linux Kernel 3.0.3 booted from eSata which frankly is a b*gg*rs muddle and had to be customised several times before I was satisfied. eSata remains modularised when I need built-in, the LEDS are simply wrong and so on. But that is another story.
Logged

Tony Pemberton
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!