8 captures
07 Jun 2010 - 29 Jul 2012
Jan FEB Mar
29
2011 2012 2013
success
fail
About this capture
COLLECTED BY
Organization: Internet Archive
The Internet Archive discovers and captures web pages through many different web crawls. At any given time several distinct crawls are running, some for months, and some every day or longer. View the web archive through the Wayback Machine.
Crawl of outlinks from wikipedia.org started February, 2012. These files are currently not publicly accessible.
TIMESTAMPS
The Wayback Machine - https://web.archive.org/web/20120229133259/http://hub.opensolaris.org/bin/view/Project+ppc-dev/kickstart
Kickstarting OpenSolaris on PowerPC
en

Kickstarting OpenSolaris on PowerPC

Overview of the Kickstart

Sun Labs is providing a kickstart to the code base for OpenSolaris on PowerPC. While there has been much discussion and perhaps some confusion from the beginning of OpenSolaris about PowerPC, Power and what progress has actually been made towards the goal of a full port, the contribution here on this project is essentially the tangible work in progress.

What it is now

  • 32bit - G4 class processor
  • big endian ordering
  • single processor
  • statically linked unix/genunix
  • kernel boot up to vfs_mountroot
  • cross compile environment on x86 host to PPC based target
  • debug with printf(), PMDB or Metrowerks PowerTAP or ABI2000 w/GDB
  • will run on Genesi ODW with 7457, EFIKA or PowerMac G4, MacMini
  • GCC and GNU toolchain dependent
  • fully open source in PPC platform, arch and psm

What it is not (at the moment)

  • 64 bit
  • MP
  • legacy support for the 2.5.1 apps or targets
  • Sun Studio / Tools compatible
  • finished or complete solaris consolidation for the architecture

Sun Labs will continue to work on this code base with the community and will assist interested developers to get started. Below are notes gathered when we first started and expect that people new to this project will find them useful.

General Integration Approaches

Much has changed in Solaris since the original 2.5.1 PowerPC release and that source is extremely dated. Above all the amount of effort required to legally review the source in order to release it, was prohibitive, thus Sun chose not to include it in OpenSolaris. Additionally the relevant parts of that source have already been incorporated into the contribution.

Copy and modify
--
Many aspects of the code development with the Solaris on PowerPC project are made by copying existing code and modifying. It is a judgement call, made on a case-by-case basis, what existing code to use as the starting point.

Sometimes, it is best to start from the old Solaris/PPC 2.6 code. This is almost always appropriate for small leaf nodes that deal more with instruction-set architecture, which has not changed much over the last decade. Other times, it seems better to start with modern (ONNV) code for another processor, and modify for PowerPC. This is more appropriate for things that interact with operating system services, where the interfaces may have changed considerably.

Then, there is the question of which processor to use as a starting point. Our current work on 32-bit PowerPC is more like x86 in some ways, but more like Sparc in other ways.

PowerPC is more like x86:

  1. Both are 32-bit only. Yes, there are 64-bit PowerPC machines, but we are not porting to those, yet. Yes, there are 64-bit x86 machines, but that is practically a different ISA, so we need not consider that for our purposes, here.
  2. Both are little-endian, see note:1 , so layout of some data structures can be cribbed off of IA32 code.
  3. Both carve out a portion of each userland process address space for the kernel address space, whereas sparc has its own completely separate kernel address space.
    1.There is no dynamic reconfiguration to deal with, so physical memory management is easier.

PowerPC is more like sparc:

  1. Both are big-endian, see note:1, so layout of some data structures can be cribbed off of sparc code.
  2. Both have 32 general-purpose (integer) registers, whereas x86 has significantly fewer registers and almost none are truly general-purpose. And, as a consequence ...
  3. Both almost always pass all function arguments in registers, whereas x86 must almost always pass arguments on the stack.
  4. Both have 32-bit, 64-bit, and 128-bit binary IEEE 754 floating-point and a set of directly addressed floating-point registers, whereas x86 has its own 80-bit extended format, and has a mixed bag of floating-point stack and SSE registers.
  5. Both use some form of OpenFirmware.

note:1 PowerPC can work in big-endian or little-endian mode. Solaris/PPC supports both. Solaris 2.6 code was little-endian only; Solaris 2.11 code is big-endian, but code is written to work both ways. Some libc functions were built using a merge of x86 and sparc code for 2.11, and Tim Marsland's 2.6 PPC big-endian workspace.

Building the Sources, Making it all Work

This is just a quick guide listed here.

The assumption is that you have already a working Solaris x86 host with GCC and the tools setup on it. You have downloaded and extracted the latest source tarball or pulled from the ppc-dev/ppc-dev svn workspace, now you need to make it all. You must configure your polaris.sh script and if this is the first time you building a fresh workspace you must run setup-polaris. These steps are outlined in a bit more detail the README.polaris file.

If your using the ODW or the EFIKA as your target you will need to run VOF (Virtual Open Firmware). A little more detail on VOF can be found at the task map page

Next thing is to build NFS boot which produces the binary inetboot This is the 2nd level bootstrap that is loaded by OpenFirmware. When inetboot is started it will prompt you for the kernel you want to download. In the source tree look at the README.inetboot notes which will not only help you build it but also setup your tftp and nfs server.

Build your kernel using these steps in this order


in usr/src/uts/make install~_h
in usr/src/head/make install~_h
in usr/src/stand/make install
in usr/src/psm/make install
in usr/src/uts/make install

More details on these notes can be found in README.polaris, or if there are still questions post them on the discussion list. The final binary will be created and found in usr/src/uts/chrp/unix/debug32 and in your $ROOT/platform/kernel. Then copy up your proto_root to your nfsroot dir and you're good to go.

Static Linking: The current makefile will do a post build link of unix
and genunix for one large bin. This was done to assist the Metrowerks debugger with location of symbols. KRTLD will still do all the module run time linking. This is now done as part of the overall make process, but it is fairly straightforward to return to the separate unix / genunix approach. KRTLD will still do it's job stitching it all together.

Target Download and Booting the Kernel

Currently the kernel boots progresses to the point of loading and executing a hand coded $ROOT/sbin/init on the Genesi ODW workstation. This involves mounting a network root file system and then will load and exec the test init app. You can see a sample output of the target's console at the Status Page.

So simply put to get to the same point as we are you first need an Pegasos ODW Workstation and a tftpboot, nfsroot server. We typically use our solaris x86 host development system as the target server, but we have also a Debian Linux x86 box as a target server also. Once that is setup and you have a built kernel, you need to populate your nfsroot with your created proto_root. You also need

openfirmware - binary provided on the Project Extras Page

inetboot - built and found in usr/src/psm/stand/boot/ppc/chrp

Once the ODW has booted you need to alternately set the irq routing. We have multiple irqs on 9 and have to manually move the RHINE irq. Enter the following on the command line

The above will load VOF from the tftpboot, then type


boot net -v

This will load inetboot and you're off and running. If you have our handcoded init in your sbin dir, it should load and exec.

Target Limitations

Currently the focus has been on the ODW target. The kernel will load on Macs and the EFIKA board but wil panic much earlier due to specific PIC and decrementer initialization work that needs to be completed.

History of Solaris on PowerPC

PPC/Solaris 2.51 release 1995-1997, it was a full up release and functional. Further development was continued into 2.6 but dropped during this release cycle. We here in the Labs have access to many of the team personnel that did this port and fortunately have worked with them directly on other projects. These critical relationships were important to leverage. We have access to the source for all of this, but the community does not. It appears that much of this code is essentially unusable in a direct sense but some parts do have relevant. It was not possible or even practical to release the 2.6 source base.

ON source code gates and releases


gate OS Solaris
~----
on495-gate 5.5 2.5
on596-gate 5.5.1 2.5.1
on297-gate 5.6 2.6
on998-gate 5.7 2.7
on29-gate 5.8 2.8
on81-gate 5.9 2.9
on10-gate 5.10 10
onnv-gate 5.10.1 10.1 ?

ON gates contain no systematic self-describing information. This table was built using information dug up by hand, from some combination of three methods:

  1. browse public/README
  2. browse public/schedule
  3. extract RELEASE variables from the corresponding tools gate
  • Quick and dirty list of OS release number and date
  • Relies on convention that each "modern" release of
  • Solaris has a corresponding tools directory and it contains templates for build environment in a standard location.
  • Does not work for anything prior to 5.8
    Also, -patch-tools is more reliable for determining original release information, because for some reason release dates are kept "up to date" in the non-patch version of the tools gate.

What internal ON gates have support for PowerPC?


on297-gate/usr/src/uts/ppc
on596-gate/usr/src/uts/ppc

Build Environment

We have started with GCC as the basic tool chain the community initially developed an x86 build environment on x86 solaris box. The long term goal of self hosting is still a ways off. Full GCC support for the OpenSolaris source is complete and GCC is required since the Sun Workshop tools do not put out PPC binaries. The community has played a big part in getting this environment up and source compilation with PPC output functioning.

binutils 2.16.1
gcc 3.4.3

Hardware/Target Tools

Sun Labs has been using the Metrowerks PowerTAP to bring up low levels parts of the kernel until the Virtual Memory Manager is up. It will essential to discuss further how the tools can be used once protected memory is in order. Metrowerks has a kernel aware debugger that can be interfaced with Solaris. We have had discussions with Freescale on how exactly this can be achieved. There is a doc that describes the interface to the kernel. KMDB is important to get functional early on. We also have GDB via serial console and Abatron BDI 2000 with GDB support.

  • Notes on target debugging.

With the OpenSolaris on PowerPC project we have been working with a few targets to date. The ODW from Genesi and the PowerMacs/MacMini from Apple. The http://www.opensolaris.org/os/project/ppc-dev/ page has more detailed information on these targets. The basic requirement is that a target runs OpenFirmware.
--

  • Debugger Options

We have 2 at this time. Good old console output that can be seen from the serial port on the ODW or directly to the display if you're using a PowerMac based target. The second choice and the way most of this early development has been done, is with the Metrowerks Codewarrior JTAG debugger from Freescale. This is a HW emulator and IDE that is hosted on a Linux system and downloads the kernel or it's associated pieces (inetboot, krtld, etc) directly to the target's memory, jump to entry and run. You have full source level debugging, stepping, breakpoints and a rich set of tools that give you insight into all levels of the hardware, regs, memory I/O, etc.

For general info and overview go to Metrowerks TAP

In order to use this tool the target hardware needs to have the JTAG port "brought out" to a pins that can be accessed with the emulators connector. The ODW has this option designed in, unfortunately the PowerMacs do not. All of our low level bringup has been done on the ODW board. We expect that the community will be using the printf approach until KMDB or GDB is up on the target.

Why Sun Labs?

Sun Labs was uniquely positioned to be a main player in this early effort because of it's PPC HW & tools expertise, embedded experience, relationships internally and externally and past history. Sun Labs is about research yet the team here found many aspects of this project beneficial this effort is generally straightforward knowing that a Solaris PPC port was done in 1995. Sun Labs will act as a direct interface between the community and Sun internals providing information, source and resources that cannot be gained otherwise.

Sun Labs Goal for the 1st Release

We will focus on the areas such that enough of a kernel is booting to allow the community to be effective. The community has chosen the Genesi PegasosII based ODW with the Freescale MPC7447 as the cpu. This is a community effort but we are focusing on the pieces that we feel that Sun Labs can contribute to directly and have coordinated these efforts. The immediate goal that the Sun Labs team is committed to with the OpenSolaris PPC community is achievement of a booting, initialized and functional OpenSolaris kernel on a 32 bit PPC architecture with KMDB, GDB, network connection and a serial console in hopefully a reasonable timeframe.

Tags:
Created by admin on 2009/10/26 12:17
Last modified by admin on 2009/10/26 12:17

XWiki Enterprise 2.7.1.34853 - Documentation