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-01-15 04:18

U-Boot for Nokia RX-51 with BootMenu (version 2013.04-2)
 
1 Attachment(s)
Update: 06.04.2016 22:00 UTC: Version 2013.04-2 is in Extras-Devel, fixing u-boot-update-bootmenu script
Update: 20.04.2013 10:00 UTC: Version 2013.04-1 is in Extras-Devel, support for bootmenu ext2/3/4 partition
Update: 28.04.2012 11:50 UTC: Fixed problem with mkimage, build error in debian/rules and correct ram size in u-boot rx51 board code
Update: 28.04.2012 17:50 UTC: Fixed and enabled SW cursor. Now problem with damaged video output is fixed.
Update: 09.07.2012 08:10 UTC: New version which generate omap atag
Update: 09.07.2012 15:46 UTC: Set bootdealy to 0 if keyboard is closed
Update: 17.10.2012 20:15 UTC: Version 2012.10-rc3-1
Update: 13.12.2012 16:15 UTC: Version 2012.10-rc3-1 is now in Extras-Devel & Testing

Please vote for packages:
http://maemo.org/packages/package_in...ols/2013.04-2/
http://maemo.org/packages/package_in...img/2013.04-2/
http://maemo.org/packages/package_in...her/2013.04-2/

Info:

Das U-Boot is bootloader which can boot kernel image with initrd. It can be used for booting more kernels (Nokia stock, kernel-power, ...) or for booting other systems (Nemo, Nitdroid, Kubuntu, Debian, ...).

This U-Boot version is new and has nice Bootmenu (like Fanoush Bootmenu or Multiboot packages). I'm working on upstreaming U-Boot RX-51 (N900) port and this U-Boot Bootmenu. This version should be stable, it has FIXED battery draining and video output garbage.

U-Boot Bootmenu reading special config file and some images from MyDocs (file bootmenu.scr and directory bootmenu-img.d). This special u-boot config file is binary and is generated from text config files by script u-boot-update-bootmenu

New U-Boot has 3 packages:

u-boot-bootimg - contains only u-boot binary, nothing more (it is not need for end-users)

u-boot-tools - contains tools:
* u-boot-gen-combined - generate combined images (u-boot with kernel)
* u-boot-update-bootmenu - update bootmenu entries for U-Boot
* mkimage - convert zImage kernel format to uImage (U-Boot format)

u-boot-flasher - contains combined image: u-boot binary with stock PR1.3 kernel. After installation is this image flashed, and replace actual kernel. This package depends on u-boot-tools!

Plus you need fiasco-image-update-ask (which ask before flashing other kernel/uboot version). More info is here: http://talk.maemo.org/showpost.php?p...&postcount=191 or https://garage.maemo.org/pm/task.php...roject_id=3864

Download & Install:

This U-Boot version is now in Extras-Devel & Extras-Testing. Install package u-boot-flasher via apt-get or via Hildon Application Manager find "U-Boot with kernel 2.6.28-omap1".

!BEFORE INSTALLING THIS U-BOOT ALL OTHER INCOMPATIBLE U-BOOT VERSIONS MUST BE UNINSTALLED!
Hildon Application Manager will not allow you to install this U-Boot if there are some problems.
!INSTALLING u-boot-flasher PACKAGE WILL REPLACE YOUR KERNEL IN NAND!


Source code:
Source code of u-boot (with n900 port) is on http://git.denx.de/?p=u-boot.git;a=summary
Source code of Maemo Debian packaging (with u-boot-update-bootmenu script) is on github:
https://github.com/pali/u-boot-maemo

Changelog:

Update: New version 2013-04-2
Changes:
* u-boot-update-bootmenu: Support for --no-attached and fixed support for ext2/3/4 MyDocs

Update: New version 2013.04-1
Changes:
* New upstream version 2013.04 now contains all n900 patches (everything with bootmenu was upstreamed)
* Added support for ext2/3/4 partition for MyDocs (before bootmenu worked only with FAT32 MyDocs)
* Do not compile U-Boot on autobuilder, but use precompiled version by my gcc 4.7
* U-Boot now can boot 3.x kernels too (thanks to gcc 4.7)
* u-boot-update-bootmenu can be configured to use different MyDocs, etc and boot paths (useful for non Maemo systems)

Update: New version 2012.10-rc3-1
Changes:
* disabled onenand support (which cause non bootable kernel on non 2101 hw revs)
* added thumb-2 errata 430973 workaround (set IBE bit in Auxiliary Control Register)
* reuse bootreason, bootmode, hwrev, nolo ver in omap atag table
* added env setup_boot_reason_atag and setup_boot_mode_atag (for forcing in omap atag table)
* rewritten assembler code (attached kernel image is now moved to end of ram)
* reset lp5523 led chip
* do not append zero size ATAG_MEM
* depends on fiasco-image-update-ask (which ask you before flashing other kernel/uboot version)
* u-boot-update-bootmenu look for kernel image in /opt/boot too (usefull for optification)

