Remove obsolete KERNEL_ARCH/TARGET_???

This commit is contained in:
Laurent Vivier 2004-06-16 17:22:22 +00:00
parent f2d141f2c4
commit 40876f5e73
3 changed files with 11 additions and 39 deletions

View File

@ -4,7 +4,7 @@
# #
PACKAGE = emile PACKAGE = emile
VERSION = 0.4 VERSION = 0.5CVS
# kernel boot arguments # kernel boot arguments
@ -16,7 +16,7 @@ else
# NFS boot # NFS boot
#KERNEL_ARGS="root=/dev/nfs ip=dhcp nfsroot=192.168.100.1:/nfsroot rw" #KERNEL_ARGS="root=/dev/nfs ip=dhcp nfsroot=192.168.100.1:/nfsroot rw"
# SCSI boot # SCSI boot
KERNEL_ARGS="root=/dev/sda4" KERNEL_ARGS="root=/dev/sda2"
endif endif
# build info # build info
@ -43,7 +43,6 @@ OBJCOPY=$(CROSS_COMPILE)objcopy
KERNEL=vmlinux KERNEL=vmlinux
FILE=file -bknL FILE=file -bknL
KERNEL_ARCH=$(filter Motorola PowerPC, $(shell $(FILE) $(KERNEL) | cut -d"," -f 2))
KERNEL_SIZE=$(shell ls -l vmlinux.bin | awk '{print $$5}') KERNEL_SIZE=$(shell ls -l vmlinux.bin | awk '{print $$5}')
all: floppy.img all: floppy.img
@ -75,7 +74,7 @@ first/first::
second/second:: second/second::
$(MAKE) -C second OBJCOPY=$(OBJCOPY) LD=$(LD) CC=$(CC) AS=$(AS) \ $(MAKE) -C second OBJCOPY=$(OBJCOPY) LD=$(LD) CC=$(CC) AS=$(AS) \
VERSION=$(VERSION) KERNEL_ARCH=$(KERNEL_ARCH) SIGNATURE="$(SIGNATURE)" VERSION=$(VERSION) SIGNATURE="$(SIGNATURE)"
tools:: tools::
$(MAKE) -C tools all VERSION=$(VERSION) SIGNATURE="$(SIGNATURE)" $(MAKE) -C tools all VERSION=$(VERSION) SIGNATURE="$(SIGNATURE)"

View File

@ -4,26 +4,17 @@
# #
# #
CPPFLAGS = -DVERSION="\"$(VERSION)\"" #CPPFLAGS = -DVERSION="\"$(VERSION)\""
CPPFLAGS = -DVERSION="\"$(VERSION)\"" -DBANK_DUMP
CFLAGS = -Wno-multichar -O -m68030 -nostdlib -nodefaultlibs -Wall -Werror -fpic CFLAGS = -Wno-multichar -O -m68030 -nostdlib -nodefaultlibs -Wall -Werror -fpic
ASFLAGS = ASFLAGS =
LS = ls LS = ls
AWK = awk AWK = awk
ifeq ($(KERNEL_ARCH),PowerPC)
CPPFLAGS += -DTARGET_PPC
OBJS = head.o MMU030_asm.o MMU040_asm.o main.o console.o printf.o \
font_8x16.o memory.o MMU030.o MMU040.o bootinfo.o misc.o glue.o \
bank.o arch.o load.o
else
ifeq ($(KERNEL_ARCH),Motorola)
CPPFLAGS += -DTARGET_M68K
OBJS = head.o MMU030_asm.o MMU040_asm.o main.o console.o printf.o \ OBJS = head.o MMU030_asm.o MMU040_asm.o main.o console.o printf.o \
font_8x16.o memory.o uncompress.o MMU030.o MMU040.o bootinfo.o \ font_8x16.o memory.o uncompress.o MMU030.o MMU040.o bootinfo.o \
misc.o glue.o enter_kernel030.o enter_kernel040.o bank.o arch.o \ misc.o glue.o enter_kernel030.o enter_kernel040.o bank.o arch.o \
load.o load.o
endif
endif
second: second.o second: second.o
$(OBJCOPY) -j .text -j .data -j .rodata -j .got \ $(OBJCOPY) -j .text -j .data -j .rodata -j .got \

