summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-06-18 18:23:22 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-06-18 18:23:22 +0000
commit7bae48c452c75115a965aa13243c886a99cbf192 (patch)
tree5c86305ab61ac6794d11dd5ac14a2cfb02bcaba4
parentff7aa0671d8bcb65bc33df25f99b1c886c672df5 (diff)
generate boot.scr in /sys/src/boot/reform
-rw-r--r--sys/lib/dist/mkfile8
-rw-r--r--sys/src/boot/reform/boot.txt2
-rw-r--r--sys/src/boot/reform/mkfile7
3 files changed, 10 insertions, 7 deletions
diff --git a/sys/lib/dist/mkfile b/sys/lib/dist/mkfile
index fa39a56e1..ac9118ab3 100644
--- a/sys/lib/dist/mkfile
+++ b/sys/lib/dist/mkfile
@@ -77,7 +77,7 @@ cd:V: /tmp/9front.386.iso.gz
mv $target.$pid.disk $target
}
-%.zynq.img:
+%.zynq.img:D:
@{
objtype=arm
kernel=/n/src9/$objtype/9zynq
@@ -88,13 +88,11 @@ cd:V: /tmp/9front.386.iso.gz
mv $target.$pid.disk $target
}
-%.reform.img: /n/src9/sys/src/boot/reform/flash.bin
+%.reform.img:D: /n/src9/sys/src/boot/reform/flash.bin /n/src9/sys/src/boot/reform/boot.scr
@{
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)
+ fatfiles=(/n/src9/sys/src/boot/reform/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
diff --git a/sys/src/boot/reform/boot.txt b/sys/src/boot/reform/boot.txt
new file mode 100644
index 000000000..738fd305d
--- /dev/null
+++ b/sys/src/boot/reform/boot.txt
@@ -0,0 +1,2 @@
+load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} ${prefix}9reform.u
+bootm ${kernel_addr_r}
diff --git a/sys/src/boot/reform/mkfile b/sys/src/boot/reform/mkfile
index 17d4326dc..52cd5058e 100644
--- a/sys/src/boot/reform/mkfile
+++ b/sys/src/boot/reform/mkfile
@@ -1,9 +1,12 @@
-FILES=flash.bin
+FILES=flash.bin boot.scr
-all:V: flash.bin
+all:V: $FILES
clean:V:
rm -f $FILES
flash.bin:
hget -o flash.bin 'https://source.mnt.re/reform/reform-boundary-uboot/-/jobs/artifacts/v3/raw/flash.bin?job=build'
+
+boot.scr: boot.txt
+ aux/txt2uimage -o $target $prereq