Subversion Repositories HelenOS

Rev

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

Rev 3349 Rev 3410
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/tmpfs/tmpfs \
-
 
49
	$(USPACEDIR)/srv/fs/fat/fat
-
 
50
 
-
 
51
RD_APPS = \
48
	$(USPACEDIR)/app/tetris/tetris \
52
	$(USPACEDIR)/app/tetris/tetris \
49
	$(USPACEDIR)/app/tester/tester \
53
	$(USPACEDIR)/app/tester/tester \
50
	$(USPACEDIR)/app/klog/klog \
54
	$(USPACEDIR)/app/klog/klog \
51
	$(USPACEDIR)/app/bdsh/bdsh \
55
	$(USPACEDIR)/app/bdsh/bdsh
52
	$(USPACEDIR)/srv/fs/tmpfs/tmpfs \
-
 
53
	$(USPACEDIR)/srv/fs/fat/fat
-
 
54
 
56
 
55
build: $(BASE)/image.iso
57
build: $(BASE)/image.iso
56
 
58
 
57
$(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)
58
	mkdir -p arch/$(ARCH)/iso/boot/grub
60
	mkdir -p arch/$(ARCH)/iso/boot/grub
59
	cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/
61
	cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/
60
ifneq ($(RDFMT),tmpfs)
62
ifneq ($(RDFMT),tmpfs)
61
	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
62
endif
64
endif
Line 65... Line 67...
65
endif
67
endif
66
	cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/
68
	cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/
67
	for task in $(INIT_TASKS) ; do \
69
	for task in $(INIT_TASKS) ; do \
68
		cp $$task arch/$(ARCH)/iso/boot/ ; \
70
		cp $$task arch/$(ARCH)/iso/boot/ ; \
69
	done
71
	done
-
 
72
	for file in $(RD_SRVS) ; do \
-
 
73
		cp $$file $(USPACEDIR)/dist/srv/ ; \
-
 
74
	done
70
	for task in $(RD_TASKS) ; do \
75
	for file in $(RD_APPS) ; do \
71
		cp $$task $(USPACEDIR)/dist/sbin/ ; \
76
		cp $$file $(USPACEDIR)/dist/app/ ; \
72
	done
77
	done
73
ifeq ($(RDFMT),tmpfs)
78
ifeq ($(RDFMT),tmpfs)
74
	$(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
75
endif
80
endif
76
ifeq ($(RDFMT),fat)
81
ifeq ($(RDFMT),fat)
Line 79... Line 84...
79
	$(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
80
	rm arch/$(ARCH)/iso/boot/initrd.fs
85
	rm arch/$(ARCH)/iso/boot/initrd.fs
81
	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/
82
 
87
 
83
clean:
88
clean:
-
 
89
	-for file in $(RD_SRVS) ; do \
-
 
90
		rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \
-
 
91
	done
84
	-for task in $(RD_TASKS) ; do \
92
	-for file in $(RD_APPS) ; do \
85
		rm -f $(USPACEDIR)/dist/sbin/`basename $$task` ; \
93
		rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \
86
	done
94
	done
87
	-rm -fr arch/$(ARCH)/iso
95
	-rm -fr arch/$(ARCH)/iso
88
	-rm -f $(BASE)/image.iso
96
	-rm -f $(BASE)/image.iso