Update: New version 2012.04-2
Changes:
* load bootmenu.src always (if keyboard is closed, first menu entry will be automatically boot)
* u-boot now NOT reusing omap atag, instead it generate it
* item option ITEM_REUSEATAGS is obsolated (but still working). Now use ITEM_OMAPATAG for booting Maemo 5
* u-boot variable atagaddr is now ignored, because u-boot is not reusing atags.
* u-boot command "setenv setup_omap_atag 1" will tell u-boot to generate omap atag for booting kernel PLEASE DO NOT USE IT - INSTEAD USE ITEM CONFIG FILE

Update: New version 2012.04
Visible changes for users:
* atag address for kernel is always 0x80000100, so for reusing atags from nolo is needed this command: "setenv atagaddr 0x80000100" instead "setenv atagaddr ${init_atagaddr}"PLEASE DO NOT WRITE YOUR OWN SCRIPTS - USE ITEM CONFIG FILES
* for reusing atags u-boot-update-bootmenu needs option ITEM_REUSEATAGS=1 (instead ITEM_USEATAG) - but works also old option (it show warning) - update your item config files
* "run noloboot" command renamed to "run attachboot"
* if you are not reusing atags from nolo, u-boot will generate memory atag which is needed to boot kernels (now maybe meego/upstream kernel will boot without nolo atags)
other changes:
* added ext4 support
* added console history support (but without cursor)
* disabled cursor - it is buggy now
* enabled generating memory atag
* restored powerbus state after enabling eMMC
* removed init_atagaddr variable (it must be always 0x80000100)
* fixed keymap, cursor keys
* ...

How to create bootmenu entry for U-Boot:
copy kernel image zImage-my to /opt/boot/
create config file in /etc/bootmenu.d/ with suffix .item

/etc/bootmenu.d/20-my-kernel.item
Code:

ITEM_NAME="My kernel"  # Menu entry name
ITEM_KERNEL="zImage-my" # zImage file in /boot/ or /opt/boot
ITEM_OMAPATAG=1        # This is needed for booting Maemo

Bootmeny entry for other system on SD card:

Code:

ITEM_NAME="My name"
ITEM_KERNEL="uImage"
ITEM_INITRD="uInitrd"
ITEM_DEVICE="${EXT_CARD}p1"
ITEM_FSTYPE="ext4"
ITEM_CMDLINE="kernel cmdline"

This means that you have SD card with first partition ext4. On that partition is kernel image with name uImage and initrd/initramfs file with name uInitrd (both generated by mkimage, see below)

Converting zImage to uImage:
Install package u-boot-tools and then run
Code:

$ mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n zImage -d zImage uImage
Warning: ITEM_USEATAG and ITEM_REUSEATAGS options was renamed to ITEM_OMAPATAG

Set bootmenu item file as default first entry
Create symlink to /etc/default/bootmenu.item from your item file. For example:
Code:

$ ln -s /etc/bootmenu.d/20-Maemo5-kernel-power-2.6.28.10-power51.item /etc/default/bootmenu.item
Item config file has same format as Fanoush bootmenu and is stored in same folder :) (Multiboot package has same format too, but in folder /etc/multiboot.d/)

After creating config run tool
Code:

$ u-boot-update-bootmenu
u-boot-update-bootmenu must be called every time, when config file is changed.

See also u-boot-images.tar.gz which contains example item files.

How to easy create Maemo kernel dualbooting: Stock PR1.3 kernel, kernel-power and other...

Just copy zImages to /opt/boot, create config files for each and run u-boot-update-bootmenu

kernel-power v50 has package kernel-power-bootimg in extras-devel & extras-testing. It contains proper zImage and item file.

Examples:

This tarball http://atrey.karlin.mff.cuni.cz/~pal...12.04-1.tar.gz contains some kernels (stock PR1.3 and stock PR1.3 with framebuffer) and some item files.

For playing & testing download archive to / and unpack it as root:
$ cd / && tar -xf u-boot-images.tar.gz

Do not forget to update bootmenu:
$ u-boot-update-bootmenu

Screenshot:

Estel 2012-01-15 04:35

Re: U-Boot for Nokia RX-51 with BootMenu
 
Pali, would it be also possible to explain in simple words, how to "migrate" from backupmenu-multiboot (multiboot combined with backupmenu as selectable option), to U-Boot with backupmenu as selectable option?

Sorry for - probably - silly question, but this whole U-boot thing was never my strong side (time to change that ;) ), so I don't even have and idea how to start tinkering with backupmenu/multiboot combination.

Thanks for this great work, Pali and freemangordon!

/Estel

