Jump to content


Photo

Multiboot using kexecboot

kexecboot multiboot

  • Please log in to reply
66 replies to this topic

Re: Multiboot using kexecboot #21 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 26 October 2013 - 13:58


For mips(el) as well?
(mips is usually one of the last platforms to get support for new features)

Hm, ok could be. This was on arm.


arm is usually the first platform ;)

Re: Multiboot using kexecboot #22 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 26 October 2013 - 22:10

Using console you can get much more information...

Here trying to boot self kernel.
INIT: Switching to runlevel: 2
INIT: Sending processes the TERM signal
[  189.810000] stop pcr0 on dmx 0 pid:84
[  189.810000] stop audio on dmx 0 pid:23d
[  189.811000] audio: xpt stop(2)
[  189.811000] audio: decoder stop
[  189.812000] bcm_audio_channel_stop(2) done
[  189.813000] stop video0 on dmx 0 pid:1d9
[  189.814000] VIDEO0: stop decode
[  189.814000] no decoder left in sync handling so disable xpt_sync
[  189.819000] alps_bsbe2 is in powersave mode now
INIT: no more processes left in this runlevel
[  214.867000] EXT4-fs (sdb4): re-mounted. Opts: barrier=1,data=ordered
[  250.925000] Starting new kernel
[  250.926000] Will call new kernel at 003d5a20
[  250.926000] Bye ...
[  250.926000] ------------[ cut here ]------------
[  250.926000] WARNING: at kernel/smp.c:464 smp_call_function_many+0x118/0x37c()

[  250.926000] Modules linked in: ipv6 r8712u(C) dreambox_keyboard(P) dreambox_r
c2(P) bcm7405(P) alps_bsbe1(O) cxd1981(P) helper(O) bcm4506(P) alps_bsbe1_c01a(P
) cu1216mk3(P) tu1216(O) tmp100(P) alps_bsbe2(P) lnb_ctrl(P) snd_pcm snd_page_al
loc snd_timer lcd(P) stb_core(P)
[  250.926000] Call Trace:
[  250.926000] [<803dc6f8>] dump_stack+0x8/0x34
[  250.926000] [<8002de60>] warn_slowpath_common+0x78/0xa4
[  250.926000] [<8002df14>] warn_slowpath_null+0x18/0x24
[  250.926000] [<80066d70>] smp_call_function_many+0x118/0x37c
[  250.926000] [<80067000>] smp_call_function+0x2c/0x3c
[  250.926000] [<80011734>] r4k___flush_cache_all+0x1c/0xa0
[  250.926000] [<8000d990>] machine_kexec+0x110/0x120
[  250.926000] [<8006ea3c>] kernel_kexec+0x84/0x98
[  250.926000] [<80042c8c>] sys_reboot+0x1e8/0x1f8
[  250.926000] [<8000c768>] stack_done+0x20/0x44
[  250.926000]
[  250.926000] ---[ end trace b81eb11c5e32b4f7 ]---
[  250.926000] ------------[ cut here ]------------
[  250.926000] WARNING: at kernel/smp.c:325 smp_call_function_single+0x174/0x224
()
[  250.926000] Modules linked in: ipv6 r8712u(C) dreambox_keyboard(P) dreambox_r
c2(P) bcm7405(P) alps_bsbe1(O) cxd1981(P) helper(O) bcm4506(P) alps_bsbe1_c01a(P
) cu1216mk3(P) tu1216(O) tmp100(P) alps_bsbe2(P) lnb_ctrl(P) snd_pcm snd_page_al
loc snd_timer lcd(P) stb_core(P)
[  250.926000] Call Trace:
[  250.926000] [<803dc6f8>] dump_stack+0x8/0x34
[  250.926000] [<8002de60>] warn_slowpath_common+0x78/0xa4
[  250.926000] [<8002df14>] warn_slowpath_null+0x18/0x24
[  250.926000] [<80066a24>] smp_call_function_single+0x174/0x224
[  250.926000] [<80067000>] smp_call_function+0x2c/0x3c
[  250.926000] [<80011734>] r4k___flush_cache_all+0x1c/0xa0
[  250.926000] [<8000d990>] machine_kexec+0x110/0x120
[  250.926000] [<8006ea3c>] kernel_kexec+0x84/0x98
[  250.926000] [<80042c8c>] sys_reboot+0x1e8/0x1f8
[  250.926000] [<8000c768>] stack_done+0x20/0x44
[  250.926000]
[  250.926000] ---[ end trace b81eb11c5e32b4f8 ]---
[    0.000000] Linux version 3.2-dm800se (athoik@pc) (gcc version 4.8.1 (GCC) )
#1 SMP Sat Oct 26 17:48:33 EEST 2013
[    0.000000] Fetching vars from bootloader...
[    0.000000] Early serial console at MMIO32 0x10400b00 (options '1000000n8')
[    0.000000] bootconsole [uart0] enabled
[    0.000000] Options: sata=1 enet=1 emac_1=0 no_mdio=0 docsis=0 pci=1 smp=1 mo
ca=0 usb=1
[    0.000000] Using 256 MB RAM (from straps)
And again (trying to boot merlin kernel)...
[  115.221000] Starting new kernel
[  115.222000] Will call new kernel at 004921f0
[  115.222000] Bye ...
[  115.223000] ------------[ cut here ]------------
[  115.223000] WARNING: at kernel/smp.c:464 smp_call_function_many+0x118/0x37c()

[  115.224000] Modules linked in: ipv6 r8712u(C) dreambox_keyboard(P) dreambox_r
c2(P) bcm7405(P) alps_bsbe1(O) cxd1981(P) helper(O) bcm4506(P) alps_bsbe1_c01a(P
) cu1216mk3(P) tu1216(O) tmp100(P) alps_bsbe2(P) lnb_ctrl(P) snd_pcm snd_page_al
loc snd_timer lcd(P) stb_core(P)
[  115.227000] Call Trace:
[  115.227000] [<803dc6f8>] dump_stack+0x8/0x34
[  115.228000] [<8002de60>] warn_slowpath_common+0x78/0xa4
[  115.228000] [<8002df14>] warn_slowpath_null+0x18/0x24
[  115.229000] [<80066d70>] smp_call_function_many+0x118/0x37c
[  115.230000] [<80067000>] smp_call_function+0x2c/0x3c
[  115.230000] [<80011734>] r4k___flush_cache_all+0x1c/0xa0
[  115.231000] [<8000d990>] machine_kexec+0x110/0x120
[  115.231000] [<8006ea3c>] kernel_kexec+0x84/0x98
[  115.232000] [<80042c8c>] sys_reboot+0x1e8/0x1f8
[  115.233000] [<8000c768>] stack_done+0x20/0x44
[  115.233000]
[  115.233000] ---[ end trace 2810814a8866b872 ]---
[  115.234000] ------------[ cut here ]------------
[  115.234000] WARNING: at kernel/smp.c:325 smp_call_function_single+0x174/0x224
()
[  115.235000] Modules linked in: ipv6 r8712u(C) dreambox_keyboard(P) dreambox_r
c2(P) bcm7405(P) alps_bsbe1(O) cxd1981(P) helper(O) bcm4506(P) alps_bsbe1_c01a(P
) cu1216mk3(P) tu1216(O) tmp100(P) alps_bsbe2(P) lnb_ctrl(P) snd_pcm snd_page_al
loc snd_timer lcd(P) stb_core(P)
[  115.238000] Call Trace:
[  115.238000] [<803dc6f8>] dump_stack+0x8/0x34
[  115.239000] [<8002de60>] warn_slowpath_common+0x78/0xa4
[  115.240000] [<8002df14>] warn_slowpath_null+0x18/0x24
[  115.240000] [<80066a24>] smp_call_function_single+0x174/0x224
[  115.241000] [<80067000>] smp_call_function+0x2c/0x3c
[  115.241000] [<80011734>] r4k___flush_cache_all+0x1c/0xa0
[  115.242000] [<8000d990>] machine_kexec+0x110/0x120
[  115.243000] [<8006ea3c>] kernel_kexec+0x84/0x98
[  115.243000] [<80042c8c>] sys_reboot+0x1e8/0x1f8
[  115.244000] [<8000c768>] stack_done+0x20/0x44
[  115.244000]
[  115.244000] ---[ end trace 2810814a8866b873 ]---
[  115.246000] CPU 0 Unable to handle kernel paging request at virtual address 0
0000020, epc == 800021c0, ra == 8007af44
[    0.000000] Linux version 3.2-dm800se (weazle@toxbox.merlin3.info) (gcc versi
on 4.6.4 20120303 (prerelease) (GCC) ) #1 SMP Mon Sep 30 09:04:50 CEST 2013
[    0.000000] Fetching vars from bootloader...
[    0.000000] Early serial console at MMIO32 0x10400b00 (options '1000000n8')
[    0.000000] bootconsole [uart0] enabled
[    0.000000] Options: sata=1 enet=1 emac_1=0 no_mdio=0 docsis=0 pci=1 smp=1 mo
ca=0 usb=1
[    0.000000] Using 256 MB RAM (from straps)
Any idea?
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Multiboot using kexecboot #23 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 26 October 2013 - 22:44

can you disable the second core?
It's probably executing wild code.

Re: Multiboot using kexecboot #24 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 26 October 2013 - 23:20

@athoik: What excatly did you compile?

This

meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb

or

meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_2.0.2.bb

or

meta-openembedded/meta-initramfs/recipes-kernel/linux/linux-kexecboot_git.bb

??

 

And which kernel needs to have "CONFIG_KEXEC=y". The running, or the newly started or both?

 

If I have time, I'll try that on my et9200. But where can I find the boot parameters?


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Multiboot using kexecboot #25 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 26 October 2013 - 23:22

where can I find the boot parameters?

cat /proc/cmdline

Re: Multiboot using kexecboot #26 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 27 October 2013 - 00:12

Thanks!
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Multiboot using kexecboot #27 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 27 October 2013 - 08:05

I compiled the dreambox kernel with kexec and additionally i applied the patch for mips.

The thirdstage loader (the kexec enabled kernel), it can be a totaly different kernel. Even the latest one! (but i thought to try first with kernel where drivers can work also)

Its nice that you are paying attension on this. I think something good will come up. :)

I compiled kexec-tools also.

Edited by athoik, 27 October 2013 - 08:07.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Multiboot using kexecboot #28 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 27 October 2013 - 09:39

Hello,
 
Here is kexecboot documentation for openembeeded.


linux-yocto-tiny as base for the creation of a kernel with embedded initramfs-kexecboot

 

(enabling KEXEC on kernel and compiling kexec-tools was much easier)


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Multiboot using kexecboot #29 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 27 October 2013 - 14:51

Regarding the following stack trace:

 

[ 250.926000] ------------[ cut here ]------------
[ 250.926000] WARNING: at kernel/smp.c:464 smp_call_function_many+0x118/0x37c()

[ 250.926000] Modules linked in: ipv6 r8712u© dreambox_keyboard(P) dreambox_r
c2(P) bcm7405(P) alps_bsbe1(O) cxd1981(P) helper(O) bcm4506(P) alps_bsbe1_c01a(P
) cu1216mk3(P) tu1216(O) tmp100(P) alps_bsbe2(P) lnb_ctrl(P) snd_pcm snd_page_al
loc snd_timer lcd(P) stb_core(P)
[ 250.926000] Call Trace:
[ 250.926000] [<803dc6f8>] dump_stack+0x8/0x34
[ 250.926000] [<8002de60>] warn_slowpath_common+0x78/0xa4
[ 250.926000] [<8002df14>] warn_slowpath_null+0x18/0x24
[ 250.926000] [<80066d70>] smp_call_function_many+0x118/0x37c
[ 250.926000] [<80067000>] smp_call_function+0x2c/0x3c
[ 250.926000] [<80011734>] r4k___flush_cache_all+0x1c/0xa0
[ 250.926000] [<8000d990>] machine_kexec+0x110/0x120
[ 250.926000] [<8006ea3c>] kernel_kexec+0x84/0x98
[ 250.926000] [<80042c8c>] sys_reboot+0x1e8/0x1f8
[ 250.926000] [<8000c768>] stack_done+0x20/0x44
[ 250.926000]
[ 250.926000] ---[ end trace b81eb11c5e32b4f7 ]---

 

I can find the following:

 

[patch 3/7] mips: Enable interrupts in do_signal()

 

And looking at the response in do_notify_resume we there is local_irq_enable.

 

asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
        __u32 thread_info_flags)
{
        local_irq_enable();

 

But in our stack trace there is no do_notify_resume call. Maybe if we add local_irq_enable in sys_reboot or kernel_kexec will solve that problem?

 

I allready ask the same on IRC #mipslinux, if i get an answer i will inform you.


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Multiboot using kexecboot #30 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 27 October 2013 - 16:42

I notice that machine kexec has the following (starting from 3.8 stock kernel)
 
#ifdef CONFIG_SMP
	/* All secondary cpus now may jump to kexec_wait cycle */
	relocated_kexec_smp_wait = reboot_code_buffer +
		(void *)(kexec_smp_wait - relocate_new_kernel);
	smp_wmb();
	atomic_set(&kexec_ready_to_reboot, 1);
#endif
 
So maybe we need to use 3.8+ kernel if the above is related...

- kexec reboot on SMP machine is implemented

http://lists.infrade...une/001909.html

Edited by athoik, 27 October 2013 - 16:44.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Multiboot using kexecboot #31 Erik Slagter

  • PLi® Core member
  • 46,960 posts

+541
Excellent

Posted 27 October 2013 - 17:17

I think pieterg has a strong point. The second core/thread is probably still running and executing stray code. You'd need to stop the second thread first (although I wouldn't know how to do that).


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Multiboot using kexecboot #32 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 27 October 2013 - 17:56

Hi athoik,

Xtrend uses 3.8.7 kernel. So perhaps it works on my box. Unfortunately I have not much time. Perhaps tomorrow or on Tuesday.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Multiboot using kexecboot #33 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 27 October 2013 - 20:19

Thanks betacentauri,

I can build an image with kexec+kexec-tools for you if that saves some time.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Multiboot using kexecboot #34 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 27 October 2013 - 20:51

That's not really a problem. My build environment should work without problems (I hope so, didn't compile a kernel for some weeks). If I have problems, I'll contact you.

Thanks for the offer!


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Multiboot using kexecboot #35 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 2 November 2013 - 21:58

... I build kexec-tools no compile error.

Strange. Build wasn't possible until I changed this:
diff --git a/meta/recipes-kernel/kexec/kexec-tools.inc b/meta/recipes-kernel/kexec/kexec-tools.inc
index 278ce34..ee1f1e8 100644
--- a/meta/recipes-kernel/kexec/kexec-tools.inc
+++ b/meta/recipes-kernel/kexec/kexec-tools.inc
@@ -12,6 +12,6 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
 
 inherit autotools
 
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*)-(linux|freebsd.*)'
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*|mips.*)-(linux|freebsd.*)'
 
 INSANE_SKIP_${PN} = "arch"

Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Multiboot using kexecboot #36 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 2 November 2013 - 22:20

I am using OpenPLi 4, where mips was allready there.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Multiboot using kexecboot #37 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 2 November 2013 - 22:46

I'm still using OpenPli 3.

Unfortunately I have the same problem. After executing "kexec -e" system freezes. Where did you see the log messages? In /var/log/messages?
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Multiboot using kexecboot #38 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 2 November 2013 - 23:13

I had to connect via serial-usb to get messages.

Actually new kernel starts, but freezes at the very beggining.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Multiboot using kexecboot #39 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 2 November 2013 - 23:18

I did several tests without success. I have currently no idea how to get it working.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Multiboot using kexecboot #40 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 2 November 2013 - 23:43

Can you see the error?
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916



Also tagged with one or more of these keywords: kexecboot, multiboot

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users