Print this page
build_iso shouldn't put the ISO in /tmp.
Add pxeboot/BSD Loader as an option for PXE Kayak boots.
Add usbgen.sh, add "install-usb" Makefile target, and declare Kayak for
ISO and USB at beta.
usbgen.sh courtesy of: Toomas Soome <tsoome@me.com>
Have build_iso.sh use BUILDSEND_MP
Make sure takeover-console.c appears in the package.
Remove iso-install.xml, hijacking console-login instead.
Fix controlling-terminal problem.
Kayak for ISO checkpoint 1
| Split |
Close |
| Expand all |
| Collapse all |
--- old/Makefile
+++ new/Makefile
1 1 #
2 -# CDDL HEADER START
2 +# This file and its contents are supplied under the terms of the
3 +# Common Development and Distribution License ("CDDL"), version 1.0.
4 +# You may only use this file in accordance with the terms of version
5 +# 1.0 of the CDDL.
3 6 #
4 -# The contents of this file are subject to the terms of the
5 -# Common Development and Distribution License, Version 1.0 only
6 -# (the "License"). You may not use this file except in compliance
7 -# with the License.
7 +# A full copy of the text of the CDDL should have accompanied this
8 +# source. A copy of the CDDL is also available via the Internet at
9 +# http://www.illumos.org/license/CDDL.
8 10 #
9 -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 -# or http://www.opensolaris.org/os/licensing.
11 -# See the License for the specific language governing permissions
12 -# and limitations under the License.
11 +
13 12 #
14 -# When distributing Covered Code, include this CDDL HEADER in each
15 -# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 -# If applicable, add the following below this CDDL HEADER, with the
17 -# fields enclosed by brackets "[]" replaced with your own identifying
18 -# information: Portions Copyright [yyyy] [name of copyright owner]
13 +# Copyright 2017 OmniTI Computer Consulting, Inc. All rights reserved.
19 14 #
20 -# CDDL HEADER END
21 -#
22 -#
23 -# Copyright 2012 OmniTI Computer Consulting, Inc. All rights reserved.
24 -# Use is subject to license terms.
25 -#
26 15
27 16 VERSION?=$(shell awk '$$1 == "OmniOS" { print $$3 }' /etc/release)
28 17 BUILDSEND=rpool/kayak_image
29 18
30 19
31 20 BUILDSEND_MP=$(shell zfs get -o value -H mountpoint $(BUILDSEND))
32 21
33 22 all:
34 23
35 24 INSTALLS=anon.dtrace.conf anon.system build_image.sh build_zfs_send.sh \
36 25 data/access.log data/boot data/etc data/filelist.ramdisk data/kernel \
37 26 data/known_extras data/mdb data/platform disk_help.sh install_help.sh \
38 - install_image.sh Makefile net_help.sh README.md \
27 + install_image.sh takeover-console.c Makefile net_help.sh README.md \
39 28 sample/000000000000.sample sample/menu.lst.000000000000
40 29
41 30 TFTP_FILES=$(DESTDIR)/tftpboot/boot/platform/i86pc/kernel/amd64/unix \
42 31 $(DESTDIR)/tftpboot/kayak/miniroot.gz \
32 + $(DESTDIR)/tftpboot/kayak/miniroot.gz.hash \
43 33 $(DESTDIR)/tftpboot/boot/grub/menu.lst \
34 + $(DESTDIR)/tftpboot/pxeboot $(DESTDIR)/tftpboot/boot/loader.conf.local \
35 + $(DESTDIR)/tftpboot/boot/forth $(DESTDIR)/tftpboot/boot/defaults \
44 36 $(DESTDIR)/tftpboot/pxegrub
45 37
46 38 WEB_FILES=$(DESTDIR)/var/kayak/kayak/$(VERSION).zfs.bz2
47 39 IMG_FILES=corner.png tail_bg_v1.png OmniOS_logo_medium.png tail_bg_v2.png
48 40
49 41 anon.dtrace.conf:
50 42 dtrace -A -q -n'int seen[string]; fsinfo:::/args[0]->fi_mount=="/" && seen[args[0]->fi_pathname]==0/{printf("%d %s\n",timestamp/1000000, args[0]->fi_pathname);seen[args[0]->fi_pathname]=1;}' -o $@.tmp
51 43 cat /kernel/drv/dtrace.conf $@.tmp > $@
52 44 rm $@.tmp
53 45
54 46 MINIROOT_DEPS=build_image.sh anon.dtrace.conf anon.system \
55 47 install_image.sh disk_help.sh install_help.sh net_help.sh
56 48
57 49 $(BUILDSEND_MP)/kayak_$(VERSION).zfs.bz2: build_zfs_send.sh
58 50 @test -d "$(BUILDSEND_MP)" || (echo "$(BUILDSEND) missing" && false)
59 51 ./build_zfs_send.sh -d $(BUILDSEND) $(VERSION)
60 52
61 53 $(DESTDIR)/tftpboot/pxegrub: /boot/grub/pxegrub
62 54 cp -p $< $@
63 55
56 +$(DESTDIR)/tftpboot/pxeboot: /boot/pxeboot
57 + cp -p $< $@
58 +
59 +$(DESTDIR)/tftpboot/boot/loader.conf.local: loader.conf.local
60 + cp -p $< $@
61 +
62 +$(DESTDIR)/tftpboot/boot/forth: /boot/forth
63 + cp -rp $< $@
64 +
65 +$(DESTDIR)/tftpboot/boot/defaults: /boot/defaults
66 + cp -rp $< $@
67 +
64 68 $(DESTDIR)/tftpboot/boot/grub/menu.lst: sample/menu.lst.000000000000
65 69 sed -e 's/@VERSION@/$(VERSION)/' $< > $@
66 70
67 71 $(DESTDIR)/tftpboot/boot/platform/i86pc/kernel/amd64/unix: /platform/i86pc/kernel/amd64/unix
68 72 cp -p $< $@
69 73
70 74 $(DESTDIR)/tftpboot/kayak/miniroot.gz: $(BUILDSEND_MP)/miniroot.gz
71 75 cp -p $< $@
72 76
77 +$(DESTDIR)/tftpboot/kayak/miniroot.gz.hash: $(BUILDSEND_MP)/miniroot.gz
78 + digest -a sha1 $< > $@
79 +
73 80 build_image.sh:
74 81 VERSION=$(VERSION) ./build_image.sh
75 82
76 83 build_zfs_send.sh:
77 84 VERSION=$(VERSION) ./build_zfs_image.sh
78 85
79 86 $(BUILDSEND_MP)/miniroot.gz: $(MINIROOT_DEPS)
80 87 if test -n "`zfs list -H -t snapshot $(BUILDSEND)/root@fixup 2>/dev/null`"; then \
81 88 VERSION=$(VERSION) DEBUG=$(DEBUG) ./build_image.sh $(BUILDSEND) fixup ; \
82 89 else \
83 90 VERSION=$(VERSION) DEBUG=$(DEBUG) ./build_image.sh $(BUILDSEND) begin ; \
84 91 fi
85 92
86 93 $(DESTDIR)/var/kayak/kayak/$(VERSION).zfs.bz2: $(BUILDSEND_MP)/kayak_$(VERSION).zfs.bz2
87 94 cp -p $< $@
88 95
89 96 tftp-dirs:
90 97 mkdir -p $(DESTDIR)/tftpboot/boot/grub
91 98 mkdir -p $(DESTDIR)/tftpboot/boot/platform/i86pc/kernel/amd64
92 99 mkdir -p $(DESTDIR)/tftpboot/kayak
93 100
94 101 server-dirs:
95 102 mkdir -p $(DESTDIR)/var/kayak/kayak
96 103 mkdir -p $(DESTDIR)/var/kayak/css
97 104 mkdir -p $(DESTDIR)/var/kayak/img
98 105 mkdir -p $(DESTDIR)/usr/share/kayak/data
99 106 mkdir -p $(DESTDIR)/usr/share/kayak/sample
100 107 mkdir -p $(DESTDIR)/var/kayak/log
101 108 mkdir -p $(DESTDIR)/var/svc/manifest/network
102 109 mkdir -p $(DESTDIR)/var/svc/method
103 110
104 111 install-package: tftp-dirs server-dirs
105 112 for file in $(INSTALLS) ; do \
106 113 cp $$file $(DESTDIR)/usr/share/kayak/$$file ; \
107 114 done
108 115 cp http/svc-kayak $(DESTDIR)/var/svc/method/svc-kayak
|
↓ open down ↓ |
26 lines elided |
↑ open up ↑ |
109 116 chmod a+x $(DESTDIR)/var/svc/method/svc-kayak
110 117 cp http/css/land.css $(DESTDIR)/var/kayak/css/land.css
111 118 for file in $(IMG_FILES) ; do \
112 119 cp http/img/$$file $(DESTDIR)/var/kayak/img/$$file ; \
113 120 done
114 121 cp http/kayak.xml $(DESTDIR)/var/svc/manifest/network/kayak.xml
115 122
116 123 install-tftp: tftp-dirs $(TFTP_FILES)
117 124
118 125 install-web: server-dirs $(WEB_FILES)
126 +
127 +takeover-console: takeover-console.c
128 + gcc -o takeover-console takeover-console.c
129 +
130 +install-iso: takeover-console install-tftp install-web
131 + BUILDSEND_MP=$(BUILDSEND_MP) VERSION=$(VERSION) ./build_iso.sh
132 +
133 +install-usb: install-iso
134 + ./usbgen.sh $(BUILDSEND_MP)/$(VERSION).iso $(BUILDSEND_MP)/$(VERSION).usb-dd /tmp
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX