Changeset d81e6bdf in mainline
- Timestamp:
- 2006-02-26T12:58:18Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1bedc54
- Parents:
- 3c1dec0
- Location:
- arch/ppc32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ppc32/Makefile.inc
r3c1dec0 rd81e6bdf 30 30 31 31 image.boot: kernel 32 make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) 32 make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNEL=../../../$(KERNELDIR)/kernel.bin 33 33 34 34 clean: clean_kernel 35 35 make -C arch/$(ARCH)/loader clean 36 -rm -f image.boot37 36 38 37 arch_distclean: distclean_kernel -
arch/ppc32/loader/Makefile
r3c1dec0 rd81e6bdf 48 48 49 49 CFLAGS = -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 50 DEFS = 50 51 51 52 SOURCES = \ … … 57 58 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 58 59 59 loader.bin: $(OBJECTS) 60 $(LD) -no-check-sections -N -T _link.ld $(OBJECTS) -o $@ 60 .PHONY: all clean depend 61 62 all: ../image.boot 63 64 -include Makefile.depend 65 66 ../image.boot: depend $(OBJECTS) kernel.o 67 $(LD) -no-check-sections -N -T _link.ld $(OBJECTS) kernel.o -o $@ 68 69 depend: 70 -makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null 61 71 62 72 clean: 63 -rm -f $(OBJECTS) loader.bin 73 -rm -f $(OBJECTS) ../image.boot kernel.o Makefile.depend 74 75 kernel.o: $(KERNEL) 76 $(OBJCOPY) -I binary -O elf32-powerpc -B powerpc $(KERNEL) $@ 64 77 65 78 %.o: %.S -
arch/ppc32/loader/main.c
r3c1dec0 rd81e6bdf 31 31 #include "ofw.h" 32 32 33 #define KERNEL_LOAD_ADDRESS 0x800000 34 #define KERNEL_SIZE _binary_____________kernel_kernel_bin_size 35 33 36 static void halt(void) 34 37 { … … 38 41 void bootstrap(void) 39 42 { 40 printf("\nHelenOS PPC Bootloader\nKernel size %d, load address %L\n", kernel_size, kernel_load_address);43 printf("\nHelenOS PPC Bootloader\nKernel size %d, load address %L\n", KERNEL_SIZE, KERNEL_LOAD_ADDRESS); 41 44 42 void *addr = ofw_claim((void *) kernel_load_address, kernel_size, 1);45 void *addr = ofw_claim((void *) KERNEL_LOAD_ADDRESS, KERNEL_SIZE, 1); 43 46 if (addr == NULL) { 44 47 printf("Error: Unable to claim memory"); -
arch/ppc32/loader/main.h
r3c1dec0 rd81e6bdf 30 30 #define __MAIN_H__ 31 31 32 extern unsigned int kernel_size;33 extern void * kernel_load_address;32 extern unsigned int _binary_____________kernel_kernel_bin_size; 33 extern void *_binary_____________kernel_kernel_bin_start; 34 34 extern void bootstrap(void); 35 35
Note:
See TracChangeset
for help on using the changeset viewer.