Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Xperia Boot Menu v1.0

OP munjeni

24th August 2013, 10:22 AM   |  #1  
munjeni's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 16,481
 
5,199 posts
Join Date:Joined: Jun 2011
Xperia Boot Menu v1.0

Disclaimer:
- Me (munjeni) is not responsible for anything related to the our project, you using our project on your own risk! If you no want to risk than don't play with Boot Menu! You can play with Boot Menu but on your own risk!



Feature:
- multiboot based on kexec
- posibility for defining: menu title, path to the kernel, path to the ramdisk, kernel cmdline
- posibility for defining max 10 menus
- autoreboot to the first kernel if menu is not moved (stop timer on menu move)
- graphic timer

Instructions:
- create folder "bootmenu", add settings.ini to these folder, modify settings.ini for your needs
- flash bootmenu using fastboot command (fastboot flash boot recovery.img)
- since internal sdcard is only supported by now, you can define only kernel and ramdisk from internal sdcard path! Make sure you define right path and make sure create folders in bootmenu on your internal sdcard
- make sure settings.ini is in internal sdcard in folder bootmenu!!!
- kexec can boot only kexec patched kernels, so your kernel need to have kexec patch!!! Complete kexec patch you can find on my git!


Simple settings.ini (example):
Quote:

[rom-1]
menutitle=recovery touch white
kernel=/sdcard/bootmenu/examplerom/zImage
ramdisk=/sdcard/bootmenu/examplerom/initrd.gz
cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=32M@128M mem_issw=1M@160M hwmem=71M@161M mem=280M@232M mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-2]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=32M@128M mem_issw=1M@160M hwmem=71M@161M mem=280M@232M mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-3]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=32M@128M mem_issw=1M@160M hwmem=71M@161M mem=280M@232M mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-4]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=32M@128M mem_issw=1M@160M hwmem=71M@161M mem=280M@232M mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-5]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=32M@128M mem_issw=1M@160M hwmem=71M@161M mem=280M@232M mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-6]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=32M@128M mem_issw=1M@160M hwmem=71M@161M mem=280M@232M mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-7]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=32M@128M mem_issw=1M@160M hwmem=71M@161M mem=280M@232M mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-8]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=32M@128M mem_issw=1M@160M hwmem=71M@161M mem=280M@232M mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-9]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=32M@128M mem_issw=1M@160M hwmem=71M@161M mem=280M@232M mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-10]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=32M@128M mem_issw=1M@160M hwmem=71M@161M mem=280M@232M mpcore_wdt.mpcore_margin=359 end lpj=24019



Download:
- http://d-h.st/UXm


Kernel source code:
- https://github.com/munjeni/android_k...go/tree/jb-dev
Last edited by munjeni; 30th August 2013 at 03:32 PM.
The Following 83 Users Say Thank You to munjeni For This Useful Post: [ View ]
24th August 2013, 10:26 AM   |  #2  
Senior Member
Thanks Meter: 190
 
542 posts
Join Date:Joined: Nov 2012
You're simply the best :beer: :beer: :beer:

Inviato dal mio Xperia U usando Tapatalk 4
The Following 3 Users Say Thank You to alematt For This Useful Post: [ View ]
24th August 2013, 11:29 AM   |  #3  
munjeni's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 16,481
 
5,199 posts
Join Date:Joined: Jun 2011
Not sure if kexec working on Xperia U, I will post kernel, kernel modules, boot menu and my new CWM Touch Recovery v6.0.3.6 ramdisk for test.

Need your help, need output of the command:

adb shell cat /proc/iomem

Xperia U have 1gb ram???

Xperia Go by now have:
Quote:

00000000-05ffffff : System RAM
0005e000-008fa4c7 : Kernel text
008fc000-00f2e797 : Kernel data
06000000-06efffff : db8500-trace-area
08000000-09ffffff : System RAM
0e800000-1fdfffff : System RAM
1fe00000-1fefffff : kexec_hardboot
1ffe0000-1fffffff : ram_console
40010000-400107ff : lcpa
40010000-400107ff : dma40 I/O lcpa

So I am not sure about X-U
Last edited by munjeni; 24th August 2013 at 12:10 PM.
The Following 10 Users Say Thank You to munjeni For This Useful Post: [ View ]
24th August 2013, 11:36 AM   |  #4  
Senior Member
Flag San Fior
Thanks Meter: 1,507
 
341 posts
Join Date:Joined: Jul 2013
More
Quote:
Originally Posted by munjeni

Not sure if kexec working on Xperia U, I will post kernel, kernel modules, boot menu and recovery ramdisk for test.

Need your help, need output of the command:

adb shell cat /proc/iomem

Xperia U have 1gb ram???

Xperia Go by now have:

So I am not sure about X-U

Xperia u have 512mb ram

Sent from my Xperia U using xda app-developers app
The Following User Says Thank You to Gava97 For This Useful Post: [ View ]
24th August 2013, 11:38 AM   |  #5  
AD9295's Avatar
Member
Flag Pune
Thanks Meter: 36
 
52 posts
Join Date:Joined: Apr 2013
More
Quote:
Originally Posted by munjeni

Not sure if kexec working on Xperia U, I will post kernel, kernel modules, boot menu and recovery ramdisk for test.

Need your help, need output of the command:

adb shell cat /proc/iomem

Xperia U have 1gb ram???

Xperia Go by now have:

So I am not sure about X-U

Here's the output..

And no XU has only 512 mb of ram
Attached Thumbnails
Click image for larger version

Name:	Screenshot - 8_24_2013 , 3_05_52 PM.jpg
Views:	2726
Size:	230.3 KB
ID:	2210079   Click image for larger version

Name:	Screenshot - 8_24_2013 , 3_06_19 PM.jpg
Views:	2105
Size:	207.0 KB
ID:	2210080  
The Following 2 Users Say Thank You to AD9295 For This Useful Post: [ View ]
24th August 2013, 11:41 AM   |  #6  
munjeni's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 16,481
 
5,199 posts
Join Date:Joined: Jun 2011
Boot menu download link ready, please let me know if booting!

First of all create bootmenu folder inside your internal sdcard, create settings.ini file in bootmenu folder:
Code:
[rom-1]
menutitle=recovery touch white
kernel=/sdcard/bootmenu/examplerom/zImage
ramdisk=/sdcard/bootmenu/examplerom/initrd.gz
cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=32M@128M mem_issw=1M@160M hwmem=71M@161M mem=280M@232M mpcore_wdt.mpcore_margin=359 end lpj=24019
Since cmdline settings is from Xperia Go please edit these line and add cmdline for Xperia U !!!

Than create "examplerom" folder in your bootmenu folder, put initrd.gz and zImage from attachment to the example rom folder, reboot to the fastboot and flash bootmenu:
Quote:

fastboot flash boot recovery.img

Reboot and let me know if working!
Attached Files
File Type: rar cwm.rar - [Click for QR Code] (4.80 MB, 209 views)
Last edited by munjeni; 24th August 2013 at 11:48 AM.
The Following 8 Users Say Thank You to munjeni For This Useful Post: [ View ]
24th August 2013, 11:49 AM   |  #7  
munjeni's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 16,481
 
5,199 posts
Join Date:Joined: Jun 2011
Quote:
Originally Posted by AD9295

Here's the output..

And no XU has only 512 mb of ram

Thanks, so kexec will working I am sure Enjoy guys!

For example if you want to boot your android rom, simple extract ramdisk from boot image, create new folder in bootmenu folder for example my_stock_rom, add [rom-2 settings lines for your new rom, modify path to "my_stock_rom", use zImage from cwm.rar, use modules from cwm.rar and put into your android /system/lib/modules folder... new menu will apear in boot menu... etc Note: autoreboot is automatically set to the [rom-1] (first menu) so if you want to automatically boot "my_stock_rom" simple move them to the top of the settings.ini ... Enjoy!!!
Last edited by munjeni; 24th August 2013 at 11:53 AM.
The Following 8 Users Say Thank You to munjeni For This Useful Post: [ View ]
24th August 2013, 11:49 AM   |  #8  
AD9295's Avatar
Member
Flag Pune
Thanks Meter: 36
 
52 posts
Join Date:Joined: Apr 2013
More
Quote:
Originally Posted by munjeni

Boot menu download link ready, please let me know if booting!

First of all create bootmenu folder inside your internal sdcard, create settings.ini file in bootmenu folder:

Code:
[rom-1]
menutitle=recovery touch white
kernel=/sdcard/bootmenu/examplerom/zImage
ramdisk=/sdcard/bootmenu/examplerom/initrd.gz
cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=32M@128M mem_issw=1M@160M hwmem=71M@161M mem=280M@232M mpcore_wdt.mpcore_margin=359 end lpj=24019
Since cmdline settings is from Xperia Go please edit these line and add cmdline for Xperia U !!!

Than create "examplerom" folder in your bootmenu folder, put initrd.gz and zImage from attachment to the example rom folder, reboot to the fastboot and flash bootmenu:


Reboot and let me know if working! If not working please give me output of the command "adb shell cat /proc/iomem"

I would like to help but I dont know hot add and modify settings.ini..

Edit: I learnt how to do that.. will post results when I get back from college.. Sorry but i have to attend today..
Last edited by AD9295; 24th August 2013 at 11:56 AM.
The Following 2 Users Say Thank You to AD9295 For This Useful Post: [ View ]
24th August 2013, 11:58 AM   |  #9  
munjeni's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 16,481
 
5,199 posts
Join Date:Joined: Jun 2011
Another example:

Since I not sucesfully booted android from sdcard, we need to prepare ramdisk of the future sdcard rom boot, modify them to use partitions from sdcard instead of using partitions from emmc!!! Need help for them!!!

So example is:
kexec cwm which have modified partitions table (sdcard partitions) -> load them into bootmenu -> boot them -> since these cwm will load sdcard partitions we can install an rom.zip regulary to these partitions using these cwm (cwm will install android to these sdcard partition) -> rom.zip updater-script need allso modification because we need to edit for example all lines which contain for example /dev/block/mmcblk0p** and change for example to the /dev/block/loop**

Ramdisk cwm or rom need allso reparation -> /dev/block/mmcblk0p** need changes to the /dev/block/loop** since for sdcard boot we need to mount system,data,cache partitions to the /dev/loop devices.

ETC...BLABLA Thats all we need for multiboot!!!
Last edited by munjeni; 24th August 2013 at 12:23 PM.
The Following 8 Users Say Thank You to munjeni For This Useful Post: [ View ]
24th August 2013, 12:01 PM   |  #10  
munjeni's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 16,481
 
5,199 posts
Join Date:Joined: Jun 2011
Quote:
Originally Posted by AD9295

I would like to help but I dont know hot add and modify settings.ini..

Edit: I learnt how to do that.. will post results when I get back from college.. Sorry but i have to attend today..

No problem mate, I am sure most experienced users will help and get them working, and post the results Good thing is we have boot menu and kexec working, so all other things will come soon, I am sure

Waiting your creations and modifications. Want to see message "sucesfully booted rom from sdcard" First of all waiting confirmation about working Boot Menu v1.0 in Xperia U !
Last edited by munjeni; 24th August 2013 at 12:06 PM.

The Following 13 Users Say Thank You to munjeni For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes