[BusyBox] Reboot Problem
Simon Poole
simon.armlinux at themalago.net
Mon Jun 6 04:09:55 MDT 2005
Brent Davidson wrote:
> I have compiled BusyBox and uClibc along with kernel 2.6.9 to run on an
> embedded system built around an NX-Geode (SC1100) cpu. My problem is
> that the system freezes when I try to use the reboot command. I get the
> "Restarting System" message issued by the kernel then the system goes no
> further. I have tried this system on two different boards (PC-Engines
> Wrap 2c and Soekris Net4511) and I have the same result with both boards.
>
> I know this might not be a BusyBox issue, but I'm hoping someone might
> be able to point me in teh right direction.
>
I have had problems with busybox reboot on my EP9312 ARM platform. I
can't remember whether the behaviour was the same as you are
experiencing, but the attached patch works for me. I've never really
worked out why kill_init isn't producing the right behaviour.
The patch reverts to Busybox's alternate behaviour of using
bb_shutdown_system, which does a SIGTERM, a few syncs, a SIGKILL, and
then a kernel reboot().
--
Simon Poole
www.appliancestudio.com
-------------- next part --------------
diff -urN busybox-1.00-pre8.orig/init/halt.c busybox-1.00-pre8/init/halt.c
--- busybox-1.00-pre8.orig/init/halt.c 2003-07-22 10:41:39.000000000 +0100
+++ busybox-1.00-pre8/init/halt.c 2004-04-02 10:44:54.000000000 +0100
@@ -37,12 +37,12 @@
sleep(atoi(delay));
}
-#ifndef CONFIG_INIT
+//#ifndef CONFIG_INIT
#ifndef RB_HALT_SYSTEM
#define RB_HALT_SYSTEM 0xcdef0123
#endif
return(bb_shutdown_system(RB_HALT_SYSTEM));
-#else
- return kill_init(SIGUSR1);
-#endif
+//#else
+// return kill_init(SIGUSR1);
+//#endif
}
diff -urN busybox-1.00-pre8.orig/init/init_shared.c busybox-1.00-pre8/init/init_shared.c
--- busybox-1.00-pre8.orig/init/init_shared.c 2004-02-22 04:17:26.000000000 +0000
+++ busybox-1.00-pre8/init/init_shared.c 2004-04-02 10:46:02.000000000 +0100
@@ -45,7 +45,7 @@
#endif
}
-#ifndef CONFIG_INIT
+//#ifndef CONFIG_INIT
const char * const bb_shutdown_format = "\r%s\n";
extern int bb_shutdown_system(unsigned long magic)
{
@@ -92,4 +92,4 @@
reboot(magic);
return 0; /* Shrug */
}
-#endif
+//#endif
diff -urN busybox-1.00-pre8.orig/init/poweroff.c busybox-1.00-pre8/init/poweroff.c
--- busybox-1.00-pre8.orig/init/poweroff.c 2003-07-22 10:41:39.000000000 +0100
+++ busybox-1.00-pre8/init/poweroff.c 2004-04-02 10:45:12.000000000 +0100
@@ -37,14 +37,14 @@
sleep(atoi(delay));
}
-#ifndef CONFIG_INIT
+//#ifndef CONFIG_INIT
#ifndef RB_POWER_OFF
#define RB_POWER_OFF 0x4321fedc
#endif
return(bb_shutdown_system(RB_POWER_OFF));
-#else
- return kill_init(SIGUSR2);
-#endif
+//#else
+// return kill_init(SIGUSR2);
+//#endif
}
/*
diff -urN busybox-1.00-pre8.orig/init/reboot.c busybox-1.00-pre8/init/reboot.c
--- busybox-1.00-pre8.orig/init/reboot.c 2003-07-22 18:04:54.000000000 +0100
+++ busybox-1.00-pre8/init/reboot.c 2004-04-02 10:44:36.000000000 +0100
@@ -37,14 +37,14 @@
sleep(atoi(delay));
}
-#ifndef CONFIG_INIT
+//#ifndef CONFIG_INIT
#ifndef RB_AUTOBOOT
#define RB_AUTOBOOT 0x01234567
#endif
return(bb_shutdown_system(RB_AUTOBOOT));
-#else
- return kill_init(SIGTERM);
-#endif
+//#else
+// return kill_init(SIGTERM);
+//#endif
}
/*
More information about the busybox
mailing list