summaryrefslogtreecommitdiff
path: root/sys/lib/dist/mkfile
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-06-18 18:15:47 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-06-18 18:15:47 +0000
commitff7aa0671d8bcb65bc33df25f99b1c886c672df5 (patch)
tree364148fa9aa5bae420dbf99af34aff5f86accd38 /sys/lib/dist/mkfile
parenta16d54da37131f00ce2db824cf85c85ae746b752 (diff)
/sys/lib/dist/mkfile: add target for mnt-reform image
Diffstat (limited to 'sys/lib/dist/mkfile')
-rw-r--r--sys/lib/dist/mkfile26
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/lib/dist/mkfile b/sys/lib/dist/mkfile
index 581ca2989..fa39a56e1 100644
--- a/sys/lib/dist/mkfile
+++ b/sys/lib/dist/mkfile
@@ -88,6 +88,18 @@ cd:V: /tmp/9front.386.iso.gz
mv $target.$pid.disk $target
}
+%.reform.img: /n/src9/sys/src/boot/reform/flash.bin
+ @{
+ objtype=arm64
+ kernel=/n/src9/$objtype/9reform.u
+ echo 'load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} ${prefix}9reform.u; bootm ${kernel_addr_r}' > /env/boot.txt
+ aux/txt2uimage -o /env/boot.scr /env/boot.txt
+ fatfiles=(/env/boot.scr $kernel)
+ mb=1885 # storage vendors idea of 2GB
+ mk $target.$pid.disk
+ mv $target.$pid.disk $target && dd -trunc 0 -bs 1024 -oseek 33 -if /n/src9/sys/src/boot/reform/flash.bin -of $target
+ }
+
%.pc.iso:D: $proto /n/src9/sys/lib/sysconfig/proto/9bootproto $kernel
@{rfork n
mk binds
@@ -142,6 +154,20 @@ cd:V: /tmp/9front.386.iso.gz
disk/prep -bw -a^(nvram fs) $d/plan9
disk/format -d $d/dos $fatfiles
}
+ if not if(~ $target *.reform.img.*){
+ {
+ echo 'a p1 4M 100M'
+ echo 't p1 FAT32'
+ echo 'a p2 . $'
+ echo 't p2 PLAN9'
+ echo 'A p1'
+ echo 'p'
+ echo 'w'
+ echo 'q'
+ } | disk/fdisk -b $d/data
+ disk/prep -bw -a^(nvram fs) $d/plan9
+ disk/format -d $d/dos $fatfiles
+ }
if not {
disk/fdisk -baw $d/data
disk/prep -bw -a^(9fat nvram fs) $d/plan9