Szwg Boottime Endpoint

From eLinux.org
Jump to: navigation, search

Two dummy functions are inserted as follows;

static int init(void * unused) {

   lock_kernel();
   do_basic_setup();
   prepare_namespace();
   /*
  • Ok, we have completed the initial bootup, and
  • we're essentially up and running. Get rid of the
  • initmem segments and start the user-mode stuff..
    */
   free_initmem();
   unlock_kernel();
      celf_sz_boottime_dummy();<<<<<<<<<<( Here
   if (open("/dev/console", O_RDWR, 0) < 0)
       printk("Warning: unable to open an initial console.\n");
   (void) dup(0);
   (void) dup(0);
              --
               |
               |
            skip
               |
               |
              --


   to_userspace();
       celf_sz_boottime_dummy2();<<<<<<<<<<( Here
   if (execute_command)
       execve(execute_command,argv_init,envp_init);
   execve("/sbin/init",argv_init,envp_init);
   execve("/etc/init",argv_init,envp_init);
   execve("/bin/init",argv_init,envp_init);
          execve("/bin/sh",argv_init,envp_init);
   panic("No init found.  Try passing init= option to kernel.");

}