source: XOpenSparcT1/trunk/tools/compila @ 33

Revision 33, 851 bytes checked in by pntsvt00, 14 years ago (diff)

checkpoint

Line 
1#!/bin/bash
2
3##bisognerebbe fare un makefile ma per ora:
4
5if [ ! $# == 1 ]; then
6                  echo "usage: compila nome_file (without extension)"
7                  exit 0
8fi
9
10
11#assembla il boot.S
12/opt/sparc64-sun-solaris2.8-toolchain/bin/sparc-sun-solaris2.8-as -64 boot.S -o boot.o
13
14## compila con ISA SPARC-V9
15/opt/sparc64-sun-solaris2.8-toolchain/bin/sparc64-sun-solaris2.8-gcc -m64 -ffreestanding -nostdinc -Os -c $1.c
16
17## linka con ISA SPARC-V9 a 64 bits
18echo "create $1.bin"
19/opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/ld -melf64_sparc --script linker.lds boot.o $1.o -o $1.bin
20
21
22## fa il dump del file
23/opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/objdump -d $1.bin >$1.dump
24
25### crea memory.hex
26echo "create memory_hello.hex for simulation"
27
28../tools/dump2hex.php <$1.dump >../sim/memory_hello.hex
Note: See TracBrowser for help on using the repository browser.