Browse Source

add dhcp server and tftp server configs for harvey minicluster.
see util/run-minicluster.sh for how to run it, the script itself should not be osx-only...

Change-Id: I5b87673e80c33e8abb23968a35fead7e5895756d

Aki Nyrhinen 4 years ago
parent
commit
a5cd8682c5

+ 1 - 2
README

@@ -29,8 +29,7 @@ you'll need to run a few commands inside the top-level directory to get set
 up for code-review:
 
 	cd harvey
-	curl -Lo .git/hooks/commit-msg
-	http://review.gerrithub.io/tools/hooks/commit-msg
+	curl -Lo .git/hooks/commit-msg http://review.gerrithub.io/tools/hooks/commit-msg
 	chmod u+x .git/hooks/commit-msg
 	git config remote.origin.push HEAD:refs/for/master
 

BIN
cfg/pxe/tftpboot/ldlinux.bin


BIN
cfg/pxe/tftpboot/ldlinux.bss


BIN
cfg/pxe/tftpboot/ldlinux.c32


BIN
cfg/pxe/tftpboot/ldlinux.sys


BIN
cfg/pxe/tftpboot/libcom32.c32


BIN
cfg/pxe/tftpboot/mboot.c32


BIN
cfg/pxe/tftpboot/pxelinux.0


+ 6 - 0
cfg/pxe/tftpboot/pxelinux.cfg/01-00-00-00-00-00-01

@@ -0,0 +1,6 @@
+label 9k8cpu.32bit 
+	kernel mboot.c32
+	append 9k8cpu.32bit
+
+default 9k8cpu.32bit
+      

+ 6 - 0
cfg/pxe/tftpboot/pxelinux.cfg/01-00-03-2d-19-6d-88

@@ -0,0 +1,6 @@
+label 9k8cpu.32bit 
+	kernel mboot.c32
+	append 9k8cpu.32bit
+
+default 9k8cpu.32bit
+      

+ 6 - 0
cfg/pxe/tftpboot/pxelinux.cfg/01-00-0c-29-cf-de-0e

@@ -0,0 +1,6 @@
+label akaros 
+	kernel mboot.c32
+	append akaros
+
+default akaros
+      

+ 6 - 0
cfg/pxe/tftpboot/pxelinux.cfg/01-00-13-20-fe-52-8c

@@ -0,0 +1,6 @@
+label 9k8cpu.32bit 
+	kernel mboot.c32
+	append 9k8cpu.32bit
+
+default 9k8cpu.32bit
+      

+ 6 - 0
cfg/pxe/tftpboot/pxelinux.cfg/01-00-14-bf-fe-24-70

@@ -0,0 +1,6 @@
+label 9k8cpu.32bit 
+	kernel mboot.c32
+	append 9k8cpu.32bit
+
+default 9k8cpu.32bit
+      

+ 6 - 0
cfg/pxe/tftpboot/pxelinux.cfg/01-c8-b3-73-1f-44-55

@@ -0,0 +1,6 @@
+label 9k8cpu.32bit 
+	kernel mboot.c32
+	append 9k8cpu.32bit
+
+default 9k8cpu.32bit
+      

+ 75 - 0
util/minicluster-dhcpd.conf

@@ -0,0 +1,75 @@
+
+ddns-update-style none;
+
+
+default-lease-time 600;
+max-lease-time 7200;
+
+subnet 192.168.28.0 netmask 255.255.255.0 {
+}
+
+subnet 10.0.0.0 netmask 255.255.255.0 {
+}
+
+host akaros {
+  hardware ethernet 00:0c:29:cf:de:0e;
+   fixed-address 192.168.28.16;   
+}
+
+
+host harvey {
+	hardware ethernet 00:00:00:00:00:01;
+	fixed-address 192.168.28.161;   
+}
+
+host harveyhost {
+	hardware ethernet 00:14:bf:fe:24:70;
+	fixed-address 10.0.0.1;
+}
+
+host harveyhost2 {
+	hardware ethernet c8:b3:73:1f:44:55;
+	fixed-address 10.0.0.10;
+}
+
+host n1 {
+	hardware ethernet 00:03:2d:19:6d:88;
+	fixed-address 10.0.0.2;
+}
+
+host n2 {
+	hardware ethernet 00:14:bf:fe:24:70;
+	fixed-address 10.0.0.3;
+}
+
+host n3 {
+	hardware ethernet 00:03:2d:19:6d:46;
+	fixed-address 10.0.0.4;
+}
+
+host n4 {
+	hardware ethernet 00:03:2d:19:6d:b0;
+	fixed-address 10.0.0.5;
+}
+
+host n5 {
+	hardware ethernet 00:03:2d:19:6d:aa;
+	fixed-address 10.0.0.6;
+}
+
+host n6 { 
+#hardware ethernet c8:b3:73:1f:44:55;
+	hardware ethernet 00:13:20:fe:52:8c;
+	fixed-address 10.0.0.7;
+	filename "bootx64.efi";
+}
+
+allow booting;
+allow bootp;
+option option-128 code 128 = string;
+option option-129 code 129 = text;
+#next-server 192.168.28.250;
+next-server 10.0.0.10;
+filename "pxelinux.0";
+
+

+ 5 - 0
util/minicluster-dhcpd.leases

@@ -0,0 +1,5 @@
+# The format of this file is documented in the dhcpd.leases(5) manual page.
+# This lease file was written by isc-dhcp-4.1-ESV-R4
+
+server-duid "\000\001\000\001\0350c\256\310\263s\037DU";
+

+ 29 - 0
util/run-minicluster.sh

@@ -0,0 +1,29 @@
+#!/bin/bash
+
+if [ $# -lt 1 ]; then
+	echo usage: $0 ethername
+	exit 1
+fi
+ethif=$1
+
+trap : 2
+
+$HARVEY/util/ufs -root=$HARVEY &
+pids=$!
+
+#
+#	install macports
+#	port install tftp-hpa
+#	port install dhcp
+#	port install gcc49
+#	port install x86_64-elf-gcc
+#	port install x86_64-elf-binutils
+#
+
+sudo ifconfig $ethif 10.0.0.10/24 
+sudo tftpd -vvvv -L --address 10.0.0.10 -s $HARVEY/cfg/pxe/tftpboot &
+pids="$pids $!"
+sudo dhcpd -d -cf $HARVEY/util/minicluster-dhcpd.conf -lf $HARVEY/util/minicluster-dhcpd.leases $ethif
+sudo kill $pids
+wait
+