Relocate the GDT to reserved memory, so it won't get clobbered by elfboot(), etc.
[coreboot.git] / src / arch / i386 / Config.lb
1 uses CONFIG_SMP
2 uses CONFIG_USE_INIT
3
4 init init/crt0.S.lb
5 ldscript init/ldscript.lb
6
7 makerule all
8         depends "linuxbios.rom"
9 end
10
11 makerule floppy 
12         depends "all" 
13         action  "mcopy -o linuxbios.rom a:"
14 end
15
16 makerule nrv2b 
17         depends "$(TOP)/util/nrv2b/nrv2b.c"
18         action  "$(HOSTCC) -O2 -DENCODE -DDECODE -DMAIN -DVERBOSE -DNDEBUG -DBITSIZE=32 -DENDIAN=0 $< -o $@"
19 end
20
21 makerule linuxbios.rom 
22         depends "linuxbios.strip buildrom" 
23         action "./buildrom $< $@ $(PAYLOAD) $(ROM_IMAGE_SIZE) $(ROM_SECTION_SIZE)"
24 end
25
26 makerule crt0.S
27         depends "$(CRT0)"
28         action  "cp $< $@"
29 end
30
31 addaction clean "rm -f romimage payload.*"
32
33 if CONFIG_USE_INIT
34 makerule init.o
35         depends "$(INIT-OBJECTS)"
36         action  "$(LD) -melf_i386 -r -o init.pre.o $(INIT-OBJECTS)"
37         action  "$(OBJCOPY) --rename-section .text=.init.text --rename-section .data=.init.data --rename-section .rodata=.init.rodata --rename-section .rodata.str1.1=.init.rodata.str1.1 init.pre.o init.o"
38 end
39
40 makerule linuxbios   
41         depends "crt0.o init.o linuxbios_ram.rom ldscript.ld"
42         action  "$(CC) -nostdlib -nostartfiles -static -o $@ -T ldscript.ld crt0.o init.o"
43         action  "$(CROSS_COMPILE)nm -n linuxbios | sort > linuxbios.map"
44 end
45
46 end
47
48 dir lib
49 dir boot
50 if CONFIG_SMP
51         dir smp
52 end