boot-directdisk: ensure generated MBR disk signature is non-zero
A zero MBR disk signature is generally seen as no signature and another partitioning program might install a new signature. (From OE-Core rev: b6cafb1fcd6c168f8f4a4d2d5c74f3b425f156f3) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
cf2ebed2ff
commit
df18dc084e
|
@ -148,7 +148,11 @@ python do_bootdirectdisk() {
|
|||
def generate_disk_signature():
|
||||
import uuid
|
||||
|
||||
return str(uuid.uuid4())[:8]
|
||||
while True:
|
||||
signature = str(uuid.uuid4())[:8]
|
||||
|
||||
if signature != '00000000':
|
||||
return signature
|
||||
|
||||
def validate_disk_signature(d):
|
||||
import re
|
||||
|
|
Loading…
Reference in New Issue