forked from M-Labs/artiq
bootloader: treat zero-length firmware in flash as no firmware
This commit is contained in:
parent
228e44a059
commit
bc050fdeec
|
@ -120,7 +120,7 @@ fn flash_boot() {
|
||||||
let length = BigEndian::read_u32(&header[0..]) as usize;
|
let length = BigEndian::read_u32(&header[0..]) as usize;
|
||||||
let expected_crc = BigEndian::read_u32(&header[4..]);
|
let expected_crc = BigEndian::read_u32(&header[4..]);
|
||||||
|
|
||||||
if length == 0xffffffff {
|
if length == 0 || length == 0xffffffff {
|
||||||
println!("No firmware present");
|
println!("No firmware present");
|
||||||
return
|
return
|
||||||
} else if length > 4 * 1024 * 1024 {
|
} else if length > 4 * 1024 * 1024 {
|
||||||
|
|
Loading…
Reference in New Issue