maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   u-boot for the RX-51 (N900) (https://talk.maemo.org/showthread.php?t=62146)

giannoug 2010-09-12 10:08

u-boot for the RX-51 (N900)
 
I just read a tweet from stskeeps saying that u-boot is available on the N900. The Beagleboard also uses u-boot and it is able to boot many other OSes (Windows CE, Symbian, etc) besides Linux (like the N900).

So here is the question: Any takers? ;) I'll be happy to test anything that comes out and also help.

http://al.robotfuzz.com/~al/maemo/u-boot/

If I understood correctly, it loads a kernel from the SD. You just flash once and then its u-boot magic. It might also help the NITDroid project.

http://twitter.com/stskeeps/status/24195693319
http://al.robotfuzz.com/~al/maemo/u-boot/

aligatro 2010-09-12 18:29

Re: u-boot for the RX-51 (N900)
 
so it replaces the nokia bootloader ? Can be very risky. I bricked my router once because I messed with bootloader.

[added]nwm

Quote:

These patches add support for the Nokia RX-51/N900 to U-Boot. Rather than totally
replace NOLO (which could be dangerous) I instead create a combined image containing
u-boot and a Linux kernel, and then flash this like a regular kernel. U-Boot loads
first, stores the environment, and then checks for boot files on the SD card, if
present. If the bootfiles are not found, it will instead load the appended kernel
image. This should in theory be totally transparent.

ali1234 2010-09-12 19:07

Re: u-boot for the RX-51 (N900)
 
This is no more dangerous to install than a custom kernel, because you flash it into the kernel partition of the onenand. This was one of the design goals - to install in a completely non-destructive way.

The other goal was for it to be completely self contained ie not require any files on Maemo rootfs or eMMC or an SD card (in contrast to multiboot.) That is the reason for the combined kernel image. The appended kernel image actually gets loaded into ram by NOLO (it thinks u-boot + kernel is one big image) - and then u-boot unpacks and boots it.

Since it might not be obvious, if you install this, the N900 keyboard does work - you can press any key to interrupt u-boot autoboot, and then do whatever you want in terms of loading kernel, setting command line etc.

Oh, also, nitdroid will need some work before it can be booted with u-boot, because it relies on multiboot scripts to set up some things like loading modules and setting up the filesystem mounts etc. All this stuff could be done by an initramfs though.

Nokia 5700 2010-09-12 19:42

Re: u-boot for the RX-51 (N900)
 
Im interested, definitively!
Would be neat to add this to Multiboot.
It would be possible, because as it said, its a kind of kernel, and then it would be logic that it can be loaded by Multiboot.

Booting Symbian? Are you kidding or what?
If thats true, its a dream come true...
Symbian AND Maemo in 1 device would be friggin' nice.

But... uh... where are there some more user-friendly instructions? :P

Stskeeps 2010-09-12 19:48

Re: u-boot for the RX-51 (N900)
 
Quote:

Originally Posted by Nokia 5700 (Post 814348)
But... uh... where are there some more user-friendly instructions? :P

u-boot is hardly the most userfriendly tool around :)

javispedro 2010-09-12 19:51

Re: u-boot for the RX-51 (N900)
 
Quote:

Originally Posted by giannoug (Post 813965)
I just read a tweet from stskeeps saying that u-boot is available on the N900. The Beagleboard also uses u-boot and it is able to boot many other OSes (Windows CE, Symbian, etc) besides Linux (like the N900).

I doubt u-boot is the only requisite for that.

At least, this will help NITdroid prevent having to flash a kernel every time you switch between Maemo/NITdroid. As it is written directly to a NAND without any wear leveling layer at all the number of kernel changes before the device breaks is rather limited (but still in the tens of thousands). This should help with that.

ivyking 2010-09-12 19:58

Re: u-boot for the RX-51 (N900)
 
Quote:

Originally Posted by Nokia 5700 (Post 814348)
Im interested, definitively!
Would be neat to add this to Multiboot.
It would be possible, because as it said, its a kind of kernel, and then it would be logic that it can be loaded by Multiboot.

Booting Symbian? Are you kidding or what?
If thats true, its a dream come true...
Symbian AND Maemo in 1 device would be friggin' nice.

But... uh... where are there some more user-friendly instructions? :P

why use multiboot to load this ? This is designed to be flashed once only then it will load the kernel for other OS from sd card , without flashing it , multiboot does flash the kernel each time u choose a different OS .
And surely a bit more detailed instructions would be appreciated .

ali1234 2010-09-12 22:02

Re: u-boot for the RX-51 (N900)
 
Indeed, the whole reason I made this is because I didn't want to use multiboot.

b-man 2010-09-12 22:30

Re: u-boot for the RX-51 (N900)
 
Just tested this and it works like a charm :)

lma 2010-09-12 23:54

Re: u-boot for the RX-51 (N900)
 
Quote:

Originally Posted by aligatro (Post 814300)
so it replaces the nokia bootloader ?

Nope, it goes in the kernel partition with the actual kernel piggybacking on top of it. NOLO assumes it's a kernel and executers it, then u-boot takes control and loads the bundled kernel by default, or anything else you like.

giannoug 2010-09-13 11:40

Re: u-boot for the RX-51 (N900)
 
Quote:

Originally Posted by javispedro (Post 814354)
I doubt u-boot is the only requisite for that.

What I was saying is that u-boot is able to boot (just start) other OSes, not that those will ever fully boot :p Multiboot / bootmenu just change root (If I'm not mistaken).

MohammadAG 2010-09-13 11:43

Re: u-boot for the RX-51 (N900)
 
Multiboot flashes kernels to the OneNAND every time you change your OS, which will eventually wear the flash.

faisal00813 2010-09-13 13:42

Re: u-boot for the RX-51 (N900)
 
can i use uboot in my 5800
Is the procedure
or is there a way to boot Linux on symbian by dual boot
plz help guyz

Nokia 5700 2010-09-13 13:50

Re: u-boot for the RX-51 (N900)
 
I didnt completely understand what to do on this part:
Quote:

Take the u-boot.bin, pad it to 0x40000 bytes. Turn the normal zImage into a uImage
then append to padded u-boot.bin. The total size of the resulting image must be less
than 2MB, which is easily possible using the PR1.2 kernel. Finally flash the new
combined image to N900 like a regular kernel.

You can use builder.py (below) to make the combined image.
Whats the goal..?
Or... how can i do it with Xterm?

Sooo... i got the default N900 kernel (zImage) here along with the u-boot.bin file.
I tried running the script, but it didnt work.
This is the error i get:
Code:

  File "builder.py", line 13
    elif len(kernel) > 0x1c0000
                              ^
SyntaxError: invalid syntax

Advice? :confused:

lma 2010-09-13 19:34

Re: u-boot for the RX-51 (N900)
 
Quote:

Originally Posted by Nokia 5700 (Post 814920)
Sooo... i got the default N900 kernel (zImage) here along with the u-boot.bin file.

That won't work, you need to convert it into a uImage first.

Quote:

I tried running the script, but it didnt work.
The elif & else lines need a ":" at the end.

ali1234 2010-09-13 21:25

Re: u-boot for the RX-51 (N900)
 
Quote:

Originally Posted by lma (Post 815151)
The elif & else lines need a ":" at the end.

Fixed, thanks.

linuxeventually 2010-09-14 01:49

Re: u-boot for the RX-51 (N900)
 
Any chance this could be adapted for N8X0?

ryanl33x1511 2010-09-14 02:52

Re: u-boot for the RX-51 (N900)
 
any newbie tut between for maemo and NITDROID ? thanks

lma 2010-09-14 03:32

Re: u-boot for the RX-51 (N900)
 
Quote:

Originally Posted by linuxeventually (Post 815375)
Any chance this could be adapted for N8X0?

Yes, there's a chance :-)

realitygaps 2010-09-14 17:36

Re: u-boot for the RX-51 (N900)
 
Any special options required in the zImage to uImage conversion? Or can you just run:

Code:

mkimage -A arm -O linux -T kernel -C none -d zImage uImage
?

Nokia 5700 2010-09-14 18:23

Re: u-boot for the RX-51 (N900)
 
So, i now successfully made a combined.bin file.
Now how do i perform the spell of endless possibilities in booting? :p
Im only familiar with booting kernels, not binaries...

lma 2010-09-14 19:35

Re: u-boot for the RX-51 (N900)
 
Quote:

Originally Posted by Nokia 5700 (Post 816085)
So, i now successfully made a combined.bin file.
Now how do i perform the spell of endless possibilities in booting? :p

As a first test try booting it without flashing (flasher -k combined.bin -l -b). If it works you can make it more permanent later.

Nokia 5700 2010-09-14 20:00

Re: u-boot for the RX-51 (N900)
 
i think it worked. When it rebooted, the phone had a commandline with tux on top left and it said loading kernel image or similar.
So, all i need to do now is find a suitable OS to try boot?
I have been thinking about it.
And this is my conclusion:
To use the OmniaHD version of Symbian would be the closest, hardware-wise. It has same hardware, and all OSs based on Symbian support a regular keyboard and arrows. The only thing i see missing is something to act as a menu-key.
But thats just a thought...
Important is: it works like a charm, at least the first part. :)

