source: mainline/boot/Makefile.common@ c1b2084

Last change on this file since c1b2084 was 7671231, checked in by Matthieu Riolo <matthieu.riolo@…>, 6 years ago

Add configuration option to put all files to RAM disk (as before) or partly to hard disk

  • Instead of four groups in Makefile.common, each server/application/driver has an item then determines where it should be stored and whether it is essential (as before).
  • Drivers are always on RAM disk (i.e. that is where devman is searching for them).
  • Empty cfg/net directory removed, configuration files are specified in Makefile.common instead.
  • Hard disk is mounted to /root.
  • tools/ew.py script favors original behavior, it prefers hdisk.img to root FS disk image (when both exists).
  • MISSING: Modify Makefiles of non-x86 platforms.

Conflicts:

.bzrignore
boot/Makefile
boot/Makefile.common
boot/arch/amd64/Makefile.inc
tools/ew.py
uspace/Makefile.common
uspace/lib/gui/terminal.c

  • Property mode set to 100644
File size: 6.1 KB
RevLine 
[81235588]1#
[4872160]2# Copyright (c) 2006 Martin Decky
[81235588]3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8#
9# - Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# - Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution.
14# - The name of the author may not be used to endorse or promote products
15# derived from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28
[4872160]29## Configuration
30#
31
32ROOT_PATH = ..
33
34VERSION_DEF = $(ROOT_PATH)/version
35
36COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common
37COMMON_HEADER = $(ROOT_PATH)/common.h
38
39CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
40CONFIG_HEADER = $(ROOT_PATH)/config.h
41
42-include $(VERSION_DEF)
43-include $(COMMON_MAKEFILE)
44-include $(CONFIG_MAKEFILE)
45
46KERNEL_PATH = $(ROOT_PATH)/kernel
47USPACE_PATH = $(ROOT_PATH)/uspace
48DIST_PATH = $(USPACE_PATH)/dist
[53238ba]49DIST_OVERLAY_PATH = $(USPACE_PATH)/overlay
[4872160]50TOOLS_PATH = $(ROOT_PATH)/tools
[a79d88d]51DRVS_PATH = drv
[7671231]52CFG_PATH = $(USPACE_PATH)/cfg
[4872160]53
[4646710]54MKARRAY = $(TOOLS_PATH)/mkarray.py
[4872160]55MKFAT = $(TOOLS_PATH)/mkfat.py
[d06c4ae]56MKEXT4 = $(TOOLS_PATH)/mkext4.py
[928d983]57MKUIMAGE = $(TOOLS_PATH)/mkuimage.py
[4872160]58
[7f881cd8]59ifeq ($(PRECHECK),y)
60 JOBFILE = $(TOOLS_PATH)/jobfile.py
[95d45482]61 # NOTE: You must not change the order of arguments.
[7f881cd8]62 CC_JOB = $(JOBFILE) $(JOB) $(CC) $< -o $@
63else
64 CC_JOB = $(CC) $< -o $@
65endif
[4872160]66
67DISTROOT = distroot
[81235588]68INITRD = initrd
69
[f42ee6f]70# NOTE: Naming service must be first task in the list
[81235588]71INIT_TASKS = \
[4872160]72 $(USPACE_PATH)/srv/ns/ns \
73 $(USPACE_PATH)/srv/loader/loader \
[f42ee6f]74 $(USPACE_PATH)/srv/sysman/sysman \
[32d96e1]75 $(USPACE_PATH)/srv/locsrv/locsrv \
[4872160]76 $(USPACE_PATH)/srv/bd/rd/rd \
[1f2dd20]77 $(USPACE_PATH)/srv/vfs/vfs \
78 $(USPACE_PATH)/srv/logger/logger
[14f1db0]79
[81235588]80ifeq ($(RDFMT),tmpfs)
[4872160]81 INIT_TASKS += $(USPACE_PATH)/srv/fs/tmpfs/tmpfs
[81235588]82endif
[14f1db0]83
[81235588]84ifeq ($(RDFMT),fat)
[4872160]85 INIT_TASKS += $(USPACE_PATH)/srv/fs/fat/fat
[81235588]86endif
87
[d06c4ae]88ifeq ($(RDFMT),ext4fs)
89 INIT_TASKS += $(USPACE_PATH)/srv/fs/ext4fs/ext4fs
[cc1a727]90endif
91
[fa9616b4]92RD_SRVS_ESSENTIAL = \
[8fefd8b]93 hid/input \
94 hid/output \
95 hid/console \
96 devman \
97 fs/locfs \
98 klog
[fa9616b4]99
[60c96cf]100ifeq ($(CONFIG_FB), y)
101 RD_SRVS_ESSENTIAL += \
102 hid/compositor
103endif
104
[fa9616b4]105RD_SRVS_NON_ESSENTIAL = \
[8fefd8b]106 bd/file_bd \
107 bd/sata_bd \
108 bd/vbd \
109 clipboard \
110 fs/tmpfs \
111 fs/fat \
112 fs/mfs \
113 fs/cdfs \
114 fs/exfat \
115 fs/udf \
116 fs/ext4fs \
117 hid/remcons \
118 hid/isdv4_tablet \
119 hid/rfb \
120 net/dhcp \
121 net/dnsrsrv \
122 net/ethip \
123 net/inetsrv \
124 net/loopip \
125 net/nconfsrv \
126 net/slip \
127 net/tcp \
128 net/udp \
129 taskmon \
130 test/chardev-test \
[1edd6d0]131 test/ipc-test \
[8fefd8b]132 volsrv
[5203e256]133
[bd250b0f]134RD_DRVS_ESSENTIAL = \
[2a37b9f]135 root/root \
136 root/virt \
[81ee1009]137 fb/kfb
[bd250b0f]138
139RD_DRVS_NON_ESSENTIAL = \
[5203e256]140 test/test1 \
141 test/test2 \
[00d7e1b]142 test/test3 \
[c4be33a]143 nic/ne2k \
[f0b74b2]144 nic/e1k \
[9904eb90]145 nic/rtl8139 \
[90782c36]146 nic/rtl8169 \
[8a64320e]147 nic/ar9271 \
[6413967]148 nic/virtio-net \
[13eecc4]149 block/ahci \
150 block/virtio-blk
[c47e1a8]151
[5203e256]152RD_DRV_CFG =
[14f1db0]153
[8a64320e]154RD_DRVS_FW_NON_ESSENTIAL = \
155 nic/ar9271
[864762a]156
[7fb3f1c]157RD_LIBS =
158
[a8010272]159ifeq ($(CONFIG_DEVEL_FILES), y)
160 RD_LIBS += \
[954c024]161 $(USPACE_PATH)/lib/c/libc.a
[a8010272]162endif
163
[ec3e2ed]164ifeq ($(CONFIG_BUILD_SHARED_LIBS), y)
[5b72635]165 RD_LIBS += \
[e2e9a8a]166 $(USPACE_PATH)/lib/c/libc.so.0 \
[9182e86f]167 $(USPACE_PATH)/lib/math/libmath.so.0 \
168 $(USPACE_PATH)/lib/dltest/libdltest.so.0
[04803bf]169endif
170
[60c96cf]171RD_APPS_ESSENTIAL = \
172 bdsh \
173 getterm \
174 kio
175
176ifeq ($(CONFIG_FB), y)
177 RD_APPS_ESSENTIAL += \
178 vlaunch \
179 vterm
180endif
[fa9616b4]181
182RD_APPS_NON_ESSENTIAL = \
[0e8c158]183 barber \
184 bithenge \
185 blkdump \
186 contacts \
187 corecfg \
188 cpptest \
189 devctl \
190 dnscfg \
191 dnsres \
192 download \
193 edit \
194 fdisk \
195 gunzip \
[fe656783]196 hbench \
[0e8c158]197 inet \
198 kill \
199 killall \
200 loc \
[10b21a1b]201 lprint \
[0e8c158]202 mixerctl \
203 modplay \
204 logset \
205 mkfat \
206 mkexfat \
207 mkext4 \
208 mkmfs \
209 nic \
210 sbi \
211 sportdmp \
212 redir \
213 taskdump \
214 tester \
215 testread \
[209cd41]216 testrunner \
[0e8c158]217 testwrit \
218 tetris \
219 tmon \
220 trace \
221 netecho \
222 nterm \
[7acd787]223 pci \
[0e8c158]224 ping \
225 pkg \
226 stats \
227 sysinfo \
228 sysinst \
229 top \
230 untar \
231 usbinfo \
232 vol \
233 vuhid \
234 mkbd \
235 websrv \
236 date \
237 vcalc \
238 vdemo \
239 viewer \
240 df \
241 fontviewer \
242 wifi_supplicant
[4872160]243
[9182e86f]244ifeq ($(CONFIG_BUILD_SHARED_LIBS), y)
[0e8c158]245 RD_APPS_NON_ESSENTIAL += dltest dltests
[9182e86f]246endif
247
[01579ad]248RD_TESTS = \
[d848752]249 $(USPACE_PATH)/lib/c/test-libc \
[80da8f70]250 $(USPACE_PATH)/lib/label/test-liblabel \
[4b1c6a4b]251 $(USPACE_PATH)/lib/conf/test-libconf \
[eeb23f2d]252 $(USPACE_PATH)/lib/posix/test-libposix \
[9c5e3a5]253 $(USPACE_PATH)/lib/sif/test-libsif \
[da4e695]254 $(USPACE_PATH)/lib/uri/test-liburi \
[516e780]255 $(USPACE_PATH)/lib/math/test-libmath \
[48197c1]256 $(USPACE_PATH)/drv/bus/usb/xhci/test-xhci \
[8ebc5b8a]257 $(USPACE_PATH)/app/bdsh/test-bdsh \
[64ffd83]258 $(USPACE_PATH)/srv/net/tcp/test-tcp \
259 $(USPACE_PATH)/srv/volsrv/test-volsrv \
[01579ad]260
[356c386]261RD_DATA_ESSENTIAL = \
262 $(USPACE_PATH)/app/bdsh/demo.txt
263
264RD_DATA_NON_ESSENTIAL = \
265 $(USPACE_PATH)/app/modplay/demo.xm \
266 $(USPACE_PATH)/app/viewer/logo.tga
267
[01579ad]268
[81235588]269COMPONENTS = \
[cfdeedc]270 $(KERNEL_PATH)/kernel.elf \
[4872160]271 $(INIT_TASKS) \
272 $(INITRD).img
[14f1db0]273
[94c05b89]274
[4872160]275LINK = arch/$(BARCH)/_link.ld
[4646710]276COMP = component
277COMPS = $(COMP)s
[14f1db0]278
[4872160]279-include arch/$(BARCH)/Makefile.inc
[21580dd]280
[15b592b]281ifeq ($(CONFIG_BAREBONE),y)
[5f53428a]282 RD_SRVS = $(RD_SRVS_ESSENTIAL)
283 RD_APPS = $(RD_APPS_ESSENTIAL)
284 RD_DRVS = $(RD_DRVS_ESSENTIAL)
285 RD_DRVS_FW = $(RD_DRVS_FW_ESSENTIAL)
286 RD_DATA = $(RD_DATA_ESSENTIAL)
[fa9616b4]287else
[5f53428a]288 RD_SRVS = $(RD_SRVS_ESSENTIAL) $(RD_SRVS_NON_ESSENTIAL)
289 RD_APPS = $(RD_APPS_ESSENTIAL) $(RD_APPS_NON_ESSENTIAL)
290 RD_DRVS = $(RD_DRVS_ESSENTIAL) $(RD_DRVS_NON_ESSENTIAL)
291 RD_DRVS_FW = $(RD_DRVS_FW_ESSENTIAL) $(RD_DRVS_FW_NON_ESSENTIAL)
292 RD_DATA = $(RD_DATA_ESSENTIAL) $(RD_DATA_NON_ESSENTIAL)
[fa9616b4]293endif
294
[4872160]295MODULES := $(notdir $(COMPONENTS))
296
297BOOT_OUTPUT ?= $(ROOT_PATH)/image.boot
298RAW ?= image.raw
299JOB ?= image.job
300MAP ?= image.map
301BUILD ?= Makefile.build
Note: See TracBrowser for help on using the repository browser.