maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   U-Boot for Nokia RX-51 with BootMenu (updated version 2012.10-rc3-1) (https://talk.maemo.org/showthread.php?t=81613)

Fabry 2012-01-16 21:44

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by pali (Post 1151524)
Me too, but without success. NITDroid kernel does not want to boot on my device from U-Boot :(

I have read on this forum and some months ago (not too many) that someone (at least two users) has created a u-boot initrd to boot Nitdroid successfully.

It was not completed detached from the usage of rootfs because Nitdroid still wants to load some firmwares from rootfs after booting process, but it was however a big step forward.
Unfortunately they haven't published their works but if I remember correctly their posts were on BackupMenu thread

EDIT:
They are not in the BackupMenu thread but in the Old U-Boot thread

fw190 2012-01-16 22:11

Re: U-Boot for Nokia RX-51 with BootMenu
 
check out e-yes twitter. He had a link from someon, I think crevetor with nitdroid loading with u-boot and a special kernel (I do not recall if it was some MeeGo one or something like this)

pali 2012-01-16 22:14

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by Fabry (Post 1151534)
I have read on this forum and some months ago (not too many) that someone (at least two users) has created a u-boot initrd to boot Nitdroid successfully.

It was not completed detached from the usage of rootfs because Nitdroid still wants to load some firmwares from rootfs after booting process, but it was however a big step forward.
Unfortunately they haven't published their works but if I remember correctly their posts were on BackupMenu thread

wifi and bluetooth firmware are now redistributable, see OBS, Meego and Nemo (Mer) system. In Meego OBS are both wl1251 and bcm non-free firmwares redistributable (but closed).

Netweaver 2012-01-16 22:25

Re: U-Boot for Nokia RX-51 with BootMenu
 
ammyt (current NITdroid dev) is also trying to get it to work with u-boot, maybe worth getting in touch and get the brains together :

Quote:

I will stop posting here for a while.

I am converting the whole multiboot NITDroid system to the new DAS Uboot utility, many advantages.
http://talk.maemo.org/showpost.php?p...postcount=3887

Estel 2012-01-16 22:35

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by pali (Post 1151524)
Note: seems that U-Boot does not support ext4 (tested: on 1 partition can only list files - not read it, on second see that partition is empty and on third hang up). ext2 is supported (and maybe ext3 too with forward compatibility).

Is it fixable in foreseeable future? Sounds like a showstopper for me :(

// Edit

Or, placing kernel on *very*small-ish dedicated ext2 partition on SD card would allow it to work, and won't cause any problems with ext4 /home/? As I understand it, u-boot just need supported filesystem to read kernel image from it, and later, it doesn't care about partition types, if kernel support them already?

don_falcone 2012-01-16 22:40

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by pali (Post 1151525)
I tested and on my n900 with default busybox is no problem with command dd.

But if somebody else has problem, I can change that code.

During the second installation of u-boot-flasher, no errors were reported as during 1st time.

Fabry 2012-01-16 23:02

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by Estel (Post 1151566)
Or, placing kernel on *very*small-ish dedicated ext2 partition on SD card would allow it to work, and won't cause any problems with ext4 /home/? As I understand it, u-boot just need supported filesystem to read kernel image from it, and later, it doesn't care about partition types, if kernel support them already?

U-Boot needs only to load kernels, initrd-files and script-files (i.e. bootmenu.scr) from a FAT/EXT2 (or EXT3) partition.

The Pali's binary as default search on first eMMC partition, but it is easy to change behavior on sources and then recompile a binary which searches on other sources

Netweaver 2012-01-16 23:14

Re: U-Boot for Nokia RX-51 with BootMenu
 
some info not soo long ago in the other big u-boot thread :

Posted by Rob1n :http://talk.maemo.org/showpost.php?p...&postcount=156
Quote:

Originally Posted by mirakels View Post

my u-boot now allows to copy the initial atags and append cmdline and ramdisk images to it.
Nitdroid now comes up without panics, completely ignoring the maemo rootfs.
Only thing still is the firmware. I'll probably just copy the firmware files tot hte nitdroid partition. Will test later tonight.

Finally got it all working I can now boot into Maemo, Meego or Nitdroid without needing to reflash or change cards. I've attached the patch to u-boot I'm using - it appends the initrd and command line (if set) to the atags instead of just ignoring them when atagaddr is set.

For Nitdroid, I'm using multiboot as normal, but fooling it into thinking it's already done the reflash, so it just loads Nitdroid straight away. If anyone's interested, I can also post my initramfs and u-boot scripts.
The patches created by Rob1n or Mirakels is not in the last version of the u-boot code as delivered yesterday. I checked the git code for /arch/arm/bootm.c

It might not be needed to allow the copying of the existing ATAGS + the new ones as specified during u-boot, if you want to go for a pure port, as Rob1n used a hybrid Maemo FS + Nitdroid FS. But then extra work needs to be done.

Also the following post in the same thread (by Mirakels) might help to get more insight.

Anyway, it's getting too deep for me, for now, I'll let the big boys play :)

Thanks already for all the effort

Hurrian 2012-01-17 09:10

Re: U-Boot for Nokia RX-51 with BootMenu
 
I found the problem with my crapola not working.
fatls mmc 1 was listing down my Music folder off my eMMC. What the actual ****? It might be because of damaged fat32 though.
Moved bootmenu files to ~/MyDocs/Music/ and it worked.

Would probably still be banging rocks together if not for the Gumstix wiki.

On a side note, it doesn't boot last selected entry, which may be undesirable for those who have ext4 /home who want to use this as daily part of booting. EDIT2: fixed that last part. Made a kp49+fmg's SR fixes COMBINED.BIN image. Anybody else want it?

iDont 2012-01-17 21:32

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by pali (Post 1151525)
I tested and on my n900 with default busybox is no problem with command dd.

But if somebody else has problem, I can change that code.

Pali, could you double check whether your dd is provided by /bin/busybox? On my device, both the stock BusyBox' dd as well as busybox-power's dd don't support the oflag parameter. Also, the conv parameter shouldn't be supported by the stock BusyBox' dd (it is by busybox-power's dd though).

pali 2012-01-17 21:43

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by Netweaver (Post 1151576)
some info not soo long ago in the other big u-boot thread :

Posted by Rob1n :http://talk.maemo.org/showpost.php?p...&postcount=156

The patches created by Rob1n or Mirakels is not in the last version of the u-boot code as delivered yesterday. I checked the git code for /arch/arm/bootm.c

It might not be needed to allow the copying of the existing ATAGS + the new ones as specified during u-boot, if you want to go for a pure port, as Rob1n used a hybrid Maemo FS + Nitdroid FS. But then extra work needs to be done.

Also the following post in the same thread (by Mirakels) might help to get more insight.

Anyway, it's getting too deep for me, for now, I'll let the big boys play :)