Stskeeps 2010-09-17 21:39

Re: u-boot for the RX-51 (N900)
 
Well, we have some kind of liftoff on u-boot N8x0 (from serial console) - this is all thanks to ali1234, I'm just testing:

Receiving kernel (length 128256)
Image successfully received
SETUP: WR VND DEVICE req 82 value 0000 index 0000 length 0000
SETUP: WR STD INTERFACE SET_INTERFACE value 0000 index 0002 length 0000
Boot requested


U-Boot 2010.06-00700-ge564557-dirty (Sep 17 2010 - 14:27:44)

I2C: ready
OMAP2420-GP revision 5
TI H4 SDP Base Board + Menelaus Daughter Board + mDDR
DRAM: 128 MiB
## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB
## Unknown FLASH on Bank 2 - Size = 0x00000000 = 0 MB
Flash: 0 Bytes
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: LAN91C95-0
OMAP242x H4 #

Stskeeps 2010-09-19 09:03

Re: u-boot for the RX-51 (N900)
 
More magic on N800 from ali1234:

http://stskeeps.subnetmask.net/meego...uboot-n800.png

ivyking 2010-09-22 09:28

Re: u-boot for the RX-51 (N900)
 
couple of days ago , i had a problem with u-boot , basically after flashing the combined image , maemo won't boot , the phone turns off after u-boot attempts to load the kernel , if no mmc was in.
later i discovered that this problem was with the combined image that i flashed , i don't know what is wrong exactly , i used the power kernel image v40 for the combined image
http://maemo.org/packages/package_in....6.28-maemo40/
extracted the zImage from the .deb and ran builder script .
the resulting image is 2 MB so it should be fine , and it gets flashed fine also..
well since the phone was useless , i had to reflash the kernel to the combined image using pr1.2 kernel .
it was hard to get the phone to flash , pressing u , while the usb cable is plugged in on reboot , did nothing , the phone still loaded u-boot .
after several tries , i got it to work , by removing the battery , plug in the usb cable while the battery is removed ,(yellow led flashes once) , press and hold u on the keyboard , put the battery back in .
the phone went into flashing mode , i flashed the new combined image and everything went fine.
i hope this helps somebody .
if someone got u-boot working using the power kernel image , please share how .

ali1234 2010-09-26 12:40

Re: u-boot for the RX-51 (N900)
 
I have had other reports that power kernel does not work. I suspect this happens because the old old kernel used on N900 does not fully initialize the hardware itself. It relies on NOLO to do most of it. Anything that u-boot touches has the potential to be in a "wrong" state when the kernel boots. This can cause all kinds of problems. For example, it is the reason why usbtty is disabled. There are two ways to fix this, the right way, and the work-around which is necessary when dealing with vendor kernels:

The right way is to fix the kernel so it will reset hardware from an unknown state without crashing. The new new kernel used in MeeGo does this, and I have not had any problems with it.

If you can't fix the kernel, then the workaround is to make sure u-boot puts all the hardware back exactly as it found it. This can be tricky if you are trying to boot from MMC...

Matan 2010-10-02 13:01

Re: u-boot for the RX-51 (N900)
 
Quote:

Originally Posted by ivyking (Post 823170)
if someone got u-boot working using the power kernel image , please share how .

I just did, and it works without any issues. I created the image manually, not using the builder script. Did you try that:

padding u-boot to 262144 bytes.

Converting zImage to uImage

Concatenating both files together.

Perhaps you forgot to convert zImage to uImage? The builder.py script does not do this.

lunat 2010-10-18 18:52

Re: u-boot for the RX-51 (N900)
 
hi ali,

is there a way to give the watchdog from uboot a signal every once in a while(eg with every keystroke) so that it won't reset when not in r&d?

nicola.mfb 2010-10-30 09:52

Re: u-boot for the RX-51 (N900)
 
How to pass custom parameters to the the kernel located on the SD card?

xopher 2010-10-31 19:17

Re: u-boot for the RX-51 (N900)
 
