ref: e4ef7a58376951b392786e9a7cc38e32b7d9cdc6
parent: 877217adb9ac94ceb2b248100d5403e1d6495533
author: Philip Silva <philip.silva@protonmail.com>
date: Mon Nov 22 19:04:42 EST 2021
update urls and include pi4rc, bootusb.rc
--- /dev/null
+++ b/9legacy/bootusb.rc
@@ -1,0 +1,50 @@
+#!/boot/rc -m /boot/rcmain
+
+/boot/echo -n boot...
+/boot/bind -ac '#e' /env
+path=(/bin /boot)
+
+bind '#p' /proc
+bind '#d' /fd
+bind -a '#P' /dev
+bind -a '#t' /dev
+bind -a '#S' /dev
+echo -n adr >/dev/hostowner
+
+usbd
+bind -a '#I' /net
+
+# Loopback initialization from /sys/src/9/boot/local.c
+<>/net/ipifc/clone{
+ echo -n bind loopback >[1=0]
+ echo -n add 127.0.0.1 255.255.255.255 >[1=0]
+}
+partfs /dev/sdU0.0/data
+fdisk -p /dev/sdXX/data >/dev/sdXX/ctl
+prep -p /dev/sdXX/plan9 >/dev/sdXX/ctl
+echo venti $venti
+venti -m 10 -c /dev/sdXX/arenas0 -a tcp!127.1!17034
+fossil -m 10 -f /dev/sdXX/fossil -c 'srv -AWP boot'
+rootdir=/root
+rootspec=''
+mount -c /srv/boot /root
+bind -ac $rootdir /
+bind -ac $rootdir/mnt /mnt
+
+echo starting factotum
+factotum -s factotum
+
+bind /$cputype/bin /bin
+bind -a /rc/bin /bin
+path=(. /bin)
+/$cputype/init -t
+cd /usr/$user
+
+################
+if (! ~ $#init 0)
+ exec `{echo $init}
+if (~ $service cpu)
+ exec /$cputype/init -c
+if not
+ exec /$cputype/init -t
+exec /boot/rc -m/boot/rcmain -i
--- /dev/null
+++ b/9legacy/pi4rc
@@ -1,0 +1,86 @@
+dev
+ root
+ cons
+ env
+ pipe
+ proc
+ mnt
+ srv
+ dup
+ arch
+ ssl
+ tls
+ cap
+ fs
+ ip arp chandial ip ipv6 ipaux iproute netlog nullmedium pktmedium ptclbsum inferno
+ draw screen
+ mouse mouse
+ kbmap
+ kbin kbd latin1
+ uart
+ gpio gpio
+ spi spi
+ i2c i2c
+
+ fakertc
+# rtc3231 i2c
+ ether netif
+ sd
+ usb
+ aoe
+
+link
+ archbcm4
+ pci
+ gisb
+ loopbackmedium
+ ethermedium
+# sdhost
+ sdhc
+ usbxhci
+ etherusb
+ ethergenet ethermii
+ ether4330 emmc
+# pitft
+
+ip
+ tcp
+ udp
+ ipifc
+ icmp
+ icmp6
+ ipmux
+
+misc
+ armv7
+ trap4
+ uartmini gpio
+ sdmmc
+ sdaoe sdscsi
+ dma
+ vcore
+ vfp3
+
+port
+ int cpuserver = 0;
+
+bootdir
+ bootusb.rc boot
+ /arm/bin/rc
+ /rc/lib/rcmain
+ /arm/bin/mount
+ /arm/bin/bind
+ /arm/bin/echo
+ /arm/bin/ed
+ /arm/bin/cp
+ /arm/bin/rm
+ /arm/bin/ls
+ /arm/bin/cat
+ /arm/bin/disk/fdisk
+ /arm/bin/disk/prep
+ /arm/bin/dossrv
+ /arm/bin/auth/factotum
+ /arm/bin/venti/venti
+ /arm/bin/fossil/fossil
+ /arm/bin/usb/usbd
+ /arm/bin/disk/partfs
--- a/9legacy/rpi4_usb_installation_example
+++ b/9legacy/rpi4_usb_installation_example
@@ -1,7 +1,7 @@
Installation example in a usb disk using
http://9p.io/sources/contrib/miller/9pi.img.gz as host.
-First apply http://adr.freeshell.org/plan9/patches/usb_uas_and_close_ep.diff
+First apply usb_uas_and_close_ep.diff
on the host if you have problems with your usb disk or you are going
to connect and disconnect usb devices several times (e.g. using a kvm switch).
@@ -76,11 +76,11 @@
; cd /n/fossil.new
-; for(i in `{hget http://adr.freeshell.org/plan9/9legacylist | grep -v '^#'}){echo applying $i; hget http://www.9legacy.org/9legacy/patch/$i | ape/patch --no-backup-if-mismatch -p1; echo}
+; for(i in `{hget http://shithub.us/ph/misc/HEAD/9legacy/9legacylist/raw | grep -v '^#'}){echo applying $i; hget http://www.9legacy.org/9legacy/patch/$i | ape/patch --no-backup-if-mismatch -p1; echo}
; rm -r /sys/src/liboventi
-; for(i in `{hget http://adr.freeshell.org/plan9/patches/list | grep -v '^#'}){echo applying $i; hget sdf.adr:/patches/$i | ape/patch --no-backup-if-mismatch -p1; echo}
+; for(i in `{hget http://shithub.us/ph/misc/HEAD/9legacy/list/raw | grep -v '^#'}){echo applying $i; hget http://shithub.us/ph/misc/HEAD/9legacy/$i/raw | ape/patch --no-backup-if-mismatch -p1; echo}
; touch (386 arm mips power sparc spim sys)^/include/ape/_apetypes.h
; mkdir /n/fossil.new/sys/lib/firmware
@@ -99,8 +99,8 @@
; mk install
; cd 9/bcm
-; hget -o bootusb.rc http://adr.freeshell.org/plan9/bootusb.rc
-; hget -o pi4rc http://adr.freeshell.org/plan9/pi4rc
+; hget -o bootusb.rc http://shithub.us/ph/misc/HEAD/9legacy/bootusb.rc/raw
+; hget -o pi4rc http://shithub.us/ph/misc/HEAD/9legacy/pi4rc/raw
; mk CONF=pi4rc
; diskparts /dev/sdM0