mirror of
https://github.com/linuxboot/linuxboot
synced 2024-11-23 09:21:09 +00:00
pruning broken board
Signed-off-by: Ronald G Minnich <rminnich@gmail.com>
This commit is contained in:
parent
6825bff247
commit
dbaba8cdf9
4
mainboards/st/st32mp1517c/.gitignore
vendored
4
mainboards/st/st32mp1517c/.gitignore
vendored
@ -1,4 +0,0 @@
|
||||
flashinitramfs.cpio
|
||||
flashinitramfs.cpio.lzma
|
||||
flashkernel
|
||||
linux
|
@ -1,125 +0,0 @@
|
||||
# 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
|
||||
|
||||
default: flash
|
||||
|
||||
flash: tiny.bin
|
||||
|
||||
flashtest: testflashkernel
|
||||
|
||||
usefultargets:
|
||||
echo fetch, uroot, flashkernel, or image.bin
|
||||
|
||||
flashinitramfs.cpio.lzma: flashinitramfs.cpio
|
||||
lzma -f -k $<
|
||||
|
||||
flashinitramfs.cpio: Makefile
|
||||
GOARCH=arm u-root -o $@ -build=bb \
|
||||
-uinitcmd=/bbin/pxeboot \
|
||||
github.com/u-root/u-root/cmds/boot/pxeboot \
|
||||
github.com/u-root/u-root/cmds/core/cat \
|
||||
github.com/u-root/u-root/cmds/core/elvish \
|
||||
github.com/u-root/u-root/cmds/core/init \
|
||||
github.com/u-root/u-root/cmds/core/ip \
|
||||
github.com/u-root/u-root/cmds/core/ls \
|
||||
github.com/u-root/u-root/cmds/core/kexec \
|
||||
github.com/u-root/u-root/cmds/core/pci \
|
||||
github.com/u-root/u-root/cmds/core/wget \
|
||||
|
||||
# this target builds an initramfs with only one program, the cpu server.
|
||||
# It depends on the kernel setting the IP address.
|
||||
# You need ip=dhcp OR ip=fixed.ip.address.here in the command line
|
||||
cpu.cpio.lzma: Makefile
|
||||
GOARCH=arm go run github.com/u-root/u-root -o cpu.cpio -build=bb -initcmd=cpud -files ~/.ssh/cpu_rsa.pub:key.pub \
|
||||
-defaultsh="" \
|
||||
github.com/u-root/cpu/cmds/cpud
|
||||
lzma -f -k cpu.cpio
|
||||
|
||||
# this target builds an initramfs with all of u-root, AND all of /bin, /usr/bin, /sbin, /usr/sbin, /etc
|
||||
# the intent is to demonstrate the capability of http loading.
|
||||
# It depends on the kernel setting the IP address.
|
||||
# You need ip=dhcp OR ip=fixed.ip.address.here in the command line
|
||||
sshd.cpio.lzma: Makefile
|
||||
GOARCH=arm go run github.com/u-root/u-root -o sshd.cpio -build=bb \
|
||||
-uinitcmd=/bbin/sshd \
|
||||
-files class_key.pub:authorized_keys \
|
||||
-files classhostkey:id_rsa \
|
||||
-files /usr/bin/vi \
|
||||
-files /usr/share/vim \
|
||||
-files /usr/share/terminfo \
|
||||
-files /bin/bash \
|
||||
-files /usr/sbin/flashrom \
|
||||
-files /usr/bin/xz \
|
||||
all
|
||||
lzma -f -k sshd.cpio
|
||||
ls -l sshd.cpio.*
|
||||
|
||||
flashkernel: flash.config flashinitramfs.cpio.lzma Makefile
|
||||
cp $< linux/.config
|
||||
(cd linux && ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make oldconfig && ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j32)
|
||||
cp linux/arch/arm/boot/zImage $@
|
||||
|
||||
testflashkernel: flashkernel
|
||||
qemu-system-arm -machine ast2600-evb -kernel flashkernel -nographic -serial /dev/tty -initrd flashinitramfs.cpio.lzma
|
||||
|
||||
# These stanzas fetch code.
|
||||
fetch: getkernel geturoot
|
||||
|
||||
getkernel:
|
||||
rm -rf linux
|
||||
git clone --depth=1 -b v5.15 --single-branch https://github.com/torvalds/linux
|
||||
(cd linux && make mrproper)
|
||||
(cd linux && ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make tinyconfig)
|
||||
|
||||
geturoot:
|
||||
go get -u github.com/u-root/u-root
|
||||
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)
|
||||
|
||||
# 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 cpukernel -http-dir . -interface $(NETWORK)
|
||||
|
||||
ssh:
|
||||
ssh -i class_key -p 2022 root@up
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user