Changeset d81e6bdf in mainline


Ignore:
Timestamp:
2006-02-26T12:58:18Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1bedc54
Parents:
3c1dec0
Message:

create ppc32 boot image

Location:
arch/ppc32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc32/Makefile.inc

    r3c1dec0 rd81e6bdf  
    3030
    3131image.boot: kernel
    32         make -C arch/$(ARCH)/loader COMPILER=$(COMPILER)
     32        make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNEL=../../../$(KERNELDIR)/kernel.bin
    3333
    3434clean: clean_kernel
    3535        make -C arch/$(ARCH)/loader clean
    36         -rm -f image.boot
    3736
    3837arch_distclean: distclean_kernel
  • arch/ppc32/loader/Makefile

    r3c1dec0 rd81e6bdf  
    4848
    4949CFLAGS = -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3
     50DEFS =
    5051
    5152SOURCES = \
     
    5758OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
    5859
    59 loader.bin: $(OBJECTS)
    60         $(LD) -no-check-sections -N -T _link.ld $(OBJECTS) -o $@
     60.PHONY: all clean depend
     61
     62all: ../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
     69depend:
     70        -makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
    6171
    6272clean:
    63         -rm -f $(OBJECTS) loader.bin
     73        -rm -f $(OBJECTS) ../image.boot kernel.o Makefile.depend
     74
     75kernel.o: $(KERNEL)
     76        $(OBJCOPY) -I binary -O elf32-powerpc -B powerpc $(KERNEL) $@
    6477
    6578%.o: %.S
  • arch/ppc32/loader/main.c

    r3c1dec0 rd81e6bdf  
    3131#include "ofw.h"
    3232
     33#define KERNEL_LOAD_ADDRESS 0x800000
     34#define KERNEL_SIZE _binary_____________kernel_kernel_bin_size
     35
    3336static void halt(void)
    3437{
     
    3841void bootstrap(void)
    3942{
    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);
    4144       
    42         void *addr = ofw_claim((void *) kernel_load_address, kernel_size, 1);
     45        void *addr = ofw_claim((void *) KERNEL_LOAD_ADDRESS, KERNEL_SIZE, 1);
    4346        if (addr == NULL) {
    4447                printf("Error: Unable to claim memory");
  • arch/ppc32/loader/main.h

    r3c1dec0 rd81e6bdf  
    3030#define __MAIN_H__
    3131
    32 extern unsigned int kernel_size;
    33 extern void *kernel_load_address;
     32extern unsigned int _binary_____________kernel_kernel_bin_size;
     33extern void *_binary_____________kernel_kernel_bin_start;
    3434extern void bootstrap(void);
    3535
Note: See TracChangeset for help on using the changeset viewer.