Modifying and compiling the system
Nov 3, 2013 1:57:14 GMT -5
Post by Deleted on Nov 3, 2013 1:57:14 GMT -5
The next thing I want to do is to display a picture in the simplest possible way. This is work in progress; among other things I am investigating both VBE3 (Vesa BIOS Extension version 3) and LRMI (Linux Real Mode Interface). But in the course of this investigation I have already discovered how simple and useful the ability to modify the system software can be. Section five of the OpenBSD Manual clearly describes how to do this.
1) Download the source files from one of the places ("mirrors") listed at www.openbsd.org/ftp.html; the four files required are sys.tar.gz, src.tar.gz, xenocara.tar.gz, and ports.tar.gz
2) "Assuming the downloaded files, src.tar.gz and sys.tar.gz, are in /usr, do the following" (they love their fixed names and locations these Unix people do they not):
# cd /usr/src
# tar xzf ../sys.tar.gz
# tar xzf ../src.tar.gz
# cd /usr
# tar xzf xenocara.tar.gz
# tar xzf ports.tar.gz
3) At this point I discovered a way to remove the horrid "PROPOLICE" option used by the silly GCC compiler. No doubt in an unorthodox way I simply edited the file /usr/src/sys/arch/i386/conf/GENERIC and inserted the line:
option NO_PROPOLICE
They say you shouldn't do that but I did. That this is possible was my first great discovery in this area, and how glad I was to see the last of the Japanese Pro-Police!
4) After that, again following the instructions in the manual, I entered:
# cd /usr/src/sys/arch/i386/conf
# config GENERIC
# cd ../compile/GENERIC
# make clean && make
[...lots of output...]
# make install
Fortunately it all worked; and after a reboot the new system was in effect.
5) My second great discovery was that it is possible to insert printf statements anywhere in the system - anywhere from the very first boot screen onwards. Just find the module you wish to modify (which can be difficult), and modify it. There is no need to recompile everything. Simply do the following, which will recompile - effectively in an instant - only the one altered module:
# cd /usr/src/sys/arch/i386/compile/GENERIC
# make
# make install
And then reboot, and use your printf output for your debugging. What delight in comparison with Windows! What indescribable satisfaction!
1) Download the source files from one of the places ("mirrors") listed at www.openbsd.org/ftp.html; the four files required are sys.tar.gz, src.tar.gz, xenocara.tar.gz, and ports.tar.gz
2) "Assuming the downloaded files, src.tar.gz and sys.tar.gz, are in /usr, do the following" (they love their fixed names and locations these Unix people do they not):
# cd /usr/src
# tar xzf ../sys.tar.gz
# tar xzf ../src.tar.gz
# cd /usr
# tar xzf xenocara.tar.gz
# tar xzf ports.tar.gz
3) At this point I discovered a way to remove the horrid "PROPOLICE" option used by the silly GCC compiler. No doubt in an unorthodox way I simply edited the file /usr/src/sys/arch/i386/conf/GENERIC and inserted the line:
option NO_PROPOLICE
They say you shouldn't do that but I did. That this is possible was my first great discovery in this area, and how glad I was to see the last of the Japanese Pro-Police!
4) After that, again following the instructions in the manual, I entered:
# cd /usr/src/sys/arch/i386/conf
# config GENERIC
# cd ../compile/GENERIC
# make clean && make
[...lots of output...]
# make install
Fortunately it all worked; and after a reboot the new system was in effect.
5) My second great discovery was that it is possible to insert printf statements anywhere in the system - anywhere from the very first boot screen onwards. Just find the module you wish to modify (which can be difficult), and modify it. There is no need to recompile everything. Simply do the following, which will recompile - effectively in an instant - only the one altered module:
# cd /usr/src/sys/arch/i386/compile/GENERIC
# make
# make install
And then reboot, and use your printf output for your debugging. What delight in comparison with Windows! What indescribable satisfaction!