Welcome! Log In Create A New Profile

Advanced

Linux Kernel 3.6.x Reboot [SOLVED]

Posted by bodhi 
Linux Kernel 3.6.x Reboot [SOLVED]
March 24, 2013 03:59PM
I've compiled kernel 3.6.11 (with Device Tree turn off), and can run on a Dockstar without problem (cold start, warm start, ...everything works great) . Some of the new features are quite interesting:
http://forum.doozan.com/read.php?2,8177,8332#msg-8332

Currently, I'm seeing a strange behavior. I cloned the USB stick to another in order to boot it on a Pogo E02, and it cold started everytime, no problem. However, a "shutdown -r now" would hang the system.

It seems it could not shutdown, and got stuck somewhere before the halt command in "/etc/rc0.d/K07halt" (I have LED light off command insert before the halt command).

It's a puzzle, since I'm sure the cloning of the stick was successful because the cold start never fails, only the warm start. And it only occurs with the cloned stick.

I guess it's serial console time :) but if anybody knows why please post.



Edited 1 time(s). Last edit at 03/31/2013 02:47PM by bodhi.
Re: Linux Kernel 3.6.x Reboot
March 24, 2013 06:19PM
CONTINUED:

Serial console log:

INIT: Sending p[info] Using makefile-style concurrent boot in runlevel 6.
[....] Stopping busybox' klogd implementation: klogd1680 (klogd)
Stopped klogd (pid 1680).
. ok 
[ ok ] Stopping Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[....] Stopping busybox' syslogd implementation: syslogd1686 (syslogd)
. ok 
[ ok ] Stopping web server: lighttpd.
logger[2375]: Stopping smbnetfs
logger[2377]: Stopped smbnetfs
[info] Saving the system clock.
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
[ ok ] Stopping RDP Session manager : sesman xrdp.
[ ok ] Stopping bittorrent daemon: transmission-daemon.
[ ok ] Stopping Samba daemons: nmbd smbd.
[ ok ] Asking all remaining processes to terminate...done.
[ ok ] All processes ended within 2 seconds...done.
[ ok ] Deconfiguring network interfaces...done.
[ ok ] Unmounting temporary filesystems...done.
[ ok ] Deactivating swap...done.
[info] Will now restart.
[  136.743786] Restarting system.
[  137.747339] Reboot failed -- System halted

I vaguely recall some thing is broken in power management settings (or need to be set differently)?
Re: Linux Kernel 3.6.x Reboot
March 25, 2013 12:39AM
CONTINUE:

It got stranger: The same Dockstar stick can be use to boot the Pogo E02, but can't reboot either. Swaping the cloned stick to the Dockstar, then it cold started and rebooted with no problem.

Guess I need to "make-kpkg clean" the source tree and rebuild the kernel to see if was just a bad build.



Edited 1 time(s). Last edit at 03/25/2013 12:47AM by bodhi.
Re: Linux Kernel 3.6.x Reboot
March 25, 2013 09:08AM
Just a guessing:

Is uboot the same on both machine?

And the environment such as: usb_rootfstype...

-syong
Re: Linux Kernel 3.6.x Reboot
March 25, 2013 10:44AM
Yes, same uBoot. Some minor setting is different because machine specifics (Dockstar vs Pogo E02). Same uBoot envs, except for IP addresses.

All my Kirkwood plugs of various types are set to the same envs and boot the same rootfs on a USB stick.
Re: Linux Kernel 3.6.x Reboot
March 25, 2013 11:34AM
Using LED light off command to track it down?

-syong
Re: Linux Kernel 3.6.x Reboot
March 25, 2013 10:15PM
bodhi Wrote:
-------------------------------------------------------
> [info] Saving the system clock.
> hwclock: Cannot access the Hardware Clock via any known method.
> hwclock: Use the --debug option to see the details of our search for an access method.

This might be the remedy for the above:

http://forum.doozan.com/read.php?2,12000,12004#msg-12004

-syong
Re: Linux Kernel 3.6.x Reboot
March 25, 2013 11:10PM
syong Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > [info] Saving the system clock.
> > hwclock: Cannot access the Hardware Clock via
> any known method.
> > hwclock: Use the --debug option to see the
> details of our search for an access method.
>
> This might be the remedy for the above:
>
> http://forum.doozan.com/read.php?2,12000,12004#msg
> -12004

Thanks syong, but I don't think it caused problem rebooting, because the Dockstar does not have HW clock either!
Re: Linux Kernel 3.6.x Reboot
March 25, 2013 11:26PM
Yes, that should not be the remedy for rebooting issue.

If you post the 3.6.x kernel, I can test it on my e02.

-syong
Re: Linux Kernel 3.6.x Reboot
March 30, 2013 04:15AM
Hi Syong,

Here is the kernel on Dropbox:
linux-image-3.6.11-kirkwood-bodhi.tar.bz2
md5:
a08482c723c26c05b93199b9f2fd9f7a

I've tried turn on -x in all shutdown/reboot scripts to see the shutdown activities. What I've found so far (comparing to a successful reboot) was that everything was shutdown OK until the last action in the reboot script:
/etc/rc6.d/K07reboot

where the reboot command failed:
reboot -d -f -i

Hope you will have more luck than I did :)
Thanks!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.6.x Reboot
March 30, 2013 10:40AM
bodhi,

I just tried your kernel on my e02. Here is my luck:

  • `reboot' does not work; led keeps green.
  • `shutdown -h now' works; led turns off.

It seems that power management for e02 in the kernel is broken between 3.2.30 and 3.6.11.

Do you know why davygravy stopped at 3.3?

The reason I asked to tried your kernel is that the K07halt in your system is K10halt in mine.
Seem that does not matter. If you need more information, please let me know.

-syong
Re: Linux Kernel 3.6.x Reboot
March 30, 2013 03:14PM
syong,

That's what I got too. "shutdown -h now" works fine. I can shutdown and cold start OK. But "reboot" failed every time. When I have time, I will look at the .config to see if somehow there were new code introduced into the mainline that has caused some power management function to activate. This is just a guess for now, I've read that lot of new power management functionalities were added to support hibernate/suspend for desktop Linux

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.6.x Reboot
March 30, 2013 04:38PM
Looks like it failed right here:


kernel/process.c

void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);

void (*arm_pm_restart)(char str, const char *cmd) = null_restart;
EXPORT_SYMBOL_GPL(arm_pm_restart);


	machine_restart()
	        machine_shutdown();

	        arm_pm_restart(reboot_mode, cmd);

	        /* Give a grace period for failure to restart of 1s */
        		mdelay(1000);

	        /* Whoops - the platform was unable to reboot. Tell the user! */
        		printk("Reboot failed -- System halted\n");
        		local_irq_disable();

I think I am close to solve this, i.e. possible why it failed.

Addendum:

Mea culpa :) the patch was incompleted sincecode in kernel 3.3.x changed the machine structure. I'll modify the patch and rebuild. Stay tuned.



Edited 4 time(s). Last edit at 03/31/2013 03:02PM by bodhi.
Re: Linux Kernel 3.6.x Reboot [SOLVED]
March 31, 2013 02:49PM
I modified the patch and fixed the reboot problem. Will post the working kernel.
Re: Linux Kernel 3.6.x Reboot [SOLVED]
March 31, 2013 03:34PM
Congratulation! I can not wait to see your patch.

-syong
Re: Linux Kernel 3.6.x Reboot [SOLVED]
March 31, 2013 03:50PM
syong Wrote:
-------------------------------------------------------
> Congratulation! I can not wait to see your patch.

Thanks! I'm uploading the kernel to dropbox. Don't have a consolidated patch yet, but I will create one and post here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.6.x Reboot [SOLVED]
March 31, 2013 04:45PM
Good! I will test it when it is there.

-syong
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: