Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 531 → Rev 532

/SPARTAN/trunk/arch/sparc64/boot/Makefile
0,0 → 1,19
.PHONY: build clean
 
CFLAGS = -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -I../include
 
build: boot.bin
cp boot.bin ../../../load.bin
 
boot.bin: boot.a.out
dd if=/dev/zero of=$@ bs=512 count=16
dd if=boot.a.out of=$@ bs=512 seek=1 conv=notrunc
 
boot.a.out: boot.o
$(LD) -no-check-sections -N -T _link.ld -s boot.o -o $@
 
boot.o: boot.S
$(CC) $(CFLAGS) -c boot.S -o $@
 
clean:
-rm -f boot.o boot.a.out boot.bin ../../../load.bin
/SPARTAN/trunk/arch/sparc64/boot/boot.S
0,0 → 1,34
#
# Copyright (C) 2005 Jakub Jermar
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# - Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# - The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
 
.global start
 
start:
b start
nop
 
/SPARTAN/trunk/arch/sparc64/boot/_link.ld
0,0 → 1,20
/*
* boot[sparc64] linker script
*
*/
 
OUTPUT_FORMAT(a.out-sunos-big)
ENTRY(start)
 
SECTIONS {
.text 0x8000: AT (0x8000) {
*(.text);
*(.rodata);
*(.rodata.*);
*(.data); /* initialized data */
*(.sdata);
*(.sdata2);
*(.sbss);
*(.bss); /* uninitialized static variables */
}
}