9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] pi4 USB '/boot/kfs' error
@ 2023-01-07 17:40 Marco Feichtinger
  2023-01-07 19:49 ` Richard Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Marco Feichtinger @ 2023-01-07 17:40 UTC (permalink / raw)
  To: 9fans

Hello.
I am new here.
I am running the Dec 22 9legacy on a machine, and now want to create a bootable USB on it.
The USB is for a raspberry pi 4 4GB, acting as a standalone auth only.
But booting the pi always results in the error 
- boot: can't connect to file server: '/boot/kfs' does not exist

I searched the mailing list for solutions, but had no luck.

To make my bootable usb, I used following script.
; cat mkusb
#!/bin/rc

iso=$home/tmp/9legacy.iso
#disk=/tmp/9legacy.rpi
disk=/dev/sdU0.0/data

sd=sdXX
dev=/dev/$sd
data=$dev/data
dos=$dev/dos
plan9=$dev/plan9
nvram=$dev/nvram
fossil=$dev/fossil

test -f /srv/9660 || 9660srv
mount /srv/9660 /n/cd $iso

# partition the SD card | USB image
dd -if /dev/zero -of $disk -bs 512 -count 1
disk/partfs $disk
disk/mbr $data
{echo a p1 0 8; echo t p1 FAT32; echo a p2 8 '$'; echo w} | disk/fdisk -b $data
{echo a nvram 2551 2552; echo a fossil 2552 '$'; echo w} | disk/prep -b $plan9

# format and populate the dos partition
disk/format -b /386/pbs -df $dos
rm -f /srv/dos.rpi
dossrv -f $dos dos.rpi
mount -c /srv/dos.rpi /n/dos
cp /arm/9pi4 /n/dos

# copy pi specific startup files
dircp $home/tmp/rpi4 /n/dos

# format the fossil partition
fossil/flfmt -y $fossil
fossil/conf -w $fossil <<XXX
fsys main config /dev/sdXX/fossil
fsys main open -Va


XXX

rm /srv/fscons.rpi /srv/fossil.rpi
fossil/fossil -f /dev/sdXX/fossil -c 'srv -p fscons.rpi' -c 'srv -AWP fossil.rpi'
echo uname upas :upas >>/srv/fscons.rpi
mount -c /srv/fossil.rpi /n/fossil.rpi

# copy the Plan 9 tree from cd to fossil, without 386 or amd64 binaries
for (d in 386 amd64) {
        bind /n/cd/mips/bin /n/cd/$d/bin
        bind /n/cd/mips/lib /n/cd/$d/lib
        bind /n/cd/acme/bin/mips /n/cd/acme/bin/$d
        for (f in /n/cd/$d/9*) bind /dev/null $f
}
disk/mkfs -a -s /n/cd /n/cd/dist/replica/plan9.proto | disk/mkext -ud /n/fossil.rpi
echo users -w >>/srv/fscons.rpi
echo fsys main create /active/usr/glenda/bin/arm glenda glenda d775 >>/srv/fscons.rpi

echo fsys main sync >>/srv/fscons.rpi

; ls -p tmp/rpi4
bcm2711-rpi-4-b.dtb
bcm2711-rpi-400.dtb
bcm2711-rpi-cm4.dtb
bcm2711-rpi-cm4s.dtb
bootcode.bin
cmdline.txt
config.txt
fixup.dat
fixup4.dat
fixup4cd.dat
fixup_cd.dat
licence.broadcom
overlays
start.elf
start4.elf
start4cd.elf
start_cd.elf

; cat tmp/rpi4/cmdline.txt
readparts=1 bootargs=local!#S/sdXX/fossil nobootprompt=local nvram=#S/sdXX/nvram user=glenda

; cat tmp/rpi4/config.txt
[pi4]
kernel=9pi4
core_freq=250
device_tree=
enable_gic=1
start_file=start4cd.elf
fixup_file=fixup4cd.dat
cmdline=cmdline.txt
[all]
gpu_mem=16



Modified the last part of the pi4 mk file;
; cat /sys/src/9/bcm/pi4
.
.
boot boot #S/sdXX/
        local
        tcp

bootdir
        boot$CONF.out   boot
        /arm/bin/ip/ipconfig
        /arm/bin/auth/factotum
        /arm/bin/fossil/fossil
        /arm/bin/usb/usbd
        /arm/bin/disk/partfs
        /arm/bin/disk/fdisk
        /arm/bin/disk/prep

What I am missing?

-marco


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T4cb044b1eee98e3e-Mdd439d50e580852cbaa676d8
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-08 17:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-07 17:40 [9fans] pi4 USB '/boot/kfs' error Marco Feichtinger
2023-01-07 19:49 ` Richard Miller
2023-01-07 20:53   ` Marco Feichtinger
2023-01-07 22:21     ` Richard Miller
2023-01-08 15:59   ` Richard Miller
2023-01-08 17:36     ` Marco Feichtinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).