diff --git a/src/system/boot/platform/openfirmware/start.c b/src/system/boot/platform/openfirmware/start.c index d4cf262c01..a885f8d578 100644 --- a/src/system/boot/platform/openfirmware/start.c +++ b/src/system/boot/platform/openfirmware/start.c @@ -132,6 +132,8 @@ _start(uint32 _unused1, uint32 _unused3, void *openFirmwareEntry) void start(void *openFirmwareEntry) { + char bootargs[512]; + // stage2 args - might be set via the command line one day stage2_args args; args.heap_size = HEAP_SIZE; @@ -139,6 +141,13 @@ start(void *openFirmwareEntry) of_init(openFirmwareEntry); + // check for arguments + if (of_getprop(gChosen, "bootargs", bootargs, sizeof(bootargs)) != OF_FAILED) { + static const char *sArgs[] = { NULL, NULL }; + sArgs[0] = (const char *)bootargs; + args.arguments = sArgs; + } + determine_machine(); console_init();