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)

pali 2012-02-01 21:12

Re: U-Boot for Nokia RX-51 with BootMenu
 
Now Carsten Munk wrote me, that Nemo kernel needs atags from NOLO.

I tried to add ITEM_USEATAG="1" to nemo bootmenu file and nemo kernel booted :-)

hermes040 2012-02-01 21:53

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

Originally Posted by pali (Post 1159091)
I had same problem when tested.

Last several hours I've been trying same, with playing with different configurations, still same result :(
No booting to Nemo.
I had run Nemo with multiboot before, so I thought it would be easier than to try NITDroid, but couldn't make it. Tomorrow will try NITDroid manual install.

Mentalist Traceur 2012-02-01 21:58

Re: U-Boot for Nokia RX-51 with BootMenu
 
Question - uboot+kernel boots before /sbin/preinit runs when booting into Maemo 5, correct?

pali 2012-02-01 22:00

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

Originally Posted by Mentalist Traceur (Post 1159198)
Question - uboot+kernel boots before /sbin/preinit runs when booting into Maemo 5, correct?

yes, it does not boot maemo from mtd

hermes040 2012-02-01 22:36

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

Originally Posted by pali (Post 1159176)
Now Carsten Munk wrote me, that Nemo kernel needs atags from NOLO.

I tried to add ITEM_USEATAG="1" to nemo bootmenu file and nemo kernel booted :-)

Can you write your Nemo bootmenu item file?

Netweaver 2012-02-01 22:50

Re: U-Boot for Nokia RX-51 with BootMenu
 
indeed now the Nemo kernel boots but i'm getting a kernel panic due to "cannot open root device "mmcblk1p1" and it gives a list of possible partition options but those are the mtdblock0 to mtdblock5 partitions ??? Not the 3 partitions on the SD card.

So the kernel looks at the wrong device to find the root. Any idea ?

EDIT: Maybe the syntax for the discovered external SD card partitions is different than the syntax for the internal ones or due to newer kernel version the names are different ?

Over to Carsten again ?

Thanks everyone for trying to crack this thing. After the hopefully very close successfull Nemo boot we only have Nitdroid left.

Or maybe (k)Ubuntu and Archlinux, but the followers for those are less in numbers and I guess/hope by then all knowledge and experience will be in the open so it's less painful.

Mentalist Traceur 2012-02-01 22:57

Re: U-Boot for Nokia RX-51 with BootMenu
 
Question, if you boot into the u-boot console, don't boot into any O.S., but kick the watchdogs over enough to keep the system from shutting down, if you wait long enough, will the screen shut-off?

I noticed that from the /sbin/preinit shell, if you leave the N900 in it for a while 5-10 min, never timed it, the screen will shut off. Interacting with the keyboard, however, brings it back on.

