Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Well, a program may try to write to /proc/acpi/... or to /sys/power/... .To enable them, you need to build procfs and sysfs into kernel, and mount them (look at any other fstab for parameters). But checking reboot() syscall will also be interesting.
as i say again,my system already has procfs,and as u said to mount procfs(mkdir /proc .......)
i did the same with sysfs in my system,i.e embedded board
but it seems sysfs is not been mounted,and kernel is 220.127.116.11 and it has sysfs support.
as u said regarding nm,when i do
#nm /lib/libc.so.6 |grep reboot
000c05c0 T reboot
but when i do the same with uclibc library libc.so.0,it says
#nm /lib/libc.so.0 |grep reboot
also yesterday i wrote a simple C prog,and when i executed it on my pc,it rebooted the system but when i executed
it on the embedded board,it did shutdown the system but did not reboot it.
Well, I'm afraid that's the reason. /sbin/reboot tries to execute reboot() call from library. But there is no.. It is smart enough not to fail just on start, and it manages to shutdown the software part, but it can do nothing about hardware. Maybe you could build a static version or something.
actually, I think this may be a linux issue, not uClibc or fs. Check to make sure that the mach_reset() function is being set for your arch. I think a few embedded systems are still incomplete in this regard.
Then I've made a mistake.. And objdump also gives no symbols? And about static version - you will need some object file with reboot() call which you will add during linking (but you'll have to edit source, or at least configure output) to resolve function reboot().
And maybe rick.2g is right also.. It will break what I think of also..