Hello, I did google search and poked around in busybox init/* sources but still don't know how/if this is possible.
I'd like to implement quicker reboot on Nokia 770 tablet without doing real reboot that goes through bootloader and kernel. For this I think I need to tell init to exec my script (as pid 1). How? 770 boot process is like - bootloader loads kernel (from /dev/mtdblock2) -kernel runs /linuxrc in /dev/mtdblock3 (uclibc system with busybox 1.00). - linuxrc does some stuff, mounts real root and then switches to it via pivot_root like this: cd /mnt/new_root pivot_root . mnt/initfs exec /usr/sbin/chroot . /sbin/init $def_runlevel <dev/console >dev/console 2>&1 Real root filesystem has busybox 1.4.1 and glibc, /sbin/init is busybox init. what I'd like to do is put genie back to bottle, shutdown everything, pivot_root back to /dev/mtdblock3 (mounted to /mnt/initfs) and run /linuxrc as pid 1 again. First I implemented it as new runlevel an basically it works except when being back in /linuxrc I am not pid 1 and still have original init as pid 1 keeping old root busy and preventing me to boot different root again via same pivot_root trick and running different /sbin/init. Obviously init cannot be killed so it needs to be replaced. init/init.c has "static void exec_signal(int sig ATTRIBUTE_UNUSED)" which looks like code I need but I don't know how to invoke it with my script or binary. I'd like to make as little changes to the system as possible so if it cannot be done with stock busybox 1.4.1 I can change and recompile it but I cannot go to higher versions or switch to different init system. Thanks for any help or pointers to previous discussion I missed. Frantisek _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
