mirror of
https://github.com/thamugadi/powerpc-ofw-boot.git
synced 2024-06-19 17:29:26 +00:00
Compare commits
5 Commits
b33635641b
...
e4435696ae
Author | SHA1 | Date | |
---|---|---|---|
|
e4435696ae | ||
|
4cdd5445f7 | ||
|
48306c066f | ||
|
9da011a73c | ||
|
720f391a10 |
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,4 +1,4 @@
|
|||
*.elf
|
||||
*.bin
|
||||
DISK.APM
|
||||
*.txt
|
||||
*.APM
|
||||
bootinfo.txt
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
ofw_arg.n_args = args; \
|
||||
ofw_arg.n_rets = rets;
|
||||
|
||||
typedef int phandle;
|
||||
typedef int ihandle;
|
||||
typedef int32_t phandle;
|
||||
typedef int32_t ihandle;
|
||||
|
|
|
@ -10,9 +10,14 @@ void __eabi(void)
|
|||
{
|
||||
}
|
||||
|
||||
//void* ofw_interpret(char* cmd, int32_t* stack_args, int n_stack_args, int n_ret_args, int32_t* reta
|
||||
void main(void)
|
||||
{
|
||||
puts("Press any key to continue", 25);
|
||||
ofw_interpret("blink-screen", 0, 0, 0, 0);
|
||||
ofw_interpret("key", 0, 0, 1, (int32_t*)0x03020000);
|
||||
|
||||
puts("Starting...", 11);
|
||||
if (ofw_test("open"))
|
||||
{
|
||||
asm("mr 27, 28");
|
16
src/lib/common.c
Normal file
16
src/lib/common.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include <ofw.h>
|
||||
|
||||
void puts(char* str, int len)
|
||||
{
|
||||
char cmd[len+8];
|
||||
cmd[0] = '.'; cmd[1] = '"';
|
||||
cmd[2] = ' ';
|
||||
for (int i = 3; i < len+3; i++)
|
||||
{
|
||||
cmd[i] = str[i-3];
|
||||
}
|
||||
cmd[len+3] = '"'; cmd[len+4] = ' ';
|
||||
cmd[len+5] = 'c'; cmd[len+6] = 'r';
|
||||
cmd[len+7] = 0;
|
||||
ofw_interpret(cmd, 0, 0, 0, 0);
|
||||
}
|
Loading…
Reference in New Issue
Block a user