// Edit

Also, is it possible to "force" u-boot flasher into flashing combined image with some stable version of kernel-power (kp49, for example), for people that are totally uninterested in using stock Nokia kernel even as fallback? I know that one of U-boots purposes is to avoid constantly flashing when we want to boot different kernel, so future kp/community kernel editions would be just loaded by U-boot, but flashing stock kernel - even as backup - again, somehow creeps me out.

flocke000 2012-01-15 09:05

Re: U-Boot for Nokia RX-51 with BootMenu
 
Nice work Pali! And thanks to freemangordon for the L2 fix.

Would it be possible to create a 'u-boot-power-flasher' package with the newest kernel-power ?

For some reason the u-boot on my phone does not load external zImages. I created a entry for kernel-power like you described in your first post, but after selecting it u-boot shows 'Loading the kernel' (or something like that) and my phone turns off after a while.

flocke000 2012-01-15 09:13

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

Originally Posted by Estel (Post 1150742)
Pali, would it be also possible to explain in simple words, how to "migrate" from backupmenu-multiboot (multiboot combined with backupmenu as selectable option), to U-Boot with backupmenu as selectable option?

You don't need to make an extra entry. If you boot with you keyboard open backupmenu will be loaded automatically after u-boot startet the kernel (and it dosen't matter if it's the stock or the power kernel).

At least on my phone it does ;)

Hurrian 2012-01-15 09:39

Re: U-Boot for Nokia RX-51 with BootMenu
 
Holy crap, it finally happened. I'm going to play with this now.

Something's very wrong here. I can see my new boot menu for a split second, the u-boot goes back to the "Internal MMC, Internal Flash" blah blah blah.
Looking at the menu generation script, it's probably ITEM_USEATAG instead of ITEM_USETAG. And the included kernel is kernel-maemo, which means that because of my ext4 /home, I can't boot back until I flash back kernel-power. This isn't good. I've done 5 kernel flashes trying to figure this out.

pali 2012-01-15 13:14

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

Originally Posted by Estel (Post 1150742)
Pali, would it be also possible to explain in simple words, how to "migrate" from backupmenu-multiboot (multiboot combined with backupmenu as selectable option), to U-Boot with backupmenu as selectable option?

Sorry for - probably - silly question, but this whole U-boot thing was never my strong side (time to change that ;) ), so I don't even have and idea how to start tinkering with backupmenu/multiboot combination.

Thanks for this great work, Pali and freemangordon!

/Estel

U-Boot is bootloader which can boot linux kernel - not shell scripts like backupmenu or recovery console. So if you want to start backupmenu, you need to boot some linux kernel (stock, power, ...) and then use normal way for booting backupmenu (e.g fanoush bootmenu or multiboot).

Quote:

Originally Posted by Estel (Post 1150742)
// Edit

Also, is it possible to "force" u-boot flasher into flashing combined image with some stable version of kernel-power (kp49, for example), for people that are totally uninterested in using stock Nokia kernel even as fallback? I know that one of U-boots purposes is to avoid constantly flashing when we want to boot different kernel, so future kp/community kernel editions would be just loaded by U-boot, but flashing stock kernel - even as backup - again, somehow creeps me out.

Of course, you can create your own combined image and flash it!

Create combined.fiasco image (you need packages: u-boot-bootimg u-boot-tools sdk-fiasco-gen)
Code:

$ mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n "<image_name>" -d /boot/<your_zImage> /var/tmp/uImage
$ u-boot-gen-combined /boot/u-boot-<version>.bin /var/tmp/uImage /var/tmp/combined.bin
$ fiasco-gen -o combined.fiasco -g -k /var/tmp/combined.bin -v <uboot_version>

flash it:
Code:

$ fiasco-image-update combined.fiasco

pali 2012-01-15 13:17

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

Originally Posted by flocke000 (Post 1150797)
Nice work Pali! And thanks to freemangordon for the L2 fix.

Would it be possible to create a 'u-boot-power-flasher' package with the newest kernel-power ?

For some reason the u-boot on my phone does not load external zImages. I created a entry for kernel-power like you described in your first post, but after selecting it u-boot shows 'Loading the kernel' (or something like that) and my phone turns off after a while.

Try to boot kernel with static linked framebuffer support. I need to know, where is problem.

Package: http://maemo.org/packages/view/kernel-framebuffer/
Unpack deb package and unpack fiasco image with flasher:
$ flasher-3.5 -F </unpacked_deb/boot/zImage.fiasco> -u
(it will unpack kernel to file zImage)

pali 2012-01-15 13:18

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

Originally Posted by Hurrian (Post 1150802)
Holy crap, it finally happened. I'm going to play with this now.

