Subversion Repositories HelenOS

Rev

Rev 3397 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3397 Rev 3492
Line 38... Line 38...
38
endif
38
endif
39
ifeq ($(RDFMT),fat)
39
ifeq ($(RDFMT),fat)
40
	INIT_TASKS += $(USPACEDIR)/srv/fs/fat/fat
40
	INIT_TASKS += $(USPACEDIR)/srv/fs/fat/fat
41
endif
41
endif
42
 
42
 
43
RD_TASKS = \
43
RD_SRVS = \
44
	$(USPACEDIR)/srv/pci/pci \
44
	$(USPACEDIR)/srv/pci/pci \
45
	$(USPACEDIR)/srv/fb/fb \
45
	$(USPACEDIR)/srv/fb/fb \
46
	$(USPACEDIR)/srv/kbd/kbd \
46
	$(USPACEDIR)/srv/kbd/kbd \
47
	$(USPACEDIR)/srv/console/console \
47
	$(USPACEDIR)/srv/console/console \
48
	$(USPACEDIR)/srv/fs/fat/fat \
48
	$(USPACEDIR)/srv/fs/fat/fat
-
 
49
 
-
 
50
RD_APPS = \
49
	$(USPACEDIR)/app/tetris/tetris \
51
	$(USPACEDIR)/app/tetris/tetris \
50
	$(USPACEDIR)/app/tester/tester \
52
	$(USPACEDIR)/app/tester/tester \
-
 
53
	$(USPACEDIR)/app/trace/trace \
51
	$(USPACEDIR)/app/klog/klog \
54
	$(USPACEDIR)/app/klog/klog \
52
	$(USPACEDIR)/app/bdsh/bdsh
55
	$(USPACEDIR)/app/bdsh/bdsh
53
 
56
 
54
build: $(BASE)/image.iso
57
build: $(BASE)/image.iso
55
 
58
 
56
$(BASE)/image.iso: arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/grub/menu.lst $(KERNELDIR)/kernel.bin $(INIT_TASKS) $(RD_TASKS)
59
$(BASE)/image.iso: arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/grub/menu.lst $(KERNELDIR)/kernel.bin $(INIT_TASKS) $(RD_SRVS) $(RD_APPS)
57
	mkdir -p arch/$(ARCH)/iso/boot/grub
60
	mkdir -p arch/$(ARCH)/iso/boot/grub
58
	cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/
61
	cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/
59
ifneq ($(RDFMT),tmpfs)
62
ifneq ($(RDFMT),tmpfs)
60
	cat arch/$(ARCH)/grub/menu.lst | grep -v "tmpfs" >arch/$(ARCH)/iso/boot/grub/menu.lst
63
	cat arch/$(ARCH)/grub/menu.lst | grep -v "tmpfs" >arch/$(ARCH)/iso/boot/grub/menu.lst
61
endif
64
endif
Line 64... Line 67...
64
endif
67
endif
65
	cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/
68
	cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/
66
	for task in $(INIT_TASKS) ; do \
69
	for task in $(INIT_TASKS) ; do \
67
		cp $$task arch/$(ARCH)/iso/boot/ ; \
70
		cp $$task arch/$(ARCH)/iso/boot/ ; \
68
	done
71
	done
-
 
72
	for file in $(RD_SRVS) ; do \
-
 
73
		cp $$file $(USPACEDIR)/dist/srv/ ; \
-
 
74
	done
69
	for task in $(RD_TASKS) ; do \
75
	for file in $(RD_APPS) ; do \
70
		cp $$task $(USPACEDIR)/dist/sbin/ ; \
76
		cp $$file $(USPACEDIR)/dist/app/ ; \
71
	done
77
	done
72
ifeq ($(RDFMT),tmpfs)
78
ifeq ($(RDFMT),tmpfs)
73
	$(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ arch/$(ARCH)/iso/boot/initrd.fs
79
	$(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ arch/$(ARCH)/iso/boot/initrd.fs
74
endif
80
endif
75
ifeq ($(RDFMT),fat)
81
ifeq ($(RDFMT),fat)
Line 78... Line 84...
78
	$(BASE)/tools/mkhord.py 4096 arch/$(ARCH)/iso/boot/initrd.fs arch/$(ARCH)/iso/boot/initrd.img
84
	$(BASE)/tools/mkhord.py 4096 arch/$(ARCH)/iso/boot/initrd.fs arch/$(ARCH)/iso/boot/initrd.img
79
	rm arch/$(ARCH)/iso/boot/initrd.fs
85
	rm arch/$(ARCH)/iso/boot/initrd.fs
80
	mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $(BASE)/image.iso arch/$(ARCH)/iso/
86
	mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $(BASE)/image.iso arch/$(ARCH)/iso/
81
 
87
 
82
clean:
88
clean:
-
 
89
	-for file in $(RD_SRVS) ; do \
-
 
90
		rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \
-
 
91
	done
83
	-for task in $(RD_TASKS) ; do \
92
	-for file in $(RD_APPS) ; do \
84
		rm -f $(USPACEDIR)/dist/sbin/`basename $$task` ; \
93
		rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \
85
	done
94
	done
86
	-rm -fr arch/$(ARCH)/iso
95
	-rm -fr arch/$(ARCH)/iso
87
	-rm -f $(BASE)/image.iso
96
	-rm -f $(BASE)/image.iso