Closed beefdeadbeef closed 11 years ago
Do you have kernel with kexec-hardboot patches flashed? http://forum.xda-developers.com/showpost.php?p=34577851&postcount=2 "Kernel w/ kexec-hardboot patch"
Looks like I forgot to put "You don't have kexec-hardboot" message also for generic linux ROMs, will fix that.
EDIT: yeah, you probably have that, because normal kexec works....or is it in recovery? Because recovery's kernel is already patched.
yes, i have. while trying to bypass somehow this problem by replacing those %% in cmdlines with actual values, or by emtying dir_cmdline and adding rootsubdir=/path/to/where/it/lives into base_cmdline etc i'm under impression that some string buffers used in this machinery are too small -- although i'm too lazy to check myself :)
Try this multirom binary (it belongs to /sdcard/multirom/, but I guess you know that): http://dl.dropbox.com/u/54372958/multirom
It should get more info to the log.
String buffers should be okay (cmdline buffer is 1024 bytes big, your cmdline is about half as long). The "write_log" call just could not write more than ~500 charaters to the kmsg.
here is it: http://ns.lioka.obninsk.ru/error.log
not grepped this time, only deleted garbage after last line.
"<3>[ 12.903264] Cannot open /proc/atags: No such file or directory" seems to be the problem.
Make sure you have "CONFIG_ATAGS_PROC=y" in your kernel's config. If that does not help, show me your kernel's config.
just rebooted into linux (manually kexec'd):
$ ssh nexus cat /proc/config.gz|zgrep ATAGS CONFIG_ATAGS_PROC=y
ssh nexus ls -l /proc/atags -r-------- 1 root root 0 Jan 6 03:55 /proc/atags
gunzipped config:
helper script i'm using from adb shell:
http://ns.lioka.obninsk.ru/dokexec
sh dokexec
do you see any difference with what multirom does ?
I meant config of the kernel in internal memory, looks like it is cyanogenmod kernel ("Linux version 3.1.10-g830e42f (inky-ghost@cyanogenmod)" in version).
Your script should do exactly the same thing.
BTW looks like kexec's error message got cut off in that log, it is fixed in this binary: http://dl.dropbox.com/u/54372958/multirom
here is it:
<3>[ 13.071499] multirom: kexec call failed, re-running it to get info: <3>[ 13.112658] multirom: kernel: 0x40412008 kernel_size: 39d2c8 <3>[ 13.112750] multirom: Cannot open /proc/atags: No such file or directory <3>[ 13.112886] multirom: kexec_load: entry = 0xa0008000 flags = 280004 <3>[ 13.112962] multirom: nr_segments = 3 <3>[ 13.113094] multirom: segment[0].buf = 0x34090 <3>[ 13.113169] multirom: segment[0].bufsz = 224 <3>[ 13.113301] multirom: segment[0].mem = 0xa0001000 <3>[ 13.113374] multirom: segment[0].memsz = 1000 <3>[ 13.113448] multirom: segment[1].buf = 0x40412008 <3>[ 13.113581] multirom: segment[1].bufsz = 39d2c8 <3>[ 13.113655] multirom: segment[1].mem = 0xa0008000 <3>[ 13.113788] multirom: segment[1].memsz = 39e000 <3>[ 13.113863] multirom: segment[2].buf = 0x400e4008 <3>[ 13.113996] multirom: segment[2].bufsz = 2b5c7b <3>[ 13.114070] multirom: segment[2].mem = 0xa0e75000 <3>[ 13.114144] multirom: segment[2].memsz = 2b6000 <3>[ 13.114278] multirom: kexec_load failed: Function not implemented <3>[ 13.114354] multirom: entry = 0xa0008000 flags = 280004 <3>[ 13.114487] multirom: nr_segments = 3 <3>[ 13.114560] multirom: segment[0].buf = 0x34090 <3>[ 13.114692] multirom: segment[0].bufsz = 224 <3>[ 13.114765] multirom: segment[0].mem = 0xa0001000 <3>[ 13.114839] multirom: segment[0].memsz = 1000 <3>[ 13.114972] multirom: segment[1].buf = 0x40412008 <3>[ 13.115045] multirom: segment[1].bufsz = 39d2c8 <3>[ 13.115178] multirom: segment[1].mem = 0xa0008000 <3>[ 13.115252] multirom: segment[1].memsz = 39e000 <3>[ 13.115384] multirom: segment[2].buf = 0x400e4008 <3>[ 13.115458] multirom: segment[2].bufsz = 2b5c7b <3>[ 13.115531] multirom: segment[2].mem = 0xa0e75000 <3>[ 13.115664] multirom: segment[2].memsz = 2b6000 .... garbage... WAIT OH SHI~ are you saying that when i autoboot with multirom i'm actually using kernel from cm and not from twrp ?Yeah. I have to use kernel from the normal boot partition because I can't boot to recovery by default.
installed kernel_kexec_cm101.zip all seems working dear sir slash madam, i'm stupid
Okay, closing. But at least I've fixed that bug when it did not show warning. And, nice to see that somebody is actually using this :)
Vojtěch, thank you.
have installed: 1) TWRP_multirom_n7_20121220-2 2) multirom_v5_n7-2 3) linux rootfs under roms/...
still can't boot into it, my guess is something wrong happening with cmdline passed to kexec.
my rom_info.txt --- %< --- type="kexec" root_dir="%m/root" kernel_path="%r/boot/vmlinuz" initrd_path="%r/boot/initrd.img" base_cmdline="%b root=%d ro console=tty1 fbcon=rotate:1" dir_cmdline="rootsubdir=%s" --- %< ---
error.txt, grepped for multirom:
-- %< --
<3>[ 5.533128] trampoline: Running multirom <3>[ 5.538651] multirom: Loading MultiROM status... <3>[ 5.539341] multirom: Adding ROM Internal <3>[ 5.539914] multirom: Adding ROM altlinux <3>[ 5.541428] multirom: Dumping multirom status: <3>[ 5.541511] multirom: is_second_boot=0 <3>[ 5.541645] multirom: current_rom=Internal <3>[ 5.541718] multirom: auto_boot_seconds=5 <3>[ 5.541849] multirom: auto_boot_rom=altlinux <3>[ 5.541923] multirom: curr_rom_part=NULL <3>[ 5.541996] multirom: <3>[ 5.542068] multirom: ROM: Internal <3>[ 5.542199] multirom: base_path: /realdata/media/multirom/roms/Internal <3>[ 5.542274] multirom: type: 0 <3>[ 5.542404] multirom: has_bootimg: 1 <3>[ 5.542477] multirom: ROM: altlinux <3>[ 5.542550] multirom: base_path: /realdata/media/multirom/roms/altlinux <3>[ 5.542684] multirom: type: 4 <3>[ 5.542757] multirom: has_bootimg: 0 <3>[ 12.499978] multirom: Found part mmcblk0p10: 57f8f4bc-abf4-655f-bf67-946fc0f9f25b, ext4 <3>[ 12.500092] multirom: Dumping multirom status: <3>[ 12.500227] multirom: is_second_boot=0 <3>[ 12.500303] multirom: current_rom=Internal <3>[ 12.500378] multirom: auto_boot_seconds=5 <3>[ 12.500510] multirom: auto_boot_rom=altlinux <3>[ 12.500583] multirom: curr_rom_part=NULL <3>[ 12.500714] multirom: <3>[ 12.500786] multirom: ROM: Internal <3>[ 12.500861] multirom: base_path: /realdata/media/multirom/roms/Internal <3>[ 12.500996] multirom: type: 0 <3>[ 12.501068] multirom: has_bootimg: 1 <3>[ 12.501142] multirom: ROM: altlinux <3>[ 12.501275] multirom: base_path: /realdata/media/multirom/roms/altlinux <3>[ 12.501350] multirom: type: 4 <3>[ 12.501483] multirom: has_bootimg: 0 <3>[ 12.501571] multirom: Parsing /realdata/media/multirom/roms/altlinux/rom_info.txt... <3>[ 12.503733] multirom: Replacing aliases in root paths... <3>[ 12.503820] multirom: Alias-replaced path: /media/multirom/roms/altlinux/root <3>[ 12.503958] multirom: Replacing aliases in the cmdline... <3>[ 12.504151] multirom: Alias-replaced cmdline: tegra_wdt.heartbeat=30 tegraid=30.1.3.0.0 mem=1022M@2048M android.commchip=0 vmalloc=128M androidboot.serialno=015d2bc28130140b video=tegrafb no_console_suspend=1 console=none debug_uartport=hsport usbcore.old_scheme_first=1 lp0_vec=8192@0xbddf9000 tegra_fbmem=8195200@0xabe01000 core_edp_mv=0 audio_codec=rt5640 board_info=f41:a00:1:44:2 tegraboot=sdmmc gpt gpt_sector=61079551 androidboot.bootloader=4.11 root=/dev/mmcblk0p10 ro console=tty1 fbcon=rotate:1 <3>[ 12.504496] multirom: Alias-replaced cmdline: rootsubdir=/media/multirom/roms/altlinux/root <3>[ 12.510373] multirom: Loading kexec: /realdata/media/multirom/kexec --load-hardboot /realdata//media/multirom/roms/altlinux/root//boot/vmlinuz --mem-min=0xA0000000 --initrd=/realdata//media/multirom/roms/altlinux/root//boot/initrd.img --command-line=tegra_wdt.heartbeat=30 tegraid=30.1.3.0.0 mem=1022M@2048M android.commchip=0 vmalloc=128M androidboot.serialno=015d2bc28130140b video=tegrafb no_console_suspend=1 console=none debug_uartport=hsport usbcore.old_scheme_first=1 lp0_vec=8192@0xbddf9000 tegra_fbmem=8195200@0 <3>[ 12.510722] multirom: --command-line=tegra_wdt.heartbeat=30 tegraid=30.1.3.0.0 mem=1022M@2048M android.commchip=0 vmalloc=128M androidboot.serialno=015d2bc28130140b video=tegrafb no_console_suspend=1 console=none debug_uartport=hsport usbcore.old_scheme_first=1 lp0_vec=8192@0xbddf9000 tegra_fbmem=8195200@0xabe01000 core_edp_mv=0 audio_codec=rt5640 board_info=f41:a00:1:44:2 tegraboot=sdmmc gpt gpt_sector=61079551 androidboot.bootloader=4.11 root=/dev/mmcblk0p10 ro console=tty1 fbcon=rotate:1 rootsubdir=/media/mult <3>[ 12.811389] multirom: kexec call failed! -- %< -- note truncated rootsubdir= on last line OTOH i'm able to successfully boot by just repeating two kexec invocations while in adb shell, like: (sitting in data/media/multirom) # ./kexec --load-hardboot roms/altlinux/root/boot/vmlinuz --mem-min=0xA0000000 --initrd=roms/altlinux/root/boot/initrd.img --command-line='tegra_wdt.heartbeat=30 tegraid=30.1.3.0.0 mem=1022M@2048M android.commchip=0 vmalloc=128M androidboot.serialno=015d2bc28130140b video=tegrafb no_console_suspend=1 console=none debug_uartport=hsport usbcore.old_scheme_first=1 lp0_vec=8192@0xbddf9000 tegra_fbmem=8195200@0xabe01000 core_edp_mv=0 audio_codec=rt5640 board_info=f41:a00:1:44:2 tegraboot=sdmmc gpt gpt_sector=61079551 androidboot.bootloader=4.11 root=/dev/mmcblk0p10 ro console=tty1 fbcon=rotate:1 access=m2 rootsubdir=/media/multirom/roms/altlinux/root' and # ./kexec -e