ia64 (Itanium) instruction set simulator. Fork of http://ski.sourceforge.net
GPL-2.0 License
This is ski: an ia64 instruction set simulator
This repository is a fork of: http://ski.sourceforge.net
The license is GPL-2.
See the file 'INSTALL'
Running Ski requires a few moving parts:
build ski-specific linux kernel
prepare disk image of a file system
run ski
Building kernel
The caveat is that upstream removed Ski-specific bits from linux-5.0. Thus latest supported kernel by Ski is 4.19 (see TODOs to get Ski ported to newer kernels).
Once you get ia64-unknown-linux cross-compiler toolchain it is straightforward:
$ wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.19.241.tar.xz
$ tar -xf linux-4.19.241.tar.xz
$ cd linux-4.19.241
$ ARCH=ia64 CROSS_COMPILE=ia64-unknown-linux-gnu- make sim_defconfig
$ ARCH=ia64 CROSS_COMPILE=ia64-unknown-linux-gnu- make -j$(nproc)
The toolchain versions I used to get working setup are:
Newer ones should work as well.
That can be any filesystem supported by guest kernel. sim_defconfig supports ext2 as is. I used fresh Gentoo image to verify it:
$ wget https://bouncer.gentoo.org/fetch/root/all/releases/ia64/autobuilds/20220420T025349Z/stage3-ia64-systemd-20220420T025349Z.tar.xz
$ dd of=sdc if=/dev/zero bs=512 count=10485760 #5G
$ /sbin/mke2fs sdc
$ mkdir mnt
$ mknod /dev/loop0 b 7 0
$ mount -t ext2 -oloop sdc ./mnt
$ cd mnt
$ tar -xpf ../stage3-ia64-systemd-20220420T025349Z.tar.xz
# ignore dev creation failures
$ cd ..
$ umount mnt
Here we created sdc
file and populated it with contents of stage3
.
Once you have got the bits it should just run:
$ bski linux-4.19.241/arch/ia64/hp/sim/boot/bootloader linux-4.19.241/vmlinux root=/dev/sda simscsi=./sd simeth=eth0 init=/bin/bash PATH=/bin rw
...
loading linux-4.19.241/vmlinux...
starting kernel...
Linux version 4.19.241 (root@gentoo) (gcc version 11.3.0 (Gentoo 11.3.0 p4)) #1 SMP PREEMPT Tue May 3 23:52:46 BST 2022
...
root@(none) / # mount -t proc proc /proc
root@(none) / # uname -a
Linux (none) 4.19.241 #1 SMP PREEMPT Tue May 3 23:52:46 BST 2022 ia64 McKinley HP Ski Simulator GNU/Linux
root@(none) / # cat /proc/cpuinfo
processor : 0
vendor : HP Ski Simulator
arch : IA-64
family : 31
model : 0
model name : McKinley
revision : 0
archrev : 0
features : branchlong, 16-byte atomic ops
cpu number : 0
cpu regs : 4
cpu MHz : 2.000
itc MHz : 2.000000
BogoMIPS : 1.23
siblings : 1
The goal of this fork is to keep ski running on modern systems. This include but is not limited to:
New additions:
Last versions supported by the toolchain:
glibc-2.38
, removed in https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=460860f457e2a889785c506e8c77d4a7dff24d3e
linux-6.6
, removed in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cf8e8658100d4eae80ce9b21f7a81cb024dd5057
gcc-13
, still not removed as of 2024-01-08binutils-2.41
, still not removed as of 2024-01-08Port from ski-specific virtual devices to more standard VIRTIO:
Bring CPU emulator up to the state where we could include it in qemu
stop requiring 'bootloader' and be able to run unmodified ia64 kernel
covert doc/ documentation into something closer to plain text