Quantcast
Channel: Astr0baby's not so random thoughts _____ rand() % 100;
Viewing all articles
Browse latest Browse all 183

pkgsrc 2020Q3 on PPC64 MacPro G5

$
0
0
Text only friendly version @ http://45.76.81.249/PPC64/Linux/


  - The following entry is dedicated to a Linux PPC64 (Big Endian) platform 
  - All was done on a legendary PowerMac G5  


 Binary pkgsrc PPC64 (64bit ABI) selected packages for Linux PPC64 (glibc based distros) 

 pkgsrc 2020Q3 packages were compiled using native build GCC 10.2.0 and are 64bit 
 all are linked against the older legacy  (Ubuntu GLIBC 2.23-0ubuntu11.2) 2.23  
 so it should work fine on ppc64 distros using this version of glibc and above 

 I have tested the builds on -current OpenSUSE Tumbleweed (September 2020) PPC64 
 and it works just fine. 

 On the Ubuntu 16.04 PPC64 make sure you have 64bit libc installed  

 	linux-vdso64.so.1 =>  (0x00003fff86ed0000)
	libc.so.6 => /lib64/libc.so.6 (0x00003fff86ca6000)
	/lib64/ld64.so.1 (0x00003fff86ea5000)


root@ubuntu-ppc64:/home/user/SRC# dpkg -l | grep libc6 
ii  libc6:powerpc                          2.23-0ubuntu11.2                           powerpc      GNU C Library: Shared libraries
ii  libc6-dbg:powerpc                      2.23-0ubuntu11.2                           powerpc      GNU C Library: detached debugging symbols
ii  libc6-dev:powerpc                      2.23-0ubuntu11.2                           powerpc      GNU C Library: Development Libraries and Header Files
ii  libc6-dev-powerpc-cross                2.23-0ubuntu3cross1                        all          GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii  libc6-dev-ppc64                        2.23-0ubuntu11.2                           powerpc      GNU C Library: 64bit Development Libraries for PowerPC64
ii  libc6-dev-ppc64-powerpc-cross          2.23-0ubuntu3cross1                        all          GNU C Library: 64bit Development Libraries for PowerPC64 (for cross-compiling)
ii  libc6-powerpc-cross                    2.23-0ubuntu3cross1                        all          GNU C Library: Shared libraries (for cross-compiling)
ii  libc6-ppc64                            2.23-0ubuntu11.2                           powerpc      GNU C Library: 64bit Shared libraries for PowerPC64
ii  libc6-ppc64-powerpc-cross              2.23-0ubuntu3cross1                        all          GNU C Library: 64bit Shared libraries for PowerPC64 (for cross-compiling)


HOW TO USE THE REPOSITORY 
-------------------------

 I have uploaded the compiled GCC 10.2.0 and compiled/bootstraped pkgsrc-2020Q3 to my repo so if you do not want to compile 
 the packages yourself, you can use the pre-build tarballs 


SPECIFIC STEPS FOR Ubuntu 16.04 PPC64 on the G5 
-----------------------------------------------
  - on other pure glibc based PPC64 systems omit the 1.1 step 

 
1.1) Steps to prepare: 
     ------------------
     sudo su - 
     apt-get install libc6-ppc64 libc6-dev-ppc64 libc6-dev-ppc64-powerpc-cross libc6-ppc64-powerpc-cross 

1.2) Get pkgsrc binary tarball 
     pkgsrc documentation - https://www.netbsd.org/docs/pkgsrc/ 
     -------------------------
     sudo su -  
     cd /usr 
     apt-get install wget    (or curl or whatever to download the tarballs) 
     wget http://45.76.81.249/PPC64/Linux/pkg.tar.gz  
     gunzip pkg.tar.gz
     tar -xvf pkg.tar
      
     
1.3) Get GCC 10.2.0 and binutils for PPC64 
     -------------------------------------
     sudo su - 
     cd /usr/local 
     wget http://45.76.81.249/PPC64/Linux/gcc-10.2.0.tar.gz
     gunzip gcc-10.2.0.tar.gz
     tar -xvf gcc-10.2.0.tar 
     cd /opt
     wget http://45.76.81.249/PPC64/Linux/opt.tar.gz 
     gunzip opt.tar.gz
     tar -xvf opt.tar 

     // Setup LDCONF and paths so that we can use the GCC in the future 
     // Make sure to add the following new patsh to /etc/ld.so.conf.d/gcc and gcc64 (create the files)  

     root@ubuntu-ppc64:/etc/ld.so.conf.d# cat gcc.conf 
     /usr/local/gcc-10.2.0/lib
     root@ubuntu-ppc64:/etc/ld.so.conf.d# cat gcc64.conf 
     /usr/local/gcc-10.2.0/lib64
 
     ldconfig 

     Adjust paths to add  /usr/local/gcc-10.2.0/bin if you wish to use GCC 10.2.0 for your projects   
 
1.4) Start using pkgin 
     ------------------
     // Full official documentation for pkgin is available here https://pkgin.net/ 
     // So now that we have binary /usr/pkg installed we can setup some packages 
     // by adding the remote repository to the /usr/pkg/etc/pkgin/repositories.conf 
   
     # Remote http repository
     #
     http://45.76.81.249/PPC64/Linux/pkgsrc/2020Q3/All   
    
     // Once we have this in place we can update the pkgin cache and sync it with online repo 

     /usr/pkg/bin/pkgin update 

     // Search and install some packages 

     /usr/pkg/bin/pkgin install dunelegacy    

     // Please note the /usr/pkg paths - this is where the new packages get installed 
     // So if needed adjust the paths or just remember to use /usr/pkg/bin   prefix 
     // All packages are 64bit PPC64 binaries !!! 

1.5) Some notable packages you can try 

     // Packages here are just an experiment to learn how to build pkgsrc packages 
     // on non Intel platforms 

     > Development Languages 
       LLVM10
       clang10 
       rust 
       python37 
       python27 
       php73 
       nodejs8  
   
     > Browsers 
       Links 
       Dillo 

     > Games 
       devilutionx (Diablo 1 - needs datafiles )  
       alephone
       scummvm (Play good old DOS games)  
       iortcw  (Return to Castle Wolfenstein - needs datafiles )  
       rott (Rise of Triad - needs datafiles) 
       tyrquake (Quake 1 - needs datafiles) 
       chocolate-doom (Doom,Hexen,Heretic) 
       prboom (Doom1/2)  
       prboom-plus (Doom1/2)
       dhewm3 (Doom3 - needs data files - issues on BigEndian systems - no menu text) 
       dunelegacy (Dune II - needs datafiles) 

      > Security 
        OpenSSH 8.3.1 
         
      ...and many more ....  
 
Some notes on the PowerMac G5 Ubuntu 16.04 Linux 
------------------------------------------------
AUDIO
-----
To get audio working make sure you load the following modules 

apm_emu
snd_aoa
snd_aoa_soundbus
snd_aoa_i2sbus
snd_aoa_fabric_layout
snd_aoa_codec_tas
snd-pcm-oss 

Unmute the powermac specific sound device in alsamixer 

GRAPHICS 
--------
To get SDL2 working properly from pkgsrc make sure to install libudev-243 !!! 

/usr/pkg/bin/pkgadd libudev-243  

The G5 I use comes with  Advanced Micro Devices, Inc. [AMD/ATI] RV350 [Radeon 9550/9600/X1050 Series]  
and some games do not seem to work with this hardware or are buggy 
 - Yquake2 
 - Cube 2: Sauerbraten 
 
But other games perform really well - especially 
 - iortcw (Return to Caslte Wolfenstein) 
 - tyr-quake 
 - SDL1.2 based games 
 - SDL2 based games (sometimes there are sound issues)  
 - Pentagram (Ultima VIII) 
 - RoTT (Rise of the Triad) 
 - Prboom/Prboom-pro/Chocolate-Doo/Hexen/Heretic
 - UFO  
   (you need to fix the /usr/pkg/bin/ufo script after installation) 
    // cd /usr/pkg/share/ufoai; ./ufo $*; exit $?
 - DevillutionX (Diablo1) 
 - DuneLegacy (Dune II) 
 - SCUMMVM 

  
 
P.S the package list is still Work in Progress so I will add some more over time 
   
Hope somebody will enjoy this as much as I did :) 

Viewing all articles
Browse latest Browse all 183

Trending Articles