I'm just wondering if that's the Maemo 5 kernel, one of the bare minimum of drivers loaded in my /sbin/preinit boot-shell (I haven't tested with the one you have in your git repo), or something lower down in the hardware having a built-in screen shut-off-when-idle feature.

Fabry 2012-02-02 00:12

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

Originally Posted by Netweaver (Post 1159209)
indeed now the Nemo kernel boots but i'm getting a kernel panic due to "cannot open root device "mmcblk1p1" and it gives a list of possible partition options but those are the mtdblock0 to mtdblock5 partitions ??? Not the 3 partitions on the SD card.

Nemo is on SD or in eMMC ?

For SD the correct device is mmcblk0p1

Netweaver 2012-02-02 00:16

Re: U-Boot for Nokia RX-51 with BootMenu
 
just tried it with mmcblk0p1 as well, same issue. the kernel still only shows the mtdblock0 to mtdblock5 partitions and panics.

Am I the only one who has a starting/booting Nemo kernel but non-completing all the way to Nemo itself ?

BTW, it's on the SD card.

Fabry 2012-02-02 01:08

Re: U-Boot for Nokia RX-51 with BootMenu
 
Command line (bootargs) for MeeGo/Nemo is :
Code:

root=/dev/mmcblk0p1 rootwait rw console=ttyO2,115200n8 console=tty0 omapfb.vram=0:2M,1:2M,2:2M mtdoops.mtddev=2

plipp 2012-02-02 07:52

Re: U-Boot for Nokia RX-51 with BootMenu
 
yay, i managed to boot with:

ITEM_NAME="Mer - Nemo Mobile"
ITEM_ID="nemo"
ITEM_CMDLINE="root=/dev/mmcblk0p1 rootwait rw console=ttyO2,115200n8 console=tty0 omapfb.vram=0:2M,1:2M,2:2M mtdoops.mtddev=2"
ITEM_DEVICE="${EXT_CARD}p3"
ITEM_KERNEL="uImage"
ITEM_FSTYPE="fat"
ITEM_USEATAG="1"

I got some mmcblk0 errors during boot but it managed to get into nemo. But then after a while it crashed by spraying the console with something like:

mmcblk0: error -110 sending read/write comand
mmcblk0: error -110 sending status comand

But that might just be due to my sd card being damaged or something?

Anyway, thanks for all the help!

Netweaver 2012-02-02 09:40

Re: U-Boot for Nokia RX-51 with BootMenu
 
ha, exact same behavior here. And after that crash Nemo doesn't boot anymore.

It complaints about locked x server files etc. Ends up in an endless loop.
I'm now rewriting my SD card, thinking I was sold a bad card.
It seems it's not the case. There must still be other things to tweak.

PS I'm having a Samsung Class 10 8 GB card, from a reputable seller at Amazon. I'm expecting also a Samsung Class 6 8GB card, for actual runtime speed comparison testing.

flocke000 2012-02-02 10:47

Re: U-Boot for Nokia RX-51 with BootMenu
 
I get exactly the same errors with the bootmenu entry posted by plipp.

My card is a 8GB class 10 from samsung, I don't think it's an issue with a bad card if we all got the same errors.

Maybe some of the options in the CMDLINE are wrong or it still needs more options ...

Fabry 2012-02-02 12:03

Re: U-Boot for Nokia RX-51 with BootMenu
 
The bootmenu items should be:

For SD generated by Nemo image:
Code:

ITEM_NAME="Mer - Nemo Mobile from SD"
ITEM_ID="nemo1"
ITEM_DEVICE="${EXT_CARD}p3"
ITEM_FSTYPE="fat"
ITEM_USEATAG="1"
ITEM_KERNEL="uImage"

For booting from a generic partition (i.e. from eMMC's partition):
Code:

ITEM_NAME="Mer - Nemo Mobile generic"
ITEM_ID="nemo2"
ITEM_KERNEL="kernel-name"
ITEM_USEATAG="1"
ITEM_CMDLINE="root=/dev/mmcblk1p5 rootwait rw console=ttyO2,115200n8 console=tty0 omapfb.vram=0:2M,1:2M,2:2M mtdoops.mtddev=2"

Remember to copy zImage (not uImage) kernel to /boot and edit "mmcblk1p5" to point to your partition (SD is mmcblk0 and eMMC is mmcblk1).

Fabry 2012-02-02 12:08

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

Originally Posted by flocke000 (Post 1159345)
Maybe some of the options in the CMDLINE are wrong or it still needs more options ...

Or subsystems (SD / eMMC) are not initialized by this u-boot as MeeGo/Nemo wants

Netweaver 2012-02-02 12:30

Re: U-Boot for Nokia RX-51 with BootMenu
 
mmmm, are you sure about that external SD card bootmenu item ?
When trying that I'm getting in U-Boot :
Quote:

Booting Boot Menu entry 3
mmc0 is current device
reading boot.scr

** Unable to read "boot.scr" from mmc 0:3 **
And I'm being dropped in the U-Boot console.

The 3rd partition (the FAT one) on the SD card does not contain a boot.scr file, only a kernel config text file, a kernel memory map text file, the vmlinuz version of the kernel and the uImage version of the kernel. No boot.scr file.

What are we doing wrong ? Does this work on your N900 ?

PS. In the mean time received I my Samsung 8GB Class 6 SD card and I used that one as the target for the image, writing was fine. As opposed to the class 10 SD card, which seems like f*cked up. rewriting the image took forever and the card reader activity light was very strange behaving. I'll try to recover that one later.

Fabry 2012-02-02 12:38

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

Originally Posted by Netweaver (Post 1159390)
mmmm, are you sure about that external SD card bootmenu item ?
When trying that I'm getting in U-Boot :


And I'm being dropped in the U-Boot console.

The 3rd partition (the FAT one) on the SD card does not contain a boot.scr file, only a kernel config text file, a kernel memory map text file, the vmlinuz version of the kernel and the uImage version of the kernel. No boot.scr file.

I have edited post, please retry

Netweaver 2012-02-02 12:59

Re: U-Boot for Nokia RX-51 with BootMenu
 
I tried again, with the removal of the SCRIPT line. Now I'm having the same result as with the CMDLINE='root= ..." version we were trying before. Getting loads of mmblck1: error -110 lines in succession reading/receiving for minutes (already 8 minutes ...) in a row. This is now the 2nd card I'm putting in giving this issue. But this one hasn't even fallen through yet to Nemo, as the first one finally did.

I did see something on the Nemo install wiki :
Quote:

Quality/brand of the card; some cards have issues with the N900 and offer slow performance due to I/O errors.
But I have a hard time believing 2 cards, different vendors, both Samsung 8 GB, one class 10, one class 6, are both defect.

So there must be something else ...

UPDATE: now I'm having the thousands of scrolling errors on mmcblk0. Same error -110 sending/receiving ...

pali 2012-02-02 13:15

Re: U-Boot for Nokia RX-51 with BootMenu
 
Same problem with dmesg error messages. Similar errors I was getting in U-boot (when I tried to activate mmc) and in U-Boot was problem that mmc/sd card was not activated with twl4030 regulator.

So I think this is problem in Nemo kernel. (U-Boot maybe does not set same sd state as NOLO, but kernel should not depends on bad bootloader).

Can somebody ask maintainers/developers of Nemo kernel about this problem? At least default Nokia Maemo 2.6.28 has no problems with eMMC/SD memory.

Netweaver 2012-02-02 13:25

Re: U-Boot for Nokia RX-51 with BootMenu
 
I've found this info on the error, talking about a kernel bug in the same kernel version as Nemo is using, also on armel architecture :)


http://groups.google.com/group/beagleboard/browse_thread/thread/87f191353f55ecc2?pli=1


Smoking gun ???

Something for Carsten and his team I guess.

pali 2012-02-02 13:36

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

Originally Posted by Netweaver (Post 1159422)
I've found this info on the error, talking about a kernel bug in the same kernel version as Nemo is using, also on armel architecture :)


http://groups.google.com/group/beagleboard/browse_thread/thread/87f191353f55ecc2?pli=1


Smoking gun ???

Something for Carsten and his team I guess.

try reporting bug

Netweaver 2012-02-02 13:37

Re: U-Boot for Nokia RX-51 with BootMenu
 
from the Nemo Kernel config :
Quote:

# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
According to the kernel bug report, the problem can be avoided by compiling the kernel with CONFIG_PREEMPT_NONE set (and of course the CONFIG_PREEMP not set).

I'm not sure what side effects that has. Need to do some more digging for that...

UPDATE : I see why this option was chosen, to reduce latency.
http://www.hotaboutlinux.com/2010/01...air-scheduler/
Might be a proper kernel patch solution is the best one, if existing ... I'll dig up the link for the Nemo/Mer bug report.

Fabry 2012-02-02 13:46

Re: U-Boot for Nokia RX-51 with BootMenu
 
I have found a bug in bootmenu generation.

I have used this profile:
Code:

ITEM_NAME="Nemo from boot.scr"
ITEM_ID="Nemo2"
ITEM_DEVICE="${INT_CARD}p1"
ITEM_FSTYPE="fat"
ITEM_USEATAG="1"
ITEM_SCRIPT="boot.scr"

to load from MyDocs my old (and working) bootscript for Nemo.

It not works and if i examine the generated menu entry, I find :
Code:

setenv bootmenu_3 'Nemo from boot.scr=
setenv mmcnum 1;
setenv mmcpart 1;
setenv mmctype fat;
setenv bootargs;
setenv atagaddr;
setenv mmckernfile;
setenv mmcinitrdfile;
setenv mmcscriptfile boot.scr;
run trymmcscriptboot;'

Error: Atag not set

Netweaver 2012-02-02 14:14

Re: U-Boot for Nokia RX-51 with BootMenu
 
bug entered on the Mer/Nemo bugzilla for the External SD card initialization failure : https://bugs.merproject.org/show_bug.cgi?id=150

Fabry 2012-02-02 14:32

Re: U-Boot for Nokia RX-51 with BootMenu
 
I have the same problem (error -110) with eMMC but with previous u-boot instead it is working fine

Netweaver 2012-02-02 15:24

Re: U-Boot for Nokia RX-51 with BootMenu
 
Hi Pali,
can u have a look at your code again ?

Specifically compare with the patches that were used by Carsten to create his uboot-pr13 package, as they seem to initialize everything fine : http://al.robotfuzz.com/~al/maemo/u-...-support.patch

We have to avoid ending up in the fingerpointing : it's the Nemo kernel's fault <-> it's Pali's u-boot fault :)

Also Fabry, if you say it was working fine with the previous one, is that a previous Pali version (with the battery drain) or the 'official' uboot-pr13 version ? Just to narrow down where the differences can be looked for.

Thanks again. I hope u have some time, as I know your pretty busy recently.

pali 2012-02-02 15:27

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

Originally Posted by Fabry (Post 1159431)
I have found a bug in bootmenu generation.

I have used this profile:
Code:

ITEM_NAME="Nemo from boot.scr"
ITEM_ID="Nemo2"
ITEM_DEVICE="${INT_CARD}p1"
ITEM_FSTYPE="fat"
ITEM_USEATAG="1"
ITEM_SCRIPT="boot.scr"

to load from MyDocs my old (and working) bootscript for Nemo.

It not works and if i examine the generated menu entry, I find :
Code:

setenv bootmenu_3 'Nemo from boot.scr=
setenv mmcnum 1;
setenv mmcpart 1;
setenv mmctype fat;
setenv bootargs;
setenv atagaddr;
setenv mmckernfile;
setenv mmcinitrdfile;
setenv mmcscriptfile boot.scr;
run trymmcscriptboot;'

Error: Atag not set

This is not error I think. You are not booting kernel, but starting other u-boot script. So if you need to reuse atags from nolo, your script should set all needed variables for booting.

I checked update script and ITEM_USEATAG is relevant only for booting kernel.


... But what other people think? Should external u-boot script set all needed variables for booting? Or should only some and some should set update-bootmenu?
I think that - if user/developer/... decide to use own u-boot script for booting (not prepaired u-boot variables for kernel/initrd) it should also handle passing atags to bootm command.

pali 2012-02-02 15:42

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

Originally Posted by Netweaver (Post 1159482)
Hi Pali,
can u have a look at your code again ?

Specifically compare with the patches that were used by Carsten to create his uboot-pr13 package, as they seem to initialize everything fine : http://al.robotfuzz.com/~al/maemo/u-...-support.patch

We have to avoid ending up in the fingerpointing : it's the Nemo kernel's fault <-> it's Pali's u-boot fault :)

Also Fabry, if you say it was working fine with the previous one, is that a previous Pali version (with the battery drain) or the 'official' uboot-pr13 version ? Just to narrow down where the differences can be looked for.

Thanks again. I hope u have some time, as I know your pretty busy recently.

My u-boot patches are based on that you pointing. Also my patches are based on recent u-boot version and ali's are based on version 2 years old. Also problem can be in upstream u-boot - but we have al least one kernel which booting without problem (stock kernel and kernel-power). My question is why some kernel booting without problem? Also you can see that in ali's patch is nothing about mmc and my code has added twl4030 regulator (which enable eMMC). Old u-boot has no (correct) eMMC support.

Netweaver 2012-02-02 18:25

Re: U-Boot for Nokia RX-51 with BootMenu
 
Whoever is interested, some more reading on the same issue, encountered by other people on Armel platform:

http://permalink.gmane.org/gmane.lin...arm.omap/52674

same issue, fixed by dissect between 2 kernel trees to find the troubled sourcecode in ubuntu on beagleboard :
https://bugs.launchpad.net/ubuntu/+s...ux/+bug/591941

issue still stays why some kernels work. Basically the 2.6.28 kernels (stock + derived kernel-power line) all work. Are they maybe configured with PREEMPT_NONE=y ?

That could explain the difference in behavior with the 2.6.37 Nemo kernel line.

