Commit 2ee7b740 authored by Jens Korinth's avatar Jens Korinth
Browse files

generate_boot_image: Fix pynq devicetree

parent 20e33f67
...@@ -140,18 +140,15 @@ fetch_pynq_image () { ...@@ -140,18 +140,15 @@ fetch_pynq_image () {
extract_pynq_bl () { extract_pynq_bl () {
IMG=${PYNQ_VERSION}.img IMG=${PYNQ_VERSION}.img
if [[ ! -f $PWD/pynq/BOOT.BIN ]]; then if [[ ! -f $PWD/pynq/BOOT.BIN ]]; then
pushd $PWD/pynq && pushd $PWD/pynq &> /dev/null
mkdir -p img || return $(error_ret "$LINENO: could not create img dir") mkdir -p img ||
return $(error_ret "$LINENO: could not create img dir")
dusudo mount -oloop,offset=1M $IMG img || dusudo mount -oloop,offset=1M $IMG img ||
return $(error_ret "$LINENO: could not mount $IMAGE") return $(error_ret "$LINENO: could not mount $IMAGE")
dusudo cp img/BOOT.BIN $VERSION/BOOT.BIN || dusudo cp img/BOOT.BIN $VERSION/BOOT.BIN ||
return $(error_ret "$LINENO: could not copy img/BOOT.BIN") return $(error_ret "$LINENO: could not copy img/BOOT.BIN")
dusudo chown $USER $VERSION/BOOT.BIN || dusudo chown $USER $VERSION/BOOT.BIN ||
return $(error_ret "$LINENO: could not chown $USER $VERSION/BOOT.BIN") return $(error_ret "$LINENO: could not chown $USER $VERSION/BOOT.BIN")
dusudo cp img/devicetree.dtb $VERSION/devicetree.dtb ||
return $(error_ret "$LINENO: could cp img/devicetree.dtb")
dusudo chown $USER $VERSION/devicetree.dtb ||
return $(error_ret "$LINENO: could not chown $USER $VERSION/devicetree.dtb")
dusudo cp img/uEnv.txt ../uenv/uEnv-pynq.txt || dusudo cp img/uEnv.txt ../uenv/uEnv-pynq.txt ||
return $(error_ret "$LINENO: could not cp img/uEnv.txt") return $(error_ret "$LINENO: could not cp img/uEnv.txt")
dusudo chown $USER ../uenv/uEnv-pynq.txt || dusudo chown $USER ../uenv/uEnv-pynq.txt ||
...@@ -160,6 +157,7 @@ extract_pynq_bl () { ...@@ -160,6 +157,7 @@ extract_pynq_bl () {
return $(error_ret "$LINENO: could not umount img") return $(error_ret "$LINENO: could not umount img")
rmdir img || rmdir img ||
return $(error_ret "$LINENO: could not remove img") return $(error_ret "$LINENO: could not remove img")
popd &> /dev/null
else else
echo "$DIR/BOOT.BIN already exists, skipping." echo "$DIR/BOOT.BIN already exists, skipping."
fi fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment