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 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 11:08.

vBulletin® Version 3.8.8