Rev 3197 | Rev 3448 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3197 | Rev 3403 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | include ../../../Makefile.config |
30 | include ../../../Makefile.config |
31 | 31 | ||
32 | ## Toolchain configuration |
32 | ## Toolchain configuration |
33 | # |
33 | # |
34 | 34 | ||
- | 35 | ifndef CROSS_PREFIX |
|
- | 36 | CROSS_PREFIX = /usr/local |
|
- | 37 | endif |
|
- | 38 | ||
35 | BFD_NAME = elf32-littlearm |
39 | BFD_NAME = elf32-littlearm |
36 | BFD_ARCH = arm |
40 | BFD_ARCH = arm |
37 | TARGET = arm-linux-gnu |
41 | TARGET = arm-linux-gnu |
38 | TOOLCHAIN_DIR = /usr/local/arm/bin |
42 | TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm/bin |
39 | 43 | ||
40 | ifeq ($(COMPILER),gcc_native) |
44 | ifeq ($(COMPILER),gcc_native) |
41 | CC = gcc |
45 | CC = gcc |
42 | AS = as |
46 | AS = as |
43 | LD = ld |
47 | LD = ld |
Line 82... | Line 86... | ||
82 | $(USPACEDIR)/srv/ns/ns \ |
86 | $(USPACEDIR)/srv/ns/ns \ |
83 | $(USPACEDIR)/srv/loader/loader \ |
87 | $(USPACEDIR)/srv/loader/loader \ |
84 | $(USPACEDIR)/app/init/init \ |
88 | $(USPACEDIR)/app/init/init \ |
85 | $(USPACEDIR)/srv/devmap/devmap \ |
89 | $(USPACEDIR)/srv/devmap/devmap \ |
86 | $(USPACEDIR)/srv/rd/rd \ |
90 | $(USPACEDIR)/srv/rd/rd \ |
87 | $(USPACEDIR)/srv/vfs/vfs \ |
91 | $(USPACEDIR)/srv/vfs/vfs |
- | 92 | ifeq ($(RDFMT),tmpfs) |
|
88 | $(USPACEDIR)/srv/fs/tmpfs/tmpfs |
93 | COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs |
- | 94 | endif |
|
- | 95 | ifeq ($(RDFMT),fat) |
|
- | 96 | COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat |
|
- | 97 | endif |
|
89 | 98 | ||
90 | RD_TASKS = \ |
99 | RD_TASKS = \ |
91 | $(USPACEDIR)/srv/fb/fb \ |
100 | $(USPACEDIR)/srv/fb/fb \ |
92 | $(USPACEDIR)/srv/kbd/kbd \ |
101 | $(USPACEDIR)/srv/kbd/kbd \ |
93 | $(USPACEDIR)/srv/console/console \ |
102 | $(USPACEDIR)/srv/console/console \ |
- | 103 | $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ |
|
94 | $(USPACEDIR)/srv/fs/fat/fat \ |
104 | $(USPACEDIR)/srv/fs/fat/fat \ |
95 | $(USPACEDIR)/app/tetris/tetris \ |
105 | $(USPACEDIR)/app/tetris/tetris \ |
96 | $(USPACEDIR)/app/tester/tester \ |
106 | $(USPACEDIR)/app/tester/tester \ |
97 | $(USPACEDIR)/app/klog/klog \ |
107 | $(USPACEDIR)/app/klog/klog \ |
98 | $(USPACEDIR)/app/cli/cli |
108 | $(USPACEDIR)/app/bdsh/bdsh |
99 | 109 | ||
100 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
110 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
101 | COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) |
111 | COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) |
102 | 112 | ||
103 | .PHONY: all clean depend |
113 | .PHONY: all clean depend |
Line 120... | Line 130... | ||
120 | 130 | ||
121 | _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) _link.ld.in |
131 | _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) _link.ld.in |
122 | for task in $(RD_TASKS) ; do \ |
132 | for task in $(RD_TASKS) ; do \ |
123 | cp $$task $(USPACEDIR)/dist/sbin/ ; \ |
133 | cp $$task $(USPACEDIR)/dist/sbin/ ; \ |
124 | done |
134 | done |
- | 135 | ifeq ($(RDFMT),tmpfs) |
|
125 | ../../../../tools/mktmpfs.py 4096 $(USPACEDIR)/dist/ initrd.img |
136 | ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs |
- | 137 | endif |
|
- | 138 | ifeq ($(RDFMT),fat) |
|
- | 139 | ../../../../tools/mkfat.sh $(USPACEDIR)/dist/ initrd.fs |
|
- | 140 | endif |
|
- | 141 | ../../../../tools/mkhord.py 4096 initrd.fs initrd.img |
|
- | 142 | rm initrd.fs |
|
126 | ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS) ./initrd.img |
143 | ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS) ./initrd.img |
127 | 144 | ||
128 | %.o: %.S |
145 | %.o: %.S |
129 | $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
146 | $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
130 | 147 |