Thanks already for all the effort

Similar patch is in this new uboot too :-) re-using atags can be done by specifing USE_ATAG in bootmenu config file.

pali 2012-01-17 21:44

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by iDont (Post 1152049)
Pali, could you double check whether your dd is provided by /bin/busybox? On my device, both the stock BusyBox' dd as well as busybox-power's dd don't support the oflag parameter. Also, the conv parameter shouldn't be supported by the stock BusyBox' dd (it is by busybox-power's dd though).

Ok, I will recheck it.

pali 2012-01-24 15:37

Re: U-Boot for Nokia RX-51 with BootMenu
 
Problem found: I have installed gnu utils and /usr/bin/gnu in PATH. So my script used first dd in path (/usr/bin/gnu/dd), which support my syntax.

/bin/dd (busybox) has real no support for conv and oflag.

Has somebody idea how to rewrite that script to work with default busybox?

Anyway, now I sent final patch series for rx51 u-boot support to mailinglist...

Fabry 2012-01-26 01:13

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by pali (Post 1154997)
Has somebody idea how to rewrite that script to work with default busybox?

Replace:
Code:

...
uboot_size=$(wc -c "$uboot" | cut -f1 -d' ')
kernel_size=$(wc -c "$kernel" | cut -f1 -d' ')
...
dd if="/dev/zero" of="$output" bs=1 count="$uboot_append" conv=notrunc oflag=append 2>/dev/null
dd if="$kernel" of="$output" conv=notrunc oflag=append 2>/dev/null
...

With:
Code:

...
uboot_size=$(ls -l "$uboot" | tr -s ' ' | cut -f5 -d' ')
kernel_size=$(ls -l "$kernel" | tr -s ' ' | cut -f5 -d' ')
...
dd if="/dev/zero" of="$output" bs=1 count="$uboot_append"  seek="$uboot_size" 2>/dev/null
dd if="$kernel" of="$output" bs=512 seek="$(($uboot_max / 512))" 2>/dev/null
...


