Skip to content

Instantly share code, notes, and snippets.

@yunqu
Last active August 8, 2018 22:45
Show Gist options
  • Save yunqu/fd73222f22879e838fb631ee7be04ce7 to your computer and use it in GitHub Desktop.
Save yunqu/fd73222f22879e838fb631ee7be04ce7 to your computer and use it in GitHub Desktop.
Easy script to locate relevant files (with changing yocto machine name) in petalinux project
all:
@echo "1. Found $(YOCTO_IMAGE_NAME)"
@echo "2. Found $(YOCTO_RPM_NAME)"
PLNX_IMAGES_FOLDER := /opt/builds/PYNQ_20180606/sdbuild/build/Pynq-Z2/petalinux_project/build/tmp/deploy/images
PLNX_RPM_FOLDER := /opt/builds/PYNQ_20180606/sdbuild/build/Pynq-Z2/petalinux_project/build/tmp/deploy/rpm
YOCTO_IMAGE_NAME := $(shell find $(PLNX_IMAGES_FOLDER) \
-wholename '*/*.tgz' | grep -E '(.*)/modules-\1\.tgz' )
YOCTO_RPM_NAME := $(shell find $(PLNX_RPM_FOLDER) \
-wholename '*/*.rpm' | grep -E '(.*)/kernel-devsrc-1.0-r0.\1\.rpm' )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment