-
-
Save bspguy/8ac347f8a599add88a5fa611865fef22 to your computer and use it in GitHub Desktop.
Building PPC Linux code using QEMU on Ubuntu 18.04 LTS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Building Debina 10 QEMU instance..." | |
wget https://cdimage.debian.org/cdimage/ports/10.0/powerpc/iso-cd/debian-10.0-powerpc-NETINST-1.iso | |
sudo apt install qemu | |
# Create new disk for install | |
qemu-img create -f qcow2 debian10.qcow2 2000M | |
# Boot the install image | |
qemu-system-ppc -L pc-bios -boot d -M mac99 -m 1024 -net nic,model=sungem -net user -hda debian10.qcow2 -cdrom ./debian-10.0-powerpc-NETINST-1.iso -g 1024x768x8 | |
# Run the image | |
qemu-system-ppc -L pc-bios -boot c -prom-env "boot-device=hd:,\yaboot" -prom-env "boot-args=conf=hd:,\yaboot.conf" \ | |
-M mac99 -m 1024 -net nic,model=sungem -net user -hda debian10.qcow2 -g 1024x768x32 | |
echo "Building lUbuntu 16.04 QEMU instance..." | |
#wget http://cdimage.ubuntu.com/releases/14.04/release/ubuntu-14.04.6-server-powerpc.iso | |
wget http://cdimage.ubuntu.com/lubuntu/releases/16.04.1/release/lubuntu-16.04-desktop-powerpc.iso | |
qemu-img create -f qcow2 lubuntu14.qcow2 2000M | |
qemu-system-ppc -L pc-bios -boot d -M mac99 -m 1024 -net nic,model=sungem -net user -hda lubuntu14.qcow2 -cdrom lubuntu-14.04.5-desktop-powerpc.iso | |
qemu-system-ppc -L pc-bios -boot c -prom-env "boot-device=hd:,\yaboot" -prom-env "boot-args=conf=hd:,\yaboot.conf" -M mac99 -m 1024 -net nic,model=sungem -net user -hda lubuntu14.qcow2 -cdrom lubuntu-14.04.5-desktop-powerpc.iso | |
#Building u-boot for PPC | |
echo "Building U-Boot for QEMU..." | |
sudo apt install gcc-powerpc-linux-gnu | |
git clone https://git.denx.de/u-boot.git | |
make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- qemu-ppce500_defconfig | |
make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- | |
#qemu-system-ppc -machine help | |
#qemu-system-ppc -cpu help | |
qemu-system-ppc -M ppce500 -m 1024 -nographic -kernel ./u-boot | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment