Skip to content

Commit a8bb620

Browse files
committed
downloadfiles: update for nand with pre-downloaded files
1 parent 8e591de commit a8bb620

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

downloadfiles.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def download(url, file_name=None):
5050
else:
5151
return response.content
5252

53-
boardpattern='^(bpi-r[2346]+(pro|mini)?).*$'
53+
boardpattern='^(bpi-r[2346]+(pro|mini|lite)?).*$'
5454

5555
def getUbootInfo():
5656
uboot_release_url="https://api.github.com/repos/frank-w/u-boot/releases/latest"
@@ -218,7 +218,9 @@ def getInitrdInfo():
218218
newconfig={}
219219
if config and config.get("skipubootdownload"):
220220
newconfig["skipubootdownload"]=config.get("skipubootdownload")
221-
newconfig["imgfile"]=config.get("imgfile")
221+
newconfig["imgfile"]=config.get("imgfile","")
222+
newconfig["bl2file"]=config.get("bl2file","")
223+
newconfig["fipfile"]=config.get("fipfile","")
222224
elif ufile and "mmc" in device:
223225
fname=ufile.get("name")
224226
a = urlparse(ufile.get("url"))
@@ -231,9 +233,7 @@ def getInitrdInfo():
231233
if c=='y':
232234
download(ufile.get("url"),fname)
233235
newconfig["imgfile"]=fname
234-
else: print("no uboot image defined!")
235-
236-
if ufile and device in ['spim-nand','nor']:
236+
elif ufile and device in ['spim-nand','nor']:
237237
bl2=ufile.get("bl2")
238238
fip=ufile.get("fip")
239239
if bl2:
@@ -242,6 +242,7 @@ def getInitrdInfo():
242242
if fip:
243243
download(fip.get("url"),fip.get("name"))
244244
newconfig["fipfile"]=fip.get("name")
245+
else: print("no uboot image defined!")
245246

246247
if config and config.get("skipkerneldownload"):
247248
newconfig["skipkerneldownload"]=config.get("skipkerneldownload")
@@ -272,7 +273,10 @@ def getInitrdInfo():
272273
newconfig[replacement+"file"]=fname
273274
else: print("no bfiles defined!")
274275

275-
if device in ["spim-nand","nor"]:
276+
if config and config.get("skipinitrddownload"):
277+
newconfig["skipinitrddownload"]=config.get("skipinitrddownload")
278+
newconfig["initrd"]=config.get("initrd","")
279+
elif device in ["spim-nand","nor"]:
276280
if ifiles:
277281
fname="rootfs_arm64.cpio.zst"
278282
if fname in ifiles:

0 commit comments

Comments
 (0)