Skip to content

Commit

Permalink
Merge pull request #1105 from balena-os/fix_overlay_list
Browse files Browse the repository at this point in the history
linux-raspberrypi_%.bbappend: Make sure DEPLOY_DIR_IMAGE dir exists w…
  • Loading branch information
flowzone-app[bot] authored Mar 1, 2024
2 parents bf85452 + 8cad2c8 commit 43d2001
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ BALENA_CONFIGS:append:raspberrypi3-64 = " aufs"
BALENA_CONFIGS:append:raspberrypi3 = " aufs"

python do_overlays() {
import glob, re
import glob, re, os
overlays = []
source_path = d.getVar('S', True) + '/arch/' + d.getVar('ARCH',True) + '/boot/dts/overlays/*-overlay.dts'
for overlay in glob.glob(source_path):
overlays.append(re.sub(r'-overlay.dts','.dtbo',overlay).split('dts/')[-1])
for dtbo in overlays:
d.setVar('KERNEL_DEVICETREE', d.getVar('KERNEL_DEVICETREE', True) + ' ' + dtbo)

if not os.path.exists(d.getVar('DEPLOY_DIR_IMAGE')):
os.makedirs(d.getVar('DEPLOY_DIR_IMAGE'))
f = open(d.getVar('DEPLOY_DIR_IMAGE') + '/overlays.txt', "w")
f.write(d.getVar('KERNEL_DEVICETREE', True))
f.close
Expand Down

0 comments on commit 43d2001

Please sign in to comment.