J4ZZ 2012-01-26 19:07

Re: U-Boot for Nokia RX-51 with BootMenu
 
Hi guys I could need some guidance here, probably I am missing something.
I installed u-boot-tools_2011.12-1_armel.deb + u-boot-flasher_2011.12-1_armel.deb and extracted u-boot-images.tar.gz to /
Then updated with u-boot-update-bootmenu.

But on reboot there's no penguin looking at me, it just boots into maemo.
Keyboard open brings only my default multiboot menu.

I'm using bash if this matters.

Edit: Ok, sorted it out. For some reason it took a few boots for u-boot to appear. Holding U while booting finally brought it up. So now I only need a config and a kernel for Memo and I would be happy....

Cheers,

J4ZZ

hermes040 2012-01-29 13:08

Re: U-Boot for Nokia RX-51 with BootMenu
 
@pali,

Hi, I have a spare N900 in my hand now, on which I tried to install u-boot.
Newly flashed the device with stock 1.3 kernel (rooted), trying to install u-boot from your files but it says incompatible package.
Do I need to install-uninstall something?

pali 2012-01-29 13:29

Re: U-Boot for Nokia RX-51 with BootMenu
 
write output of dpkg

hermes040 2012-01-29 17:58

Re: U-Boot for Nokia RX-51 with BootMenu
 
dpkg worked after several reboots and I ran and installed u-boot-tools, then u-boot-flasher. copied /boot and /etc, and run u-boot-update-bootmenu.
I can see all .item files in place, all images in place, but when i reboot i am given only one choice=default omap kernel.

I am no developer, but not a noob either and I would like to help in testing. Can you please guide me?
I can also report on hw, but how do I check which version I have?

pali 2012-01-29 18:02

Re: U-Boot for Nokia RX-51 with BootMenu
 
@hermes040:
You need to start phone with open keyboard. Did you see U-Boot screen?
Please provide directory listing of your /boot and /etc/bootmenu.d
Also write here output of u-boot-update-bootmenu

hermes040 2012-01-29 19:11

Re: U-Boot for Nokia RX-51 with BootMenu
 
@pali,

sorry, everything went under /home/boot and /home/etc.. corrected them to /boot and /etc.
Everything is fine now, I get all options for boot images on startup with keyboard open.
The only problem as mentioned some post before is the short time to select.
I will now boot all of them in sequence and report to you.

I also have a 16GB class 10 memory card, partitioned to 1 FAT and 3 more ext3 partitions on which I want to try installing Nemo, Ubuntu and Nitdroid.
Hope I can achieve that with no big pain.

pali 2012-01-29 19:15

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by hermes040 (Post 1157493)
@pali,

sorry, everything went under /home/boot and /home/etc.. corrected them to /boot and /etc.
Everything is fine now, I get all options for boot images on startup with keyboard open.
The only problem as mentioned some post before is the short time to select.
I will now boot all of them in sequence and report to you.

I also have a 16GB class 10 memory card, partitioned to 1 FAT and 3 more ext3 partitions on which I want to try installing Nemo, Ubuntu and Nitdroid.
Hope I can achieve that with no big pain.

I tried to boot kubuntu, nitdroid and nemo kernel but without success yet. Now I do not have time for testing and finding problem... (maybe in next 4-5 weeks) But my plan is to boot all these systems in u-boot!

hermes040 2012-01-29 19:36

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by hermes040 (Post 1157493)
@pali,

I will now boot all of them in sequence and report to you.

booting with keyboard open, I get the following options with booting results:

1. Maemo 5 (Internal Nand) = booting OK
2. Maemo 5 with 2.6.28-omap1-fb = booting OK
3. Maemo 5 with 2.6.28-omap1 = booting OK
4. Maemo 5 with kernel-power 2.6.28.10-power49,pre50 = reboots to U-boot menu
5. Maemo 5 with kernel-power 2.6.28.10-power49 = reboots to U-boot menu
6. U-Boot 2011.12.1 with zimage 2.6.28-omap1 = returns to U-boot menu
7. U-Boot 2011.12.1 = returns back to U-boot menu
8. U-boot console = opens console

Ah, one thing to note: The keyboard must be open before the power key is pressed. With multiboot, it was ok to press powerkey and immediately open keyboard. With U-Boot it doesn't work, keyboard shall be opened first.

flocke000 2012-01-29 21:55

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by hermes040 (Post 1157506)
5. Maemo 5 with kernel-power 2.6.28.10-power49 = reboots to U-boot menu

Do you have the kernel-power packages (at least kernel-power-modules) installed on your device?
Even if you extracted pali's kernel image to /boot the kernel still needs the modules in /lib/modules/2.6.28.10-power49 to work correctly.
Same thing with the 2.6.28.10-power49+pre50 image (but I don't know where to get the modules for pre50).

Edit: If the kernel-power-modules package depends on kernel-power-flasher you may have to reflash the u-boot kernel by reinstalling the u-boot-flasher package.

hermes040 2012-01-29 22:43

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by flocke000 (Post 1157567)
Do you have the kernel-power packages (at least kernel-power-modules) installed on your device?
Even if you extracted pali's kernel image to /boot the kernel still needs the modules in /lib/modules/2.6.28.10-power49 to work correctly.
Same thing with the 2.6.28.10-power49+pre50 image (but I don't know where to get the modules for pre50).

Edit: If the kernel-power-modules package depends on kernel-power-flasher you may have to reflash the u-boot kernel by reinstalling the u-boot-flasher package.

Thanks, as I said, I started with a completely empty device. Will install kernel-power modules and see what happens.

Fabry 2012-01-30 23:11

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by pali (Post 1157498)
I tried to boot kubuntu, nitdroid and nemo kernel but without success yet. Now I do not have time for testing and finding problem... (maybe in next 4-5 weeks) But my plan is to boot all these systems in u-boot!

Nemo works !
I have used u-boot to boot Nemo on eMMC many times.
Probably your attemps have failed because your auto-constructed (by bootmenu style config) boot-args has some options missing.

hermes040 2012-01-31 11:05

Re: U-Boot for Nokia RX-51 with BootMenu
 
If someone can guide on how to create u-boot menu items, i am willing to try.

pali 2012-01-31 11:19

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by hermes040 (Post 1158313)
If someone can guide on how to create u-boot menu items, i am willing to try.

see examples in my tar.gz package

[DarkGUNMAN] 2012-01-31 12:35

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by Fabry (Post 1158119)
Nemo works !
I have used u-boot to boot Nemo on eMMC many times.
Probably your attemps have failed because your auto-constructed (by bootmenu style config) boot-args has some options missing.

Could you please give details how you managed to get it working?
I had a working Nemo bootable from a combined image with matan's u-boot before I switched to pali's version,

ildar 2012-02-01 05:52

Re: U-Boot for Nokia RX-51 with BootMenu
 
Hi, Pali.
Thanks for the thing, it's awesome!

Looking at u-boot-images.tar.gz, I couldn't find BFS image in it.
Also I couldn't just take an image from kernel-bfs package on my own as it contains only fiasco image.

XeonDead 2012-02-01 06:58

Re: U-Boot for Nokia RX-51 with BootMenu
 
BFS is no more, try pwck.

ildar 2012-02-01 10:45

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by Hurrian (Post 1151709)
I found the problem with my crapola not working.
fatls mmc 1 was listing down my Music folder off my eMMC. What the actual ****? It might be because of damaged fat32 though.
Moved bootmenu files to ~/MyDocs/Music/ and it worked.

Would probably still be banging rocks together if not for the Gumstix wiki.

Have the same here. Details:
  1. 1. Have the healthy FAT at /home/user/MyDocs
  2. 2. U-boot shows default menu
  3. 3. U-boot console:
    Code:

    mmc init
    mmc dev 1
    fatls 1

    It shows the contents of /home/user/MyDocs/Text/0scraps/20111026223145
So U-boot indeed handles (v)FAT incorrectly.
My guess it is due to misaligned partition OR parted resize. I mean I used parted to resize /dev/mmcblk0p1 so that I could put another system on eMMC.

Any ideas howto fix?

Netweaver 2012-02-01 14:12

Re: U-Boot for Nokia RX-51 with BootMenu
 
when creating the bootmenu.d file entry for the latest Nemo kernel, what extra boot arguments/options one needs enter in the file to boot Nemo from the SD card ?

or, what manual commands could be tried in the uboot console to boot nemo ?

stskeeps would be the best to answer this I guess, as he was the first person able to create the PR1.3+uboot kernel, able to boot from the external MMC.

Thanks.

Rob1n 2012-02-01 14:32

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by Netweaver (Post 1158949)
when creating the bootmenu.d file entry for the latest Nemo kernel, what extra boot arguments/options one needs enter in the file to boot Nemo from the SD card ?

All I had to pass in was the normal root=/dev/mmcblk0pX argument to tell it which partition to boot to.

pali 2012-02-01 15:16

Re: U-Boot for Nokia RX-51 with BootMenu
 
Here are all supported variables for bootmenu entry:

ITEM_NAME=""
ITEM_DEVICE=""
ITEM_FSTYPE=""
ITEM_KERNEL=""
ITEM_INITRD=""
ITEM_SCRIPT=""
ITEM_CMDLINE=""
ITEM_USEATAG=""

Try to play with it, maybe you can get nemo booting. Now I do not have time to playing with it.

I tried this (stored kernel uImage-nemo in MyDocs) but not worked:
ITEM_NAME="Nemo"
ITEM_KERNEL="uImage-nemo"
ITEM_DEVICE="${INT_CARD}p1"
ITEM_FSTYPE="fat"

Rob1n 2012-02-01 16:58

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by pali (Post 1158981)
Here are all supported variables for bootmenu entry:

ITEM_NAME=""
ITEM_DEVICE=""
ITEM_FSTYPE=""
ITEM_KERNEL=""
ITEM_INITRD=""
ITEM_SCRIPT=""
ITEM_CMDLINE=""
ITEM_USEATAG=""

Try to play with it, maybe you can get nemo booting. Now I do not have time to playing with it.

I tried this (stored kernel uImage-nemo in MyDocs) but not worked:
ITEM_NAME="Nemo"
ITEM_KERNEL="uImage-nemo"
ITEM_DEVICE="${INT_CARD}p1"
ITEM_FSTYPE="fat"

I think you need to add:
ITEM_CMDLINE="root=${EXT_CARD}p6"

or wherever the Nemo partition is.

[DarkGUNMAN] 2012-02-01 17:06

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by Rob1n (Post 1159028)
I think you need to add:
ITEM_CMDLINE="root=${EXT_CARD}p6"

or wherever the Nemo partition is.

How did you build the Nemo uImage to add to the boot entry?
Is it the same procedure used for a merged image (uboot + p49) and setting that one instead?

I would guess this will allow more than one O/S can be loaded from several partitions on the sdcard?

pali 2012-02-01 17:26

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by Rob1n (Post 1159028)
I think you need to add:
ITEM_CMDLINE="root=${EXT_CARD}p6"

or wherever the Nemo partition is.

!! ${EXT_CARD} is variable ONLY for ITEM_DEVICE !!

in ITEM_CMDLINE you should use root=/dev/mmcblk...

pali 2012-02-01 17:27

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by [DarkGUNMAN] (Post 1159030)
How did you build the Nemo uImage to add to the boot entry?
Is it the same procedure used for a merged image (uboot + p49) and setting that one instead?

I would guess this will allow more than one O/S can be loaded from several partitions on the sdcard?

store kernel image (must be in uImage format) to internal/external mmc and set correct variables.

script u-boot-update-bootmenu will then create correct bootmenu configuration

plipp 2012-02-01 18:11

Re: U-Boot for Nokia RX-51 with BootMenu
 
The nemo mobile project releases ready made raw images that you write to an sd card. I should be configured as follows:
partition 1: root filesystem
partition 2: swap
partition 3: /boot

So something like this:
ITEM_NAME="Nemo"
ITEM_KERNEL="uImage"
ITEM_DEVICE="${EXT_CARD}p3"
ITEM_FSTPE="fat"
ITEM_CMDLINE="root=/dev/mmcblk1p1"

Should work, right? But nope, it loads the right kernel (as does run sdboot in the console), but then it just shuts down.

Any suggestions?

pali 2012-02-01 18:49

Re: U-Boot for Nokia RX-51 with BootMenu
 
Quote:

Originally Posted by plipp (Post 1159068)
The nemo mobile project releases ready made raw images that you write to an sd card. I should be configured as follows:
partition 1: root filesystem
partition 2: swap
partition 3: /boot

So something like this:
ITEM_NAME="Nemo"
ITEM_KERNEL="uImage"
ITEM_DEVICE="${EXT_CARD}p3"
ITEM_FSTPE="fat"
ITEM_CMDLINE="root=/dev/mmcblk1p1"

Should work, right? But nope, it loads the right kernel (as does run sdboot in the console), but then it just shuts down.

Any suggestions?

I had same problem when tested.


All times are GMT. The time now is 04:57.

vBulletin® Version 3.8.8