ref: d0f824edc2fa69ab9fc9618a93fd6e3f15acb2b9
parent: c88ed6488f36eaa7d499dac424f647d166267dec
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Jan 3 21:51:29 EST 2019
pc, pc64: properly track dependencies for mem.h on autogenerated apbootstrap.h and reboot.h targets
--- a/sys/src/9/pc/mkfile
+++ b/sys/src/9/pc/mkfile
@@ -8,8 +8,9 @@
p=9
# must match mem.h
-APBOOTSTRAP=0xF0007000
KTZERO=0xF0100020
+APBOOTSTRAP=0xF0007000
+REBOOTADDR=0x11000
DEVS=`{rc ../port/mkdevlist $CONF}
@@ -143,15 +144,15 @@
sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
echo '};'} > init.h
-reboot.h:D: rebootcode.s
+reboot.h:D: rebootcode.s mem.h
$AS rebootcode.s
- $LD -l -s -T0x11000 -R4 -o reboot.out rebootcode.$O
+ $LD -l -s -T$REBOOTADDR -R4 -o reboot.out rebootcode.$O
{echo 'uchar rebootcode[]={'
xd -1x reboot.out |
sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
echo '};'} > reboot.h
-apbootstrap.h: apbootstrap.s mem.h
+apbootstrap.h:D: apbootstrap.s mem.h
$AS $prereq
$LD -o apbootstrap.out -T$APBOOTSTRAP -R4 -l -s apbootstrap.$O
{echo 'uchar apbootstrap[]={'
--- a/sys/src/9/pc64/mkfile
+++ b/sys/src/9/pc64/mkfile
@@ -5,6 +5,7 @@
</$objtype/mkfile
p=9
+# must match mem.h
KTZERO=0xffffffff80110000
APBOOTSTRAP=0xffffffff80007000
REBOOTADDR=0x11000
@@ -99,7 +100,7 @@
<../port/portmkfile
<|../port/mkbootrules $CONF
-l.$O apbootstrap.$O: mem.h
+l.$O: mem.h
$ETHER: ../port/etherif.h ../port/netif.h
$AUDIO: ../port/audioif.h
@@ -144,7 +145,7 @@
sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
echo '};'} > init.h
-reboot.h: rebootcode.s
+reboot.h:D: rebootcode.s mem.h
$AS rebootcode.s
$LD -l -R1 -s -o reboot.out -T$REBOOTADDR rebootcode.$O
{echo 'uchar rebootcode[]={'
@@ -153,7 +154,7 @@
sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
echo '};'} > $target
-apbootstrap.h: apbootstrap.s
+apbootstrap.h:D: apbootstrap.s mem.h
$AS apbootstrap.s
$LD -l -R1 -s -o apbootstrap.out -T$APBOOTSTRAP apbootstrap.$O
{echo 'uchar apbootstrap[]={'