[Busybox] How to add a new executable file in busybox-0.60.3 in Ubuntu 10.04
1. Add the following definition into applets.h
#ifdef BB_HAPPY
APPLET(happy, happy_main, _BB_DIR_BIN)
#endif
2. Add the following definition into Config.h
must follow the order.
#define BB_HAPPY
3. Add the following definition into usage.h
#define happy_full_usage \
"[HAPPY]..."
#define happy_trivial_usage \
"[HAPPY]..."
4. make
5. make install
6. cd _install/bin
7. ./busybox happy
happy.c
#include <stdlib.h>
#include <string.h>
#include "busybox.h"
extern int happy_main(int argc, char **argv)
{
fprintf(stderr,"I am successful to add new function \n");
return 1;
}
0 意見:
張貼留言