#!/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 echo "create boot.o" /opt/sparc64-sun-solaris2.8-toolchain/bin/sparc-sun-solaris2.8-as -xarch=v9 -64 boot.S -o boot.o ## compila con ISA SPARC-V9 echo "compile $1.c" /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 ### da codice S1 /opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/ld -melf64_sparc --script=linker.map -EB -o $1.bin boot.o $1.o ## fa il dump del file /opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/objdump -zD $1.bin >$1.dump ### crea memory.hex echo "create memory_hello.hex for simulation" ../tools/dump2hex.php <$1.dump >../sim/memory_hello.hex