Some PPC/Linux packages













Last change at 3. of June, 2001




I have a PowerPC Board with an 823e, a controller with several on board peripherals like
  • PCMCIA port
  • LCD controller
  • Ethernet
  • Memory interface
  • Some serial interfaces
  • lots of other stuff
  • Above you can see the board.

    To get some software running on this board, you first need a kernel. I use a 2.4.4 especially adapted for the Board. I got it from Denx, their ftp area is here: Denx FTP Server. Some parts of the patches (for glibc & gcc) come from there, too.

    You'll also need several other packages, they will be either needed for the host software or to be compiled for the target. You need them all (zipped or bzip2'ed) in one directory.
  • ppcboot-0.9.2 To boot a kernel from Network or from Flash or Hard disk, or ... get it from Denx's FTP area
  • binutils-2.9.5.0.22 As cross assembler for the target
  • gcc-core-2.95.2 As a cross compiler for the target
  • gcc-2.95.2 For compiling C, C++ with libc
  • glibc-2.1.2 If you want to write normal C and C++ programs you'll need this.
  • glibc-linuxthreads-2.1.2 Patch for Thread support
  • glibc-crypt-2.1.2 Patch for Cryptographic support
  • gdb-5.0 Optional, really makes sense if you have a parallel port adapter to access a PowerPC. Don't get this mixed up with the parallel port adaptor on my web site, that one definitely NOT for PowerPC.
  • MPCBDM Optional, you'll need it with a PowerPC parallel port adapter
  • modutils-2.4.3 Optional, if you use a kernel with modules
  • e2fsprogs-1.19 E.g. for making file systems on flash cards or hard disks
  • zlib-1.1.3
  • sash-2.1 The "stand alone shell", needed to give commands to the board
  • sh-utils-2.0 Some shell utilities
  • file-3.20.1utils Some file utilities
  • textutils-2.0 Some text utilities
  • findutils-4.1 The "find" program
  • gawk-3.0.6 "Awk" for the target
  • sed-3.02 "Sed" for the target
  • bash-2.04 bash can be started from within sash, but bash is much more comfortable. As long as there's no "/etc/init".
  • GNU make-3.79.1 To compile some packages directly on the target.
  • grep-2.4.2 The "grep" command
  • gzip-1.2.4a
  • tar-1.13
  • m4-1.4
  • diffutils-2.7
  • flex-2.5.4a
  • bison-1.28
  • file-3.20.1

  • I have a directory "powerpc-linux" as a toplevel directory. This is the working directory and it has some subdirectories:
  • nfsroot The NFS root directory, export it via NFS.
  • usr With several subdirectories, for compiling the packages and so on...
  • patches Some packages need patches to compile for the target. They are stored here.
  • tools The host targets/tools like "gcc", "as" and so on are stored here.
  • The Makefile (28184 Bytes)>Makefile consists of several sections, TAKE A LOOK AT IT, DON'T USE IT AS IT IS, THAT MAY DAMAGE YOUR HOST FILE SYSTEM!!!
    First, there are some definitions in it. You'll need to change the variable TM_ARCHIVE_DIR to match the location of all the packages described above. ALSO DON'T CHANGE THE DIRECTORY VARIABLES TO LOWERCASE LETTERS WITHOUT TRIPLE CHECKING AND FULL BACK UP OF YOUR HOST FILE SYSTEM. E.G. A "LIB" IN UPPERCASE WON'T OVERWRITE YOUR "/lib". IT WAS NO FUN, WHEN SOME PACKAGES' MAKEFILE IGNORED "--prefix" and "DESTDIR=" AND OVERWROTE MY "/lib" ON THE HOST FILE SYSTEM WITH "ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1, not stripped". I wasn't able to boot my PC any more.

    The definitions of some variables for all the different packages follows. These definitions work like this, a short example:
  • I define a variable "binutils-dir".
  • If the target of some operation in a Makefile is "binutils", the automatic variable "$@" is set to "binutils".
  • If i now refer to "$($@-dir) this is expanded to the value of "binutils-dir". This mechanism helps a lot to shorten the Makefile.
  • After the definitions for the packages, the definitions of some standard commands follow. There are commands for unpacking, configuring, patching and so on defined. After that, all simple targets are categorized, this depends on what commands are necessary to compile and install them. The main targets are these:
  • TOOLS The tools for the host system and the filling of the NFS root file system. You'll be able to boot a kernel, and get a shell (sash).
  • UTIL With the compiled packages you'll have a comfortable shell and be able to give some commands.
  • NATIVE Doesn't work yet reliable, try to compile a tool chain that runs ON the target FOR the target.
  • NEXTRACT This doesn't work yet. Extract some packages into the NFS file system, so the target can compile some packages on its own.
  • When you compile UTIL, you'll be asked for the root pasword twice, first to install a /dev for the target and have correct modes. Second, to have some programs in "util-linux" installed with root access rights. You can also make any target directly, no need to do it all from scratch.

    If you have any comments, please don't hesitate to write me an email, my address is here: Address.

    And finally, here's the directory structure, the Makefile, the patches and the kernel configuration: powerpc-linux.tbz2 (563047 Bytes).

    A short description on how to export the root file system via NFS
    I use "DHCPD" to boot the kernel, enable it in your system configuration. On my system it's the variable "START_DHCPD=YES" in SuSEs configuration tool "yast". Add a line like this in "/etc/inetd.conf":
    tftp	dgram   udp	wait    nobody	/usr/sbin/tcpd  in.tftpd  /powerpc-linux/nfsroot
    

    Also have a file "/etc/dhcpd.conf", mine looks like this:
    option domain-name "qwe.de";
    option domain-name-servers schleim.qwe.de;
    
    option subnet-mask 255.255.255.0;
    default-lease-time 600;
    max-lease-time 7200;
    
    subnet 192.168.0.0 netmask 255.255.255.0 {
      range 192.168.0.3 192.168.0.10;
      option broadcast-address 192.168.0.255;
    
      host mpc823 {
        hardware ethernet 00:d0:93:00:03:c7;
        fixed-address mpc823.qwe.de;
        filename "/powerpc-linux/nfsroot/images/ppckernel";
        server-name "schleim.qwe.de";
      }
    }
    

    Also add a line like this to your "/etc/exports":
    /powerpc-linux/nfsroot		mpc823(rw,no_root_squash)
    

    Restart the appropriate services/daemons or restart your box to activate these changes.