Minute timing differences in the boot/init process can already influence this race condition, making it hard to pinpoint the issue.

Reading back at the Mer/Nemo install wiki, it almost looks like this issue was known/encountered before but was never really bottomed out, maybe because other more important issue were present.at the time.

Just my 2 cents, to be confirmed.

pali 2012-02-02 18:34

Re: U-Boot for Nokia RX-51 with BootMenu
 
kernel-power has this config:
Code:

$ grep PREEMPT .config
CONFIG_PREEMPT=y
# CONFIG_DEBUG_PREEMPT is not set
# CONFIG_PREEMPT_TRACER is not set


Netweaver 2012-02-02 20:40

Re: U-Boot for Nokia RX-51 with BootMenu
 
ok, thanks, that's ruled out then.

A bit deeper now...

As per the Ubuntu ARM bug, the commit below was introduced in 2.6.34rc1 so is surely not included in our 2.6.28. It got removed later by the Ubuntu Arm team to fix their (and our identical) issue. I checked the code in the Nemo 2.6.37 N900 Adaptation kernel in OBS and an evolved version from this commit is STILL in the code.

Also the modification we have in our kernel for the Class 10 cards (setting DTO to 14, iirc), in the same source file, is also NOT in the Nemo kernel.

I suppose, when patched (and that commit rebased/reverted) the same way as our kernel-power, it would have more chance of working but it needs a more experienced kernel programmer than me to create the correct patch and create a new kernel for testing :)


Quote:

6da20c89af64b75302399369a90b9d50c1a87665
drivers/mmc/host/omap_hsmmc.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index cb94044..d2fad58 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -296,11 +296,8 @@ static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
ret = mmc_regulator_set_ocr(host->vcc, 0);
}
} else {
- if (host->vcc_aux) {
- ret = regulator_is_enabled(host->vcc_aux);
- if (ret > 0)
- ret = regulator_disable(host->vcc_aux);
- }
+ if (host->vcc_aux)
+ ret = regulator_disable(host->vcc_aux);
if (ret == 0)
ret = mmc_regulator_set_ocr(host->vcc, 0);
}
@@ -1975,7 +1972,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
host->slot_id = 0;
host->mapbase = res->start;
host->base = ioremap(host->mapbase, SZ_4K);
- host->power_mode = -1;
+ host->power_mode = MMC_POWER_OFF;

platform_set_drvdata(pdev, host);
INIT_WORK(&host->mmc_carddetect_work, omap_hsmmc_detect);

Estel 2012-02-02 21:01

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

Originally Posted by Netweaver (Post 1159646)
Also the modification we have in our kernel for the Class 10 cards (setting DTO to 14, iirc), in the same source file, is also NOT in the Nemo kernel.

Submit a bug for Nemo kernel - they may be interested in including this fix as well. No much sense, in doing this work by our kernel-team, and then, to make Nemo's guys to do same work again, or harvest our work at best. I have nothing against collaboration, but I think that our kernel-specialist are overprojected enough ;)

/Estel

Fabry 2012-02-02 21:26

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

Originally Posted by Netweaver (Post 1159482)
Also Fabry, if you say it was working fine with the previous one, is that a previous Pali version (with the battery drain) or the 'official' uboot-pr13 version ? Just to narrow down where the differences can be looked for.

It is Matan's version

Netweaver 2012-02-04 17:03

Re: U-Boot for Nokia RX-51 with BootMenu
 
ok, some progress, as I did have some time :)

I made 2 patches on top of the latest Nemo kernel. Now I'm waiting for my OBS account, then I can branch off the kernel and compile my own version. I'll create combinations, looking which of the 2 patches fixes the issue (or both or none ...).

It's weekend and FOSDEM in Brussels, I guess people will be busy/having a party tonight (I would if I was there ...). So if I don't get that account soon, then I'll try the local compilation method and do the proper admin/patch workflow in OBS later,

Fun times ahead, tackling the OBS beast! :)
Ultimate goal, a Nemo kernel working with the Pali u-boot.
Win odds? ... tbd :D

hermes040 2012-02-06 21:23

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

I installed uboot in the repos and nemo works just fine with it, maybe you should check your u-boot?

m4r0v3r 2012-02-07 01:47

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

Originally Posted by hermes040 (Post 1161411)
@pali

I installed uboot in the repos and nemo works just fine with it, maybe you should check your u-boot?

same issue, not sure why though

ildar 2012-02-07 09:08

Re: U-Boot for Nokia RX-51 with BootMenu
 
Hi, pali, ppl.
1. Plz apply this:
sed -i 's|test -f "\$BOOTMENU_BOOT_DIR|test -s "$BOOTMENU_BOOT_DIR|' u-boot-update-bootmenu
This will allow processing kernel images which are symlinks.
2. BTW where's the public repo with u-boot-update-bootmenu? Guthub?
3. Would be very nice having ability to change the default boot item through /etc/bootmenu.d/ items.

Hurrian 2012-02-07 09:50

Re: U-Boot for Nokia RX-51 with BootMenu
 
Confirming bug. Installed on external microSD partition 3.
SD Card is a Sandisk 32GB class 2.

Note that the mmc problems also occur with the internal mmc1. MMC init is therefore to blame for message flooding.

ildar 2012-02-07 09:55

Re: U-Boot for Nokia RX-51 with BootMenu
 
anyone tried to boot the kernel with kexec? Maybe that would separate loader problems from kernel problems?

pali 2012-02-07 10:32

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

Originally Posted by ildar (Post 1161567)
Hi, pali, ppl.
1. Plz apply this:
sed -i 's|test -f "\$BOOTMENU_BOOT_DIR|test -s "$BOOTMENU_BOOT_DIR|' u-boot-update-bootmenu
This will allow processing kernel images which are symlinks.
2. BTW where's the public repo with u-boot-update-bootmenu? Guthub?
3. Would be very nice having ability to change the default boot item through /etc/bootmenu.d/ items.

1. Ok, I will apply it
2. Not yet. If I have correct debian/* packaging I will create new branch on gitorious u-boot-shr project
3. Why? I think that the best is to have one place with one format for all multiboot programs...


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

vBulletin® Version 3.8.8