History log of /haiku/src/system/boot/platform/openfirmware/Jamfile
Revision Date Author Comments
# f6166140 29-Nov-2022 Augustin Cavalier <waddlesplash@gmail.com>

build: Define _BOOT_MODE once and for all in ArchitectureRules+BootRules.

Previously it was spread all around the tree, and was not defined
consistently for all boot objects (there were a number of boot modules
which did not define it, but did include headers which checked for it.)

Now, as it is handled in SetupBoot which is invoked for all boot objects,
it will be applied consistently throughout. We can thus drop the manual
additions of it from all Jamfiles.


# e050005a 22-Dec-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

Revert "openfirmware: remove real_time_clock."

This reverts commit 4e134b546a253168f986914ae9c08344d1a75d1a.

It breaks bootloader build on powerpc.


# 39a7a69b 23-Mar-2020 Jérôme Duval <jerome.duval@gmail.com>

boot_loader: add missing stubs

u_boot build still broken

Change-Id: Iba93ce7bf0d5c30a95ff98420a2e419eb28bb398
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2412
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 4e134b54 13-Mar-2020 PulkoMandy <pulkomandy@pulkomandy.tk>

openfirmware: remove real_time_clock.

It is used only in the TCP loader to initialize a random TCP source port.
Since the RTC device does not exist on sparc, this is not portable. A
simple solution is to use a non-random source port, maybe based on the
powercycle count or something like that. For now, I don't need the TCP
loader, so I'll just disable this.

Change-Id: I6e279a77bb90a8b8b989f06dd9fb256156f71635
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1988
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# cdbda49e 20-May-2019 PulkoMandy <pulkomandy@pulkomandy.tk>

sparc: fix openfirmware entry point.

According to the IEEE standard documentation, the OpenFirmware entry
point should be in %o3. But that doesn't work, and both FreeBSD and
NetBSD expect it in %o4 (5th argument of the function). I suspect this
was changed for 64bit sparc, but neither the sparc nor 64bit
openfirmware specs mention it.

Move the sparc and powerpc specific parts out of the generic start.cpp
for openfirmware as they each have some specificities. More
specifically:
- sparc already clears bss for us
- entry point arguments are different
- determine_machine is of course platform specific

Change-Id: Icaa05087e88ea4d29198e3565223459aed75cdf9
Reviewed-on: https://review.haiku-os.org/c/1470
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# e8f58ba4 28-Mar-2019 PulkoMandy <pulkomandy@pulkomandy.tk>

sparc: fix bootloader build

- Add various missing jamfiles
- Add required implementation stubs
- Update openfirmware jamfiles for multiboot support
- Update linker rules for sparc loader

Change-Id: I2d06c7a4d33827f58d82946687003f9a0dcb1b7d
Reviewed-on: https://review.haiku-os.org/c/1329
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 65ad1ba3 26-May-2012 Alex Smith <alex@alex-smith.me.uk>

Made it possible to build the bootloader when targetting x86_64.

* x86_64 is using the existing *_ia32 boot platforms.
* Special flags are required when compiling the loader to get GCC to compile
32-bit code. This adds a new set of rules for compiling boot code rather
than using the kernel rules, which compile using the necessary flags.
* Some x86_64 private headers have been stubbed by #include'ing the x86
versions. These will be replaced later.


# 40a5a5a0 26-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Rename of_region type template as per Axel
* Rename of_support.h/cpp back to support.cpp as per Axel


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42498 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d24ddec4 25-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Move platform support.cpp into less generic of_support.cpp
* Add header file to support of_support.cpp
* Add support functions to obtain address and size cell lengths
* Small style cleanups
* Add support for G5 PowerPC cpus...
* Refactor memory region code to be aware of 64-bit OF addresses.
As-is the boot loader wouldn't start on G5 systems because
OpenFirmware memory base addresses are stored as two 32-bit
unsigned int 'cells' vs one 32-bit unsigned int 'cell' on G3/G4.
I removed the static struct and replaced it with a template
and pass uint32 or uint64 depending on the address cell size.
Thanks for the idea DeadYak!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42486 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4499da39 17-Jan-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Moved generic boot platform code to its own static lib, boot_platform_generic.a.
I hope I didn't break anything, as I can and have only test
bios_ia32's haiku_loader. Flame me otherwise.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40240 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2f6b97dc 12-Jan-2011 François Revol <revol@free.fr>

This should hopefully fix build break introduced by r40215.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40217 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f5aaa387 21-Aug-2010 Andreas Färber <andreas.faerber@web.de>

boot_loader_openfirmware: Fetch EDID

Read the EDID from OF and pass it on to the kernel.

Last part of ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38307 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 36ee6a87 21-Aug-2010 Andreas Färber <andreas.faerber@web.de>

boot_loader_openfirmware: Add frame buffer support

Use the OF "screen" device alias to query frame buffer properties. Postpone
the opening of the device as far as possible as it erases the screen output.
Initialize the kernel arguments and hook into generic code to display the
splash screen.

Like on x86, the frame buffer is enabled by default. To disable it, either
press ESC during early boot or, for debugging, make sure in start.cpp that
platform_boot_options() has the BOOT_OPTION_DEBUG_OUTPUT flag set.

Resolves ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38306 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4142bceb 21-Aug-2010 Andreas Färber <andreas.faerber@web.de>

boot_loader_openfirmware: Refactor Jamfile

The frame buffer will need more generic sources than just the text menu.
Adapted from bios_ia32 platform.

Part of ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38301 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b6add3ff 25-Jun-2010 Axel Dörfler <axeld@pinc-software.de>

* Renamed remaining .c files to .cpp, and made the necessary changes to let
them compile still.
* Some cleanup in ARM's start2.cpp.
* m68k stuff is still missing, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37249 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd185b41 01-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

*.c -> *.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34417 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1ea618c5 07-Oct-2007 Jérôme Duval <korli@users.berlios.de>

added BOOT_MODE define instead of adding dprintf_no_syslog()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22478 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f602da2b 26-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

* Turned the kernel platform support from a library into an object.
* Moved the Open Firmware function platform_get_next_device() from
the boot loader into the kernel (renamed to of_get_next_device()).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16101 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e55e1a0e 03-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented the PPC specific RTC support. We search for an "rtc"
device in the Open Firmware implementation of boot loader and
pass its path to the kernel, where it's opened and used for
getting/setting the real time. The expensive atomic_*64() on PPC
32-bit make things a bit more complicated. Moreover, missing
64 bit multiplication and division instructions won't really
allow system_time() to be anywhere near as fast as on x86. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15837 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 957a1b17 30-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced new build system variables
{HAIKU,HOST,TARGET}_KERNEL_PIC_{CC,LINK}FLAGS which define the
compiler/linker flags specifying the kind of position independence
the kernel shall have. For x86 we had and still have -fno-pic, but the
PPC kernel has -fPIE (position independent executable) now, as we
need to relocate it.
* The boot loader relocates the kernel now. Mostly copied the relocation
code from the kernel ELF loader. Almost completely rewrote the PPC
specific relocation code, though. It's more correct and more complete now
(some things are still missing though).
* Added boot platform awareness to the kernel. Moved the generic
Open Firmware code (openfirmware.c/h) from the boot loader to the kernel.
* The kernel PPC serial debug output is sent to the console for the time
being.
* The PPC boot loader counts the CPUs now and allocates the kernel stacks
(made OF device iteration a bit more flexible on the way -- the search
can be restricted to subtree). Furthermore we really enter the kernel...
(Yay! :-) ... and crash in the first dprintf() (in the atomic_set()
called by acquire_spinlock()). kprintf() works, though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15756 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d561d0ad 27-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a mini networking stack to the boot loader. It speaks basic ARP,
IP, and UDP, as well as a home brewn UDP based protocol, "remote disk",
which provides random access to a single remote file/device. The Open
Firmware flavored boot loader automatically initializes the net stack,
searches for a remote disk, and tries to boot from it, if the boot
device is a network device (e.g. when loading the boot loader via
TFTP).

This is quite nice for developing with a two-machine setup, since one
doesn't even need to install Haiku on the test machine anymore, but can
serve it directly from the development machine. When the networking
support in the kernel is working, this method could even be used to
fully boot, not just for loading kernel and initial modules.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15689 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44c11fdb 19-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added console support functions required for the generic textual boot
menu. The menu basically works, but has a couple of problems. The
harmless ones are graphical: we get cursor artifacts when the colors
are changed, and the item selection doesn't quite look as it should.
More serious is the lack of Home/End, Page Up/Down keys. All I read from
the console is a '\0' byte when such a key is pressed. The cursor keys
work fortunately. I mapped the functionality of Page Up/Down
additionally to the Left/Right cursor keys. So the menu should be usable
at least. I guess, I'll leave it in that state; Axel wants a graphical
menu anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15589 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 338b8dc3 29-Oct-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged changes from branch build_system_redesign at revision 14573.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 718b5114 13-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

This should fix the build after all the kernel/system renaming.
If anything is still broken (and was not before :)), please shout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12361 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5af32e75 13-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed src/kernel to src/system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12359 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 65ad1ba320d945c9626f471c4fb0972ae49440b5 26-May-2012 Alex Smith <alex@alex-smith.me.uk>

Made it possible to build the bootloader when targetting x86_64.

* x86_64 is using the existing *_ia32 boot platforms.
* Special flags are required when compiling the loader to get GCC to compile
32-bit code. This adds a new set of rules for compiling boot code rather
than using the kernel rules, which compile using the necessary flags.
* Some x86_64 private headers have been stubbed by #include'ing the x86
versions. These will be replaced later.


# 40a5a5a0ac071efdbd7cab48c642fc805fc420f4 26-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Rename of_region type template as per Axel
* Rename of_support.h/cpp back to support.cpp as per Axel


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42498 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d24ddec4e4e5bb2fd466c1b3db7a4fa836fbd4ff 25-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Move platform support.cpp into less generic of_support.cpp
* Add header file to support of_support.cpp
* Add support functions to obtain address and size cell lengths
* Small style cleanups
* Add support for G5 PowerPC cpus...
* Refactor memory region code to be aware of 64-bit OF addresses.
As-is the boot loader wouldn't start on G5 systems because
OpenFirmware memory base addresses are stored as two 32-bit
unsigned int 'cells' vs one 32-bit unsigned int 'cell' on G3/G4.
I removed the static struct and replaced it with a template
and pass uint32 or uint64 depending on the address cell size.
Thanks for the idea DeadYak!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42486 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4499da3990dcd46133bc5797dd2f14177175d1dd 17-Jan-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Moved generic boot platform code to its own static lib, boot_platform_generic.a.
I hope I didn't break anything, as I can and have only test
bios_ia32's haiku_loader. Flame me otherwise.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40240 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2f6b97dc3058c77d233f9baac017be52609f63e1 12-Jan-2011 François Revol <revol@free.fr>

This should hopefully fix build break introduced by r40215.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40217 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f5aaa387bd39ae183938bd73b9620b1b67fffe7b 21-Aug-2010 Andreas Färber <andreas.faerber@web.de>

boot_loader_openfirmware: Fetch EDID

Read the EDID from OF and pass it on to the kernel.

Last part of ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38307 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 36ee6a873142e9a493ebf52c9d050afce5d7d147 21-Aug-2010 Andreas Färber <andreas.faerber@web.de>

boot_loader_openfirmware: Add frame buffer support

Use the OF "screen" device alias to query frame buffer properties. Postpone
the opening of the device as far as possible as it erases the screen output.
Initialize the kernel arguments and hook into generic code to display the
splash screen.

Like on x86, the frame buffer is enabled by default. To disable it, either
press ESC during early boot or, for debugging, make sure in start.cpp that
platform_boot_options() has the BOOT_OPTION_DEBUG_OUTPUT flag set.

Resolves ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38306 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4142bceb25e95cc21c95e5f60b053bb87b03bc25 21-Aug-2010 Andreas Färber <andreas.faerber@web.de>

boot_loader_openfirmware: Refactor Jamfile

The frame buffer will need more generic sources than just the text menu.
Adapted from bios_ia32 platform.

Part of ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38301 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b6add3ffb67db23d3c873c4614750a9bd1164be1 25-Jun-2010 Axel Dörfler <axeld@pinc-software.de>

* Renamed remaining .c files to .cpp, and made the necessary changes to let
them compile still.
* Some cleanup in ARM's start2.cpp.
* m68k stuff is still missing, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37249 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd185b4117e06c1674c4d214abc3917acedc560d 01-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

*.c -> *.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34417 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1ea618c556f1becd00729f1184861d5d23a948b0 07-Oct-2007 Jérôme Duval <korli@users.berlios.de>

added BOOT_MODE define instead of adding dprintf_no_syslog()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22478 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f602da2b72be9c948e694de0d89b1bc823b0f106 26-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

* Turned the kernel platform support from a library into an object.
* Moved the Open Firmware function platform_get_next_device() from
the boot loader into the kernel (renamed to of_get_next_device()).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16101 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e55e1a0e666da61eb901533dae4af2ec44d216d8 03-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented the PPC specific RTC support. We search for an "rtc"
device in the Open Firmware implementation of boot loader and
pass its path to the kernel, where it's opened and used for
getting/setting the real time. The expensive atomic_*64() on PPC
32-bit make things a bit more complicated. Moreover, missing
64 bit multiplication and division instructions won't really
allow system_time() to be anywhere near as fast as on x86. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15837 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 957a1b17eb9d13d6dbf164145e82997e16742549 30-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced new build system variables
{HAIKU,HOST,TARGET}_KERNEL_PIC_{CC,LINK}FLAGS which define the
compiler/linker flags specifying the kind of position independence
the kernel shall have. For x86 we had and still have -fno-pic, but the
PPC kernel has -fPIE (position independent executable) now, as we
need to relocate it.
* The boot loader relocates the kernel now. Mostly copied the relocation
code from the kernel ELF loader. Almost completely rewrote the PPC
specific relocation code, though. It's more correct and more complete now
(some things are still missing though).
* Added boot platform awareness to the kernel. Moved the generic
Open Firmware code (openfirmware.c/h) from the boot loader to the kernel.
* The kernel PPC serial debug output is sent to the console for the time
being.
* The PPC boot loader counts the CPUs now and allocates the kernel stacks
(made OF device iteration a bit more flexible on the way -- the search
can be restricted to subtree). Furthermore we really enter the kernel...
(Yay! :-) ... and crash in the first dprintf() (in the atomic_set()
called by acquire_spinlock()). kprintf() works, though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15756 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d561d0ad6889135e08b83c18dede8872a75c6d75 27-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a mini networking stack to the boot loader. It speaks basic ARP,
IP, and UDP, as well as a home brewn UDP based protocol, "remote disk",
which provides random access to a single remote file/device. The Open
Firmware flavored boot loader automatically initializes the net stack,
searches for a remote disk, and tries to boot from it, if the boot
device is a network device (e.g. when loading the boot loader via
TFTP).

This is quite nice for developing with a two-machine setup, since one
doesn't even need to install Haiku on the test machine anymore, but can
serve it directly from the development machine. When the networking
support in the kernel is working, this method could even be used to
fully boot, not just for loading kernel and initial modules.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15689 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44c11fdbc1cda4d29d8ed8eb9585a097f43e6d27 19-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added console support functions required for the generic textual boot
menu. The menu basically works, but has a couple of problems. The
harmless ones are graphical: we get cursor artifacts when the colors
are changed, and the item selection doesn't quite look as it should.
More serious is the lack of Home/End, Page Up/Down keys. All I read from
the console is a '\0' byte when such a key is pressed. The cursor keys
work fortunately. I mapped the functionality of Page Up/Down
additionally to the Left/Right cursor keys. So the menu should be usable
at least. I guess, I'll leave it in that state; Axel wants a graphical
menu anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15589 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 338b8dc301721b1f472e8297a898d4eaa2f2ee3a 29-Oct-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged changes from branch build_system_redesign at revision 14573.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 718b5114e0613a5602d5d6296afeaa7f3ee4b576 13-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

This should fix the build after all the kernel/system renaming.
If anything is still broken (and was not before :)), please shout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12361 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5af32e752606778be5dd7379f319fe43cb3f6b8c 13-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed src/kernel to src/system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12359 a95241bf-73f2-0310-859d-f6bbb57e9c96