Something's very wrong here. I can see my new boot menu for a split second, the u-boot goes back to the "Internal MMC, Internal Flash" blah blah blah.
Looking at the menu generation script, it's probably ITEM_USEATAG instead of ITEM_USETAG. And the included kernel is kernel-maemo, which means that because of my ext4 /home, I can't boot back until I flash back kernel-power. This isn't good. I've done 5 kernel flashes trying to figure this out.

Yes, you are right, config is ITEM_USEATAG. I will update first post.

Fabry 2012-01-15 13:46

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

Originally Posted by pali (Post 1150859)
U-Boot is bootloader which can boot linux kernel - not shell scripts like backupmenu or recovery console. So if you want to start backupmenu, you need to boot some linux kernel (stock, power, ...) and then use normal way for booting backupmenu (e.g fanoush bootmenu or multiboot).

It already exists: http://talk.maemo.org/showpost.php?p...&postcount=915

pali 2012-01-15 13:50

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

Originally Posted by Fabry (Post 1150871)

You can create your own initfs which can be booted by U-boot. (I will write later how to write config. I need to know if all working...)

Fabry 2012-01-15 14:13

Re: U-Boot for Nokia RX-51 with BootMenu
 
How is HW Rev compatibility ?

I have rev 2101 so no problems for me, but I have read many times in the past that peoples with different hw revision had many problems with u-boot

pali 2012-01-15 14:31

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

Originally Posted by Fabry (Post 1150883)
How is HW Rev compatibility ?

I have rev 2101 so no problems for me, but I have read many times in the past that peoples with different hw revision had many problems with u-boot

I do not know why there should be problem with HW rev. U-Boot is booted by NOLO as linux kernel. And everyone has one same kernel (eg. one nokia stock) - so no HW rev. differences.

Fabry 2012-01-15 16:58

Re: U-Boot for Nokia RX-51 with BootMenu
 
I don't know why, but there many reports on this forum (and other forums also) of "no booting anymore" after installing u-boot (in particulary Matan's version).

And all peoples with problems have in common that they own a Hw rev different from 2101.

I.e. Matan's version works perfectly on my N900 (rev 2101), but it hangs at "loading/starting kernel" message on some N900 of my friends with different revision (i.e. rev 2204).
And if I remember correctly there was some similar (no boot) problems reported on your first version also

pali 2012-01-15 17:08

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

Originally Posted by Fabry (Post 1150933)
I don't know why, but there many reports on this forum (and other forums also) of "no booting anymore" after installing u-boot (in particulary Matan's version).

And all peoples with problems have in common that they own a Hw rev different from 2101.

I.e. Matan's version works perfectly on my N900 (rev 2101), but it hangs at "loading kernel" message on some N900 of my friends with different revision (i.e. rev 2204)

Problem can be only with address where to load kernel. Different HW revisions has different NOLO and NOLO can load U-Boot to different addres. And if we load kernel to address space of uboot it can lead to errors (e.g u-boot rewrite kernel or u-boot rewrite itself code...).

But now in U-Boot lowlevel init is assembler code which move u-boot itself to address 0x80008000. Kernel is always loaded to 0x82008000, so it should not rewrite code (max size of kernel and u-boot is 2MB=0x2000000).

But if somebody has problem, please boot kernel with framebuffer included static linked support. It can write some early error logs, which can be usefull...

Fabry 2012-01-15 17:17

Re: U-Boot for Nokia RX-51 with BootMenu
 
Ok problems probably have already been fixed in newer version.

So we need only someone which confirm it (of course someone which owns hw rev different from 2101).
There are at least 3 o 4 hw rev, so we need at least 2 o 3 owners that do the test.

pali 2012-01-15 17:19

Re: U-Boot for Nokia RX-51 with BootMenu
 
I will create tar.gz archive which contains more kernels images in zImage format and config files for bootmenu (for easy testing)

pali 2012-01-15 17:50

Re: U-Boot for Nokia RX-51 with BootMenu
 
Archive is ready, see first post.

Fabry 2012-01-15 18:12

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

Originally Posted by pali (Post 1150740)
New U-Boot has 3 packages:

u-boot-bootimg - contains only u-boot binary, nothing more (it is not need for end-users)

u-boot-tools - contains tools:
* u-boot-gen-combined - generate combined images (u-boot with kernel)
* u-boot-update-bootmenu - update bootmenu entries for U-Boot
* mkimage - convert zImage kernel format to uImage (U-Boot format)

u-boot-flasher - contains combined image: u-boot binary with stock PR1.3 kernel. After installation is this image flashed, and replace actual kernel. This package depends on u-boot-tools!

Download & Install (in this order)
[url]http://atrey.karlin.mff.cuni.cz/~pali/u-boot-
http://atrey.karlin.mff.cuni.cz/~pal...12-1_armel.deb
http://atrey.karlin.mff.cuni.cz/~pal...12-1_armel.deb

u-boot-tools requires libc6 >= 2.13 but Maemo has 2.5 ??
"dpkg -i" installs deb package but not configures it

dpkg -i on u-boot-flasher refuses to install because u-boot-tools isn't configured.

pali 2012-01-15 19:51

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

Originally Posted by Fabry (Post 1150963)
u-boot-tools requires libc6 >= 2.13 but Maemo has 2.5 ??
"dpkg -i" installs deb package but not configures it

dpkg -i on u-boot-flasher refuses to install because u-boot-tools isn't configured.

Try again, I updated u-boot-tools package

flocke000 2012-01-15 20:23

Re: U-Boot for Nokia RX-51 with BootMenu
 
When I use your kernel images from the first post everything works fine, maybe I made a mistake before.

And would it be possible to use another dir for the config files?
Now if you have bootmenu installed along with u-boot you get the same menu items twice while booting.
And if you have the backupmenu entry in the dir the 'u-boot-update-bootmenu' command fails.

AndrewX192 2012-01-15 20:24

Re: U-Boot for Nokia RX-51 with BootMenu
 
I've installed the tools and flasher packages, as well as the sample images + configs, and I don't see them in my boot menu. Instead I am offered to boot from Internal Flash, eMMC, SD, etc.

Here is the output of the u-boot-update-bootmenu script:

Quote:

# u-boot-update-bootmenu
Adding bootmenu entry for: Maemo 5 (Internal Nand)

Configuration file: /etc/bootmenu.d/01-Maemo-kernel-power-2.6.28.10-power49.item
Generating u-boot image for kernel zImage-2.6.28.10-power49...
Adding bootmenu entry for: Maemo kernel-power 2.6.28.10-power49

Configuration file: /etc/bootmenu.d/10-Maemo5-2.6.28-omap1-fb.item
Generating u-boot image for kernel zImage-2.6.28-omap1-fb...
Adding bootmenu entry for: Maemo 5 with 2.6.28-omap1-fb

Configuration file: /etc/bootmenu.d/10-Maemo5-2.6.28-omap1.item
Generating u-boot image for kernel zImage-2.6.28-omap1...
Adding bootmenu entry for: Maemo 5 with 2.6.28-omap1

Configuration file: /etc/bootmenu.d/20-Maemo5-kernel-power-2.6.28.10-power49+pre50.item
Generating u-boot image for kernel zImage-2.6.28.10-power49+pre50...
Adding bootmenu entry for: Maemo 5 with kernel-power 2.6.28.10-power49+pre50

Configuration file: /etc/bootmenu.d/20-Maemo5-kernel-power-2.6.28.10-power49.item
Generating u-boot image for kernel zImage-2.6.28.10-power49...
Adding bootmenu entry for: Maemo 5 with kernel-power 2.6.28.10-power49

Configuration file: /etc/bootmenu.d/80-U-Boot-2011.12-1+zImage-2.6.28-omap1.item
Generating u-boot image for kernel u-boot-2011.12-1+zImage-2.6.28-omap1.bin...
Adding bootmenu entry for: U-Boot 2011.12-1 with zImage 2.6.28-omap1

Configuration file: /etc/bootmenu.d/80-U-Boot-2011.12-1.item
Generating u-boot image for kernel u-boot-2011.12-1.bin...
Adding bootmenu entry for: U-Boot 2011.12-1

Configuration file: /etc/bootmenu.d/backupmenu.item
cannot open /dev/null
another udev daemon already running
After the script has finished running, my screen backlight turns up, and starting a new X-Terminal window fails with message:

Quote:

CAL ERROR: open(/dev/mtd1): No such file or directory
mesg: /dev/pts/1: No such file or directory

pali 2012-01-15 20:27

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

Originally Posted by flocke000 (Post 1151006)
When I use your kernel images from the first post everything works fine, maybe I made a mistake before.

And would it be possible to use another dir for the config files?
Now if you have bootmenu installed along with u-boot you get the same menu items twice while booting.
And if you have the backupmenu entry in the dir the 'u-boot-update-bootmenu' command fails.

I have patches for fanoush bootmenu, which will ignore configs with kernels (fanoush bootmenu does not support booting kernels...)

Config file must have only variables with ITEM_ prefix. It is same in fanoush bootmenu.

Should I add some shell checking if config file has only variables? It will decreate bootmenu speed... But I think it is not needed...

pali 2012-01-15 20:29

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

Originally Posted by AndrewX192 (Post 1151007)
I've installed the tools and flasher packages, as well as the sample images + configs, and I don't see them in my boot menu. Instead I am offered to boot from Internal Flash, eMMC, SD, etc.

Here is the output of the u-boot-update-bootmenu script:



After the script has finished running, my screen backlight turns up, and starting a new X-Terminal window fails with message:

WTF, what you are doing? Config file must have only ITEM_ variables assing as written in first post!!

flocke000 2012-01-15 21:04

Re: U-Boot for Nokia RX-51 with BootMenu
 
Yeah that's what happend on my device too.
Move the 'backupmenu.item' out of the /etc/bootmenu.d, run 'u-boot-update-bootmenu' and move it back.

Fabry 2012-01-15 23:27

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

Originally Posted by pali (Post 1150994)
Try again, I updated u-boot-tools package

Unfortunately since some hours I have a N900 which no boot anymore (reboot loop) and I am trying to recover it without full reflash.

I have executed :
  • dpkg -i u-boot-tools (installed but not configured)
  • dpkg -i u-boot-flasher (install failed)
  • cd / && tar -xf /home/user/u-boot-images.tar.gz
  • u-boot-update-bootmenu
  • dpkg -i kernel-power-modules_2.6.28-10power49+pre50_armel.deb (which has removed power kernel v49 modules)
  • flashed manually new kernel
  • rebooted

Then phone has never completed boot process.

Tried many kernels but at some point it always reboots with all kernels (stock and power v50).
Tried RD mode and Kernel with FB but no results

Fortunately multiboot menu is still operative and I can launch backupmenu and its ssh shell, the problem is to find out what is the problem that causes reboot

Estel 2012-01-15 23:28

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

Originally Posted by pali (Post 1151008)
Should I add some shell checking if config file has only variables? It will decreate bootmenu speed... But I think it is not needed...

Absolutely agree with you. It;s already not noob-proof thing, so I think we can ommit things like this - everyone is responsible to check for typos/plain wrong content, before proceeding.

/Estel

AndrewX192 2012-01-16 01:49

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

Originally Posted by pali (Post 1151009)
WTF, what you are doing? Config file must have only ITEM_ variables assing as written in first post!!

Thanks! I'm not sure how that backupmenu.item file got in there.

For future thread readers, be sure to move backupmenu.item out of /etc/bootmenu.d/ before running u-boot-update-bootmenu.

Fabry 2012-01-16 03:28

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

Originally Posted by Fabry (Post 1151060)
Unfortunately since some hours I have a N900 which no boot anymore (reboot loop) and I am trying to recover it without full reflash.

Then phone has never completed boot process.

Tried many kernels but at some point it always reboots with all kernels (stock and power v50).
Tried RD mode and Kernel with FB but no results

Fortunately multiboot menu is still operative and I can launch backupmenu and its ssh shell, the problem is to find out what is the problem that causes reboot

Ok some hours needed but now phone is alive again.

Stock kernel can't work anymore (reboot loop), probably because I have updated dsp libs with N9 version.

Kernel v49 did not work because modules directory was not present (as I known)
Kernel v50 did not work because multiboot had replaced it with v49 at each boot tried with manually flashed v50 kernel

Solution: Manually install modules directory for kernel v49

Hurrian 2012-01-16 09:42

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

Originally Posted by AndrewX192 (Post 1151007)
I've installed the tools and flasher packages, as well as the sample images + configs, and I don't see them in my boot menu. Instead I am offered to boot from Internal Flash, eMMC, SD, etc.

I have this problem, but I don't have backupmenu item installed.
I updated to the newest tools and flasher, I don't get to see my menu.

How do I diagnose this? /home file system is ext4, if it's important.

pali 2012-01-16 10:43

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

Originally Posted by Hurrian (Post 1151205)
I have this problem, but I don't have backupmenu item installed.
I updated to the newest tools and flasher, I don't get to see my menu.

How do I diagnose this? /home file system is ext4, if it's important.

These U-Boot menu entries "Internal Nand", "Internal eMMC", "External SD card" are hardcoded into U-Boot binary and used if bootmenu script not exist (as fallback).

U-Boot bootmenu script is stored in MyDocs in file bootmenu.scr. U-Boot it load from first partition from internal mmc. So if you changed MyDocs partition number, U-Boot bootmenu will not work. Other partition on internal mmc (home, swap) has no effect for U-Boot.

Also you need to properly generate bootmenu.scr file. This file is generated by u-boot-update-bootmenu program. Do not forget to run it. Bootmenu entires is generated only if this program not failed - It must write someting like "generating bootmenu file..."

Fabry 2012-01-16 14:10

Re: U-Boot for Nokia RX-51 with BootMenu
 
I have problems with u-boot-gen-combined:

Code:

Nokia-N900:/home/user# ls -l u-boot-2011.12-1.bin
-rw-r--r--    1 user    users      191600 Jan 16 14:55 u-boot-2011.12-1.bin
Nokia-N900:/home/user# ls -l uImage1
-rw-r--r--    1 user    users      1783320 Jan 16 14:38 uImage1
Nokia-N900:/home/user# u-boot-gen-combined u-boot-2011.12-1.bin uImage1 zImage1
U-Boot binary: u-boot-2011.12-1.bin
U-Boot kernel image: uImage1
Nokia-N900:/home/user# ls -l zImage1
-rw-r--r--    1 root    root        191600 Jan 16 15:08 zImage1
Nokia-N900:/home/user#

uImage1 is Power Kernel v49 zImage converted to uImage with mkimage

pali 2012-01-16 15:58

Re: U-Boot for Nokia RX-51 with BootMenu
 
u-boot-gen-combined propably failed because it does not show output file. Correct output should be:
Code:

U-Boot binary: u-boot-2011.12-1.bin
U-Boot kernel image: uImage1
Output combined image: zImage1

Run u-boot-gen-combined in debug mode:
Code:

$ sh -x /usr/bin/u-boot-gen-combined u-boot-2011.12-1.bin uImage1 zImage1
and post output here if you have still problems.

Fabry 2012-01-16 17:25

Re: U-Boot for Nokia RX-51 with BootMenu
 
Here the result:
Code:

Nokia-N900:/home/user# sh -x /usr/bin/u-boot-gen-combined u-boot-2011.12-1.bin uImage1 zImage3
+ test u-boot-2011.12-1.bin = -h
+ test u-boot-2011.12-1.bin = --help
+ test -z u-boot-2011.12-1.bin
+ uboot=u-boot-2011.12-1.bin
+ test -z uImage1
+ kernel=uImage1
+ test -z zImage3
+ output=zImage3
+ test -f u-boot-2011.12-1.bin
+ test -f uImage1
+ cut -f1 -d
+ wc -c u-boot-2011.12-1.bin
+ uboot_size=191600
+ cut -f1 -d
+ wc -c uImage1
+ kernel_size=1783320
+ uboot_max=262144
+ kernel_max=1835008
+ test 191600 -gt 262144
+ test 1783320 -gt 1835008
+ uboot_append=70544
+ echo U-Boot binary: u-boot-2011.12-1.bin
U-Boot binary: u-boot-2011.12-1.bin
+ echo U-Boot kernel image: uImage1
U-Boot kernel image: uImage1
+ dd if=u-boot-2011.12-1.bin of=zImage3
+ dd if=/dev/zero of=zImage3 bs=1 count=70544 conv=notrunc oflag=append
+ dd if=uImage1 of=zImage3 conv=notrunc oflag=append
+ echo Output combined image: zImage3
Output combined image: zImage3
Nokia-N900:/home/user# ls -l zImage3
-rw-r--r--    1 root    root        191600 Jan 16 18:24 zImage3

It seems that these commands:
dd if=/dev/zero of=zImage3 bs=1 count=70544 conv=notrunc oflag=append
dd if=uImage1 of=zImage3 conv=notrunc oflag=append
have no effect

PS
I have BusyBox v1.19.3 (Debian 1.19.3power4) multi-call binary.

Fabry 2012-01-16 17:42

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

Originally Posted by Fabry (Post 1151388)
It seems that these commands:
dd if=/dev/zero of=zImage3 bs=1 count=70544 conv=notrunc oflag=append
dd if=uImage1 of=zImage3 conv=notrunc oflag=append
have no effect

I have found the problem!
oflag option is not supported by maemo's dd command (at least on busybox power4 version)

The correct dd commands should be:
dd if="/dev/zero" of="$output" bs=1 count="$uboot_append" conv=notrunc seek="$uboot_size" 2>/dev/null
dd if="$kernel" of="$output" conv=notrunc bs=1024 seek="$(($uboot_max / 1024))" 2>/dev/null

don_falcone 2012-01-16 19:45

Re: U-Boot for Nokia RX-51 with BootMenu
 
Has someone tested this with busybox-power? I got errors during flashing with u-boot-flasher (related to /dev/mtd3 and whatever) Also, booting the standard kernel (omap1, installed via u-boot-flasher) and some others via very early u-boot menu seems ok, but if you aren't quick enough to close the slider afterwards BootMenu can't boot using /etc/bootmenu.d/*.item and has troubles with mtd4.

I'm actually not sure if using /etc/bootmenu.d/ is "the best way" as it conflicts in the above way and also during updating u-boot's menu (manually have to move backupmenu.item and recovery.item out of there to allow successful menu creation)

Netweaver 2012-01-16 20:55

Re: U-Boot for Nokia RX-51 with BootMenu
 
hi Pali,

first of all thanks for your great work! This is really a step change in the multiboot/boot menu area. Finally something user friendly. And very safe, once your first combined kernel is set up correctly.
I'm sure lother devs will modify their solutions to be usable with this U-Boot solution.

Can I have a few requests ?
- Is it possible to auto boot the LAST selected kernel when booting with keyboard closed ? That way it would only be needed to open the keyboard to select a DIFFERENT kernel, and it would allow to boot every time (with keyboard closed) the previously selected non-NAND kernel.

- when showing the U-boot bootmenu, is possible to increase the timeout value before continuing the default boot? Now it's a v short time it's looking for keystrokes. This can easily be extended to a few seconds I guess.

- maybe I'm running abit ahead but I'm trying to get create an entry to start my NITdroid :)

What is the syntax for the device specifier in the item for the SD Card, 2nd partition ? U-boot keeps complaining about the incorrect boot device.

I started off with ITEM_DEVICE=mmcblk1p2. NO GO.
Then, according to the error message, the device specifier should be in the format 'dev[:part]'. U-boot also informed me gently that the current device is mmc0

so trying to be clever, I tried ITEM_DEVICE=mmc1:2. stil NO GO
all other ITEM_ properties I kept as in the multiboot item file.

Any hint u can give ?

PS. Did I already say I really like booting/playing with kernels this way ? :)

Fabry 2012-01-16 21:09

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

Originally Posted by don_falcone (Post 1151469)
Has someone tested this with busybox-power?

I have Busybox power4 but I don't remember to have seen errors during u-boot-flasher installation.

pali 2012-01-16 21:16

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

Originally Posted by Netweaver (Post 1151510)
hi Pali,

first of all thanks for your great work! This is really a step change in the multiboot/boot menu area. Finally something user friendly. And very safe, once your first combined kernel is set up correctly.
I'm sure lother devs will modify their solutions to be usable with this U-Boot solution.

Can I have a few requests ?
- Is it possible to auto boot the LAST selected kernel when booting with keyboard closed ? That way it would only be needed to open the keyboard to select a DIFFERENT kernel, and it would allow to boot every time (with keyboard closed) the previously selected non-NAND kernel.

There is problem that saving anything to mmc is not possible yet. But I'd like to implement storing u-boot env to file in MyDocs (and then it is possible to store last boot entry in env variable)

Quote:

Originally Posted by Netweaver (Post 1151510)
- when showing the U-boot bootmenu, is possible to increase the timeout value before continuing the default boot? Now it's a v short time it's looking for keystrokes. This can easily be extended to a few seconds I guess.

Default timeout is in U-Boot rx51 board code, but can changed by U-Boot variable. I think I will increase default timeout to 30s.

Quote:

Originally Posted by Netweaver (Post 1151510)
- maybe I'm running abit ahead but I'm trying to get create an entry to start my NITdroid :)

Me too, but without success. NITDroid kernel does not want to boot on my device from U-Boot :(

Quote:

Originally Posted by Netweaver (Post 1151510)
What is the syntax for the device specifier in the item for the SD Card, 2nd partition ? U-boot keeps complaining about the incorrect boot device.

I started off with ITEM_DEVICE=mmcblk1p2. NO GO.
Then, according to the error message, the device specifier should be in the format 'dev[:part]'. U-boot also informed me gently that the current device is mmc0

so trying to be clever, I tried ITEM_DEVICE=mmc1:2. stil NO GO
all other ITEM_ properties I kept as in the multiboot item file.

Any hint u can give ?

PS. Did I already say I really like booting/playing with kernels this way ? :)

Syntax is same as for Fanoush bootmenu (I already wrote it :)). Here is example config file for booting uImage with uInitrd (with cmdline root=/dev/mmcblk1p2 init=/sbin/init) from second ext3 external mmc partition:

Code:

ITEM_NAME="Test"
ITEM_DEVICE="${EXT_CARD}p2"
ITEM_FSTYPE="ext3"
ITEM_KERNEL"uImage"
ITEM_INITRD="uInitrd"
ITEM_CMDLINE="root=/dev/mmcblk1p2 init=/sbin/init"

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).

pali 2012-01-16 21:17

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

Originally Posted by Fabry (Post 1151521)
I have Busybox power4 but I don't remember to have seen errors during u-boot-flasher installation.

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.

Fabry 2012-01-16 21:29

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

Originally Posted by AndrewX192 (Post 1151007)
I've installed the tools and flasher packages, as well as the sample images + configs, and I don't see them in my boot menu. Instead I am offered to boot from Internal Flash, eMMC, SD, etc.

Here is the output of the u-boot-update-bootmenu script:
Quote:

Configuration file: /etc/bootmenu.d/backupmenu.item
cannot open /dev/null
another udev daemon already running


I have the same problem and it is due to backupmenu.item which is not processable by u-boot-update-bootmenu.

If there is even only one error during menu generation, the bootmenu.scr is not generated (or updated).

Please remove backupmenu.item from /etc/bootmenu.d/ and retry, it will work.


All times are GMT. The time now is 07:58.

vBulletin® Version 3.8.8