I'm having trouble.
I grabbed kernel-power40's deb
extracted the fiasco from it
unpacked fiasco via flasher
renamed zImage to uImage
ran pybuilder.py using the provided u-boot.bin
FROM PC: flasher -k combined.bin -l -b
Result: Error: can't find kernel image

What have I missed, overlooked, or botched?
Thanks

edit: left one step out

Matan 2010-10-31 19:43

Re: u-boot for the RX-51 (N900)
 
Don't rename zImage to uImage. You need to convert it with u-boot's mkimage tool. It is explained where the files are downloadable from:

http://al.robotfuzz.com/~al/maemo/u-boot/

xopher 2010-10-31 20:07

Re: u-boot for the RX-51 (N900)
 
That did it, thank you very much.

jorgecallejas 2010-11-12 07:51

Re: u-boot for the RX-51 (N900)
 
Please help me .I do not what happen but a penguin show up while I was installing a full charged battery it do not time out, I can not turn off my n900 and if I remove the battery and reinstall it the penguin show up on power on.
How can go back to maemo , when I typed the command

run mmcboot it said wrong image format comand
ERROr : can not get kernel image

MasterZap 2010-11-12 08:49

Re: u-boot for the RX-51 (N900)
 
The problem with u-boot (beyond the forcing-it-on-us debacle that happened in titan's 44 kernel which was rather unfortunate) is that it breaks together with multiboot.

And I really don't fancy having to have one OS per SD card and having to put SD cards in and out. To me, multiboot was way more versatile; it gave me a boot menu with OS options, I could even have maemo-vanilla, maemo-power, meego and nitdroid on the same machine with no tedios SD card swapping.

What are the actual benefits of u-boot? I don't accept the wear-on-flash-memory argument at all (are you gonna boot and switch OS's thousands of times? really?)

/Z

nicola.mfb 2010-11-12 09:20

Re: u-boot for the RX-51 (N900)
 
Simple: multiboot depends on maemo, so it does not support any kernel/any OS and if you brick the maemo mtd partition (or multiboot-flash a kernel that is not able to mount maemo and/or execute it's userspace) you are not able to boot any other OS.

Stskeeps 2010-11-12 12:43

Re: u-boot for the RX-51 (N900)
 
Quote:

Originally Posted by MasterZap (Post 871233)
The problem with u-boot (beyond the forcing-it-on-us debacle that happened in titan's 44 kernel which was rather unfortunate) is that it breaks together with multiboot.

And I really don't fancy having to have one OS per SD card and having to put SD cards in and out. To me, multiboot was way more versatile; it gave me a boot menu with OS options, I could even have maemo-vanilla, maemo-power, meego and nitdroid on the same machine with no tedios SD card swapping.

What are the actual benefits of u-boot? I don't accept the wear-on-flash-memory argument at all (are you gonna boot and switch OS's thousands of times? really?)

/Z

There is nothing that stops you from using boot.scr feature (partition 1) or make a custom u-boot binary with something like 'run mmc1' or the likes. The benefit is than multiboot is that multiboot sucks for anything that doesn't boot from NAND.

Stskeeps 2010-11-12 12:44

Re: u-boot for the RX-51 (N900)
 
I've just uploaded a new uboot-pr13 that explictly conflicts with kernel-power and kernel-maemo and kernel-hostmode.

geneven 2010-11-12 12:56

Re: u-boot for the RX-51 (N900)
 
I'm not sure where to put this information since it involves several programs, but uboot saved me from an inconvenient incident just now.

I received authorization requests from someone identified as Marcy Raptor. At first I didn't know where they were coming from. Eventually I discovered they were from Skype and I picked a menu item that blocked them.

But before that I noticed that my calendar program listed the birthday of someone called -- Marcy Raptor. I spent a few minutes getting rid of it.

Then I noticed that some parts of my Desktop-Switcher icons were missing, icons that would be a hassle to recreate.

Just recently I had backed up everything with uboot. I restored and everything seems fine now.

I am using the latest of Titan's kernels, Matan's modified desktop.

geneven 2010-11-12 13:20

Re: u-boot for the RX-51 (N900)
 
Quote:

Originally Posted by Stskeeps (Post 871455)
I've just uploaded a new uboot-pr13 that explictly conflicts with kernel-power and kernel-maemo and kernel-hostmode.

Just out of curiosity, isn't there a way to coordinate this stuff before it goes public? Or am I missing something?


All times are GMT. The time now is 11:59.

vBulletin® Version 3.8.8