Browse Source

Copy uroot to tftp folder when built

Signed-off-by: Graham MacDonald <grahamamacdonald@gmail.com>
Graham MacDonald 3 years ago
parent
commit
8f47f64625
3 changed files with 9 additions and 4 deletions
  1. 1 0
      .gitignore
  2. 5 4
      clean.json
  3. 3 0
      sys/src/u-root.json

+ 1 - 0
.gitignore

@@ -70,6 +70,7 @@ tools/share
 cfg/pxe/tftpboot/harvey.32bit
 cfg/pxe/tftpboot/pxelinux.cfg
 cfg/pxe/tftpboot/ipxe
+cfg/pxe/tftpboot/uroot.cpio.lzma
 usr/harvey/tmp
 
 build_out

+ 5 - 4
clean.json

@@ -2,10 +2,11 @@
 	{
 		"Name": "clean",
 		"Pre": [
-			"rm -rf $ARCH/lib/*.a $ARCH/bin/*",
-			"rm -f cfg/pxe/tftpboot/harvey.32bit",
-			"rm -rf plan9_$ARCH/bin/*",
-			"rm -rf linux_$ARCH/bin/*"
+			"rm -rf /$ARCH/lib/*.a /$ARCH/bin/*",
+			"rm -f /cfg/pxe/tftpboot/harvey.32bit",
+			"rm -f /cfg/pxe/tftpboot/uroot.cpio.lzma",
+			"rm -rf /plan9_$ARCH/bin/*",
+			"rm -rf /linux_$ARCH/bin/*"
 		],
 		"Projects": [
 			"/sys/src/9/$ARCH/clean.json",

+ 3 - 0
sys/src/u-root.json

@@ -9,6 +9,9 @@
 		"Pre": [
 			"u-root -shellbang -initcmd= -o /plan9_$ARCH/uroot.cpio plan9",
 			"lzma -f -k -3 /plan9_$ARCH/uroot.cpio"
+		],
+		"Post": [
+			"cp /plan9_$ARCH/uroot.cpio.lzma /cfg/pxe/tftpboot"
 		]
 	}
 ]