Clean up makefile, remove unused commands from boot.scr

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Ronald G. Minnich 2021-10-19 14:53:57 -07:00 committed by ron minnich
parent fe7cbd093b
commit a32b0a735e

View File

@ -1,38 +1,5 @@
# This is the makefile for a flash image, a netbootable sshd image,
# and a netbootable cpu image.
#
# sshdkernel produces a kernel with a built-in initramfs for netboot
# It provides (and starts) an sshd, and also has flashrom.
# Hence you can ssh to a node, flashrom -r on it, scp the
# image back, process it, scp the new image to the node, and
# write with flashrom.
# e.g.
# ssh -i ../../class_key -p 2022 board flashrom -r image.bin -p internal
# scp -i ../../class_key -P 2022 board:/image.bin image.bin
# make tiny.bin
# scp -i ../../class_key -P 2022 tiny.bin board:/tiny.bin
# ssh -i ../../class_key -p 2022 board flashrom -w tiny.bin -p internal
#
# The cpu image uses a cpud as its init, and you
# can cpu to it to run commands, including flashrom -p internal
# to flash the flash image.
# e.g.
# cpu board flashrom -r image.bin -p internal
# Note this writes image image.bin to the host directoy; no scp needed
# make tiny.bin
# cpu board flashrom -w tiny.bin -p internal
# cpu is way more convenient than ssh/scp if you can learn it.
# you can also just
# cpu board
# and once you are in:
# flashrom -r image.bin -p internal
# make tiny.bin
# flashrom -w tiny.bin -p internal
# NOTE: those commands are running on the board, and they all work
#
# You can test the flash image kernel with qemu
# make flashtest
# This is the makefile for a netbootable image. It has cpud build in.
# see README.md in this directory for more information.
default: netbootkernel
@ -87,7 +54,7 @@ kernel-5.10: config-5.10 flashinitramfs.cpio
cp linux-5.10/arch/arm64/boot/Image $@
# These stanzas fetch code.
fetch: getkernel geturoot
fetch: getkernel geturoot apt
getkernel:
rm -rf linux
@ -101,19 +68,5 @@ geturoot:
GO111MODULE=off go get -u github.com/u-root/u-root
GO111MODULE=off go get -u github.com/u-root/cpu/...
# Serve the combined sshd-kernel and sshd-initramfs image. This includes flashrom
sshd-pxeserver:
echo Consider Disabling any system services ...
echo e.g. sudo systemctl stop tftpd-hpa.service
echo e.g. sudo systemctl stop isc-dhcp-server
sudo `go env GOPATH`/bin/pxeserver -tftp-dir . -bootfilename sshdkernel -http-dir . -interface $(NETWORK)
apt:
sudo apt install gcc-aarch64-linux-gnu
# Serve the combined cpu-kernel and cpu-initramfs image.
cpu-pxeserver:
echo Consider Disabling any system services ...
echo e.g. sudo systemctl stop tftpd-hpa.service
echo e.g. sudo systemctl stop isc-dhcp-server
sudo `go env GOPATH`/bin/pxeserver -tftp-dir . -bootfilename sshdkernel -http-dir . -interface $(NETWORK)