Fix netinit
This commit is contained in:
parent
a92007245d
commit
1960980586
2
Makefile
2
Makefile
@ -161,7 +161,7 @@ base/bin/init: apps/init.c base/lib/libc.a | dirs
|
||||
$(CC) -static -Wl,-static $(CFLAGS) -o $@ $<
|
||||
|
||||
fatbase/netinit: util/netinit.c base/lib/libc.a | dirs
|
||||
$(CC) -s -static -Wl,-static $(CFLAGS) -o $@ $<
|
||||
$(CC) -static -Wl,-static $(CFLAGS) -o $@ $<
|
||||
|
||||
# Userspace applications
|
||||
|
||||
|
@ -40,7 +40,7 @@ EFI_HANDLE ImageHandleIn;
|
||||
#define DEFAULT_TEXT_CMDLINE "start=--vga "
|
||||
#define DEFAULT_VID_CMDLINE "vid=auto,1440,900 "
|
||||
#define DEFAULT_PRESET_VID_CMDLINE "vid=preset "
|
||||
#define DEFAULT_NETINIT_CMDLINE "init=/dev/ram0 _"
|
||||
#define DEFAULT_NETINIT_CMDLINE "init=/dev/ram0 "
|
||||
#define MIGRATE_CMDLINE "migrate "
|
||||
#define DEBUG_LOG_CMDLINE "logtoserial=warning "
|
||||
#define DEBUG_SERIAL_CMDLINE "kdebug "
|
||||
|
@ -84,7 +84,7 @@ static fs_node_t * ramdisk_device_create(int device_number, uintptr_t location,
|
||||
sprintf(fnode->name, "ram%d", device_number);
|
||||
fnode->uid = 0;
|
||||
fnode->gid = 0;
|
||||
fnode->mask = 0660;
|
||||
fnode->mask = 0770;
|
||||
fnode->length = size;
|
||||
fnode->flags = FS_BLOCKDEVICE;
|
||||
fnode->read = read_ramdisk;
|
||||
|
@ -529,11 +529,8 @@ int main(int argc, char * argv[]) {
|
||||
|
||||
|
||||
struct http_req my_req;
|
||||
if (argc > 1) {
|
||||
parse_url(argv[1], &my_req);
|
||||
} else {
|
||||
parse_url(NETBOOT_URL, &my_req);
|
||||
}
|
||||
/* TODO: Extract URL from kcmdline */
|
||||
parse_url(NETBOOT_URL, &my_req);
|
||||
|
||||
char file[100];
|
||||
sprintf(file, "/dev/net/%s:%d", my_req.domain, my_req.port);
|
||||
@ -706,7 +703,7 @@ int main(int argc, char * argv[]) {
|
||||
TRACE("Executing init...\n");
|
||||
char * const _argv[] = {
|
||||
"/bin/init",
|
||||
"--migrate",
|
||||
argv[1],
|
||||
NULL,
|
||||
};
|
||||
execve("/bin/init",_argv,NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user