#!/bin/bash ##bisognerebbe fare un makefile ma per ora: if [ ! $# == 1 ]; then echo "usage: compila nome_file (without extension)" exit 0 fi #assembla il boot.S /opt/sparc64-sun-solaris2.8-toolchain/bin/sparc-sun-solaris2.8-as -64 boot.S -o boot.o ## compila con ISA SPARC-V9 /opt/sparc64-sun-solaris2.8-toolchain/bin/sparc64-sun-solaris2.8-gcc -m64 -ffreestanding -nostdinc -Os -c $1.c ## linka con ISA SPARC-V9 a 64 bits echo "create $1.bin" /opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/ld -melf64_sparc --script linker.lds boot.o $1.o -o $1.bin ## fa il dump del file /opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/objdump -d $1.bin >$1.dump ### crea memory.hex echo "create memory_hello.hex for simulation" ../tools/dump2hex.php <$1.dump >../sim/memory_hello.hex