Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/golang.org/x/crypto-0.…
Browse files Browse the repository at this point in the history
…31.0
  • Loading branch information
rminnich authored Dec 14, 2024
2 parents b271326 + 50f47d6 commit 47c288b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@
*tar
*uck
*.pub

u-root/
20 changes: 11 additions & 9 deletions TESTCPU
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -e
SOURCE=${SOURCE:=$HOME/go/src/github.com/u-root/u-root}
UROOT=${UROOT:=$HOME/go/src/github.com/u-root/u-root}
KERNEL=${KERNEL:=$HOME/linuxboot/mainboards/intel/generic/kernel-noinitramfs}
VMN=${VMN:=42}
KEY=${KEY:=~/.ssh/cpu_rsa.pub:key.pub}
KEY=${KEY:=$HOME/.ssh/cpu_rsa.pub}

echo NOTE: WE USED TO RUN CPUD AUTOMAGICALLY
echo That turned out to be inconvenient for testing
Expand All @@ -12,18 +12,20 @@ echo If you want to test cpud as the init, add this line
echo to the u-root command, along with the other switches.
echo -initcmd=/bbin/cpud \

# error our early for simple things
ls ${KEY}
ls -d ${UROOT}
ls ${KERNEL}

# You will need to put your host key and private key somewhere. They will be placed in the proper place in the image.
#
# $* is positioned where it is so you can use extra switches like -h or add files via, e.g., -files whatever
# you can also add non-switch args too.
# it allows you to configure the initramfs a bit more, with or without switches
u-root \
-files $KEY \
-uroot-source $SOURCE \
$* \
all \
cmds/cpud \
cmds/cpu \
# The day when u-root was superconvenient to use is gone, done in by modules.
# goanywhere makes it much less hard.
go install github.com/u-root/gobusybox/src/cmd/goanywhere@latest
goanywhere ${UROOT}/cmds/core/* ./cmds/cpu ./cmds/cpud -- u-root -files $KEY

echo NOT adding a host key at -files ssh_host_rsa_key:etc/ssh/ssh_host_rsa_key

Expand Down
3 changes: 3 additions & 0 deletions cmds/cpu/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ func main() {
if *port == "22" {
*sshd = true
}
if *srvnfs {
*ninep = false
}
verbose("connecting to %q port %q", host, *port)
if err := newCPU(host, a...); err != nil {
e := 1
Expand Down
2 changes: 1 addition & 1 deletion session/session_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (s *Session) Namespace() error {
// The debug= option is here so you can see how to temporarily set it if needed.
// It generates copious output so use it sparingly.
// A useful compromise value is 5.
opts := fmt.Sprintf("version=9p2000.L,trans=fd,rfdno=%d,wfdno=%d,uname=%v,debug=0,msize=%d", fd, fd, user, s.msize)
opts := fmt.Sprintf("version=9p2000.L,noxattr,trans=fd,rfdno=%d,wfdno=%d,uname=%v,debug=0,msize=%d", fd, fd, user, s.msize)
if len(s.mopts) > 0 {
opts += "," + s.mopts
}
Expand Down

0 comments on commit 47c288b

Please sign in to comment.