mirror of
https://github.com/elliotnunn/NetBoot.git
synced 2024-09-01 00:28:57 +00:00
Protocol changes to help with config
This commit is contained in:
parent
a902c2620b
commit
c16fa09c3d
@ -286,7 +286,7 @@ while 1:
|
|||||||
# break # wait for another request, you mofo!
|
# break # wait for another request, you mofo!
|
||||||
|
|
||||||
elif boot_type == 128:
|
elif boot_type == 128:
|
||||||
boot_seq, boot_blkoffset, boot_blkcnt = struct.unpack_from('>HLL', data); boot_imgname = b'A608.dsk'
|
boot_seq, boot_imgnum, boot_blkoffset, boot_blkcnt = struct.unpack_from('>HLLL', data); boot_imgname = b'A608.dsk'
|
||||||
boot_blkcnt = min(boot_blkcnt, 32)
|
boot_blkcnt = min(boot_blkcnt, 32)
|
||||||
boot_imgname = boot_imgname.decode('mac_roman')
|
boot_imgname = boot_imgname.decode('mac_roman')
|
||||||
for blk in range(boot_blkoffset, boot_blkoffset + boot_blkcnt):
|
for blk in range(boot_blkoffset, boot_blkoffset + boot_blkcnt):
|
||||||
@ -300,7 +300,7 @@ while 1:
|
|||||||
(MCAST_ADDR, MCAST_PORT))
|
(MCAST_ADDR, MCAST_PORT))
|
||||||
|
|
||||||
elif boot_type == 130:
|
elif boot_type == 130:
|
||||||
boot_type, blk, seq, hunk_start = struct.unpack_from('>BBHL', whole_data)
|
boot_type, blk, seq, boot_imgnum, hunk_start = struct.unpack_from('>BBHLL', whole_data)
|
||||||
if seq != buf_sequence:
|
if seq != buf_sequence:
|
||||||
buf_sequence = seq
|
buf_sequence = seq
|
||||||
buf = bytearray(32*512)
|
buf = bytearray(32*512)
|
||||||
|
@ -173,6 +173,7 @@ DrvrBase
|
|||||||
DrvrName dc.b 8, ".netBOOT", 0
|
DrvrName dc.b 8, ".netBOOT", 0
|
||||||
|
|
||||||
g
|
g
|
||||||
|
gImage dc.l 0 ; "configuration mode" by default
|
||||||
gMyDCE dc.l 0
|
gMyDCE dc.l 0
|
||||||
gExpectHdr dc.l 0
|
gExpectHdr dc.l 0
|
||||||
gProgress dc.l 0
|
gProgress dc.l 0
|
||||||
@ -243,6 +244,7 @@ DrvrSendRead
|
|||||||
lea gQuery,A2
|
lea gQuery,A2
|
||||||
move.w #$8000,(A2)+ ; Means a polite request
|
move.w #$8000,(A2)+ ; Means a polite request
|
||||||
move.w gExpectHdr+2,(A2)+
|
move.w gExpectHdr+2,(A2)+
|
||||||
|
move.l gImage,(A2)+
|
||||||
|
|
||||||
move.l $28(A0),D0 ; [ioActCount (in bytes)
|
move.l $28(A0),D0 ; [ioActCount (in bytes)
|
||||||
lsr.l #4,D0
|
lsr.l #4,D0
|
||||||
@ -260,7 +262,7 @@ DrvrSendRead
|
|||||||
clr.w (A2)+ ; WDS+0: reserved field
|
clr.w (A2)+ ; WDS+0: reserved field
|
||||||
pea gAddr
|
pea gAddr
|
||||||
move.l (SP)+,(A2)+ ; WDS+2: pointer to address struct
|
move.l (SP)+,(A2)+ ; WDS+2: pointer to address struct
|
||||||
move.w #12,(A2)+ ; WDS: push pointer/length
|
move.w #16,(A2)+ ; WDS: push pointer/length
|
||||||
pea gQuery
|
pea gQuery
|
||||||
move.l (SP)+,(A2)+
|
move.l (SP)+,(A2)+
|
||||||
clr.w (A2)+ ; WDS: end with zero
|
clr.w (A2)+ ; WDS: end with zero
|
||||||
@ -333,6 +335,7 @@ DrvrSendWrite
|
|||||||
move.b #$82,(A2)+ ; Means a polite request
|
move.b #$82,(A2)+ ; Means a polite request
|
||||||
move.b D1,(A2)+ ; nth block of this chunk follows
|
move.b D1,(A2)+ ; nth block of this chunk follows
|
||||||
move.w gExpectHdr+2,(A2)+
|
move.w gExpectHdr+2,(A2)+
|
||||||
|
move.l gImage,(A2)+
|
||||||
move.l D0,(A2)+ ; first block of this chunk
|
move.l D0,(A2)+ ; first block of this chunk
|
||||||
|
|
||||||
lea gWDS,A2
|
lea gWDS,A2
|
||||||
@ -340,7 +343,7 @@ DrvrSendWrite
|
|||||||
pea gAddr
|
pea gAddr
|
||||||
move.l (SP)+,(A2)+ ; WDS+2: pointer to address struct
|
move.l (SP)+,(A2)+ ; WDS+2: pointer to address struct
|
||||||
|
|
||||||
move.w #8,(A2)+ ; WDS: push length/ptr of header
|
move.w #12,(A2)+ ; WDS: push length/ptr of header
|
||||||
pea gQuery
|
pea gQuery
|
||||||
move.l (SP)+,(A2)+
|
move.l (SP)+,(A2)+
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user