View File

@ -47,7 +47,6 @@ struct first_level_info {
int start(struct first_level_info* info) int start(struct first_level_info* info)
{ {
#ifdef TARGET_M68K
char * kernel; char * kernel;
unsigned long physImage; unsigned long physImage;
entry_t entry; entry_t entry;
@ -61,7 +60,6 @@ int start(struct first_level_info* info)
unsigned long kernel_image_start; unsigned long kernel_image_start;
unsigned long ramdisk_start; unsigned long ramdisk_start;
int uncompressed_size; int uncompressed_size;
#endif
printf("Early Macintosh Image LoadEr\n"); printf("Early Macintosh Image LoadEr\n");
printf("EMILE v"VERSION" (c) 2004 Laurent Vivier\n"); printf("EMILE v"VERSION" (c) 2004 Laurent Vivier\n");
@ -85,26 +83,6 @@ int start(struct first_level_info* info)
printf("Kernel image loaded at 0x%lx\n", kernel_image_start); printf("Kernel image loaded at 0x%lx\n", kernel_image_start);
printf("Kernel image size is %ld Bytes\n", info->kernel_image_size); printf("Kernel image size is %ld Bytes\n", info->kernel_image_size);
#ifdef TARGET_PPC
if (arch_type == gestalt68k)
{
error("You're trying to boot a powerPC kernel on 680x0 Machine\n");
}
/* FIXME: add some stuff to start 3rd level (powerPC) */
while(1);
return 0;
#elif defined(TARGET_M68K)
if (arch_type == gestaltPowerPC)
{
error("You're trying to boot a m68k kernel on powerPC Machine\n");
}
/* where is mapped my boot function ? */ /* where is mapped my boot function ? */
if (mmu_type == gestalt68040MMU) if (mmu_type == gestalt68040MMU)
@ -146,6 +124,9 @@ int start(struct first_level_info* info)
uncompressed_size = uncompress(kernel, (char*)kernel_image_start); uncompressed_size = uncompress(kernel, (char*)kernel_image_start);
printf("\n"); printf("\n");
if (check_full_in_bank((unsigned long)kernel, uncompressed_size))
error("Kernel between two banks, send a mail to LaurentVivier@wanadoo.fr for support\n");
/* copy enter_kernel at end of kernel */ /* copy enter_kernel at end of kernel */
memcpy((char*)kernel_image_start + uncompressed_size, memcpy((char*)kernel_image_start + uncompressed_size,
@ -174,12 +155,15 @@ int start(struct first_level_info* info)
info->ramdisk_size); info->ramdisk_size);
printf("RAMDISK loaded at 0x%lx\n", ramdisk_start); printf("RAMDISK loaded at 0x%lx\n", ramdisk_start);
printf("RAMDISK size is %ld Bytes\n", info->ramdisk_size); printf("RAMDISK size is %ld Bytes\n", info->ramdisk_size);
if (check_full_in_bank(ramdisk_start, info->ramdisk_size))
error("ramdisk between two banks, send a mail to LaurentVivier@wanadoo.fr for support\n");
} }
else else
{ {
ramdisk_start = 0; ramdisk_start = 0;
printf("no RAMDISK\n"); printf("no RAMDISK\n");
} }
ret = logical2physical((unsigned long)kernel, &physImage); ret = logical2physical((unsigned long)kernel, &physImage);
/* disable and flush cache */ /* disable and flush cache */
@ -237,6 +221,4 @@ int start(struct first_level_info* info)
entry(physImage, uncompressed_size + BI_ALLOC_SIZE, start_mem); entry(physImage, uncompressed_size + BI_ALLOC_SIZE, start_mem);
return 0; return 0;
#endif /* TARGET_M68K */
} }