https://openfirmware.info/api.php?action=feedcontributions&user=Programmingkid&feedformat=atomOpenBIOS - User contributions [en]2024-03-28T23:55:41ZUser contributionsMediaWiki 1.40.0https://openfirmware.info/index.php?title=Adding_words_to_openbios&diff=460Adding words to openbios2017-12-27T18:19:37Z<p>Programmingkid: /* Advanced example: */</p>
<hr />
<div>How to add “words” to the OpenBIOS Dictionary using the C language. <br />
<br />
In this example, we are going to implement a forth “word” in C. There are two arrays that need to be looked at. One is located in the file openbios-devel/kernel/bootstrap.c. The other array is located in the file openbios-devel/kernel/forth.c. The two arrays are used to map a C function to a forth word.<br />
<br />
The array in bootstrap.c is where the name of the forth word would go. The array in forth.c is where the corresponding C function would go. When adding to these arrays, make sure to add at the end of the list. This ensures everything continues to run smoothly. <br />
<br />
Here is an example on adding to the dictionary. Say you want to add a word called dog. You can define the C function like this:<br />
<br />
static void dog(void)<br />
{<br />
printk(“bark bark!”);<br />
}<br />
<br />
Add this function to a .c file. Knowing which file to pick can involve a lot of trial and error. In this example, we will use the file openbios-devel/kernel/forth.c. Be sure to include the static keyword before in the function declaration, or OpenBIOS won’t build successfully.<br />
<br />
Now we add the word dog to the end of the forth word list. Open the file bootstrap.c, then find the array called wordnames. When adding the word dog, be sure the name of the word is surrounded in double quotes. Here is how the array should look:<br />
<br />
/* the word names are used to generate the prim words in the<br />
dictionary. This is done by the C written interpreter.<br />
*/<br />
<br />
static const char *wordnames[] = {<br />
"(semis)", "", "(lit)", "", "", "", "", "(do)", "(?do)", "(loop)",<br />
"(+loop)", "", "", "", "dup", "2dup", "?dup", "over", "2over", "pick", "drop",<br />
"2drop", "nip", "roll", "rot", "-rot", "swap", "2swap", ">r", "r>",<br />
"r@", "depth", "depth!", "rdepth", "rdepth!", "+", "-", "*", "u*",<br />
"mu/mod", "abs", "negate", "max", "min", "lshift", "rshift", ">>a",<br />
"and", "or", "xor", "invert", "d+", "d-", "m*", "um*", "@", "c@",<br />
"w@", "l@", "!", "+!", "c!", "w!", "l!", "=", ">", "<", "u>", "u<",<br />
"sp@", "move", "fill", "(emit)", "(key?)", "(key)", "execute",<br />
"here", "here!", "dobranch", "do?branch", "unaligned-w@",<br />
"unaligned-w!", "unaligned-l@", "unaligned-l!", "ioc@", "iow@",<br />
"iol@", "ioc!", "iow!", "iol!", "i", "j", "call", "sys-debug",<br />
"$include", "$encode-file", "(debug", "(debug-off)", “dog” // <------- insert here<br />
};<br />
<br />
<br />
Next we add the C function name to the end of the function list. Open the file forth.c and add dog (no quotes this time) to the end of the list. You may want to add a comment to the right indicating the word this c function corresponds to, but this isn’t necessary.<br />
<br />
<br />
sysdebug, /* sys-debug */<br />
do_include, /* $include */<br />
do_encode_file, /* $encode-file */<br />
do_debug_xt, /* (debug */<br />
do_debug_off, /* (debug-off) */<br />
dog /* dog */ //<-------- insert here<br />
};<br />
<br />
Now you should be ready to build OpenBIOS. Go to the shell and set the current directory to the root level of openbios-devel folder:<br />
<br />
cd openbios-devel<br />
<br />
Set the architure you wish to build openbios for (amd64 is used in this example):<br />
<br />
./config/scripts/switch-arch amd64<br />
<br />
Then start building OpenBIOS:<br />
<br />
make build-verbose<br />
<br />
Once these commands are done, you need to be able to execute OpenBIOS. In this example we will be using the unix program version of OpenBIOS. <br />
<br />
We run the program like this:<br />
<br />
./obj-amd64/openbios-unix ./obj-amd64/openbios-unix.dict<br />
<br />
We should then be greeted by the OpenBIOS Banner:<br />
<br />
Welcome to OpenBIOS v1.0 built on Mar 9 2010 21:06<br />
Type 'help' for detailed information<br />
<br />
[unix] Booting default not supported.<br />
<br />
0 > <br />
<br />
Type dog at the prompt and see what it says:<br />
<br />
0 > dog <br />
bark bark! ok<br />
0 > <br />
<br />
Congratulations, you have just taken your first step to improving OpenBIOS.<br />
<br />
<br />
== Advanced example: ==<br />
<br />
Suppose you want to make a forth word that would give you access to a PowerPC CPU register. To do this you can use inline assembly language to access the register from C. Then use the bind_func() function to make this C function available to forth.<br />
<br />
In this example we implement a word called fpscr@ that will push the value of the FPSCR onto the top of the stack. <br />
<br />
In the file arch/ppc/qemu/init.c add this code right above the arch_of_init() function:<br />
<br />
static void get_fpscr(void)<br />
{<br />
asm volatile("mffs 0");<br />
asm volatile("stfd 0, 40(1)");<br />
uint32_t return_value;<br />
asm volatile("lwz %0, 44(1)" : "=r"(return_value));<br />
PUSH(return_value);<br />
}<br />
<br />
Then to make this function available from forth we add this line to the end of the arch_of_init() function in the same file:<br />
<br />
bind_func("fpscr@", get_fpscr);<br />
<br />
To build this example you would have to issue this command:<br />
<br />
./config/scripts/switch-arch ppc && make build-verbose<br />
<br />
The resulting file can be used with QEMU like this:<br />
<br />
qemu-system-ppc -bios <path to openbios folder>/obj-ppc/openbios-qemu.elf.nostrip<br />
<br />
Entering fpscr@ in the OpenBIOS prompt would return the value to the fpscr.</div>Programmingkidhttps://openfirmware.info/index.php?title=Adding_words_to_openbios&diff=459Adding words to openbios2017-12-27T18:18:33Z<p>Programmingkid: /* Advanced example: */</p>
<hr />
<div>How to add “words” to the OpenBIOS Dictionary using the C language. <br />
<br />
In this example, we are going to implement a forth “word” in C. There are two arrays that need to be looked at. One is located in the file openbios-devel/kernel/bootstrap.c. The other array is located in the file openbios-devel/kernel/forth.c. The two arrays are used to map a C function to a forth word.<br />
<br />
The array in bootstrap.c is where the name of the forth word would go. The array in forth.c is where the corresponding C function would go. When adding to these arrays, make sure to add at the end of the list. This ensures everything continues to run smoothly. <br />
<br />
Here is an example on adding to the dictionary. Say you want to add a word called dog. You can define the C function like this:<br />
<br />
static void dog(void)<br />
{<br />
printk(“bark bark!”);<br />
}<br />
<br />
Add this function to a .c file. Knowing which file to pick can involve a lot of trial and error. In this example, we will use the file openbios-devel/kernel/forth.c. Be sure to include the static keyword before in the function declaration, or OpenBIOS won’t build successfully.<br />
<br />
Now we add the word dog to the end of the forth word list. Open the file bootstrap.c, then find the array called wordnames. When adding the word dog, be sure the name of the word is surrounded in double quotes. Here is how the array should look:<br />
<br />
/* the word names are used to generate the prim words in the<br />
dictionary. This is done by the C written interpreter.<br />
*/<br />
<br />
static const char *wordnames[] = {<br />
"(semis)", "", "(lit)", "", "", "", "", "(do)", "(?do)", "(loop)",<br />
"(+loop)", "", "", "", "dup", "2dup", "?dup", "over", "2over", "pick", "drop",<br />
"2drop", "nip", "roll", "rot", "-rot", "swap", "2swap", ">r", "r>",<br />
"r@", "depth", "depth!", "rdepth", "rdepth!", "+", "-", "*", "u*",<br />
"mu/mod", "abs", "negate", "max", "min", "lshift", "rshift", ">>a",<br />
"and", "or", "xor", "invert", "d+", "d-", "m*", "um*", "@", "c@",<br />
"w@", "l@", "!", "+!", "c!", "w!", "l!", "=", ">", "<", "u>", "u<",<br />
"sp@", "move", "fill", "(emit)", "(key?)", "(key)", "execute",<br />
"here", "here!", "dobranch", "do?branch", "unaligned-w@",<br />
"unaligned-w!", "unaligned-l@", "unaligned-l!", "ioc@", "iow@",<br />
"iol@", "ioc!", "iow!", "iol!", "i", "j", "call", "sys-debug",<br />
"$include", "$encode-file", "(debug", "(debug-off)", “dog” // <------- insert here<br />
};<br />
<br />
<br />
Next we add the C function name to the end of the function list. Open the file forth.c and add dog (no quotes this time) to the end of the list. You may want to add a comment to the right indicating the word this c function corresponds to, but this isn’t necessary.<br />
<br />
<br />
sysdebug, /* sys-debug */<br />
do_include, /* $include */<br />
do_encode_file, /* $encode-file */<br />
do_debug_xt, /* (debug */<br />
do_debug_off, /* (debug-off) */<br />
dog /* dog */ //<-------- insert here<br />
};<br />
<br />
Now you should be ready to build OpenBIOS. Go to the shell and set the current directory to the root level of openbios-devel folder:<br />
<br />
cd openbios-devel<br />
<br />
Set the architure you wish to build openbios for (amd64 is used in this example):<br />
<br />
./config/scripts/switch-arch amd64<br />
<br />
Then start building OpenBIOS:<br />
<br />
make build-verbose<br />
<br />
Once these commands are done, you need to be able to execute OpenBIOS. In this example we will be using the unix program version of OpenBIOS. <br />
<br />
We run the program like this:<br />
<br />
./obj-amd64/openbios-unix ./obj-amd64/openbios-unix.dict<br />
<br />
We should then be greeted by the OpenBIOS Banner:<br />
<br />
Welcome to OpenBIOS v1.0 built on Mar 9 2010 21:06<br />
Type 'help' for detailed information<br />
<br />
[unix] Booting default not supported.<br />
<br />
0 > <br />
<br />
Type dog at the prompt and see what it says:<br />
<br />
0 > dog <br />
bark bark! ok<br />
0 > <br />
<br />
Congratulations, you have just taken your first step to improving OpenBIOS.<br />
<br />
<br />
== Advanced example: ==<br />
<br />
Suppose you want to make a forth word that would give you access to a PowerPC CPU register. To do this you can use inline assembly language to access the register from C. Then use the bind_func() function to make this C function available to forth.<br />
<br />
In this example we implement a word called r3@ that will push the value of register r3 onto the top of the stack. <br />
<br />
In the file arch/ppc/qemu/init.c add this code right above the arch_of_init() function:<br />
<br />
static void get_fpscr(void)<br />
{<br />
asm volatile("mffs 0");<br />
asm volatile("stfd 0, 40(1)");<br />
uint32_t return_value;<br />
asm volatile("lwz %0, 44(1)" : "=r"(return_value));<br />
PUSH(return_value);<br />
}<br />
<br />
<br />
Then to make this function available from forth we add this line to the end of the arch_of_init() function in the same file:<br />
<br />
bind_func("fpscr@", get_fpscr);<br />
<br />
To build this example you would have to issue this command:<br />
<br />
./config/scripts/switch-arch ppc && make build-verbose<br />
<br />
The resulting file can be used with QEMU like this:<br />
<br />
qemu-system-ppc -bios <path to openbios folder>/obj-ppc/openbios-qemu.elf.nostrip<br />
<br />
Entering fpscr@ in the OpenBIOS prompt would return the value to the fpscr.</div>Programmingkidhttps://openfirmware.info/index.php?title=Adding_words_to_openbios&diff=458Adding words to openbios2017-12-27T17:12:47Z<p>Programmingkid: </p>
<hr />
<div>How to add “words” to the OpenBIOS Dictionary using the C language. <br />
<br />
In this example, we are going to implement a forth “word” in C. There are two arrays that need to be looked at. One is located in the file openbios-devel/kernel/bootstrap.c. The other array is located in the file openbios-devel/kernel/forth.c. The two arrays are used to map a C function to a forth word.<br />
<br />
The array in bootstrap.c is where the name of the forth word would go. The array in forth.c is where the corresponding C function would go. When adding to these arrays, make sure to add at the end of the list. This ensures everything continues to run smoothly. <br />
<br />
Here is an example on adding to the dictionary. Say you want to add a word called dog. You can define the C function like this:<br />
<br />
static void dog(void)<br />
{<br />
printk(“bark bark!”);<br />
}<br />
<br />
Add this function to a .c file. Knowing which file to pick can involve a lot of trial and error. In this example, we will use the file openbios-devel/kernel/forth.c. Be sure to include the static keyword before in the function declaration, or OpenBIOS won’t build successfully.<br />
<br />
Now we add the word dog to the end of the forth word list. Open the file bootstrap.c, then find the array called wordnames. When adding the word dog, be sure the name of the word is surrounded in double quotes. Here is how the array should look:<br />
<br />
/* the word names are used to generate the prim words in the<br />
dictionary. This is done by the C written interpreter.<br />
*/<br />
<br />
static const char *wordnames[] = {<br />
"(semis)", "", "(lit)", "", "", "", "", "(do)", "(?do)", "(loop)",<br />
"(+loop)", "", "", "", "dup", "2dup", "?dup", "over", "2over", "pick", "drop",<br />
"2drop", "nip", "roll", "rot", "-rot", "swap", "2swap", ">r", "r>",<br />
"r@", "depth", "depth!", "rdepth", "rdepth!", "+", "-", "*", "u*",<br />
"mu/mod", "abs", "negate", "max", "min", "lshift", "rshift", ">>a",<br />
"and", "or", "xor", "invert", "d+", "d-", "m*", "um*", "@", "c@",<br />
"w@", "l@", "!", "+!", "c!", "w!", "l!", "=", ">", "<", "u>", "u<",<br />
"sp@", "move", "fill", "(emit)", "(key?)", "(key)", "execute",<br />
"here", "here!", "dobranch", "do?branch", "unaligned-w@",<br />
"unaligned-w!", "unaligned-l@", "unaligned-l!", "ioc@", "iow@",<br />
"iol@", "ioc!", "iow!", "iol!", "i", "j", "call", "sys-debug",<br />
"$include", "$encode-file", "(debug", "(debug-off)", “dog” // <------- insert here<br />
};<br />
<br />
<br />
Next we add the C function name to the end of the function list. Open the file forth.c and add dog (no quotes this time) to the end of the list. You may want to add a comment to the right indicating the word this c function corresponds to, but this isn’t necessary.<br />
<br />
<br />
sysdebug, /* sys-debug */<br />
do_include, /* $include */<br />
do_encode_file, /* $encode-file */<br />
do_debug_xt, /* (debug */<br />
do_debug_off, /* (debug-off) */<br />
dog /* dog */ //<-------- insert here<br />
};<br />
<br />
Now you should be ready to build OpenBIOS. Go to the shell and set the current directory to the root level of openbios-devel folder:<br />
<br />
cd openbios-devel<br />
<br />
Set the architure you wish to build openbios for (amd64 is used in this example):<br />
<br />
./config/scripts/switch-arch amd64<br />
<br />
Then start building OpenBIOS:<br />
<br />
make build-verbose<br />
<br />
Once these commands are done, you need to be able to execute OpenBIOS. In this example we will be using the unix program version of OpenBIOS. <br />
<br />
We run the program like this:<br />
<br />
./obj-amd64/openbios-unix ./obj-amd64/openbios-unix.dict<br />
<br />
We should then be greeted by the OpenBIOS Banner:<br />
<br />
Welcome to OpenBIOS v1.0 built on Mar 9 2010 21:06<br />
Type 'help' for detailed information<br />
<br />
[unix] Booting default not supported.<br />
<br />
0 > <br />
<br />
Type dog at the prompt and see what it says:<br />
<br />
0 > dog <br />
bark bark! ok<br />
0 > <br />
<br />
Congratulations, you have just taken your first step to improving OpenBIOS.<br />
<br />
<br />
== Advanced example: ==<br />
<br />
Suppose you want to make a forth word that would give you access to a PowerPC CPU register. To do this you can use inline assembly language to access the register from C. Then use the bind_func() function to make this C function available to forth.<br />
<br />
In this example we implement a word called r3@ that will push the value of register r3 onto the top of the stack. <br />
<br />
In the file arch/ppc/qemu/init.c add this code right above the arch_of_init() function:<br />
<br />
static void get_r3(void)<br />
{<br />
int value;<br />
asm volatile("mv %0 r3" : "=r"(value));<br />
PUSH(value);<br />
}<br />
<br />
Then to make this function available from forth we add this line to the end of the arch_of_init() function in the same file:<br />
<br />
bind_func("r3@", get_r3);<br />
<br />
To build this example you would have to issue this command:<br />
<br />
./config/scripts/switch-arch ppc && make build-verbose<br />
<br />
The resulting file can be used with QEMU like this:<br />
<br />
qemu-system-ppc -bios <path to openbios folder>/obj-ppc/openbios-qemu.elf.nostrip</div>Programmingkidhttps://openfirmware.info/index.php?title=Adding_words_to_openbios&diff=457Adding words to openbios2017-12-27T17:12:16Z<p>Programmingkid: Add PowerPC register access example</p>
<hr />
<div>How to add “words” to the OpenBIOS Dictionary using the C language. <br />
<br />
In this example, we are going to implement a forth “word” in C. There are two arrays that need to be looked at. One is located in the file openbios-devel/kernel/bootstrap.c. The other array is located in the file openbios-devel/kernel/forth.c. The two arrays are used to map a C function to a forth word.<br />
<br />
The array in bootstrap.c is where the name of the forth word would go. The array in forth.c is where the corresponding C function would go. When adding to these arrays, make sure to add at the end of the list. This ensures everything continues to run smoothly. <br />
<br />
Here is an example on adding to the dictionary. Say you want to add a word called dog. You can define the C function like this:<br />
<br />
static void dog(void)<br />
{<br />
printk(“bark bark!”);<br />
}<br />
<br />
Add this function to a .c file. Knowing which file to pick can involve a lot of trial and error. In this example, we will use the file openbios-devel/kernel/forth.c. Be sure to include the static keyword before in the function declaration, or OpenBIOS won’t build successfully.<br />
<br />
Now we add the word dog to the end of the forth word list. Open the file bootstrap.c, then find the array called wordnames. When adding the word dog, be sure the name of the word is surrounded in double quotes. Here is how the array should look:<br />
<br />
/* the word names are used to generate the prim words in the<br />
dictionary. This is done by the C written interpreter.<br />
*/<br />
<br />
static const char *wordnames[] = {<br />
"(semis)", "", "(lit)", "", "", "", "", "(do)", "(?do)", "(loop)",<br />
"(+loop)", "", "", "", "dup", "2dup", "?dup", "over", "2over", "pick", "drop",<br />
"2drop", "nip", "roll", "rot", "-rot", "swap", "2swap", ">r", "r>",<br />
"r@", "depth", "depth!", "rdepth", "rdepth!", "+", "-", "*", "u*",<br />
"mu/mod", "abs", "negate", "max", "min", "lshift", "rshift", ">>a",<br />
"and", "or", "xor", "invert", "d+", "d-", "m*", "um*", "@", "c@",<br />
"w@", "l@", "!", "+!", "c!", "w!", "l!", "=", ">", "<", "u>", "u<",<br />
"sp@", "move", "fill", "(emit)", "(key?)", "(key)", "execute",<br />
"here", "here!", "dobranch", "do?branch", "unaligned-w@",<br />
"unaligned-w!", "unaligned-l@", "unaligned-l!", "ioc@", "iow@",<br />
"iol@", "ioc!", "iow!", "iol!", "i", "j", "call", "sys-debug",<br />
"$include", "$encode-file", "(debug", "(debug-off)", “dog” // <------- insert here<br />
};<br />
<br />
<br />
Next we add the C function name to the end of the function list. Open the file forth.c and add dog (no quotes this time) to the end of the list. You may want to add a comment to the right indicating the word this c function corresponds to, but this isn’t necessary.<br />
<br />
<br />
sysdebug, /* sys-debug */<br />
do_include, /* $include */<br />
do_encode_file, /* $encode-file */<br />
do_debug_xt, /* (debug */<br />
do_debug_off, /* (debug-off) */<br />
dog /* dog */ //<-------- insert here<br />
};<br />
<br />
Now you should be ready to build OpenBIOS. Go to the shell and set the current directory to the root level of openbios-devel folder:<br />
<br />
cd openbios-devel<br />
<br />
Set the architure you wish to build openbios for (amd64 is used in this example):<br />
<br />
./config/scripts/switch-arch amd64<br />
<br />
Then start building OpenBIOS:<br />
<br />
make build-verbose<br />
<br />
Once these commands are done, you need to be able to execute OpenBIOS. In this example we will be using the unix program version of OpenBIOS. <br />
<br />
We run the program like this:<br />
<br />
./obj-amd64/openbios-unix ./obj-amd64/openbios-unix.dict<br />
<br />
We should then be greeted by the OpenBIOS Banner:<br />
<br />
Welcome to OpenBIOS v1.0 built on Mar 9 2010 21:06<br />
Type 'help' for detailed information<br />
<br />
[unix] Booting default not supported.<br />
<br />
0 > <br />
<br />
Type dog at the prompt and see what it says:<br />
<br />
0 > dog <br />
bark bark! ok<br />
0 > <br />
<br />
Congratulations, you have just taken your first step to improving OpenBIOS.<br />
<br />
<br />
== Advanced example: ==<br />
<br />
Suppose you want to make a forth word that would give you access to a PowerPC CPU register. To do this you can use inline assembly language to access the register from C. Then use the bind_func() function to make this C function available to forth.<br />
<br />
In this example we implement a word called r3@ that will push the value of register r3 onto the top of the stack. <br />
<br />
In the file arch/ppc/qemu/init.c add this code right above the arch_of_init() function:<br />
<br />
static void get_r3(void)<br />
{<br />
int value;<br />
asm volatile("mv %0 r3" : "=r"(value));<br />
PUSH(value);<br />
}<br />
<br />
Then to make this function available from forth we add this line to the end of the arch_of_init() function in the same file:<br />
<br />
bind_func("r3@", get_r3);<br />
<br />
To build this example you would have to issue this command:<br />
<br />
./config/scripts/switch-arch ppc && make build-verbose<br />
<br />
The resulting file can be used with QEMU like this:<br />
<br />
qemu-system-ppc -bios <path to openbios folder>/obj-ppc/openbios-qemu.elf.nostrip</div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=456How to build OpenBIOS on Mac OS X2017-12-22T00:28:40Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=$PATH:/usr/local/ppcelfgcc/bin<br><br />
export PATH=$PATH:/usr/local/i386elf/i386elf/bin<br><br />
<br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bash_profile file for the Bash shell. It is located in your home folder. <br><br />
To open this file use these commands:<br><br />
cd ~<br><br />
open .bash_profile<br><br />
Then simply paste the export commands in this file. Save changes when you are done.<br />
<BR><br><br />
To test to see if the cross compilers work issue these commands:<br><br />
i386-elf-gcc --version<br />
<br><br />
ppc-elf-gcc --version<br />
<br><br><br />
You should see a message like this print:<br><br />
ppc-elf-gcc (GCC) 4.2.3<br />
Copyright (C) 2007 Free Software Foundation, Inc.<br />
This is free software; see the source for copying conditions. There is NO<br />
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
There is a known build issue when building on Mac OS 10.6. The switch-arch script will report your computer as 32 bit (x86) when it is really 64 bit (amd64). If you see the message "panic: segmentation violation at …" while building, you probably have this problem.<br />
<br><br><br />
If this happens to you, try setting the HOSTARCH variable before using the switch-arch script.<br />
<br><br><br />
Example:<br />
<br><br><br />
HOSTARCH=amd64 CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<br />
<br><br><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=455How to build OpenBIOS on Mac OS X2017-12-22T00:27:36Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=$PATH:/usr/local/ppcelfgcc/bin<br><br />
export PATH=$PATH:/usr/local/i386elf/i386elf/bin<br><br />
<br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bash_profile file for the Bash shell. It is located in your home folder. <br><br />
To open this file use these commands:<br><br />
cd ~<br><br />
open .bash_profile<br><br />
Then simply paste the export commands in this file. Save changes when you are done.<br />
<BR><br><br />
To test to see if the cross compilers work issue these commands:<br><br />
i386-elf-gcc --version<br />
<br><br />
ppc-elf-gcc --version<br />
<br><br><br />
You should see a message like this print:<br><br />
ppc-elf-gcc (GCC) 4.2.3<br />
Copyright (C) 2007 Free Software Foundation, Inc.<br />
This is free software; see the source for copying conditions. There is NO<br />
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
There is a known build issue when building on Mac OS 10.6. The switch-arch script will report your computer as 32 bit (x86) when it is really 64 bit (amd64). If you see the message "panic: segmentation violation at …" while building, you probably have this problem.<br />
<br><br><br />
If this happens to you, try setting the HOSTARCH variable before using the switch-arch script.<br />
<br><br />
Example:<br />
<br><br />
HOSTARCH=amd64 CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<br />
<br><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=454How to build OpenBIOS on Mac OS X2017-12-22T00:26:39Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=$PATH:/usr/local/ppcelfgcc/bin<br><br />
export PATH=$PATH:/usr/local/i386elf/i386elf/bin<br><br />
<br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bash_profile file for the Bash shell. It is located in your home folder. <br><br />
To open this file use these commands:<br><br />
cd ~<br><br />
open .bash_profile<br><br />
Then simply paste the export commands in this file. Save changes when you are done.<br />
<BR><br><br />
To test to see if the cross compilers work issue these commands:<br><br />
i386-elf-gcc --version<br />
<br><br />
ppc-elf-gcc --version<br />
<br><br><br />
You should see a message like this print:<br><br />
ppc-elf-gcc (GCC) 4.2.3<br />
Copyright (C) 2007 Free Software Foundation, Inc.<br />
This is free software; see the source for copying conditions. There is NO<br />
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
There is a known build issue when building on Mac OS 10.6. The switch-arch script will report your computer as 32 bit (x86) when it is really 64 bit (amd64). If you see the message "panic: segmentation violation at …" while building, you probably have this problem.<br />
<br><br><br />
If this happens to you, try setting the HOSTARCH variable before using the switch-arch script.<br />
<br><br />
Example:<br />
<br><br />
HOSTARCH=amd64<br />
<br><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=453How to build OpenBIOS on Mac OS X2017-12-22T00:21:49Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=$PATH:/usr/local/ppcelfgcc/bin<br><br />
export PATH=$PATH:/usr/local/i386elf/i386elf/bin<br><br />
<br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bash_profile file for the Bash shell. It is located in your home folder. <br><br />
To open this file use these commands:<br><br />
cd ~<br><br />
open .bash_profile<br><br />
Then simply paste the export commands in this file. Save changes when you are done.<br />
<BR><br><br />
To test to see if the cross compilers work issue these commands:<br><br />
i386-elf-gcc --version<br />
<br><br />
ppc-elf-gcc --version<br />
<br><br><br />
You should see a message like this print:<br><br />
ppc-elf-gcc (GCC) 4.2.3<br />
Copyright (C) 2007 Free Software Foundation, Inc.<br />
This is free software; see the source for copying conditions. There is NO<br />
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=452How to build OpenBIOS on Mac OS X2017-12-22T00:19:58Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=$PATH:/usr/local/ppcelfgcc/bin<br><br />
export PATH=$PATH:/usr/local/i386elf/i386elf/bin<br><br />
<br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bash_profile file for the Bash shell. It is located in your home folder. <br><br />
To open this file use these commands:<br><br />
cd ~<br><br />
open .bash_profile<br><br />
Then simply paste the export commands in this file. Save changes when you are done.<br />
<BR><br><br />
To test to see if the cross compilers work issue these commands:<br><br />
i386-elf-gcc --version<br />
<br><br />
ppc-elf-gcc --version<br />
<br><br><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=451How to build OpenBIOS on Mac OS X2017-12-22T00:19:21Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=$PATH:/usr/local/ppcelfgcc/bin<br><br />
export PATH=$PATH:/usr/local/i386elf/i386elf/bin<br><br />
<br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bash_profile file for the Bash shell. It is located in your home folder. <br><br />
To open this file use these commands:<br><br />
cd ~<br><br />
open .bash_profile<br><br />
Then simply paste the export commands in this file. Save changes when you are done.<br />
<BR><br><br />
To test to see if the cross compilers work issue these commands:<br><br />
i386-elf-gcc --version<br />
<br><br />
ppc-elf-gcc --version<br />
<br><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=450How to build OpenBIOS on Mac OS X2017-12-22T00:18:58Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=$PATH:/usr/local/ppcelfgcc/bin<br><br />
export PATH=$PATH:/usr/local/i386elf/i386elf/bin<br><br />
<br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bash_profile file for the Bash shell. It is located in your home folder. <br><br />
To open this file use these commands:<br><br />
cd ~<br><br />
open .bash_profile<br><br />
Then simply paste the export commands in this file. Save changes when you are done.<br />
<BR><br />
To test to see if the cross compilers work issue these commands:<br><br />
i386-elf-gcc --version<br />
<br><br />
ppc-elf-gcc --version<br />
<br><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=449How to build OpenBIOS on Mac OS X2017-12-22T00:16:57Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=$PATH:/usr/local/ppcelfgcc/bin<br><br />
export PATH=$PATH:/usr/local/i386elf/i386elf/bin<br><br />
<br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bash_profile file for the Bash shell. It is located in your home folder. <br><br />
To open this file use these commands:<br><br />
cd ~<br><br />
open .bash_profile<br><br />
Then simply paste the export commands in this file. Save changes when you are done.<br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=448How to build OpenBIOS on Mac OS X2017-12-22T00:16:18Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=$PATH:/usr/local/ppcelfgcc/bin<br><br />
export PATH=$PATH:/usr/local/i386elf/i386elf/bin<br><br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bash_profile file for the Bash shell. It is located in your home folder. <br><br />
To open this file use these commands:<br><br />
cd ~<br><br />
open .bash_profile<br><br />
Then simply paste the export commands in this file. Save changes when you are done.<br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=447How to build OpenBIOS on Mac OS X2017-12-22T00:12:23Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=PATH:/usr/local/ppcelfgcc/bin<br><br />
export PATH=PATH:/usr/local/i386elf/i386elf/bin<br><br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bash_profile file for the Bash shell. It is located in your home folder. <br><br />
To open this file use these commands:<br><br />
cd ~<br><br />
open .bash_profile<br><br />
Then simply paste the export commands in this file. Save changes when you are done.<br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=446How to build OpenBIOS on Mac OS X2017-12-22T00:11:28Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=PATH:/usr/local/ppcelfgcc/bin<br><br />
export PATH=PATH:/usr/local/i386elf/i386elf/bin<br><br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bash_profile file for the Bash shell. It is located in your home folder. <br><br />
To open this file use these commands:<br><br />
cd ~<br><br />
open .bash_profile<br><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=445How to build OpenBIOS on Mac OS X2017-12-22T00:09:59Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=PATH:/usr/local/ppcelfgcc/bin<br><br />
export PATH=PATH:/usr/local/i386elf/i386elf/bin<br><br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=444How to build OpenBIOS on Mac OS X2017-12-22T00:05:38Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=:/usr/local/ppcelfgcc/bin<br><br />
export PATH=:/usr/local/i386elf/i386elf/bin<br><br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=443How to build OpenBIOS on Mac OS X2017-12-22T00:03:34Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=:/usr/local/ppcelfgcc/bin<br><br />
export PATH=:/usr/local/i386elf/bin<br><br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=442How to build OpenBIOS on Mac OS X2017-12-22T00:03:05Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=:/usr/local/ppcelfgcc/bin<br />
export PATH=:/usr/local/i386elf/bin<br><br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=441How to build OpenBIOS on Mac OS X2017-12-22T00:02:41Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell:<br><br />
export PATH=:/usr/local/ppcelfgcc/bin<br />
export PATH=:/usr/local/i386elf/bin<br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=440How to build OpenBIOS on Mac OS X2017-12-21T23:59:10Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin.<br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
CROSS_COMPILE=ppc-elf- ./config/scripts/switch-arch ppc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=439How to build OpenBIOS on Mac OS X2017-12-21T23:50:53Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin.<br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=File:Example.png&diff=438File:Example.png2017-12-21T23:50:16Z<p>Programmingkid: How to comment out the -Werrors line.</p>
<hr />
<div>How to comment out the -Werrors line.</div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=437How to build OpenBIOS on Mac OS X2017-12-21T23:49:08Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br><br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin.<br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Open the file makefile.target and add a # in front of this text "CFLAGS+= -Werror". Save the changes when done.<br><br />
[[File:example.png]]<br />
<br><br />
4) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=File:Installer.png&diff=436File:Installer.png2017-12-21T23:43:40Z<p>Programmingkid: AWOS installer</p>
<hr />
<div>AWOS installer</div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=435How to build OpenBIOS on Mac OS X2017-12-21T23:42:07Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br />
[[File:Installer.png]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin.<br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=434How to build OpenBIOS on Mac OS X2017-12-21T23:41:43Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" and the "i386 Support" check boxes when given the option.<br />
[[File:Installer.[ng]]<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin.<br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=433How to build OpenBIOS on Mac OS X2017-12-21T23:39:18Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple's GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the "AWOS Cross-Compiler for OS X" file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the "PowerPC Support" check box only when given the option.<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin.<br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 2: Building OpenBIOS from source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
This tutorial was made using information available on 12/21/2017. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=Adding_words_to_openbios&diff=432Adding words to openbios2017-12-21T16:35:35Z<p>Programmingkid: </p>
<hr />
<div>How to add “words” to the OpenBIOS Dictionary using the C language. <br />
<br />
In this example, we are going to implement a forth “word” in C. There are two arrays that need to be looked at. One is located in the file openbios-devel/kernel/bootstrap.c. The other array is located in the file openbios-devel/kernel/forth.c. The two arrays are used to map a C function to a forth word.<br />
<br />
The array in bootstrap.c is where the name of the forth word would go. The array in forth.c is where the corresponding C function would go. When adding to these arrays, make sure to add at the end of the list. This ensures everything continues to run smoothly. <br />
<br />
Here is an example on adding to the dictionary. Say you want to add a word called dog. You can define the C function like this:<br />
<br />
static void dog(void)<br />
{<br />
printk(“bark bark!”);<br />
}<br />
<br />
Add this function to a .c file. Knowing which file to pick can involve a lot of trial and error. In this example, we will use the file openbios-devel/kernel/forth.c. Be sure to include the static keyword before in the function declaration, or OpenBIOS won’t build successfully.<br />
<br />
Now we add the word dog to the end of the forth word list. Open the file bootstrap.c, then find the array called wordnames. When adding the word dog, be sure the name of the word is surrounded in double quotes. Here is how the array should look:<br />
<br />
/* the word names are used to generate the prim words in the<br />
dictionary. This is done by the C written interpreter.<br />
*/<br />
<br />
static const char *wordnames[] = {<br />
"(semis)", "", "(lit)", "", "", "", "", "(do)", "(?do)", "(loop)",<br />
"(+loop)", "", "", "", "dup", "2dup", "?dup", "over", "2over", "pick", "drop",<br />
"2drop", "nip", "roll", "rot", "-rot", "swap", "2swap", ">r", "r>",<br />
"r@", "depth", "depth!", "rdepth", "rdepth!", "+", "-", "*", "u*",<br />
"mu/mod", "abs", "negate", "max", "min", "lshift", "rshift", ">>a",<br />
"and", "or", "xor", "invert", "d+", "d-", "m*", "um*", "@", "c@",<br />
"w@", "l@", "!", "+!", "c!", "w!", "l!", "=", ">", "<", "u>", "u<",<br />
"sp@", "move", "fill", "(emit)", "(key?)", "(key)", "execute",<br />
"here", "here!", "dobranch", "do?branch", "unaligned-w@",<br />
"unaligned-w!", "unaligned-l@", "unaligned-l!", "ioc@", "iow@",<br />
"iol@", "ioc!", "iow!", "iol!", "i", "j", "call", "sys-debug",<br />
"$include", "$encode-file", "(debug", "(debug-off)", “dog” // <------- insert here<br />
};<br />
<br />
<br />
Next we add the C function name to the end of the function list. Open the file forth.c and add dog (no quotes this time) to the end of the list. You may want to add a comment to the right indicating the word this c function corresponds to, but this isn’t necessary.<br />
<br />
<br />
sysdebug, /* sys-debug */<br />
do_include, /* $include */<br />
do_encode_file, /* $encode-file */<br />
do_debug_xt, /* (debug */<br />
do_debug_off, /* (debug-off) */<br />
dog /* dog */ //<-------- insert here<br />
};<br />
<br />
Now you should be ready to build OpenBIOS. Go to the shell and set the current directory to the root level of openbios-devel folder:<br />
<br />
cd openbios-devel<br />
<br />
Set the architure you wish to build openbios for (amd64 is used in this example):<br />
<br />
./config/scripts/switch-arch amd64<br />
<br />
Then start building OpenBIOS:<br />
<br />
make build-verbose<br />
<br />
Once these commands are done, you need to be able to execute OpenBIOS. In this example we will be using the unix program version of OpenBIOS. <br />
<br />
We run the program like this:<br />
<br />
./obj-amd64/openbios-unix ./obj-amd64/openbios-unix.dict<br />
<br />
We should then be greeted by the OpenBIOS Banner:<br />
<br />
Welcome to OpenBIOS v1.0 built on Mar 9 2010 21:06<br />
Type 'help' for detailed information<br />
<br />
[unix] Booting default not supported.<br />
<br />
0 > <br />
<br />
Type dog at the prompt and see what it says:<br />
<br />
0 > dog <br />
bark bark! ok<br />
0 > <br />
<br />
Congratulations, you have just taken your first step to improving OpenBIOS.</div>Programmingkidhttps://openfirmware.info/index.php?title=Adding_words_to_openbios&diff=431Adding words to openbios2017-12-21T16:34:14Z<p>Programmingkid: </p>
<hr />
<div>How to add “words” to the OpenBIOS Dictionary using the C language. <br />
<br />
In this example, we are going to implement a forth “word” in C. There are two arrays that need to be looked at. One is located in the file openbios-devel/kernel/bootstrap.c. The other array is located in the file openbios-devel/kernel/forth.c. The two arrays are used to map a C function to a forth word.<br />
<br />
The array in bootstrap.c is where the name of the forth word would go. The array in forth.c is where the corresponding C function would go. When adding to these arrays, make sure to add at the end of the list. This ensures everything continues to run smoothly. <br />
<br />
Here is an example on adding to the dictionary. Say you want to add a word called dog. You can define the C function like this:<br />
<br />
static void dog(void)<br />
{<br />
printk(“bark bark!”);<br />
}<br />
<br />
Add this function to a .c file. Knowing which file to pick can involve a lot of trial and error. In this example, we will use the file openbios-devel/kernel/forth.c. Be sure to include the static keyword before in the function declaration, or OpenBIOS won’t build successfully.<br />
<br />
Now we add the word dog to the end of the forth word list. Open the file bootstrap.c, then find the array called wordnames. When adding the word dog, be sure the name of the word is surrounded in double quotes. Here is how the array should look:<br />
<br />
/* the word names are used to generate the prim words in the<br />
dictionary. This is done by the C written interpreter.<br />
*/<br />
<br />
static const char *wordnames[] = {<br />
"(semis)", "", "(lit)", "", "", "", "", "(do)", "(?do)", "(loop)",<br />
"(+loop)", "", "", "", "dup", "2dup", "?dup", "over", "2over", "pick", "drop",<br />
"2drop", "nip", "roll", "rot", "-rot", "swap", "2swap", ">r", "r>",<br />
"r@", "depth", "depth!", "rdepth", "rdepth!", "+", "-", "*", "u*",<br />
"mu/mod", "abs", "negate", "max", "min", "lshift", "rshift", ">>a",<br />
"and", "or", "xor", "invert", "d+", "d-", "m*", "um*", "@", "c@",<br />
"w@", "l@", "!", "+!", "c!", "w!", "l!", "=", ">", "<", "u>", "u<",<br />
"sp@", "move", "fill", "(emit)", "(key?)", "(key)", "execute",<br />
"here", "here!", "dobranch", "do?branch", "unaligned-w@",<br />
"unaligned-w!", "unaligned-l@", "unaligned-l!", "ioc@", "iow@",<br />
"iol@", "ioc!", "iow!", "iol!", "i", "j", "call", "sys-debug",<br />
"$include", "$encode-file", "(debug", "(debug-off)", “dog” // <------- insert here<br />
};<br />
<br />
<br />
Next we add the C function name to the end of the function list. Open the file forth.c and add dog (no quotes this time) to the end of the list. You may want to add a comment to the right indicating the word this c function corresponds to, but this isn’t necessary.<br />
<br />
<br />
sysdebug, /* sys-debug */<br />
do_include, /* $include */<br />
do_encode_file, /* $encode-file */<br />
do_debug_xt, /* (debug */<br />
do_debug_off, /* (debug-off) */<br />
dog /* dog */ //<-------- insert here<br />
};<br />
<br />
Now you should be ready to build OpenBIOS. Go to the shell and set the current directory to the root level of openbios-devel folder:<br />
<br />
cd openbios-devel<br />
<br />
Set the architure you wish to build openbios for (amd64 is used in this example):<br />
<br />
./config/scripts/switch-arch amd64<br />
<br />
Then start building OpenBIOS:<br />
<br />
make<br />
<br />
Once these commands are done, you need to be able to execute OpenBIOS. In this example we will be using the unix program version of OpenBIOS. <br />
<br />
We run the program like this:<br />
<br />
./obj-amd64/openbios-unix ./obj-amd64/openbios-unix.dict<br />
<br />
We should then be greeted by the OpenBIOS Banner:<br />
<br />
Welcome to OpenBIOS v1.0 built on Mar 9 2010 21:06<br />
Type 'help' for detailed information<br />
<br />
[unix] Booting default not supported.<br />
<br />
0 > <br />
<br />
Type dog at the prompt and see what it says:<br />
<br />
0 > dog <br />
bark bark! ok<br />
0 > <br />
<br />
Congratulations, you have just taken your first step to improving OpenBIOS.</div>Programmingkidhttps://openfirmware.info/index.php?title=Adding_words_to_openbios&diff=430Adding words to openbios2017-12-21T16:00:46Z<p>Programmingkid: Update where the c function array is kept</p>
<hr />
<div>How to add “words” to the OpenBIOS Dictionary using the C language. <br />
<br />
In this example, we are going to implement a forth “word” in C. There are two arrays that need to be looked at. One is located in the file openbios-devel/kernel/bootstrap.c. The other array is located in the file openbios-devel/kernel/forth.c. The two arrays are used to map a C function to a forth word.<br />
<br />
The array in bootstrap.c is where the name of the forth word would go. The array in forth.c is where the corresponding C function would go. When adding to these arrays, make sure to add at the end of the list. This ensures everything continues to run smoothly. <br />
<br />
Here is an example on adding to the dictionary. Say you want to add a word called dog. You can define the C function like this:<br />
<br />
static void dog(void)<br />
{<br />
printk(“bark bark!”);<br />
}<br />
<br />
Add this function to a .c file. Knowing which file to pick can involve a lot of trial and error. In this example, we will use the file openbios-devel/kernel/forth.c. Be sure to include the static keyword before in the function declaration, or OpenBIOS won’t build successfully.<br />
<br />
Now we add the word dog to the end of the forth word list. Open the file bootstrap.c, then find the array called wordnames. When adding the word dog, be sure the name of the word is surrounded in double quotes. Here is how the array should look:<br />
<br />
/* the word names are used to generate the prim words in the<br />
dictionary. This is done by the C written interpreter.<br />
*/<br />
<br />
static const char *wordnames[] = {<br />
"(semis)", "", "(lit)", "", "", "", "", "(do)", "(?do)", "(loop)",<br />
"(+loop)", "", "", "", "dup", "2dup", "?dup", "over", "2over", "pick", "drop",<br />
"2drop", "nip", "roll", "rot", "-rot", "swap", "2swap", ">r", "r>",<br />
"r@", "depth", "depth!", "rdepth", "rdepth!", "+", "-", "*", "u*",<br />
"mu/mod", "abs", "negate", "max", "min", "lshift", "rshift", ">>a",<br />
"and", "or", "xor", "invert", "d+", "d-", "m*", "um*", "@", "c@",<br />
"w@", "l@", "!", "+!", "c!", "w!", "l!", "=", ">", "<", "u>", "u<",<br />
"sp@", "move", "fill", "(emit)", "(key?)", "(key)", "execute",<br />
"here", "here!", "dobranch", "do?branch", "unaligned-w@",<br />
"unaligned-w!", "unaligned-l@", "unaligned-l!", "ioc@", "iow@",<br />
"iol@", "ioc!", "iow!", "iol!", "i", "j", "call", "sys-debug",<br />
"$include", "$encode-file", "(debug", "(debug-off)", “dog” // <------- insert here<br />
};<br />
<br />
<br />
Next we add the C function name to the end of the function list. Open the file forth.c and add dog (no quotes this time) to the end of the list. You may want to add a comment to the right indicating the word this c function corresponds to, but this isn’t necessary.<br />
<br />
<br />
sysdebug, /* sys-debug */<br />
do_include, /* $include */<br />
do_encode_file, /* $encode-file */<br />
do_debug_xt, /* (debug */<br />
do_debug_off, /* (debug-off) */<br />
dog /* dog */ //<-------- insert here<br />
};<br />
<br />
Now you should be ready to build OpenBIOS. Go to the shell and set the current directory to the root level of openbios-devel folder:<br />
<br />
cd openbios-devel<br />
<br />
Set the architure you wish to build openbios for (x86 is used in this example):<br />
<br />
./config/scripts/switch-arch x86<br />
<br />
Then start building OpenBIOS:<br />
<br />
make<br />
<br />
Once these commands are done, you need to be able to execute OpenBIOS. In this example we will be using the unix program version of OpenBIOS. <br />
<br />
We run the program like this:<br />
<br />
./obj-x86/openbios-unix ./obj-x86/openbios-unix.dict<br />
<br />
We should then be greeted by the OpenBIOS Banner:<br />
<br />
Welcome to OpenBIOS v1.0 built on Mar 9 2010 21:06<br />
Type 'help' for detailed information<br />
<br />
[unix] Booting default not supported.<br />
<br />
0 > <br />
<br />
Type dog at the prompt and see what it says:<br />
<br />
0 > dog <br />
bark bark! ok<br />
0 > <br />
<br />
Congratulations, you have just taken your first step to improving OpenBIOS.</div>Programmingkidhttps://openfirmware.info/index.php?title=OpenBIOS&diff=195OpenBIOS2016-07-08T17:22:21Z<p>Programmingkid: Add Mac OS 9 info</p>
<hr />
<div>= OpenBIOS - Code Releases =<br />
<br />
Welcome to the OpenBIOS download page. Here you'll find releases of OpenBIOS components.<br />
<br />
After 4 years of hard work, OpenBIOS v1.1 has been released. The new features include:<br />
* Internal memory API (OFMEM) implementation<br />
* Forth Source Debugger<br />
* 64-bit 1275 6d5 implementation<br />
* Forth Local Variables<br />
* Internal libopenbios code reorganisation<br />
<br />
See the [http://tracker.coreboot.org/trac/openbios OpenBIOS issue tracker] for milestones, tasks and open bugs.<br />
<br />
= OpenBIOS =<br />
<br />
Download the latest release of OpenBIOS including the Forth kernel and all of the IEEE 1275-1994 compliant Forth code for user interface, client interface and device interface.<br />
<br />
Latest release version is: [http://tracker.coreboot.org/trac/openbios/changeset/1135/trunk/openbios-devel?old_path=%2F&old=1135&format=zip OpenBIOS 1.1] (2013-05-04)<br />
<br />
'''NOTE:''' The FCODE utilities are no longer part of the main OpenBIOS distribution. Have a look at the [[FCODE suite]] if you are looking for toke and detok.<br />
<br />
= Status and use cases =<br />
<br />
OpenBIOS can be used directly as a boot ROM for [http://qemu.org/ QEMU] system emulators for PPC, PPC64, Sparc32 and Sparc64.<br />
<br />
OpenBIOS/SPARC32 is currently able to boot the following OS/kernels:<br />
* Linux<br />
* NetBSD<br />
* OpenBSD<br />
* Some later versions of Solaris (Solaris 8 and early Solaris 9 are known to work)<br />
OpenBIOS/SPARC64 is currently able to boot the following OS/kernels:<br />
* Linux (with virtio drivers)<br />
OpenBIOS/PPC is currently able to boot the following OS/kernels:<br />
* Linux<br />
* HelenOS<br />
The following operating systems will partially boot, but may suffer from some emulation bugs under QEMU:<br />
* FreeBSD<br />
* NetBSD<br />
* Darwin/Mac OS X<br />
* Mac OS 9<br />
<br />
[http://www.coreboot.org Coreboot] can use OpenBIOS as a payload on x86. <br />
<br />
Do not try to put OpenBIOS in a real boot ROM, it will not work and may damage your hardware!<br />
<br />
== Kernel ==<br />
There is also an ancient stand-alone version of the OpenBIOS Forth kernel ''BeginAgain''.<br />
<br />
The last released stand-alone version is: [http://www.openbios.org/data/bin/kernel-1.1.tar.bz2 BeginAgain 1.1] (2003-10-12). <br />
<br />
'''NOTE:''' You should use the latest version of ''BeginAgain'' that is present in the complete ''OpenBIOS release'' above. It is much newer than ''BeginAgain 1.1'' and it supports cross compiling and lots of other nifty features. ''BeginAgain 1.1'' is here for educational purposes only: The core binary is only 6k on x86.<br />
<br />
= Development Environment =<br />
<br />
== FCode Suite ==<br />
<br />
To download the latest version of the FCode Suite, including an FCode detokenizer, an FCode tokenizer and the romheader utility, please go to the [[FCODE suite|FCode Suite page]].<br />
<br />
== Flashing ==<br />
/dev/bios is obsolete and has been replaced by a new and better utility. Please download a coreboot snapshot and use the [[FlashRom|flashrom utility]] from ''coreboot-v2/util/flashrom''.<br />
<br />
= Development Repository =<br />
<br />
OpenBIOS keeps its development tree in a [http://subversion.tigris.org/ Subversion ] repository. If you do not want to use Subversion, please have a look at the [[#Snapshots|Snapshots]] below.<br />
<br />
== Anonymous access ==<br />
<br />
You can check it out as follows:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
if you want a specific revision:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel -r 1153<br />
<br />
or for checking out the source code for the OpenBIOS FCode Suite:<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
If your company installed a firewall that blocks the svn port (3690) you can also check out using the webdav frontend:<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/openbios-devel</nowiki><br />
<br />
or<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/fcode-utils</nowiki><br />
<br />
For versions prior to r470, please remove the /trunk component from the path.<br />
<br />
== Developer access ==<br />
<br />
Access for developers is very similar to anonymous access. Just add your subversion username as follows when checking out the repository:<br />
$ svn co svn://username@openbios.org/openbios/trunk/openbios-devel<br />
<br />
Subversion has commands very similar to CVS.<br />
<br />
= Source code browsing =<br />
<br />
You can also browse the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel OpenBIOS subversion repository] online.<br />
<br />
= Snapshots =<br />
<br />
There is currently no archive of snapshots available for OpenBIOS. You can use the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel source code browser] to download a ZIP archive of any revision.<br />
<br />
Alternatively you can also download the [http://tracker.coreboot.org/trac/openbios/changeset/latest/trunk/openbios-devel?old_path=%2F&format=zip most current snapshot] directly.<br />
<br />
= Building OpenBIOS =<br />
Download fcode suite:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
Build the needed programs inside the fcode-utils-devel folder:<br />
<br />
$ make<br />
<br />
Install the programs:<br />
<br />
$ make install<br />
<br />
Download OpenBIOS:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
Select the build targets:<br />
$ ./config/scripts/switch-arch sparc32 sparc64 x86 ppc amd64<br />
<br />
Build OpenBIOS:<br />
$ make<br />
or<br />
$ make build-verbose<br />
<br />
<br />
OpenBIOS can even be cross-compiled on a host which is different type (big vs. little endian and 32 vs. 64 bits) from the target. At least Linux and OpenBSD hosts are known to work.<br />
<br />
If your cross tools use different prefix from what the makefiles assume, the prefix can be overridden with:<br />
$ make build-verbose TARGET=powerpc-elf-<br />
<br />
or<br />
$ make -C obj-ppc CC=powerpc-elf-gcc<br />
<br />
The OpenBIOS binaries (typically openbios-builtin.elf) can be found in obj- subdirectories. The Unix executable version (native only) is named openbios-unix.<br />
<br />
<br />
= Additional Resources =<br />
[http://www.mediafire.com/download/wy5xgj2hwjp8k4k/AWOS_Cross-Compilers.zip PowerPC, x86, ARM, and Sparc elf cross-compilers for Mac OS X ] <br />
*This compiler uses a unsupported compiler prefix. To use it, set the CROSS_COMPILE variable to "ppc-elf-" before running the switch-arch script. <br />
<br />
Example:<br />
CROSS_COMPILE=ppc-elf- ./switch-arch ppc<br />
<br />
*As of May 2015, a problem with this compiler and the file usbohci.c causes compiling to fail. This is only because compiler warnings are being treated as errors. To disable this option, open the Makefile.target file (located at the root level of the openbios-devel folder) and remove the "-Werror" text. <br />
<br />
<br />
= Notes for Building on Mac OS X =<br />
There is a known build issue when building on Mac OS 10.6. The switch-arch script will report your computer as 32 bit (x86) when it is really 64 bit (amd64). If you see the message "''panic: segmentation violation at …''" while building, you probably have this problem.<br />
<br />
If this happens to you, try setting the HOSTARCH variable before using the switch-arch script. <br />
<br />
Example: <br />
HOSTARCH=amd64 ./switch-arch ppc<br />
<br />
<br />
= Troubleshooting =<br />
Seeing this message: ''Unable to locate toke executable from the fcode-utils package - aborting''<br />
<br>- Install the fcode suite first before trying to build OpenBIOS.<br />
<br />
<br />
= More on Subversion =<br />
<br />
* [http://svnbook.red-bean.com/ Subversion book] - this online book is the best SVN documentation available online.<br />
* [http://subversion.tigris.org/ Subversion homepage]<br />
<br />
__NOEDITSECTION__</div>Programmingkidhttps://openfirmware.info/index.php?title=OpenBIOS&diff=194OpenBIOS2015-05-14T16:44:35Z<p>Programmingkid: </p>
<hr />
<div>= OpenBIOS - Code Releases =<br />
<br />
Welcome to the OpenBIOS download page. Here you'll find releases of OpenBIOS components.<br />
<br />
After 4 years of hard work, OpenBIOS v1.1 has been released. The new features include:<br />
* Internal memory API (OFMEM) implementation<br />
* Forth Source Debugger<br />
* 64-bit 1275 6d5 implementation<br />
* Forth Local Variables<br />
* Internal libopenbios code reorganisation<br />
<br />
See the [http://tracker.coreboot.org/trac/openbios OpenBIOS issue tracker] for milestones, tasks and open bugs.<br />
<br />
= OpenBIOS =<br />
<br />
Download the latest release of OpenBIOS including the Forth kernel and all of the IEEE 1275-1994 compliant Forth code for user interface, client interface and device interface.<br />
<br />
Latest release version is: [http://tracker.coreboot.org/trac/openbios/changeset/1135/trunk/openbios-devel?old_path=%2F&old=1135&format=zip OpenBIOS 1.1] (2013-05-04)<br />
<br />
'''NOTE:''' The FCODE utilities are no longer part of the main OpenBIOS distribution. Have a look at the [[FCODE suite]] if you are looking for toke and detok.<br />
<br />
= Status and use cases =<br />
<br />
OpenBIOS can be used directly as a boot ROM for [http://qemu.org/ QEMU] system emulators for PPC, PPC64, Sparc32 and Sparc64.<br />
<br />
OpenBIOS/SPARC32 is currently able to boot the following OS/kernels:<br />
* Linux<br />
* NetBSD<br />
* OpenBSD<br />
* Some later versions of Solaris (Solaris 8 and early Solaris 9 are known to work)<br />
OpenBIOS/SPARC64 is currently able to boot the following OS/kernels:<br />
* Linux (with virtio drivers)<br />
OpenBIOS/PPC is currently able to boot the following OS/kernels:<br />
* Linux<br />
* HelenOS<br />
The following operating systems will partially boot, but may suffer from some emulation bugs under QEMU:<br />
* FreeBSD<br />
* NetBSD<br />
* Darwin/Mac OS X<br />
<br />
[http://www.coreboot.org Coreboot] can use OpenBIOS as a payload on x86. <br />
<br />
Do not try to put OpenBIOS in a real boot ROM, it will not work and may damage your hardware!<br />
<br />
== Kernel ==<br />
There is also an ancient stand-alone version of the OpenBIOS Forth kernel ''BeginAgain''.<br />
<br />
The last released stand-alone version is: [http://www.openbios.org/data/bin/kernel-1.1.tar.bz2 BeginAgain 1.1] (2003-10-12). <br />
<br />
'''NOTE:''' You should use the latest version of ''BeginAgain'' that is present in the complete ''OpenBIOS release'' above. It is much newer than ''BeginAgain 1.1'' and it supports cross compiling and lots of other nifty features. ''BeginAgain 1.1'' is here for educational purposes only: The core binary is only 6k on x86.<br />
<br />
= Development Environment =<br />
<br />
== FCode Suite ==<br />
<br />
To download the latest version of the FCode Suite, including an FCode detokenizer, an FCode tokenizer and the romheader utility, please go to the [[FCODE suite|FCode Suite page]].<br />
<br />
== Flashing ==<br />
/dev/bios is obsolete and has been replaced by a new and better utility. Please download a coreboot snapshot and use the [[FlashRom|flashrom utility]] from ''coreboot-v2/util/flashrom''.<br />
<br />
= Development Repository =<br />
<br />
OpenBIOS keeps its development tree in a [http://subversion.tigris.org/ Subversion ] repository. If you do not want to use Subversion, please have a look at the [[#Snapshots|Snapshots]] below.<br />
<br />
== Anonymous access ==<br />
<br />
You can check it out as follows:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
if you want a specific revision:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel -r 1153<br />
<br />
or for checking out the source code for the OpenBIOS FCode Suite:<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
If your company installed a firewall that blocks the svn port (3690) you can also check out using the webdav frontend:<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/openbios-devel</nowiki><br />
<br />
or<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/fcode-utils</nowiki><br />
<br />
For versions prior to r470, please remove the /trunk component from the path.<br />
<br />
== Developer access ==<br />
<br />
Access for developers is very similar to anonymous access. Just add your subversion username as follows when checking out the repository:<br />
$ svn co svn://username@openbios.org/openbios/trunk/openbios-devel<br />
<br />
Subversion has commands very similar to CVS.<br />
<br />
= Source code browsing =<br />
<br />
You can also browse the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel OpenBIOS subversion repository] online.<br />
<br />
= Snapshots =<br />
<br />
There is currently no archive of snapshots available for OpenBIOS. You can use the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel source code browser] to download a ZIP archive of any revision.<br />
<br />
Alternatively you can also download the [http://tracker.coreboot.org/trac/openbios/changeset/latest/trunk/openbios-devel?old_path=%2F&format=zip most current snapshot] directly.<br />
<br />
= Building OpenBIOS =<br />
Download fcode suite:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
Build the needed programs inside the fcode-utils-devel folder:<br />
<br />
$ make<br />
<br />
Install the programs:<br />
<br />
$ make install<br />
<br />
Download OpenBIOS:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
Select the build targets:<br />
$ ./config/scripts/switch-arch sparc32 sparc64 x86 ppc amd64<br />
<br />
Build OpenBIOS:<br />
$ make<br />
or<br />
$ make build-verbose<br />
<br />
<br />
OpenBIOS can even be cross-compiled on a host which is different type (big vs. little endian and 32 vs. 64 bits) from the target. At least Linux and OpenBSD hosts are known to work.<br />
<br />
If your cross tools use different prefix from what the makefiles assume, the prefix can be overridden with:<br />
$ make build-verbose TARGET=powerpc-elf-<br />
<br />
or<br />
$ make -C obj-ppc CC=powerpc-elf-gcc<br />
<br />
The OpenBIOS binaries (typically openbios-builtin.elf) can be found in obj- subdirectories. The Unix executable version (native only) is named openbios-unix.<br />
<br />
<br />
= Additional Resources =<br />
[http://www.mediafire.com/download/wy5xgj2hwjp8k4k/AWOS_Cross-Compilers.zip PowerPC, x86, ARM, and Sparc elf cross-compilers for Mac OS X ] <br />
*This compiler uses a unsupported compiler prefix. To use it, set the CROSS_COMPILE variable to "ppc-elf-" before running the switch-arch script. <br />
<br />
Example:<br />
CROSS_COMPILE=ppc-elf- ./switch-arch ppc<br />
<br />
*As of May 2015, a problem with this compiler and the file usbohci.c causes compiling to fail. This is only because compiler warnings are being treated as errors. To disable this option, open the Makefile.target file (located at the root level of the openbios-devel folder) and remove the "-Werror" text. <br />
<br />
<br />
= Notes for Building on Mac OS X =<br />
There is a known build issue when building on Mac OS 10.6. The switch-arch script will report your computer as 32 bit (x86) when it is really 64 bit (amd64). If you see the message "''panic: segmentation violation at …''" while building, you probably have this problem.<br />
<br />
If this happens to you, try setting the HOSTARCH variable before using the switch-arch script. <br />
<br />
Example: <br />
HOSTARCH=amd64 ./switch-arch ppc<br />
<br />
<br />
= Troubleshooting =<br />
Seeing this message: ''Unable to locate toke executable from the fcode-utils package - aborting''<br />
<br>- Install the fcode suite first before trying to build OpenBIOS.<br />
<br />
<br />
= More on Subversion =<br />
<br />
* [http://svnbook.red-bean.com/ Subversion book] - this online book is the best SVN documentation available online.<br />
* [http://subversion.tigris.org/ Subversion homepage]<br />
<br />
__NOEDITSECTION__</div>Programmingkidhttps://openfirmware.info/index.php?title=OpenBIOS&diff=193OpenBIOS2015-05-14T16:39:04Z<p>Programmingkid: </p>
<hr />
<div>= OpenBIOS - Code Releases =<br />
<br />
Welcome to the OpenBIOS download page. Here you'll find releases of OpenBIOS components.<br />
<br />
After 4 years of hard work, OpenBIOS v1.1 has been released. The new features include:<br />
* Internal memory API (OFMEM) implementation<br />
* Forth Source Debugger<br />
* 64-bit 1275 6d5 implementation<br />
* Forth Local Variables<br />
* Internal libopenbios code reorganisation<br />
<br />
See the [http://tracker.coreboot.org/trac/openbios OpenBIOS issue tracker] for milestones, tasks and open bugs.<br />
<br />
= OpenBIOS =<br />
<br />
Download the latest release of OpenBIOS including the Forth kernel and all of the IEEE 1275-1994 compliant Forth code for user interface, client interface and device interface.<br />
<br />
Latest release version is: [http://tracker.coreboot.org/trac/openbios/changeset/1135/trunk/openbios-devel?old_path=%2F&old=1135&format=zip OpenBIOS 1.1] (2013-05-04)<br />
<br />
'''NOTE:''' The FCODE utilities are no longer part of the main OpenBIOS distribution. Have a look at the [[FCODE suite]] if you are looking for toke and detok.<br />
<br />
= Status and use cases =<br />
<br />
OpenBIOS can be used directly as a boot ROM for [http://qemu.org/ QEMU] system emulators for PPC, PPC64, Sparc32 and Sparc64.<br />
<br />
OpenBIOS/SPARC32 is currently able to boot the following OS/kernels:<br />
* Linux<br />
* NetBSD<br />
* OpenBSD<br />
* Some later versions of Solaris (Solaris 8 and early Solaris 9 are known to work)<br />
OpenBIOS/SPARC64 is currently able to boot the following OS/kernels:<br />
* Linux (with virtio drivers)<br />
OpenBIOS/PPC is currently able to boot the following OS/kernels:<br />
* Linux<br />
* HelenOS<br />
The following operating systems will partially boot, but may suffer from some emulation bugs under QEMU:<br />
* FreeBSD<br />
* NetBSD<br />
* Darwin/Mac OS X<br />
<br />
[http://www.coreboot.org Coreboot] can use OpenBIOS as a payload on x86. <br />
<br />
Do not try to put OpenBIOS in a real boot ROM, it will not work and may damage your hardware!<br />
<br />
== Kernel ==<br />
There is also an ancient stand-alone version of the OpenBIOS Forth kernel ''BeginAgain''.<br />
<br />
The last released stand-alone version is: [http://www.openbios.org/data/bin/kernel-1.1.tar.bz2 BeginAgain 1.1] (2003-10-12). <br />
<br />
'''NOTE:''' You should use the latest version of ''BeginAgain'' that is present in the complete ''OpenBIOS release'' above. It is much newer than ''BeginAgain 1.1'' and it supports cross compiling and lots of other nifty features. ''BeginAgain 1.1'' is here for educational purposes only: The core binary is only 6k on x86.<br />
<br />
= Development Environment =<br />
<br />
== FCode Suite ==<br />
<br />
To download the latest version of the FCode Suite, including an FCode detokenizer, an FCode tokenizer and the romheader utility, please go to the [[FCODE suite|FCode Suite page]].<br />
<br />
== Flashing ==<br />
/dev/bios is obsolete and has been replaced by a new and better utility. Please download a coreboot snapshot and use the [[FlashRom|flashrom utility]] from ''coreboot-v2/util/flashrom''.<br />
<br />
= Development Repository =<br />
<br />
OpenBIOS keeps its development tree in a [http://subversion.tigris.org/ Subversion ] repository. If you do not want to use Subversion, please have a look at the [[#Snapshots|Snapshots]] below.<br />
<br />
== Anonymous access ==<br />
<br />
You can check it out as follows:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
if you want a specific revision:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel -r 1153<br />
<br />
or for checking out the source code for the OpenBIOS FCode Suite:<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
If your company installed a firewall that blocks the svn port (3690) you can also check out using the webdav frontend:<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/openbios-devel</nowiki><br />
<br />
or<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/fcode-utils</nowiki><br />
<br />
For versions prior to r470, please remove the /trunk component from the path.<br />
<br />
== Developer access ==<br />
<br />
Access for developers is very similar to anonymous access. Just add your subversion username as follows when checking out the repository:<br />
$ svn co svn://username@openbios.org/openbios/trunk/openbios-devel<br />
<br />
Subversion has commands very similar to CVS.<br />
<br />
= Source code browsing =<br />
<br />
You can also browse the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel OpenBIOS subversion repository] online.<br />
<br />
= Snapshots =<br />
<br />
There is currently no archive of snapshots available for OpenBIOS. You can use the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel source code browser] to download a ZIP archive of any revision.<br />
<br />
Alternatively you can also download the [http://tracker.coreboot.org/trac/openbios/changeset/latest/trunk/openbios-devel?old_path=%2F&format=zip most current snapshot] directly.<br />
<br />
= Building OpenBIOS =<br />
Download fcode suite:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
Build the needed programs inside the fcode-utils-devel folder:<br />
<br />
$ make<br />
<br />
Install the programs:<br />
<br />
$ make install<br />
<br />
Download OpenBIOS:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
Select the build targets:<br />
$ ./config/scripts/switch-arch sparc32 sparc64 x86 ppc amd64<br />
<br />
Build OpenBIOS:<br />
$ make<br />
or<br />
$ make build-verbose<br />
<br />
<br />
OpenBIOS can even be cross-compiled on a host which is different type (big vs. little endian and 32 vs. 64 bits) from the target. At least Linux and OpenBSD hosts are known to work.<br />
<br />
If your cross tools use different prefix from what the makefiles assume, the prefix can be overridden with:<br />
$ make build-verbose TARGET=powerpc-elf-<br />
<br />
or<br />
$ make -C obj-ppc CC=powerpc-elf-gcc<br />
<br />
The OpenBIOS binaries (typically openbios-builtin.elf) can be found in obj- subdirectories. The Unix executable version (native only) is named openbios-unix.<br />
<br />
<br />
= Additional Resources =<br />
[http://www.mediafire.com/download/wy5xgj2hwjp8k4k/AWOS_Cross-Compilers.zip PowerPC, x86, ARM, and Sparc elf cross compilers for Mac OS X ] <br />
*This compiler uses a unsupported compiler prefix. To use it, set the CROSS_COMPILE variable to "ppc-elf-" before running the switch-arch script. <br />
<br />
Example:<br />
CROSS_COMPILE=ppc-elf- ./switch-arch ppc<br />
<br />
*As of May 2015, a problem with this compiler and the file usbohci.c causes compiling to fail. This is only because compiler warnings are being treated as errors. To disable this option, open the Makefile.target file (located at the root level of the openbios-devel folder) and remove the "-Werror" text. <br />
<br />
<br />
= Notes for Building on Mac OS X =<br />
There is a known build issue when building on Mac OS 10.6. The switch-arch script will report your computer as 32 bit (x86) when it is really 64 bit (amd64). If you see the message "''panic: segmentation violation at …''" while building, you probably have this problem.<br />
<br />
If this happens to you, try setting the HOSTARCH variable before using the switch-arch script. <br />
<br />
Example: <br />
HOSTARCH=amd64 ./switch-arch ppc<br />
<br />
<br />
= Troubleshooting =<br />
Seeing this message: ''Unable to locate toke executable from the fcode-utils package - aborting''<br />
<br>- Install the fcode suite first before trying to build OpenBIOS.<br />
<br />
<br />
= More on Subversion =<br />
<br />
* [http://svnbook.red-bean.com/ Subversion book] - this online book is the best SVN documentation available online.<br />
* [http://subversion.tigris.org/ Subversion homepage]<br />
<br />
__NOEDITSECTION__</div>Programmingkidhttps://openfirmware.info/index.php?title=OpenBIOS&diff=192OpenBIOS2015-05-14T16:07:55Z<p>Programmingkid: </p>
<hr />
<div>= OpenBIOS - Code Releases =<br />
<br />
Welcome to the OpenBIOS download page. Here you'll find releases of OpenBIOS components.<br />
<br />
After 4 years of hard work, OpenBIOS v1.1 has been released. The new features include:<br />
* Internal memory API (OFMEM) implementation<br />
* Forth Source Debugger<br />
* 64-bit 1275 6d5 implementation<br />
* Forth Local Variables<br />
* Internal libopenbios code reorganisation<br />
<br />
See the [http://tracker.coreboot.org/trac/openbios OpenBIOS issue tracker] for milestones, tasks and open bugs.<br />
<br />
= OpenBIOS =<br />
<br />
Download the latest release of OpenBIOS including the Forth kernel and all of the IEEE 1275-1994 compliant Forth code for user interface, client interface and device interface.<br />
<br />
Latest release version is: [http://tracker.coreboot.org/trac/openbios/changeset/1135/trunk/openbios-devel?old_path=%2F&old=1135&format=zip OpenBIOS 1.1] (2013-05-04)<br />
<br />
'''NOTE:''' The FCODE utilities are no longer part of the main OpenBIOS distribution. Have a look at the [[FCODE suite]] if you are looking for toke and detok.<br />
<br />
= Status and use cases =<br />
<br />
OpenBIOS can be used directly as a boot ROM for [http://qemu.org/ QEMU] system emulators for PPC, PPC64, Sparc32 and Sparc64.<br />
<br />
OpenBIOS/SPARC32 is currently able to boot the following OS/kernels:<br />
* Linux<br />
* NetBSD<br />
* OpenBSD<br />
* Some later versions of Solaris (Solaris 8 and early Solaris 9 are known to work)<br />
OpenBIOS/SPARC64 is currently able to boot the following OS/kernels:<br />
* Linux (with virtio drivers)<br />
OpenBIOS/PPC is currently able to boot the following OS/kernels:<br />
* Linux<br />
* HelenOS<br />
The following operating systems will partially boot, but may suffer from some emulation bugs under QEMU:<br />
* FreeBSD<br />
* NetBSD<br />
* Darwin/Mac OS X<br />
<br />
[http://www.coreboot.org Coreboot] can use OpenBIOS as a payload on x86. <br />
<br />
Do not try to put OpenBIOS in a real boot ROM, it will not work and may damage your hardware!<br />
<br />
== Kernel ==<br />
There is also an ancient stand-alone version of the OpenBIOS Forth kernel ''BeginAgain''.<br />
<br />
The last released stand-alone version is: [http://www.openbios.org/data/bin/kernel-1.1.tar.bz2 BeginAgain 1.1] (2003-10-12). <br />
<br />
'''NOTE:''' You should use the latest version of ''BeginAgain'' that is present in the complete ''OpenBIOS release'' above. It is much newer than ''BeginAgain 1.1'' and it supports cross compiling and lots of other nifty features. ''BeginAgain 1.1'' is here for educational purposes only: The core binary is only 6k on x86.<br />
<br />
= Development Environment =<br />
<br />
== FCode Suite ==<br />
<br />
To download the latest version of the FCode Suite, including an FCode detokenizer, an FCode tokenizer and the romheader utility, please go to the [[FCODE suite|FCode Suite page]].<br />
<br />
== Flashing ==<br />
/dev/bios is obsolete and has been replaced by a new and better utility. Please download a coreboot snapshot and use the [[FlashRom|flashrom utility]] from ''coreboot-v2/util/flashrom''.<br />
<br />
= Development Repository =<br />
<br />
OpenBIOS keeps its development tree in a [http://subversion.tigris.org/ Subversion ] repository. If you do not want to use Subversion, please have a look at the [[#Snapshots|Snapshots]] below.<br />
<br />
== Anonymous access ==<br />
<br />
You can check it out as follows:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
if you want a specific revision:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel -r 1153<br />
<br />
or for checking out the source code for the OpenBIOS FCode Suite:<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
If your company installed a firewall that blocks the svn port (3690) you can also check out using the webdav frontend:<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/openbios-devel</nowiki><br />
<br />
or<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/fcode-utils</nowiki><br />
<br />
For versions prior to r470, please remove the /trunk component from the path.<br />
<br />
== Developer access ==<br />
<br />
Access for developers is very similar to anonymous access. Just add your subversion username as follows when checking out the repository:<br />
$ svn co svn://username@openbios.org/openbios/trunk/openbios-devel<br />
<br />
Subversion has commands very similar to CVS.<br />
<br />
= Source code browsing =<br />
<br />
You can also browse the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel OpenBIOS subversion repository] online.<br />
<br />
= Snapshots =<br />
<br />
There is currently no archive of snapshots available for OpenBIOS. You can use the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel source code browser] to download a ZIP archive of any revision.<br />
<br />
Alternatively you can also download the [http://tracker.coreboot.org/trac/openbios/changeset/latest/trunk/openbios-devel?old_path=%2F&format=zip most current snapshot] directly.<br />
<br />
= Building OpenBIOS =<br />
Download fcode suite:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
Build the needed programs inside the fcode-utils-devel folder:<br />
<br />
$ make<br />
<br />
Install the programs:<br />
<br />
$ make install<br />
<br />
Download OpenBIOS:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
Select the build targets:<br />
$ ./config/scripts/switch-arch sparc32 sparc64 x86 ppc amd64<br />
<br />
Build OpenBIOS:<br />
$ make<br />
or<br />
$ make build-verbose<br />
<br />
<br />
OpenBIOS can even be cross-compiled on a host which is different type (big vs. little endian and 32 vs. 64 bits) from the target. At least Linux and OpenBSD hosts are known to work.<br />
<br />
If your cross tools use different prefix from what the makefiles assume, the prefix can be overridden with:<br />
$ make build-verbose TARGET=powerpc-elf-<br />
<br />
or<br />
$ make -C obj-ppc CC=powerpc-elf-gcc<br />
<br />
The OpenBIOS binaries (typically openbios-builtin.elf) can be found in obj- subdirectories. The Unix executable version (native only) is named openbios-unix.<br />
<br />
<br />
= Additional Resources =<br />
[http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2 PowerPC elf cross compiler for Mac OS X] <br />
*This compiler uses a unsupported compiler prefix. To use it, set the CROSS_COMPILE variable to "ppc-elf-" before running the switch-arch script. <br />
<br />
Example:<br />
CROSS_COMPILE=ppc-elf- ./switch-arch ppc<br />
<br />
*As of May 2015, a problem with this compiler and the file usbohci.c causes compiling to fail. This is only because compiler warnings are being treated as errors. To disable this option, open the Makefile.target file (located at the root level of the openbios-devel folder) and remove the "-Werror" text. <br />
<br />
<br />
= Notes for Building on Mac OS X =<br />
There is a known build issue when building on Mac OS 10.6. The switch-arch script will report your computer as 32 bit (x86) when it is really 64 bit (amd64). If you see the message "''panic: segmentation violation at …''" while building, you probably have this problem.<br />
<br />
If this happens to you, try setting the HOSTARCH variable before using the switch-arch script. <br />
<br />
Example: <br />
HOSTARCH=amd64 ./switch-arch ppc<br />
<br />
<br />
= Troubleshooting =<br />
Seeing this message: ''Unable to locate toke executable from the fcode-utils package - aborting''<br />
<br>- Install the fcode suite first before trying to build OpenBIOS.<br />
<br />
<br />
= More on Subversion =<br />
<br />
* [http://svnbook.red-bean.com/ Subversion book] - this online book is the best SVN documentation available online.<br />
* [http://subversion.tigris.org/ Subversion homepage]<br />
<br />
__NOEDITSECTION__</div>Programmingkidhttps://openfirmware.info/index.php?title=OpenBIOS&diff=191OpenBIOS2015-05-14T16:04:50Z<p>Programmingkid: </p>
<hr />
<div>= OpenBIOS - Code Releases =<br />
<br />
Welcome to the OpenBIOS download page. Here you'll find releases of OpenBIOS components.<br />
<br />
After 4 years of hard work, OpenBIOS v1.1 has been released. The new features include:<br />
* Internal memory API (OFMEM) implementation<br />
* Forth Source Debugger<br />
* 64-bit 1275 6d5 implementation<br />
* Forth Local Variables<br />
* Internal libopenbios code reorganisation<br />
<br />
See the [http://tracker.coreboot.org/trac/openbios OpenBIOS issue tracker] for milestones, tasks and open bugs.<br />
<br />
= OpenBIOS =<br />
<br />
Download the latest release of OpenBIOS including the Forth kernel and all of the IEEE 1275-1994 compliant Forth code for user interface, client interface and device interface.<br />
<br />
Latest release version is: [http://tracker.coreboot.org/trac/openbios/changeset/1135/trunk/openbios-devel?old_path=%2F&old=1135&format=zip OpenBIOS 1.1] (2013-05-04)<br />
<br />
'''NOTE:''' The FCODE utilities are no longer part of the main OpenBIOS distribution. Have a look at the [[FCODE suite]] if you are looking for toke and detok.<br />
<br />
= Status and use cases =<br />
<br />
OpenBIOS can be used directly as a boot ROM for [http://qemu.org/ QEMU] system emulators for PPC, PPC64, Sparc32 and Sparc64.<br />
<br />
OpenBIOS/SPARC32 is currently able to boot the following OS/kernels:<br />
* Linux<br />
* NetBSD<br />
* OpenBSD<br />
* Some later versions of Solaris (Solaris 8 and early Solaris 9 are known to work)<br />
OpenBIOS/SPARC64 is currently able to boot the following OS/kernels:<br />
* Linux (with virtio drivers)<br />
OpenBIOS/PPC is currently able to boot the following OS/kernels:<br />
* Linux<br />
* HelenOS<br />
The following operating systems will partially boot, but may suffer from some emulation bugs under QEMU:<br />
* FreeBSD<br />
* NetBSD<br />
* Darwin/Mac OS X<br />
<br />
[http://www.coreboot.org Coreboot] can use OpenBIOS as a payload on x86. <br />
<br />
Do not try to put OpenBIOS in a real boot ROM, it will not work and may damage your hardware!<br />
<br />
== Kernel ==<br />
There is also an ancient stand-alone version of the OpenBIOS Forth kernel ''BeginAgain''.<br />
<br />
The last released stand-alone version is: [http://www.openbios.org/data/bin/kernel-1.1.tar.bz2 BeginAgain 1.1] (2003-10-12). <br />
<br />
'''NOTE:''' You should use the latest version of ''BeginAgain'' that is present in the complete ''OpenBIOS release'' above. It is much newer than ''BeginAgain 1.1'' and it supports cross compiling and lots of other nifty features. ''BeginAgain 1.1'' is here for educational purposes only: The core binary is only 6k on x86.<br />
<br />
= Development Environment =<br />
<br />
== FCode Suite ==<br />
<br />
To download the latest version of the FCode Suite, including an FCode detokenizer, an FCode tokenizer and the romheader utility, please go to the [[FCODE suite|FCode Suite page]].<br />
<br />
== Flashing ==<br />
/dev/bios is obsolete and has been replaced by a new and better utility. Please download a coreboot snapshot and use the [[FlashRom|flashrom utility]] from ''coreboot-v2/util/flashrom''.<br />
<br />
= Development Repository =<br />
<br />
OpenBIOS keeps its development tree in a [http://subversion.tigris.org/ Subversion ] repository. If you do not want to use Subversion, please have a look at the [[#Snapshots|Snapshots]] below.<br />
<br />
== Anonymous access ==<br />
<br />
You can check it out as follows:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
if you want a specific revision:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel -r 1153<br />
<br />
or for checking out the source code for the OpenBIOS FCode Suite:<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
If your company installed a firewall that blocks the svn port (3690) you can also check out using the webdav frontend:<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/openbios-devel</nowiki><br />
<br />
or<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/fcode-utils</nowiki><br />
<br />
For versions prior to r470, please remove the /trunk component from the path.<br />
<br />
== Developer access ==<br />
<br />
Access for developers is very similar to anonymous access. Just add your subversion username as follows when checking out the repository:<br />
$ svn co svn://username@openbios.org/openbios/trunk/openbios-devel<br />
<br />
Subversion has commands very similar to CVS.<br />
<br />
= Source code browsing =<br />
<br />
You can also browse the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel OpenBIOS subversion repository] online.<br />
<br />
= Snapshots =<br />
<br />
There is currently no archive of snapshots available for OpenBIOS. You can use the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel source code browser] to download a ZIP archive of any revision.<br />
<br />
Alternatively you can also download the [http://tracker.coreboot.org/trac/openbios/changeset/latest/trunk/openbios-devel?old_path=%2F&format=zip most current snapshot] directly.<br />
<br />
= Building OpenBIOS =<br />
Download fcode suite:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
Build the needed programs inside the fcode-utils-devel folder:<br />
<br />
$ make<br />
<br />
Install the programs:<br />
<br />
$ make install<br />
<br />
Download OpenBIOS:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
Select the build targets:<br />
$ ./config/scripts/switch-arch sparc32 sparc64 x86 ppc amd64<br />
<br />
Build OpenBIOS:<br />
$ make<br />
or<br />
$ make build-verbose<br />
<br />
<br />
OpenBIOS can even be cross-compiled on a host which is different type (big vs. little endian and 32 vs. 64 bits) from the target. At least Linux and OpenBSD hosts are known to work.<br />
<br />
If your cross tools use different prefix from what the makefiles assume, the prefix can be overridden with:<br />
$ make build-verbose TARGET=powerpc-elf-<br />
<br />
or<br />
$ make -C obj-ppc CC=powerpc-elf-gcc<br />
<br />
The OpenBIOS binaries (typically openbios-builtin.elf) can be found in obj- subdirectories. The Unix executable version (native only) is named openbios-unix.<br />
<br />
<br />
= Additional Resources =<br />
[http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2 PowerPC elf cross compiler for Mac OS X] <br />
*This compiler uses a unsupported compiler prefix. To use it, set the CROSS_COMPILE variable to "ppc-elf-" before running the switch-arch script. <br />
<br />
Example:<br />
CROSS_COMPILE=ppc-elf- ./switch-arch ppc<br />
<br />
*As of May 2015, a problem with this compiler and the file usbohci.c causes compiling to fail. This is only because compiler warnings are being treated as errors. To disable this option, go to the Makefile.target file located at the root level of the openbios-devel folder and remove the "-Werror" text. <br />
<br />
<br />
= Notes for Building on Mac OS X =<br />
There is a known build issue when building on Mac OS 10.6. The switch-arch script will report your computer as 32 bit (x86) when it is really 64 bit (amd64). If you see the message "''panic: segmentation violation at …''" while building, you probably have this problem.<br />
<br />
If this happens to you, try setting the HOSTARCH variable before using the switch-arch script. <br />
<br />
Example: <br />
HOSTARCH=amd64 ./switch-arch ppc<br />
<br />
<br />
= Troubleshooting =<br />
Seeing this message: ''Unable to locate toke executable from the fcode-utils package - aborting''<br />
<br>- Install the fcode suite first before trying to build OpenBIOS.<br />
<br />
<br />
= More on Subversion =<br />
<br />
* [http://svnbook.red-bean.com/ Subversion book] - this online book is the best SVN documentation available online.<br />
* [http://subversion.tigris.org/ Subversion homepage]<br />
<br />
__NOEDITSECTION__</div>Programmingkidhttps://openfirmware.info/index.php?title=OpenBIOS&diff=190OpenBIOS2015-05-14T15:45:53Z<p>Programmingkid: </p>
<hr />
<div>= OpenBIOS - Code Releases =<br />
<br />
Welcome to the OpenBIOS download page. Here you'll find releases of OpenBIOS components.<br />
<br />
After 4 years of hard work, OpenBIOS v1.1 has been released. The new features include:<br />
* Internal memory API (OFMEM) implementation<br />
* Forth Source Debugger<br />
* 64-bit 1275 6d5 implementation<br />
* Forth Local Variables<br />
* Internal libopenbios code reorganisation<br />
<br />
See the [http://tracker.coreboot.org/trac/openbios OpenBIOS issue tracker] for milestones, tasks and open bugs.<br />
<br />
= OpenBIOS =<br />
<br />
Download the latest release of OpenBIOS including the Forth kernel and all of the IEEE 1275-1994 compliant Forth code for user interface, client interface and device interface.<br />
<br />
Latest release version is: [http://tracker.coreboot.org/trac/openbios/changeset/1135/trunk/openbios-devel?old_path=%2F&old=1135&format=zip OpenBIOS 1.1] (2013-05-04)<br />
<br />
'''NOTE:''' The FCODE utilities are no longer part of the main OpenBIOS distribution. Have a look at the [[FCODE suite]] if you are looking for toke and detok.<br />
<br />
= Status and use cases =<br />
<br />
OpenBIOS can be used directly as a boot ROM for [http://qemu.org/ QEMU] system emulators for PPC, PPC64, Sparc32 and Sparc64.<br />
<br />
OpenBIOS/SPARC32 is currently able to boot the following OS/kernels:<br />
* Linux<br />
* NetBSD<br />
* OpenBSD<br />
* Some later versions of Solaris (Solaris 8 and early Solaris 9 are known to work)<br />
OpenBIOS/SPARC64 is currently able to boot the following OS/kernels:<br />
* Linux (with virtio drivers)<br />
OpenBIOS/PPC is currently able to boot the following OS/kernels:<br />
* Linux<br />
* HelenOS<br />
The following operating systems will partially boot, but may suffer from some emulation bugs under QEMU:<br />
* FreeBSD<br />
* NetBSD<br />
* Darwin/Mac OS X<br />
<br />
[http://www.coreboot.org Coreboot] can use OpenBIOS as a payload on x86. <br />
<br />
Do not try to put OpenBIOS in a real boot ROM, it will not work and may damage your hardware!<br />
<br />
== Kernel ==<br />
There is also an ancient stand-alone version of the OpenBIOS Forth kernel ''BeginAgain''.<br />
<br />
The last released stand-alone version is: [http://www.openbios.org/data/bin/kernel-1.1.tar.bz2 BeginAgain 1.1] (2003-10-12). <br />
<br />
'''NOTE:''' You should use the latest version of ''BeginAgain'' that is present in the complete ''OpenBIOS release'' above. It is much newer than ''BeginAgain 1.1'' and it supports cross compiling and lots of other nifty features. ''BeginAgain 1.1'' is here for educational purposes only: The core binary is only 6k on x86.<br />
<br />
= Development Environment =<br />
<br />
== FCode Suite ==<br />
<br />
To download the latest version of the FCode Suite, including an FCode detokenizer, an FCode tokenizer and the romheader utility, please go to the [[FCODE suite|FCode Suite page]].<br />
<br />
== Flashing ==<br />
/dev/bios is obsolete and has been replaced by a new and better utility. Please download a coreboot snapshot and use the [[FlashRom|flashrom utility]] from ''coreboot-v2/util/flashrom''.<br />
<br />
= Development Repository =<br />
<br />
OpenBIOS keeps its development tree in a [http://subversion.tigris.org/ Subversion ] repository. If you do not want to use Subversion, please have a look at the [[#Snapshots|Snapshots]] below.<br />
<br />
== Anonymous access ==<br />
<br />
You can check it out as follows:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
if you want a specific revision:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel -r 1153<br />
<br />
or for checking out the source code for the OpenBIOS FCode Suite:<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
If your company installed a firewall that blocks the svn port (3690) you can also check out using the webdav frontend:<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/openbios-devel</nowiki><br />
<br />
or<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/fcode-utils</nowiki><br />
<br />
For versions prior to r470, please remove the /trunk component from the path.<br />
<br />
== Developer access ==<br />
<br />
Access for developers is very similar to anonymous access. Just add your subversion username as follows when checking out the repository:<br />
$ svn co svn://username@openbios.org/openbios/trunk/openbios-devel<br />
<br />
Subversion has commands very similar to CVS.<br />
<br />
= Source code browsing =<br />
<br />
You can also browse the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel OpenBIOS subversion repository] online.<br />
<br />
= Snapshots =<br />
<br />
There is currently no archive of snapshots available for OpenBIOS. You can use the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel source code browser] to download a ZIP archive of any revision.<br />
<br />
Alternatively you can also download the [http://tracker.coreboot.org/trac/openbios/changeset/latest/trunk/openbios-devel?old_path=%2F&format=zip most current snapshot] directly.<br />
<br />
= Building OpenBIOS =<br />
Download fcode suite:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
Build the needed programs inside the fcode-utils-devel folder:<br />
<br />
$ make<br />
<br />
Install the programs:<br />
<br />
$ make install<br />
<br />
Download OpenBIOS:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
Select the build targets:<br />
$ ./config/scripts/switch-arch sparc32 sparc64 x86 ppc amd64<br />
<br />
Build OpenBIOS:<br />
$ make<br />
or<br />
$ make build-verbose<br />
<br />
<br />
OpenBIOS can even be cross-compiled on a host which is different type (big vs. little endian and 32 vs. 64 bits) from the target. At least Linux and OpenBSD hosts are known to work.<br />
<br />
If your cross tools use different prefix from what the makefiles assume, the prefix can be overridden with:<br />
$ make build-verbose TARGET=powerpc-elf-<br />
<br />
or<br />
$ make -C obj-ppc CC=powerpc-elf-gcc<br />
<br />
The OpenBIOS binaries (typically openbios-builtin.elf) can be found in obj- subdirectories. The Unix executable version (native only) is named openbios-unix.<br />
<br />
<br />
= Additional Resources =<br />
[http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2 PowerPC elf cross compiler for Mac OS X] <br />
*This compiler uses a unsupported compiler prefix. To use it, set the CROSS_COMPILE variable to "ppc-elf-" before running the switch-arch script. <br />
<br />
Example:<br />
CROSS_COMPILE=ppc-elf- ./switch-arch ppc<br />
<br />
<br />
= Notes for Building on Mac OS X =<br />
There is a known build issue when building on Mac OS 10.6. The switch-arch script will report your computer as 32 bit (x86) when it is really 64 bit (amd64). If you see the message "''panic: segmentation violation at …''" while building, you probably have this problem.<br />
<br />
If this happens to you, try setting the HOSTARCH variable before using the switch-arch script. <br />
<br />
Example: <br />
HOSTARCH=amd64 ./switch-arch ppc<br />
<br />
<br />
= Troubleshooting =<br />
Seeing this message: ''Unable to locate toke executable from the fcode-utils package - aborting''<br />
<br>- Install the fcode suite first before trying to build OpenBIOS.<br />
<br />
<br />
= More on Subversion =<br />
<br />
* [http://svnbook.red-bean.com/ Subversion book] - this online book is the best SVN documentation available online.<br />
* [http://subversion.tigris.org/ Subversion homepage]<br />
<br />
__NOEDITSECTION__</div>Programmingkidhttps://openfirmware.info/index.php?title=OpenBIOS&diff=189OpenBIOS2015-05-14T15:39:40Z<p>Programmingkid: </p>
<hr />
<div>= OpenBIOS - Code Releases =<br />
<br />
Welcome to the OpenBIOS download page. Here you'll find releases of OpenBIOS components.<br />
<br />
After 4 years of hard work, OpenBIOS v1.1 has been released. The new features include:<br />
* Internal memory API (OFMEM) implementation<br />
* Forth Source Debugger<br />
* 64-bit 1275 6d5 implementation<br />
* Forth Local Variables<br />
* Internal libopenbios code reorganisation<br />
<br />
See the [http://tracker.coreboot.org/trac/openbios OpenBIOS issue tracker] for milestones, tasks and open bugs.<br />
<br />
= OpenBIOS =<br />
<br />
Download the latest release of OpenBIOS including the Forth kernel and all of the IEEE 1275-1994 compliant Forth code for user interface, client interface and device interface.<br />
<br />
Latest release version is: [http://tracker.coreboot.org/trac/openbios/changeset/1135/trunk/openbios-devel?old_path=%2F&old=1135&format=zip OpenBIOS 1.1] (2013-05-04)<br />
<br />
'''NOTE:''' The FCODE utilities are no longer part of the main OpenBIOS distribution. Have a look at the [[FCODE suite]] if you are looking for toke and detok.<br />
<br />
= Status and use cases =<br />
<br />
OpenBIOS can be used directly as a boot ROM for [http://qemu.org/ QEMU] system emulators for PPC, PPC64, Sparc32 and Sparc64.<br />
<br />
OpenBIOS/SPARC32 is currently able to boot the following OS/kernels:<br />
* Linux<br />
* NetBSD<br />
* OpenBSD<br />
* Some later versions of Solaris (Solaris 8 and early Solaris 9 are known to work)<br />
OpenBIOS/SPARC64 is currently able to boot the following OS/kernels:<br />
* Linux (with virtio drivers)<br />
OpenBIOS/PPC is currently able to boot the following OS/kernels:<br />
* Linux<br />
* HelenOS<br />
The following operating systems will partially boot, but may suffer from some emulation bugs under QEMU:<br />
* FreeBSD<br />
* NetBSD<br />
* Darwin/Mac OS X<br />
<br />
[http://www.coreboot.org Coreboot] can use OpenBIOS as a payload on x86. <br />
<br />
Do not try to put OpenBIOS in a real boot ROM, it will not work and may damage your hardware!<br />
<br />
== Kernel ==<br />
There is also an ancient stand-alone version of the OpenBIOS Forth kernel ''BeginAgain''.<br />
<br />
The last released stand-alone version is: [http://www.openbios.org/data/bin/kernel-1.1.tar.bz2 BeginAgain 1.1] (2003-10-12). <br />
<br />
'''NOTE:''' You should use the latest version of ''BeginAgain'' that is present in the complete ''OpenBIOS release'' above. It is much newer than ''BeginAgain 1.1'' and it supports cross compiling and lots of other nifty features. ''BeginAgain 1.1'' is here for educational purposes only: The core binary is only 6k on x86.<br />
<br />
= Development Environment =<br />
<br />
== FCode Suite ==<br />
<br />
To download the latest version of the FCode Suite, including an FCode detokenizer, an FCode tokenizer and the romheader utility, please go to the [[FCODE suite|FCode Suite page]].<br />
<br />
== Flashing ==<br />
/dev/bios is obsolete and has been replaced by a new and better utility. Please download a coreboot snapshot and use the [[FlashRom|flashrom utility]] from ''coreboot-v2/util/flashrom''.<br />
<br />
= Development Repository =<br />
<br />
OpenBIOS keeps its development tree in a [http://subversion.tigris.org/ Subversion ] repository. If you do not want to use Subversion, please have a look at the [[#Snapshots|Snapshots]] below.<br />
<br />
== Anonymous access ==<br />
<br />
You can check it out as follows:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
if you want a specific revision:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel -r 1153<br />
<br />
or for checking out the source code for the OpenBIOS FCode Suite:<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
If your company installed a firewall that blocks the svn port (3690) you can also check out using the webdav frontend:<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/openbios-devel</nowiki><br />
<br />
or<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/fcode-utils</nowiki><br />
<br />
For versions prior to r470, please remove the /trunk component from the path.<br />
<br />
== Developer access ==<br />
<br />
Access for developers is very similar to anonymous access. Just add your subversion username as follows when checking out the repository:<br />
$ svn co svn://username@openbios.org/openbios/trunk/openbios-devel<br />
<br />
Subversion has commands very similar to CVS.<br />
<br />
= Source code browsing =<br />
<br />
You can also browse the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel OpenBIOS subversion repository] online.<br />
<br />
= Snapshots =<br />
<br />
There is currently no archive of snapshots available for OpenBIOS. You can use the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel source code browser] to download a ZIP archive of any revision.<br />
<br />
Alternatively you can also download the [http://tracker.coreboot.org/trac/openbios/changeset/latest/trunk/openbios-devel?old_path=%2F&format=zip most current snapshot] directly.<br />
<br />
= Building OpenBIOS =<br />
Download fcode suite:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
Build the needed programs inside the fcode-utils-devel folder:<br />
<br />
$ make<br />
<br />
Install the programs:<br />
<br />
$ make install<br />
<br />
Download OpenBIOS:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
Select the build targets:<br />
$ ./config/scripts/switch-arch sparc32 sparc64 x86 ppc amd64<br />
<br />
Build OpenBIOS:<br />
$ make<br />
or<br />
$ make build-verbose<br />
<br />
<br />
OpenBIOS can even be cross-compiled on a host which is different type (big vs. little endian and 32 vs. 64 bits) from the target. At least Linux and OpenBSD hosts are known to work.<br />
<br />
If your cross tools use different prefix from what the makefiles assume, the prefix can be overridden with:<br />
$ make build-verbose TARGET=powerpc-elf-<br />
<br />
or<br />
$ make -C obj-ppc CC=powerpc-elf-gcc<br />
<br />
The OpenBIOS binaries (typically openbios-builtin.elf) can be found in obj- subdirectories. The Unix executable version (native only) is named openbios-unix.<br />
<br />
<br />
= Additional Resources =<br />
[http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2 PowerPC elf cross compiler for Mac OS X] <br />
*This compiler uses a unsupported compiler prefix. To use it, set the CROSS_COMPILE variable to "ppc-elf-" before running the switch-arch script. <br />
<br />
Example:<br />
CROSS_COMPILE=ppc-elf- ./switch-arch ppc<br />
<br />
<br />
= Notes for Building on Mac OS X =<br />
There is a known build issue when building on Mac OS 10.6. The switch-arch script will report your computer as 32 bit (x86) when it is really 64 bit (amd64). If you see the message "''panic: segmentation violation at …''" while building, you probably have this problem.<br />
<br />
If this happens to you, try setting the HOSTARCH variable before using the switch-arch script. <br />
<br />
Example: <br />
HOSTARCH=amd64 ./switch-arch ppc<br />
<br />
<br />
= Troubleshooting =<br />
Seeing this message? Unable to locate toke executable from the fcode-utils package - aborting<br />
<br>- Install the fcode suite first before trying to build OpenBIOS.<br />
<br />
= More on Subversion =<br />
<br />
* [http://svnbook.red-bean.com/ Subversion book] - this online book is the best SVN documentation available online.<br />
* [http://subversion.tigris.org/ Subversion homepage]<br />
<br />
__NOEDITSECTION__</div>Programmingkidhttps://openfirmware.info/index.php?title=OpenBIOS&diff=188OpenBIOS2015-04-28T19:59:37Z<p>Programmingkid: </p>
<hr />
<div>= OpenBIOS - Code Releases =<br />
<br />
Welcome to the OpenBIOS download page. Here you'll find releases of OpenBIOS components.<br />
<br />
After 4 years of hard work, OpenBIOS v1.1 has been released. The new features include:<br />
* Internal memory API (OFMEM) implementation<br />
* Forth Source Debugger<br />
* 64-bit 1275 6d5 implementation<br />
* Forth Local Variables<br />
* Internal libopenbios code reorganisation<br />
<br />
See the [http://tracker.coreboot.org/trac/openbios OpenBIOS issue tracker] for milestones, tasks and open bugs.<br />
<br />
= OpenBIOS =<br />
<br />
Download the latest release of OpenBIOS including the Forth kernel and all of the IEEE 1275-1994 compliant Forth code for user interface, client interface and device interface.<br />
<br />
Latest release version is: [http://tracker.coreboot.org/trac/openbios/changeset/1135/trunk/openbios-devel?old_path=%2F&old=1135&format=zip OpenBIOS 1.1] (2013-05-04)<br />
<br />
'''NOTE:''' The FCODE utilities are no longer part of the main OpenBIOS distribution. Have a look at the [[FCODE suite]] if you are looking for toke and detok.<br />
<br />
= Status and use cases =<br />
<br />
OpenBIOS can be used directly as a boot ROM for [http://qemu.org/ QEMU] system emulators for PPC, PPC64, Sparc32 and Sparc64.<br />
<br />
OpenBIOS/SPARC32 is currently able to boot the following OS/kernels:<br />
* Linux<br />
* NetBSD<br />
* OpenBSD<br />
* Some later versions of Solaris (Solaris 8 and early Solaris 9 are known to work)<br />
OpenBIOS/SPARC64 is currently able to boot the following OS/kernels:<br />
* Linux (with virtio drivers)<br />
OpenBIOS/PPC is currently able to boot the following OS/kernels:<br />
* Linux<br />
* HelenOS<br />
The following operating systems will partially boot, but may suffer from some emulation bugs under QEMU:<br />
* FreeBSD<br />
* NetBSD<br />
* Darwin/Mac OS X<br />
<br />
[http://www.coreboot.org Coreboot] can use OpenBIOS as a payload on x86. <br />
<br />
Do not try to put OpenBIOS in a real boot ROM, it will not work and may damage your hardware!<br />
<br />
== Kernel ==<br />
There is also an ancient stand-alone version of the OpenBIOS Forth kernel ''BeginAgain''.<br />
<br />
The last released stand-alone version is: [http://www.openbios.org/data/bin/kernel-1.1.tar.bz2 BeginAgain 1.1] (2003-10-12). <br />
<br />
'''NOTE:''' You should use the latest version of ''BeginAgain'' that is present in the complete ''OpenBIOS release'' above. It is much newer than ''BeginAgain 1.1'' and it supports cross compiling and lots of other nifty features. ''BeginAgain 1.1'' is here for educational purposes only: The core binary is only 6k on x86.<br />
<br />
= Development Environment =<br />
<br />
== FCode Suite ==<br />
<br />
To download the latest version of the FCode Suite, including an FCode detokenizer, an FCode tokenizer and the romheader utility, please go to the [[FCODE suite|FCode Suite page]].<br />
<br />
== Flashing ==<br />
/dev/bios is obsolete and has been replaced by a new and better utility. Please download a coreboot snapshot and use the [[FlashRom|flashrom utility]] from ''coreboot-v2/util/flashrom''.<br />
<br />
= Development Repository =<br />
<br />
OpenBIOS keeps its development tree in a [http://subversion.tigris.org/ Subversion ] repository. If you do not want to use Subversion, please have a look at the [[#Snapshots|Snapshots]] below.<br />
<br />
== Anonymous access ==<br />
<br />
You can check it out as follows:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
if you want a specific revision:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel -r 1153<br />
<br />
or for checking out the source code for the OpenBIOS FCode Suite:<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
If your company installed a firewall that blocks the svn port (3690) you can also check out using the webdav frontend:<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/openbios-devel</nowiki><br />
<br />
or<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/fcode-utils</nowiki><br />
<br />
For versions prior to r470, please remove the /trunk component from the path.<br />
<br />
== Developer access ==<br />
<br />
Access for developers is very similar to anonymous access. Just add your subversion username as follows when checking out the repository:<br />
$ svn co svn://username@openbios.org/openbios/trunk/openbios-devel<br />
<br />
Subversion has commands very similar to CVS.<br />
<br />
= Source code browsing =<br />
<br />
You can also browse the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel OpenBIOS subversion repository] online.<br />
<br />
= Snapshots =<br />
<br />
There is currently no archive of snapshots available for OpenBIOS. You can use the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel source code browser] to download a ZIP archive of any revision.<br />
<br />
Alternatively you can also download the [http://tracker.coreboot.org/trac/openbios/changeset/latest/trunk/openbios-devel?old_path=%2F&format=zip most current snapshot] directly.<br />
<br />
= Building OpenBIOS =<br />
Download fcode suite:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
Build the needed programs inside the fcode-utils-devel folder:<br />
<br />
$ make<br />
<br />
Install the programs:<br />
<br />
$ make install<br />
<br />
Download OpenBIOS:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
Select the build targets:<br />
$ ./config/scripts/switch-arch sparc32 sparc64 x86 ppc amd64<br />
<br />
Build OpenBIOS:<br />
$ make<br />
or<br />
$ make build-verbose<br />
<br />
<br />
OpenBIOS can even be cross-compiled on a host which is different type (big vs. little endian and 32 vs. 64 bits) from the target. At least Linux and OpenBSD hosts are known to work.<br />
<br />
If your cross tools use different prefix from what the makefiles assume, the prefix can be overridden with:<br />
$ make build-verbose TARGET=powerpc-elf-<br />
<br />
or<br />
$ make -C obj-ppc CC=powerpc-elf-gcc<br />
<br />
The OpenBIOS binaries (typically openbios-builtin.elf) can be found in obj- subdirectories. The Unix executable version (native only) is named openbios-unix.<br />
<br />
= Troubleshooting =<br />
Seeing this message? Unable to locate toke executable from the fcode-utils package - aborting<br />
<br>- Install the fcode suite first before trying to build OpenBIOS.<br />
<br />
= More on Subversion =<br />
<br />
* [http://svnbook.red-bean.com/ Subversion book] - this online book is the best SVN documentation available online.<br />
* [http://subversion.tigris.org/ Subversion homepage]<br />
<br />
__NOEDITSECTION__</div>Programmingkidhttps://openfirmware.info/index.php?title=OpenBIOS&diff=187OpenBIOS2015-04-28T19:42:59Z<p>Programmingkid: </p>
<hr />
<div>= OpenBIOS - Code Releases =<br />
<br />
Welcome to the OpenBIOS download page. Here you'll find releases of OpenBIOS components.<br />
<br />
After 4 years of hard work, OpenBIOS v1.1 has been released. The new features include:<br />
* Internal memory API (OFMEM) implementation<br />
* Forth Source Debugger<br />
* 64-bit 1275 6d5 implementation<br />
* Forth Local Variables<br />
* Internal libopenbios code reorganisation<br />
<br />
See the [http://tracker.coreboot.org/trac/openbios OpenBIOS issue tracker] for milestones, tasks and open bugs.<br />
<br />
= OpenBIOS =<br />
<br />
Download the latest release of OpenBIOS including the Forth kernel and all of the IEEE 1275-1994 compliant Forth code for user interface, client interface and device interface.<br />
<br />
Latest release version is: [http://tracker.coreboot.org/trac/openbios/changeset/1135/trunk/openbios-devel?old_path=%2F&old=1135&format=zip OpenBIOS 1.1] (2013-05-04)<br />
<br />
'''NOTE:''' The FCODE utilities are no longer part of the main OpenBIOS distribution. Have a look at the [[FCODE suite]] if you are looking for toke and detok.<br />
<br />
= Status and use cases =<br />
<br />
OpenBIOS can be used directly as a boot ROM for [http://qemu.org/ QEMU] system emulators for PPC, PPC64, Sparc32 and Sparc64.<br />
<br />
OpenBIOS/SPARC32 is currently able to boot the following OS/kernels:<br />
* Linux<br />
* NetBSD<br />
* OpenBSD<br />
* Some later versions of Solaris (Solaris 8 and early Solaris 9 are known to work)<br />
OpenBIOS/SPARC64 is currently able to boot the following OS/kernels:<br />
* Linux (with virtio drivers)<br />
OpenBIOS/PPC is currently able to boot the following OS/kernels:<br />
* Linux<br />
* HelenOS<br />
The following kernels will partially boot, but still suffer from some emulation bugs under QEMU:<br />
* FreeBSD<br />
* NetBSD<br />
* Darwin/OS X<br />
<br />
[http://www.coreboot.org Coreboot] can use OpenBIOS as a payload on x86. <br />
<br />
Do not try to put OpenBIOS in a real boot ROM, it will not work and may damage your hardware!<br />
<br />
== Kernel ==<br />
There is also an ancient stand-alone version of the OpenBIOS Forth kernel ''BeginAgain''.<br />
<br />
The last released stand-alone version is: [http://www.openbios.org/data/bin/kernel-1.1.tar.bz2 BeginAgain 1.1] (2003-10-12). <br />
<br />
'''NOTE:''' You should use the latest version of ''BeginAgain'' that is present in the complete ''OpenBIOS release'' above. It is much newer than ''BeginAgain 1.1'' and it supports cross compiling and lots of other nifty features. ''BeginAgain 1.1'' is here for educational purposes only: The core binary is only 6k on x86.<br />
<br />
= Development Environment =<br />
<br />
== FCode Suite ==<br />
<br />
To download the latest version of the FCode Suite, including an FCode detokenizer, an FCode tokenizer and the romheader utility, please go to the [[FCODE suite|FCode Suite page]].<br />
<br />
== Flashing ==<br />
/dev/bios is obsolete and has been replaced by a new and better utility. Please download a coreboot snapshot and use the [[FlashRom|flashrom utility]] from ''coreboot-v2/util/flashrom''.<br />
<br />
= Development Repository =<br />
<br />
OpenBIOS keeps its development tree in a [http://subversion.tigris.org/ Subversion ] repository. If you do not want to use Subversion, please have a look at the [[#Snapshots|Snapshots]] below.<br />
<br />
== Anonymous access ==<br />
<br />
You can check it out as follows:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
if you want a specific revision:<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel -r 1153<br />
<br />
or for checking out the source code for the OpenBIOS FCode Suite:<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
If your company installed a firewall that blocks the svn port (3690) you can also check out using the webdav frontend:<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/openbios-devel</nowiki><br />
<br />
or<br />
<br />
$ svn co <nowiki>https://www.openbios.org/openbios-svn/trunk/fcode-utils</nowiki><br />
<br />
For versions prior to r470, please remove the /trunk component from the path.<br />
<br />
== Developer access ==<br />
<br />
Access for developers is very similar to anonymous access. Just add your subversion username as follows when checking out the repository:<br />
$ svn co svn://username@openbios.org/openbios/trunk/openbios-devel<br />
<br />
Subversion has commands very similar to CVS.<br />
<br />
= Source code browsing =<br />
<br />
You can also browse the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel OpenBIOS subversion repository] online.<br />
<br />
= Snapshots =<br />
<br />
There is currently no archive of snapshots available for OpenBIOS. You can use the [http://tracker.coreboot.org/trac/openbios/browser/trunk/openbios-devel source code browser] to download a ZIP archive of any revision.<br />
<br />
Alternatively you can also download the [http://tracker.coreboot.org/trac/openbios/changeset/latest/trunk/openbios-devel?old_path=%2F&format=zip most current snapshot] directly.<br />
<br />
= Building OpenBIOS =<br />
Download fcode suite:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/fcode-utils-devel<br />
<br />
Build the needed programs inside the fcode-utils-devel folder:<br />
<br />
$ make<br />
<br />
Install the programs:<br />
<br />
$ make install<br />
<br />
Download OpenBIOS:<br />
<br />
$ svn co svn://openbios.org/openbios/trunk/openbios-devel<br />
<br />
Select the build targets:<br />
$ ./config/scripts/switch-arch sparc32 sparc64 x86 ppc amd64<br />
<br />
Build OpenBIOS:<br />
$ make<br />
or<br />
$ make build-verbose<br />
<br />
<br />
OpenBIOS can even be cross-compiled on a host which is different type (big vs. little endian and 32 vs. 64 bits) from the target. At least Linux and OpenBSD hosts are known to work.<br />
<br />
If your cross tools use different prefix from what the makefiles assume, the prefix can be overridden with:<br />
$ make build-verbose TARGET=powerpc-elf-<br />
<br />
or<br />
$ make -C obj-ppc CC=powerpc-elf-gcc<br />
<br />
The OpenBIOS binaries (typically openbios-builtin.elf) can be found in obj- subdirectories. The Unix executable version (native only) is named openbios-unix.<br />
<br />
= Troubleshooting =<br />
Seeing this message? Unable to locate toke executable from the fcode-utils package - aborting<br />
<br>- Install the fcode suite first before trying to build OpenBIOS.<br />
<br />
= More on Subversion =<br />
<br />
* [http://svnbook.red-bean.com/ Subversion book] - this online book is the best SVN documentation available online.<br />
* [http://subversion.tigris.org/ Subversion homepage]<br />
<br />
__NOEDITSECTION__</div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=426How to build OpenBIOS on Mac OS X2013-04-19T00:53:39Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple&#146;s supplied GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
Disclaimer: You assume all risk involved when following this tutorial. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the &#147;AWOS Cross-Compiler for OS X&#148; file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the &#147;PowerPC Support&#148; check box only when given the option.<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin.<br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
Next the switch-arch configuration script needs to be altered so it can work on Mac OS X. <FONT COLOR="#BB0000"><B><U><BR><br />
<BR><br />
Part 2: Required changes to OpenBIOS source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Copy this patch and place it into a file. Call the file mac.patch.<BR><br />
<BR><br />
<pre><br />
Index: config/scripts/switch-arch<br />
===================================================================<br />
--- config/scripts/switch-arch (revision 1117)<br />
+++ config/scripts/switch-arch (working copy)<br />
@@ -89,16 +89,27 @@<br />
<br />
archname()<br />
{<br />
- HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<br />
- -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<br />
- -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<br />
- -e "s/Power Macintosh/ppc/"`<br />
+ OS_NAME=`uname`<br />
+ if test "$OS_NAME" = "Darwin"; then # Can't depend on uname -m on Mac OS X<br />
+ IS_64BIT=`sysctl hw.cpu64bit_capable`<br />
+ if test "$IS_64BIT" = "hw.cpu64bit_capable: 1"; then<br />
+ HOSTARCH="amd64"<br />
+ else<br />
+ HOSTARCH="x86"<br />
+ fi<br />
+ else<br />
+ HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<br />
+ -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<br />
+ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<br />
+ -e "s/Power Macintosh/ppc/"`<br />
+ fi <br />
}<br />
<br />
select_prefix()<br />
{<br />
- for TARGET in ${1}-unknown-linux-gnu- ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi-<br />
+ for TARGET in ${1}-unknown-linux-gnu- ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi- ppc-elf-<br />
do<br />
+ echo "Trying ${TARGET}gcc"<br />
if type ${TARGET}gcc > /dev/null 2>&1<br />
then<br />
return<br />
<br />
</pre><br />
<BR><br />
4) Apply the patch to your OpenBIOS source code using the patch command. <BR><br />
Example: patch -p0 &lt; ~/Desktop/mac.patch<BR><br />
<br />
:If everything went to plan, you would see something like this: patching file config/scripts/switch-arch.<br />
<br />
:If an error message was displayed instead, try changing the p0 argument to p1 or p2. If this doesn't help, verify you are in the openbios-devel directory. If you are still stuck, applying this patch by hand is an option.<BR><br />
<BR><br />
<BR><br />
That is all the changes that are needed. By this point, you should be able to configure and build OpenBIOS. Just type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
<BR><br />
<BR><br />
This tutorial was made using information available on 4/18/13. It is possible things have changed since that time. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=425How to build OpenBIOS on Mac OS X2012-12-18T16:13:32Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple&#146;s supplied GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
Disclaimer: You assume all risk involved when following this tutorial. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the &#147;AWOS Cross-Compiler for OS X&#148; file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the &#147;PowerPC Support&#148; check box only when given the option.<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin.<br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
Next the switch-arch configuration script needs to be altered so it can work on Mac OS X. <FONT COLOR="#BB0000"><B><U><BR><br />
<BR><br />
Part 2: Required changes to OpenBIOS source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Copy this patch and place it into a file. Call the file mac.patch.<BR><br />
<BR><br />
<pre><br />
Index: config/scripts/switch-arch<br />
===================================================================<br />
--- config/scripts/switch-arch (revision 1080)<br />
+++ config/scripts/switch-arch (working copy)<br />
@@ -89,16 +89,27 @@<br />
<br />
archname()<br />
{<br />
- HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<br />
- -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<br />
- -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<br />
- -e "s/Power Macintosh/ppc/"`<br />
+ OS_NAME=`uname`<br />
+ if test "$OS_NAME" = "Darwin"; then # Can't depend on uname -m on Mac OS X<br />
+ IS_64BIT=`sysctl hw.cpu64bit_capable`<br />
+ if test "$IS_64BIT" = "hw.cpu64bit_capable: 1"; then<br />
+ HOSTARCH="amd64"<br />
+ else<br />
+ HOSTARCH="x86"<br />
+ fi<br />
+ else<br />
+ HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<br />
+ -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<br />
+ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<br />
+ -e "s/Power Macintosh/ppc/"`<br />
+ fi<br />
}<br />
<br />
select_prefix()<br />
{<br />
- for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi-<br />
+ for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi- ppc-elf-<br />
do<br />
+ echo "Trying ${TARGET}gcc"<br />
if type ${TARGET}gcc > /dev/null 2>&1<br />
then<br />
return<br />
<br />
</pre><br />
<BR><br />
4) Apply the patch to your OpenBIOS source code using the patch command. <BR><br />
Example: patch -p0 &lt; ~/Desktop/mac.patch<BR><br />
<br />
:If everything went to plan, you would see something like this: patching file config/scripts/switch-arch.<br />
<br />
:If an error message was displayed instead, try changing the p0 argument to p1 or p2. If this doesn't help, verify you are in the openbios-devel directory. If you are still stuck, applying this patch by hand is an option.<BR><br />
<BR><br />
<BR><br />
That is all the changes that are needed. By this point, you should be able to configure and build OpenBIOS. Just type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
<BR><br />
<BR><br />
This tutorial was made using information available on 12/17/12. It is possible things have changed since that time. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=424How to build OpenBIOS on Mac OS X2012-12-17T19:10:00Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple&#146;s supplied GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
Disclaimer: You assume all risk involved when following this tutorial. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the &#147;AWOS Cross-Compiler for OS X&#148; file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the &#147;PowerPC Support&#148; check box only when given the option.<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler's folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin.<br />
<br />
:Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell's documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
Next the switch-arch configuration script needs to be altered so it can work on Mac OS X. <FONT COLOR="#BB0000"><B><U><BR><br />
<BR><br />
Part 2: Required changes to OpenBIOS source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Copy this patch and place it into a file. Call the file mac.patch.<BR><br />
<BR><br />
<pre><br />
Index: config/scripts/switch-arch<br />
===================================================================<br />
--- config/scripts/switch-arch (revision 1080)<br />
+++ config/scripts/switch-arch (working copy)<br />
@@ -89,16 +89,27 @@<br />
<br />
archname()<br />
{<br />
- HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<br />
- -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<br />
- -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<br />
- -e "s/Power Macintosh/ppc/"`<br />
+ OS_NAME=`uname`<br />
+ if test "$OS_NAME" = "Darwin"; then # Can't depend on uname -m on Mac OS X<br />
+ IS_64BIT=`sysctl hw.cpu64bit_capable`<br />
+ if test "$IS_64BIT" = "hw.cpu64bit_capable: 1"; then<br />
+ HOSTARCH="amd64"<br />
+ else<br />
+ HOSTARCH="x86"<br />
+ fi<br />
+ else<br />
+ HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<br />
+ -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<br />
+ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<br />
+ -e "s/Power Macintosh/ppc/"`<br />
+ fi<br />
}<br />
<br />
select_prefix()<br />
{<br />
- for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi-<br />
+ for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi- ppc-elf-<br />
do<br />
+ echo "Trying ${TARGET}gcc"<br />
if type ${TARGET}gcc > /dev/null 2>&1<br />
then<br />
return<br />
<br />
</pre><br />
<BR><br />
4) Apply the patch to your OpenBIOS source code using the patch command. <BR><br />
Example: patch -p0 &lt; ~/Desktop/mac.patch<BR><br />
<br />
:If everything went to plan, you would see something like this: patching file config/scripts/switch-arch.<br />
<br />
:If an error message was displayed instead, try changing the p0 argument to p1 or p2. If this doesn't help, verify you are in the openbios-devel directory. If you are still stuck, applying this patch by hand is an option.<BR><br />
<BR><br />
<BR><br />
That is all the changes that are needed. By this point, you should be able to configure and build OpenBIOS. Just type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose.<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
<BR><br />
<BR><br />
This tutorial was made using information available on 12/17/12. It is possible things have changed since that time. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=423How to build OpenBIOS on Mac OS X2012-12-17T19:08:18Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple&#146;s supplied GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
Disclaimer: You assume all risk involved when following this tutorial. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the &#147;AWOS Cross-Compiler for OS X&#148; file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the &#147;PowerPC Support&#148; check box only when given the option.<br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler&#146;s folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin. <BR><br />
<BR><br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell&#146;s documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
Next the switch-arch configuration script needs to be altered so it can work on Mac OS X. <FONT COLOR="#BB0000"><B><U><BR><br />
<BR><br />
Part 2: Required changes to OpenBIOS source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Copy this patch and place it into a file. Call the file mac.patch.<BR><br />
<BR><br />
<pre><br />
Index: config/scripts/switch-arch<br />
===================================================================<br />
--- config/scripts/switch-arch (revision 1080)<br />
+++ config/scripts/switch-arch (working copy)<br />
@@ -89,16 +89,27 @@<br />
<br />
archname()<br />
{<br />
- HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<br />
- -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<br />
- -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<br />
- -e "s/Power Macintosh/ppc/"`<br />
+ OS_NAME=`uname`<br />
+ if test "$OS_NAME" = "Darwin"; then # Can't depend on uname -m on Mac OS X<br />
+ IS_64BIT=`sysctl hw.cpu64bit_capable`<br />
+ if test "$IS_64BIT" = "hw.cpu64bit_capable: 1"; then<br />
+ HOSTARCH="amd64"<br />
+ else<br />
+ HOSTARCH="x86"<br />
+ fi<br />
+ else<br />
+ HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<br />
+ -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<br />
+ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<br />
+ -e "s/Power Macintosh/ppc/"`<br />
+ fi<br />
}<br />
<br />
select_prefix()<br />
{<br />
- for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi-<br />
+ for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi- ppc-elf-<br />
do<br />
+ echo "Trying ${TARGET}gcc"<br />
if type ${TARGET}gcc > /dev/null 2>&1<br />
then<br />
return<br />
<br />
</pre><br />
<BR><br />
4) Apply the patch to your OpenBIOS source code using the patch command. <BR><br />
Example: patch -p0 &lt; ~/Desktop/mac.patch<BR><br />
<br />
:If everything went to plan, you would see something like this: patching file config/scripts/switch-arch.<br />
<br />
:If an error message was displayed instead, try changing the p0 argument to p1 or p2. If this doesn't help, verify you are in the openbios-devel directory. If you are still stuck, applying this patch by hand is an option.<BR><br />
<BR><br />
<BR><br />
That is all the changes that are needed. By this point, you should be able to configure and build OpenBIOS. Just type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose.<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
<BR><br />
<BR><br />
This tutorial was made using information available on 12/17/12. It is possible things have changed since that time. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=422How to build OpenBIOS on Mac OS X2012-12-17T18:59:12Z<p>Programmingkid: </p>
<hr />
<div><P><BR><br />
Apple&#146;s supplied GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
Disclaimer: You assume all risk involved when following this tutorial. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the &#147;AWOS Cross-Compiler for OS X&#148; file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the &#147;PowerPC Support&#148; check box only when given the option.<BR><br />
<IMG SRC="Building OpenBIOS on OS X.1.jpg"><BR><br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler&#146;s folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin. <BR><br />
<BR><br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell&#146;s documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
Next the switch-arch configuration script needs to be altered so it can work on Mac OS X. <FONT COLOR="#BB0000"><B><U><BR><br />
<BR><br />
Part 2: Required changes to OpenBIOS source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Copy this patch and place it into a file. Call the file mac.patch.<BR><br />
<BR><br />
<pre><br />
Index: config/scripts/switch-arch<br />
===================================================================<br />
--- config/scripts/switch-arch (revision 1080)<br />
+++ config/scripts/switch-arch (working copy)<br />
@@ -89,16 +89,27 @@<br />
<br />
archname()<br />
{<br />
- HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<br />
- -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<br />
- -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<br />
- -e "s/Power Macintosh/ppc/"`<br />
+ OS_NAME=`uname`<br />
+ if test "$OS_NAME" = "Darwin"; then # Can't depend on uname -m on Mac OS X<br />
+ IS_64BIT=`sysctl hw.cpu64bit_capable`<br />
+ if test "$IS_64BIT" = "hw.cpu64bit_capable: 1"; then<br />
+ HOSTARCH="amd64"<br />
+ else<br />
+ HOSTARCH="x86"<br />
+ fi<br />
+ else<br />
+ HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<br />
+ -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<br />
+ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<br />
+ -e "s/Power Macintosh/ppc/"`<br />
+ fi<br />
}<br />
<br />
select_prefix()<br />
{<br />
- for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi-<br />
+ for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi- ppc-elf-<br />
do<br />
+ echo "Trying ${TARGET}gcc"<br />
if type ${TARGET}gcc > /dev/null 2>&1<br />
then<br />
return<br />
<br />
</pre><br />
<BR><br />
4) Apply the patch to your OpenBIOS source code using the patch command. <BR><br />
Example: patch -p0 &lt; ~/Desktop/mac.patch<BR><br />
<BR><br />
If everything went to plan, you would see something like this: patching file config/scripts/switch-arch.<BR><br />
<BR><br />
If an error message was displayed instead, try changing the p0 argument to p1 or p2. If this doesn&#146;t help, verify you are in the openbios-devel directory. If you are still stuck, applying this patch by hand is an option.<BR><br />
<BR><br />
<BR><br />
That is all the changes that are needed. By this point, you should be able to configure and build OpenBIOS. Just type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose.<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
<BR><br />
<BR><br />
This tutorial was made using information available on 12/17/12. It is possible things have changed since that time. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=421How to build OpenBIOS on Mac OS X2012-12-17T18:53:03Z<p>Programmingkid: </p>
<hr />
<div><P ALIGN=CENTER><FONT SIZE=5><B>How to build OpenBIOS on Mac OS X<BR><br />
</B></FONT><BR><br />
</P><br />
<br />
<P><BR><br />
Apple&#146;s supplied GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
Disclaimer: You assume all risk involved when following this tutorial. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2<BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the &#147;AWOS Cross-Compiler for OS X&#148; file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the &#147;PowerPC Support&#148; check box only when given the option.<BR><br />
<IMG SRC="Building OpenBIOS on OS X.1.jpg"><BR><br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler&#146;s folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin. <BR><br />
<BR><br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell&#146;s documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
Next the switch-arch configuration script needs to be altered so it can work on Mac OS X. <FONT COLOR="#BB0000"><B><U><BR><br />
<BR><br />
Part 2: Required changes to OpenBIOS source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Copy this patch and place it into a file. Call the file mac.patch.<BR><br />
<BR><br />
<pre><br />
Index: config/scripts/switch-arch<br />
===================================================================<br />
--- config/scripts/switch-arch (revision 1080)<br />
+++ config/scripts/switch-arch (working copy)<br />
@@ -89,16 +89,27 @@<br />
<br />
archname()<br />
{<br />
- HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<br />
- -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<br />
- -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<br />
- -e "s/Power Macintosh/ppc/"`<br />
+ OS_NAME=`uname`<br />
+ if test "$OS_NAME" = "Darwin"; then # Can't depend on uname -m on Mac OS X<br />
+ IS_64BIT=`sysctl hw.cpu64bit_capable`<br />
+ if test "$IS_64BIT" = "hw.cpu64bit_capable: 1"; then<br />
+ HOSTARCH="amd64"<br />
+ else<br />
+ HOSTARCH="x86"<br />
+ fi<br />
+ else<br />
+ HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<br />
+ -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<br />
+ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<br />
+ -e "s/Power Macintosh/ppc/"`<br />
+ fi<br />
}<br />
<br />
select_prefix()<br />
{<br />
- for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi-<br />
+ for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi- ppc-elf-<br />
do<br />
+ echo "Trying ${TARGET}gcc"<br />
if type ${TARGET}gcc > /dev/null 2>&1<br />
then<br />
return<br />
<br />
</pre><br />
<BR><br />
4) Apply the patch to your OpenBIOS source code using the patch command. <BR><br />
Example: patch -p0 &lt; ~/Desktop/mac.patch<BR><br />
<BR><br />
If everything went to plan, you would see something like this: patching file config/scripts/switch-arch.<BR><br />
<BR><br />
If an error message was displayed instead, try changing the p0 argument to p1 or p2. If this doesn&#146;t help, verify you are in the openbios-devel directory. If you are still stuck, applying this patch by hand is an option.<BR><br />
<BR><br />
<BR><br />
That is all the changes that are needed. By this point, you should be able to configure and build OpenBIOS. Just type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose.<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
<BR><br />
<BR><br />
This tutorial was made using information available on 12/17/12. It is possible things have changed since that time. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=420How to build OpenBIOS on Mac OS X2012-12-17T18:33:27Z<p>Programmingkid: </p>
<hr />
<div><P ALIGN=CENTER><FONT SIZE=5><B>How to build OpenBIOS on Mac OS X<BR><br />
</B></FONT><BR><br />
</P><br />
<br />
<P><BR><br />
Apple&#146;s supplied GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
Disclaimer: You assume all risk involved when following this tutorial. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: <A HREF="http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2"><FONT COLOR="#0000DD"><U>http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2</A></U></FONT><BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the &#147;AWOS Cross-Compiler for OS X&#148; file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the &#147;PowerPC Support&#148; check box only when given the option.<BR><br />
<IMG SRC="Building OpenBIOS on OS X.1.jpg"><BR><br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler&#146;s folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin. <BR><br />
<BR><br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell&#146;s documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
Next the switch-arch configuration script needs to be altered so it can work on Mac OS X. <FONT COLOR="#BB0000"><B><U><BR><br />
<BR><br />
Part 2: Required changes to OpenBIOS source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Copy this patch and place it into a file. Call the file mac.patch.<BR><br />
<BR><br />
<FONT COLOR="#008800"># start of patch</FONT><BR><br />
<BR><br />
Index: config/scripts/switch-arch<BR><br />
===================================================================<BR><br />
--- config/scripts/switch-arch (revision 1080)<BR><br />
+++ config/scripts/switch-arch (working copy)<BR><br />
@@ -89,16 +89,27 @@<BR><br />
<BR><br />
archname()<BR><br />
{<BR><br />
- HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<BR><br />
- -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<BR><br />
- -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<BR><br />
- -e &quot;s/Power Macintosh/ppc/&quot;`<BR><br />
+ OS_NAME=`uname`<BR><br />
+ if test &quot;$OS_NAME&quot; = &quot;Darwin&quot;; then # Can't depend on uname -m on Mac OS X<BR><br />
+ IS_64BIT=`sysctl hw.cpu64bit_capable`<BR><br />
+ if test &quot;$IS_64BIT&quot; = &quot;hw.cpu64bit_capable: 1&quot;; then<BR><br />
+ HOSTARCH=&quot;amd64&quot;<BR><br />
+ else<BR><br />
+ HOSTARCH=&quot;x86&quot;<BR><br />
+ fi<BR><br />
+ else<BR><br />
+ HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<BR><br />
+ -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<BR><br />
+ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<BR><br />
+ -e &quot;s/Power Macintosh/ppc/&quot;`<BR><br />
+ fi<BR><br />
}<BR><br />
<BR><br />
select_prefix()<BR><br />
{<BR><br />
- for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi-<BR><br />
+ for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi- ppc-elf-<BR><br />
do<BR><br />
+ echo &quot;Trying ${TARGET}gcc&quot;<BR><br />
if type ${TARGET}gcc &gt; /dev/null 2&gt;&amp;1<BR><br />
then<BR><br />
return<BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#770000"># end of patch</FONT><BR><br />
<BR><br />
<BR><br />
4) Apply the patch to your OpenBIOS source code using the patch command. <BR><br />
Example: patch -p0 &lt; ~/Desktop/mac.patch<BR><br />
<BR><br />
If everything went to plan, you would see something like this: patching file config/scripts/switch-arch.<BR><br />
<BR><br />
If an error message was displayed instead, try changing the p0 argument to p1 or p2. If this doesn&#146;t help, verify you are in the openbios-devel directory. If you are still stuck, applying this patch by hand is an option.<BR><br />
<BR><br />
<BR><br />
That is all the changes that are needed. By this point, you should be able to configure and build OpenBIOS. Just type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose.<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
<BR><br />
<BR><br />
This tutorial was made using information available on 12/17/12. It is possible things have changed since that time. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P></div>Programmingkidhttps://openfirmware.info/index.php?title=How_to_build_OpenBIOS_on_Mac_OS_X&diff=419How to build OpenBIOS on Mac OS X2012-12-17T18:28:45Z<p>Programmingkid: Created page with "<!--This file created by AppleWorks HTML Filter 6.0--> <HTML> <HEAD> <META NAME=GENERATOR CONTENT="AppleWorks HTML Filter 6.0"> <META HTTP-EQUIV="Content-Type" CONTENT="text/h..."</p>
<hr />
<div><!--This file created by AppleWorks HTML Filter 6.0--><br />
<HTML><br />
<HEAD><br />
<META NAME=GENERATOR CONTENT="AppleWorks HTML Filter 6.0"><br />
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=macintosh"><br />
<TITLE>Building OpenBIOS on OS X.cwk</TITLE><br />
</HEAD><br />
<BODY ><br />
<br />
<P ALIGN=CENTER><FONT SIZE=5><B>How to build OpenBIOS on Mac OS X<BR><br />
</B></FONT><BR><br />
</P><br />
<br />
<P><BR><br />
Apple&#146;s supplied GCC on Mac OS X does not support the elf binary format. So compiling OpenBIOS on Mac OS X is not easy. Thankfully someone has already made a PowerPC cross compiler for Mac OS X that can compile OpenBIOS. Note: this tutorial was made with Mac OS 10.6. I suggest you use Mac OS 10.5 or higher when trying to build OpenBIOS. <BR><br />
<BR><br />
Disclaimer: You assume all risk involved when following this tutorial. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Part 1: Installing the cross compiler on Mac OS X</U><BR><br />
</B></FONT><BR><br />
1). Download the AWOS cross compiler: <A HREF="http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2"><FONT COLOR="#0000DD"><U>http://awos.wilcox-tech.com/downloads/AWOS-CC.bz2</A></U></FONT><BR><br />
<BR><br />
2) Expand this bz2 file by double clicking on it.<BR><br />
<BR><br />
3) Rename the file AWOS-CC to AWOS-CC.img. <BR><br />
<BR><br />
4) Open the image file. <BR><br />
<BR><br />
5) Open the &#147;AWOS Cross-Compiler for OS X&#148; file on the newly mounted disk.<BR><br />
<BR><br />
6) Select the &#147;PowerPC Support&#148; check box only when given the option.<BR><br />
<IMG SRC="Building OpenBIOS on OS X.1.jpg"><BR><br />
<BR><br />
<BR><br />
7) Continue with the installation until it is finished. <BR><br />
<BR><br />
8) Add the new compiler&#146;s folder to the PATH variable. This is the command you use if you are in the Bash shell: export PATH=:/usr/local/ppcelfgcc/bin. <BR><br />
<BR><br />
Note: the above step will probably need to be repeated with each new session of the shell you start. It can be made permanent by altering the .bashrc file for the Bash shell. Check your shell&#146;s documentation for more information. <BR><br />
<BR><br />
This should conclude installing the compiler. <BR><br />
<BR><br />
<BR><br />
Next the switch-arch configuration script needs to be altered so it can work on Mac OS X. <FONT COLOR="#BB0000"><B><U><BR><br />
<BR><br />
Part 2: Required changes to OpenBIOS source code</U><BR><br />
</B></FONT><BR><br />
1) Open the Terminal application.<BR><br />
<BR><br />
2) Change the current directory to the inside of the openbios-devel folder. <BR><br />
<BR><br />
3) Copy this patch and place it into a file. Call the file mac.patch.<BR><br />
<BR><br />
<FONT COLOR="#008800"># start of patch</FONT><BR><br />
<BR><br />
Index: config/scripts/switch-arch<BR><br />
===================================================================<BR><br />
--- config/scripts/switch-arch (revision 1080)<BR><br />
+++ config/scripts/switch-arch (working copy)<BR><br />
@@ -89,16 +89,27 @@<BR><br />
<BR><br />
archname()<BR><br />
{<BR><br />
- HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<BR><br />
- -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<BR><br />
- -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<BR><br />
- -e &quot;s/Power Macintosh/ppc/&quot;`<BR><br />
+ OS_NAME=`uname`<BR><br />
+ if test &quot;$OS_NAME&quot; = &quot;Darwin&quot;; then # Can't depend on uname -m on Mac OS X<BR><br />
+ IS_64BIT=`sysctl hw.cpu64bit_capable`<BR><br />
+ if test &quot;$IS_64BIT&quot; = &quot;hw.cpu64bit_capable: 1&quot;; then<BR><br />
+ HOSTARCH=&quot;amd64&quot;<BR><br />
+ else<BR><br />
+ HOSTARCH=&quot;x86&quot;<BR><br />
+ fi<BR><br />
+ else<BR><br />
+ HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \<BR><br />
+ -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \<BR><br />
+ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \<BR><br />
+ -e &quot;s/Power Macintosh/ppc/&quot;`<BR><br />
+ fi<BR><br />
}<BR><br />
<BR><br />
select_prefix()<BR><br />
{<BR><br />
- for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi-<BR><br />
+ for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi- ppc-elf-<BR><br />
do<BR><br />
+ echo &quot;Trying ${TARGET}gcc&quot;<BR><br />
if type ${TARGET}gcc &gt; /dev/null 2&gt;&amp;1<BR><br />
then<BR><br />
return<BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#770000"># end of patch</FONT><BR><br />
<BR><br />
<BR><br />
4) Apply the patch to your OpenBIOS source code using the patch command. <BR><br />
Example: patch -p0 &lt; ~/Desktop/mac.patch<BR><br />
<BR><br />
If everything went to plan, you would see something like this: patching file config/scripts/switch-arch.<BR><br />
<BR><br />
If an error message was displayed instead, try changing the p0 argument to p1 or p2. If this doesn&#146;t help, verify you are in the openbios-devel directory. If you are still stuck, applying this patch by hand is an option.<BR><br />
<BR><br />
<BR><br />
That is all the changes that are needed. By this point, you should be able to configure and build OpenBIOS. Just type this command in the terminal and watch the show: <BR><br />
<BR><br />
./config/scripts/switch-arch cross-pcc &amp;&amp; make build-verbose.<BR><br />
<BR><br />
To test out your newly created binary in qemu, use the -bios option:<BR><br />
qemu-system-ppc -bios &lt;path to binary&gt;/openbios-qemu.elf.nostrip<BR><br />
<BR><br />
<BR><br />
<BR><br />
This tutorial was made using information available on 12/17/12. It is possible things have changed since that time. If you encounter any problems, please report it to the openbios developer list: openbios@openbios.org. </P><br />
</BODY><br />
</HTML></div>Programmingkidhttps://openfirmware.info/index.php?title=How_Local_Variables_in_Forth_Work_---_Using_Apple%E2%80%99s_Open_Firmware_Implementation&diff=417How Local Variables in Forth Work --- Using Apple’s Open Firmware Implementation2012-09-08T19:18:16Z<p>Programmingkid: </p>
<hr />
<div><FONT SIZE=4><FONT COLOR="#AA0000"><B><U>Contents:</U></B></FONT><BR><br />
How to try out these code examples<BR><br />
Declaring local variables<BR><br />
Setting local variables<BR><br />
Setting a local variables&#146; value automatically<BR><br />
Obtaining local variables&#146; values<BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>How to try out these code examples</U></B></FONT><BR><br />
<BR><br />
The following example code may be entered and ran in Apple&#146;s Open Firmware. In order to access Open Firmware, just hold down Command-Option-O-F while you boot your pre-Intel Mac. PowerPC iMacs and PowerBooks, iBooks, PowerMac G3&#146;s, G4&#146;s, and G5&#146;s all have Open Firmware built-in. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Declaring local variables:</U></B></FONT><BR><br />
<BR><br />
Place curly braces next to the word name. The curly braces must be on the same line as the word&#146;s name. The semicolon is optional. The semicolon lets the system know that the variables following it will not be initializing their values to the values that would have been popped from the stack. <BR><br />
<BR><br />
<FONT COLOR="#003399"><B>Example 1</B></FONT><BR><br />
<BR><br />
<pre><br />
: myword { ; cat dog }<br />
;<br />
</pre><br />
<BR><br />
Omitting the semicolon will initialize the local variable&#146;s values to values popped from the stack. Make sure the stack has enough values in it before proceeding. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Setting local variables:</U></B></FONT><FONT COLOR="#DD0000"><BR><br />
</FONT><BR><br />
The word &#147;-&gt;&#148; (hyphen greater-than) is used to set the values of local variables. <BR><br />
<BR><br />
<FONT COLOR="#003399"><B>Example 2</B></FONT><BR><br />
<BR><br />
<pre><br />
: myword { ; cat dog }<br />
4 -&gt; cat<br />
5 -&gt; dog<br />
;<br />
</pre><br />
<BR><br />
In the above example, the numbers are each pushed into the stack first. Then the -&gt; word pops a value out of the stack and sets each variable&#146;s value to a popped value. If a value is already in the stack, the following code would work as well: -&gt; cat (The 4 has been omitted).<BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Setting a local variable&#146;s value automatically</U></B></FONT><BR><br />
<BR><br />
When you don&#146;t use the semicolon in the local variable declaration, the variables get their value from the stack. The order is the last variable declared is set to the last value pushed on the stack. <BR><br />
<BR><br />
<FONT COLOR="#003399"><B>Example 3</B></FONT><BR><br />
<BR><br />
stack before myword is called ...<BR><br />
<BR><br />
3 &lt;---- top of stack<BR><br />
2<BR><br />
1<BR><br />
<BR><br />
<pre><br />
: myword { one two three }<br />
cr ." one = " one . <br />
cr ." two = " two . <br />
cr ." three = " three . <br />
;<br />
</pre><br />
<BR><br />
after myword is called ...<BR><br />
<BR><br />
one = 1<BR><br />
two = 2<BR><br />
three = 3<BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Obtaining a local variable&#146;s value</U></B></FONT><BR><br />
<BR><br />
To push a local variable&#146;s value onto the stack, just enter a local variable&#146;s name in a word. <BR><br />
<BR><br />
<FONT COLOR="#003399"><B>Example 4</B></FONT><BR><br />
<BR><br />
<pre><br />
: myword { ; cat dog }<br />
4 -> cat<br />
5 -> dog<br />
<br />
cat \ cat's value pushed onto stack ( - cat)<br />
dog \ dog's value pushed onto stack (cat - cat dog )<br />
+<br />
<br />
cr<br />
." Total animals = " . <br />
cr<br />
;<br />
</pre><br />
<BR><br />
<BR><br />
</FONT></div>Programmingkidhttps://openfirmware.info/index.php?title=How_Local_Variables_in_Forth_Work_---_Using_Apple%E2%80%99s_Open_Firmware_Implementation&diff=416How Local Variables in Forth Work --- Using Apple’s Open Firmware Implementation2012-09-08T19:17:13Z<p>Programmingkid: </p>
<hr />
<div><FONT SIZE=4><FONT COLOR="#AA0000"><B><U>Contents:</U></B></FONT><BR><br />
How to try out these code examples<BR><br />
Declaring local variables<BR><br />
Setting local variables<BR><br />
Setting a local variables&#146; value automatically<BR><br />
Obtaining local variables&#146; values<BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>How to try out these code examples</U></B></FONT><BR><br />
<BR><br />
The following example code may be entered and ran in Apple&#146;s Open Firmware. In order to access Open Firmware, just hold down Command-Option-O-F while you boot your pre-Intel Mac. PowerPC iMacs and PowerBooks, iBooks, PowerMac G3&#146;s, G4&#146;s, and G5&#146;s all have Open Firmware built-in. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Declaring local variables:</U></B></FONT><BR><br />
<BR><br />
Place curly braces next to the word name. The curly braces must be on the same line as the word&#146;s name. The semicolon is optional. The semicolon lets the system know that the variables following it will not be initializing their values to the values that would have been popped from the stack. <BR><br />
<BR><br />
<FONT COLOR="#003399"><B>Example 1</B></FONT><BR><br />
<BR><br />
<pre><br />
: myword { ; cat dog }<br />
;<br />
</pre><br />
<BR><br />
Omitting the semicolon will initialize the local variable&#146;s values to values popped from the stack. Make sure the stack has enough values in it before proceeding. <BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Setting local variables:</U></B></FONT><FONT COLOR="#DD0000"><BR><br />
</FONT><BR><br />
The word &#147;-&gt;&#148; (hyphen greater-than) is used to set the values of local variables. <BR><br />
<BR><br />
<FONT COLOR="#003399"><B>Example 2</B></FONT><BR><br />
<BR><br />
<pre><br />
: myword { ; cat dog }<br />
4 -&gt; cat<br />
5 -&gt; dog<br />
;<br />
</pre><br />
<BR><br />
In the above example, the numbers are each pushed into the stack first. Then the -&gt; word pops a value out of the stack and sets each variable&#146;s value to a popped value. If a value is already in the stack, the following code would work as well: -&gt; cat (The 4 has been omitted).<BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Setting a local variable&#146;s value automatically</U></B></FONT><BR><br />
<BR><br />
When you don&#146;t use the semicolon in the local variable declaration, the variables get their value from the stack. The order is the last variable declared is set to the last value pushed on the stack. <BR><br />
<BR><br />
<FONT COLOR="#003399"><B>Example 3</B></FONT><BR><br />
<BR><br />
stack before myword is called<BR><br />
<BR><br />
3 &lt;---- top of stack<BR><br />
2<BR><br />
1<BR><br />
<BR><br />
<pre><br />
: myword { one two three }<br />
cr ." one = " one . <br />
cr ." two = " two . <br />
cr ." three = " three . <br />
;<br />
</pre><br />
<BR><br />
after myword is called ...<BR><br />
<BR><br />
one = 1<BR><br />
two = 2<BR><br />
three = 3<BR><br />
<BR><br />
<BR><br />
<FONT COLOR="#AA0000"><B><U>Obtaining a local variable&#146;s value</U></B></FONT><BR><br />
<BR><br />
To push a local variable&#146;s value onto the stack, just enter a local variable&#146;s name in a word. <BR><br />
<BR><br />
<FONT COLOR="#003399"><B>Example 4</B></FONT><BR><br />
<BR><br />
<pre><br />
: myword { ; cat dog }<br />
4 -> cat<br />
5 -> dog<br />
<br />
cat \ cat's value pushed onto stack ( - cat)<br />
dog \ dog's value pushed onto stack (cat - cat dog )<br />
+<br />
<br />
cr<br />
." Total animals = " . <br />
cr<br />
;<br />
</pre><br />
<BR><br />
<BR><br />
</FONT></div>Programmingkid