Active Topics

 


Reply
Thread Tools
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#1
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:
Attached Images
 

Last edited by pali; 2020-10-02 at 23:08.
 

The Following 115 Users Say Thank You to pali For This Useful Post:
AapoRantalainen, accountvip, ade, Alfred, amin007110, ammyt, ArchiMark, ArnimS, Astaoth, ayazpak, azad1top, Bad_Habit, Bahador, bharathkumarst, bingbings, brad112358, chainsawbike, conred, cproc, datjomp, Dongle Fongle, don_falcone, dos1, drucula, dschwertb, dzano, eight, eliasps, elros34, ersanpermana, Estel, Fabry, flocke000, foobar, fw190, gttnnn, guilledoc, Halftux, hamil_hamster, Hellmur, hermes040, HtheB, Hurrian, hyno111, int_ua, ivgalvez, ivyking, J4ZZ, joerg_rw, JorgeFX, Joseph9560, juiceme, jurgel, kowalski, lenoch, marmistrz, MartinK, mayhem, Megaltariak, melisa queen, meloferz, MetalGearSolid, Mike Fila, Minhaz, minimos, mosiomm, mouzg, mrsellout, nahci13, Netweaver, nicolai, nkirk, Nobless, nokiabot, panjgoori, PanzerSajt, patriotnop, pelago, peterleinchen, pgarvey, phapsubongtoi, pierrem, preflex, quailstorm, Redouan, reinob, riv64, Santhan, sifo, Skaven2k2, Skry, skykooler, Sohil876, Sourav.dubey, sowwhatyoureap, SSLMM, ste-phan, stlpaul, strange1712, tanpoaran, tetris11_, trompkins, tullamulla, unclouded, unknown.obvious, uros, vetsin, whisk4s, wicket, Wikiwide, X-J, Zaerc, [DarkGUNMAN], Älä hakkaa
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#2
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.
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!

Last edited by Estel; 2012-01-15 at 04:39.
 

The Following 8 Users Say Thank You to Estel For This Useful Post:
flocke000's Avatar
Posts: 16 | Thanked: 13 times | Joined on May 2011 @ Magdeburg, Germany
#3
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.
 

The Following 2 Users Say Thank You to flocke000 For This Useful Post:
flocke000's Avatar
Posts: 16 | Thanked: 13 times | Joined on May 2011 @ Magdeburg, Germany
#4
Originally Posted by Estel View Post
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
 

The Following User Says Thank You to flocke000 For This Useful Post:
Posts: 1,225 | Thanked: 1,905 times | Joined on Feb 2011 @ Quezon City, Philippines
#5
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.
__________________
N9 PR 1.3 Open Mode + kernel-plus for Harmattan
@kenweknot, working on Glacier for Nemo.

Last edited by Hurrian; 2012-01-15 at 10:24.
 
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#6
Originally Posted by Estel View Post
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).

Originally Posted by Estel View Post
// 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
 

The Following 13 Users Say Thank You to pali For This Useful Post:
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#7
Originally Posted by flocke000 View Post
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)
 

The Following 7 Users Say Thank You to pali For This Useful Post:
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#8
Originally Posted by Hurrian View Post
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.
 

The Following 4 Users Say Thank You to pali For This Useful Post:
Posts: 362 | Thanked: 426 times | Joined on Nov 2010 @ Italy, Lombardia
#9
Originally Posted by pali View Post
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
 

The Following 5 Users Say Thank You to Fabry For This Useful Post:
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#10
Originally Posted by Fabry View Post
It already exists: http://talk.maemo.org/showpost.php?p...&postcount=915
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...)
 

The Following 4 Users Say Thank You to pali For This Useful Post:
Reply

Tags
bootmenu, u-boot


 
Forum Jump


All times are GMT. The time now is 23:01.