Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Andrew-R

macrumors member
Original poster
May 18, 2024
58
10
Hello all!

I was looking at ways to create/test Slackware bootable cd/dvd for NewWorld Power Macs.

I found this LFS hint:


It uses yaboot, and I do not know if Slackware packages from


contain yaboot (seems to be no?)

So I grabbed yaboot ppc binary from finnix-110.iso but I think you can use full debian 8.x installer for that too.

I unpacked finnix-110 iso to temporary directory, changed kernel there and used this command:

mkisofs -r -V F1 -iso-level 4 -chrp-boot -hfs -part -probe -no-desktop -hfs-bless finnix-rebuild/boot/ppc -map finnix-rebuild/boot/ppc/hfs.map -b boot/ppc/yaboot -no-emul-boot -o f-new.iso finnix-rebuild/

And resulting iso booted in qemu-system-ppc!

So, idea is to make ramdisk with usual ppc utilites from Bonslack, and put set of packages there too.

It will be still manual, but better than using yet another cd to install Linux and then install Bonslack into chroot/partition from under it?

There was Slackintosh at some point, may be I can grab its installer (just "dialog" script? bash script using dialog program) and see if it still works with new kernel?

Probably will need some tweaks for package extension change (tgz -> txz) ...

And of course I need to build kernel using Bonslack config. Probably some_other_distro_with_gcc with Bonslack chroot? On host tmpfs mounted via nfs, ha!

Sounds like good project, hopefully wintout unbeatable roadblocks.
 

Get both smaller cd sized (700 mb) iso and now downloading bigger DVD.

edit: for some reason bigger DVD images stops downloading mid-way. But this mirror works:



I already noticed iso folder inside CD image, it contain script for building image.

Well, but inside initrd I see a lot of busybox files, I can keep them for initial tests, and just replace kernel and say put new a/ and ap/ dirs there (and see if I need new tar/xz for unpacking packages. Most likely yes ... I wonder how old busybox will react to new libc for new tar and friends?)

Next downloads - Bonslack itself. (in the background servercentral mirror for void-ppc downloads - 60 Gb already, while I try to limit it with --no-parent)
 
Last edited:

resulted in

FINISHED --2026-01-15 12:18:30-- Total wall clock time: 3h 9m 0s Downloaded: 28409 files, 15G in 2h 30m 52s (1.70 MB/s)

kernel 3.16 from Debian 8.11 boots ok with Slackintosh-12.1 initrd, but it really too modular, with additional modules stored on dvd itself as *.udeb and expanding all of them with "7z x" is too much work for me, considering I can't depmod them correctly (too new depmod on Slackware 15.0 for Slackware 12.1 module tools?)

Also Debian's kernel assume initramfs, I can mount initrd, copy content to some_dir, and run there:

find . | cpio -o -H newc | gzip -9c > ../INITRD-PPC.GZ

But in general I think I'll try to cross-compile my ppc slackware kernel. (without much modules)
 
Ho, of course build instructions were SLIGHTLY wrong for gcc 15.2.0

I used my saved cross compilation line from building x86-64 kernel on i586 Slackware.

Modified line:
Code:
 setarch i686 ../gcc-15.2.0/configure --target=ppc-unknown-linux-gnu --prefix=/opt/ppc --disable-nls --enable-languages=c,c++ --disable-shared --disable-threads --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libatomic --disable-decimal-float --disable-libsanitizer --disable-libvtv --disable-libitm --disable-libcilkrts  --disable-multilib  --disable-libmpx --disable-libstdcxx

then

Code:
setarch i686 make -j4

and then

Code:
setarch i686 make install-strip -j4

now we have our /opt/pcc populated:

Code:
root@slax:/mnt/zip1/cross/build-gcc# ls /opt/ppc/bin/
ppc-unknown-linux-gnu-addr2line   ppc-unknown-linux-gnu-gcc-15.2.0  ppc-unknown-linux-gnu-lto-dump
ppc-unknown-linux-gnu-ar          ppc-unknown-linux-gnu-gcc-ar      ppc-unknown-linux-gnu-nm
ppc-unknown-linux-gnu-as          ppc-unknown-linux-gnu-gcc-nm      ppc-unknown-linux-gnu-objcopy
ppc-unknown-linux-gnu-c++         ppc-unknown-linux-gnu-gcc-ranlib  ppc-unknown-linux-gnu-objdump
ppc-unknown-linux-gnu-c++filt     ppc-unknown-linux-gnu-gcov        ppc-unknown-linux-gnu-ranlib
ppc-unknown-linux-gnu-cpp         ppc-unknown-linux-gnu-gcov-dump   ppc-unknown-linux-gnu-readelf
ppc-unknown-linux-gnu-elfedit     ppc-unknown-linux-gnu-gcov-tool   ppc-unknown-linux-gnu-size
ppc-unknown-linux-gnu-embedspu    ppc-unknown-linux-gnu-gprof       ppc-unknown-linux-gnu-strings
ppc-unknown-linux-gnu-g++         ppc-unknown-linux-gnu-ld          ppc-unknown-linux-gnu-strip
ppc-unknown-linux-gnu-gcc         ppc-unknown-linux-gnu-ld.bfd

Lets see how it cross-compile ....

Edit: without make install-strip gcc eats 1.3 Gb of space. With it complete toolchain is less than 200 Mb.
 
Last edited:
As it turned out provided kernel config

config-huge-6.1.35.ppc32

is not exactly desktop-friendly - no GPU, no audio, no multimedia ...

Rebuilding.

I also unpacked (on Slackware 15.0 i586) some of packages like this:

Code:
root@slax:/mnt/zip1/cross# installpkg --root  bonslack_targetroot ../More_QEMU/bonslack/bonslack.org/bonslack_ppc-current/slackware/a/mkinitrd-1.4.11-ppc-68.txz

But even small amount of a/ only packages lead to 250 Mb big rootfs, so for initrd I need something smaller

root@slax:/mnt/zip1/cross# ls bonslack_targetroot/var/log/packages/
aaa_base-15.1-ppc-2 bzip2-1.0.8-ppc-3 file-5.46-ppc-2 mkinitrd-1.4.11-ppc-68
aaa_glibc-solibs-2.42-ppc-1 coreutils-9.8-ppc-2 grep-3.12-ppc-1 tar-1.35-ppc-1
aaa_libraries-15.1-ppc-44 cpio-2.15-ppc-1 grub-2.12-ppc-18 util-linux-2.41.2-ppc-1
aaa_terminfo-6.5_20250816-ppc-1 e2fsprogs-1.47.3-ppc-1 gzip-1.14-ppc-1 xfsprogs-6.17.0-ppc-1
bash-5.3.003-ppc-1 eudev-3.2.14-ppc-2 lzip-1.25-ppc-1 xz-5.8.1-ppc-1

Code:
root@slax:/mnt/zip1/cross# du -h bonslack_targetroot/ | tail -n 1
229M    bonslack_targetroot/
 
Yes it boots! (on qemu)

Code:
# make ARCH=powerpc CROSS_COMPILE=ppc-unknown-linux-gnu- -j4

Kernel 6.12.51
 

Attachments

  • ppc-kernel-first-boot-slackintosh-qemu.png
    ppc-kernel-first-boot-slackintosh-qemu.png
    310.8 KB · Views: 1
  • config-6.12.51-ppc32.txt
    218.4 KB · Views: 1
Aha, there was missing ramdisk support, I added it and bunch of SCSI

Now it boots into ramdisk-based initrd:

Code:
qemu-system-ppc -kernel vmlinux -initrd /dev/shm/initrd -append "rw"

edit: forgot to set SCSI CDROM as built-in. Now installer can find its own disk at /dev/sr0 (devtmpfs active, so no udev needed)

Code:
qemu-system-ppc -kernel vmlinux -initrd /dev/shm/initrd -append "rw" -cdrom /mnt/zip1/More_QEMU/Slackintosh-12.1/slackintosh-12.1-install-d1.iso
 

Attachments

  • config-6.12.51-ppc32.txt
    224.9 KB · Views: 1
Last edited:
So, I think I needed two yaboot debian patches from


for installing on newer kernel, but it seems to work? Qemu by default does not save nvram, so warning about unability to set boot device in nvram does not affect me?

mac-fdisk was surprizingly simple, on single virtual 2 Gb disk. Just type partition start in blocks, as displayed, and size in M(egabytes). There is no auto-filling size field for remaining free space, but nevermind.

Code:
qemu-system-ppc -M mac99 -hda /dev/shm/slack-ppc-compressed.img -prom-env "boot-device=hd:,\yaboot" -device ati-vga -nic user,model=pcnet

For some reason I can't mount NFS v3 from qemu VM (using default slirp networking), and nic model must be set to pcnet (GEM hang on DHCP). And of course there was difference between 6.21.51 kernel seeing hard drive as /dev/sda and 2.6.24 from Slackintosh still using /dev/hdX notation, but in the end I just edited /etc/yaboot.conf


Slackintosh 12.1's choice of kernel drivers a bit limited, for example no es1370 ALSA driver? There is also no pure OF framebuffer, so I used ati-vga device in qemu. USB audio seems to have issues - driver loads, but alsamixer complains about missed controls, and amp (mpeg audio player) seems to hang on playing audio?

Now I need to learn how to install modern grub :)
 

Attachments

  • slackintosh-full.diff.txt
    78.7 KB · Views: 1
Installed new, crosscompiled kernel 6.12.51 into old Slackintosh 12.1 rootfs/install.

It even works with udev!


I am quite surprized such big jumpt actually works.

But yay, not all API is unstable!

But sadly old XFS (with log=v4) will only be supported until September, 2030, according to kernel message
 
Download mirror.slackware.pl:

Code:
wget -m --no-parent https://mirror.slackware.pl/slackintosh/12.1/

ЗАВЕРШЕНО --2026-01-17 06:27:43--
Общее время: 24m 48s
Загружено: 11929 файлов, 6,5G за 15m 31s (7,13 MB/s)

So, I think you can set this as local (http/ftp) mirror and use slapt-get for (old) software installation

Eh, seamonkey/firefox/thunderbird all were "just" 35-40 Mbytes back in 2008, compared to modern 700+! Openoffice was already was BIG:

# du -h mirror.slackware.pl/slackintosh/12.1/extra/source/openoffice-2.0.4/OOo_2.0.4_src.tar.gz
319M mirror.slackware.pl/slackintosh/12.1/extra/source/openoffice-2.0.4/OOo_2.0.4_src.tar.gz
 
Created bunch of qemu images, showing progress.

slack-ppc-6.12.51-compressed - Slackintosh 12.1 with new kernel
704M

slack-ppc-bonslack-compressed.qcow2 - Bonslack ppc current, with slackpkg (hacked a bit so it works)
571M

Both should contain gcc and friends and work with usual line:

Code:
qemu-system-ppc -M mac99 -hda /dev/shm/slack-ppc-bonslack-compressed.qcow2 -prom-env "boot-device=hd:,\yaboot" -accel tcg,tb-size=256 -device ES1370

 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.