From 3aa01640b811ec16b00d00f910ed1f8e300fa173 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Mon, 21 Mar 2022 10:41:50 -0700 Subject: [PATCH] pcengines/apu2: run u-root command directly The makefile now builds the u-root command when make fetch is invoked. It runs the u-root command it builds, rather than run u-root.go Further, now that a set of bugs are fixed in cpud, we can now fire up a console shell, and include lots of commands, which makes life a LOT easier. Signed-off-by: Ronald G. Minnich --- mainboards/pcengines/apu2/Makefile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/mainboards/pcengines/apu2/Makefile b/mainboards/pcengines/apu2/Makefile index 782d83f..7f1f33b 100644 --- a/mainboards/pcengines/apu2/Makefile +++ b/mainboards/pcengines/apu2/Makefile @@ -67,7 +67,7 @@ flashinitramfs.cpio.lzma: flashinitramfs.cpio lzma -f -k $< flashinitramfs.cpio: Makefile - go run github.com/u-root/u-root -o $@ -build=bb \ + GO111MODULE=off 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 \ @@ -82,18 +82,23 @@ flashinitramfs.cpio: Makefile # 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 - go run github.com/u-root/u-root -o cpu.cpio -build=bb -initcmd=cpud -files ~/.ssh/cpu_rsa.pub:key.pub \ - -defaultsh="" \ +cpu.cpio: Makefile + CGO_ENABLED=0 GO111MODULE=off u-root -o cpu.cpio -build=bb -initcmd=cpud -files ~/.ssh/cpu_rsa.pub:key.pub \ + minimal \ github.com/u-root/cpu/cmds/cpud + +cpu.cpio.lzma: cpu.cpio lzma -f -k cpu.cpio +cpu.cpio.xz: cpu.cpio + xz -9 -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 - go run github.com/u-root/u-root -o sshd.cpio -build=bb \ + CGO_ENABLED=0 GO111MODULE=off u-root -o sshd.cpio -build=bb \ -uinitcmd=/bbin/sshd \ -files class_key.pub:authorized_keys \ -files classhostkey:id_rsa \ @@ -130,7 +135,8 @@ getrom: geturoot: go get -u github.com/u-root/u-root - go get -u github.com/u-root/cpu/... + CGO_ENABLED=0 GO111MODULE=off go install github.com/u-root/u-root + CGO_ENABLED=0 GO111MODULE=off go get -u github.com/u-root/cpu/... # Serve the combined sshd-kernel and sshd-initramfs image. This includes flashrom sshd-pxeserver: