blob: 1b878067ada2afcfd0841860414c356a2039f912 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
#
# i386/Makefile
#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1994 by Linus Torvalds
#
AS86 =as86 -0 -a
LD86 =ld86 -0
AS =as
LD =ld
HOSTCC =gcc -I$(TOPDIR)/include
CC =gcc -D__KERNEL__ -I$(TOPDIR)/include
MAKE =make
CPP =$(CC) -E
AR =ar
STRIP =strip
ifdef CONFIG_M486
CFLAGS := $(CFLAGS) -m486
else
CFLAGS := $(CFLAGS) -m386
endif
zBoot/zSystem: zBoot/*.c zBoot/*.S tools/zSystem
$(MAKE) -C zBoot
zImage: $(CONFIGURE) boot/bootsect boot/setup zBoot/zSystem tools/build
tools/build boot/bootsect boot/setup zBoot/zSystem $(ROOT_DEV) > zImage
sync
zdisk: zImage
dd bs=8192 if=zImage of=/dev/fd0
zlilo: $(CONFIGURE) zImage
if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi
if [ -f $(INSTALL_PATH)/zSystem.map ]; then mv $(INSTALL_PATH)/zSystem.map $(INSTALL_PATH)/zSystem.old; fi
cat zImage > $(INSTALL_PATH)/vmlinuz
cp zSystem.map $(INSTALL_PATH)/
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
#
# Set these to indicate how to link it..
#
# -zmagic:
#
#LOWLDFLAGS = -Ttext 0x1000
#HIGHLDFLAGS = -Ttext 0x100000
#
# -qmagic (we need to remove the 32 byte header for bootup purposes)
#
LOWLDFLAGS =-qmagic -Ttext 0xfe0
HIGHLDFLAGS =-qmagic -Ttext 0xfffe0
tools/system: boot/head.o init/main.o tools/version.o linuxsubdirs
$(LD) $(LOWLDFLAGS) boot/head.o init/main.o tools/version.o \
$(ARCHIVES) \
$(FILESYSTEMS) \
$(DRIVERS) \
$(LIBS) \
-o tools/system
nm tools/zSystem | grep -v '\(compiled\)\|\(\.o$$\)\|\( a \)' | \
sort > System.map
boot/setup: boot/setup.o
$(LD86) -s -o $@ $<
boot/setup.o: boot/setup.s
$(AS86) -o $@ $<
boot/setup.s: boot/setup.S $(CONFIGURE) include/linux/config.h Makefile
$(CPP) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@
boot/bootsect: boot/bootsect.o
$(LD86) -s -o $@ $<
boot/bootsect.o: boot/bootsect.s
$(AS86) -o $@ $<
boot/bootsect.s: boot/bootsect.S $(CONFIGURE) include/linux/config.h Makefile
$(CPP) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@
tools/zSystem: boot/head.o init/main.o tools/version.o linuxsubdirs
$(LD) $(HIGHLDFLAGS) boot/head.o init/main.o tools/version.o \
$(ARCHIVES) \
$(FILESYSTEMS) \
$(DRIVERS) \
$(LIBS) \
-o tools/zSystem
nm tools/zSystem | grep -v '\(compiled\)\|\(\.o$$\)\|\( a \)' | \
sort > zSystem.map
#
# Leave these dummy entries for now to tell people that they are going away..
#
lilo:
@echo
@echo Uncompressed kernel images no longer supported. Use
@echo \"make zlilo\" instead.
@echo
@exit 1
archclean:
rm -f boot/bootsect boot/setup
|