Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
2ee7b740
Commit
2ee7b740
authored
May 26, 2017
by
Jens Korinth
Browse files
generate_boot_image: Fix pynq devicetree
parent
20e33f67
Changes
1
Hide whitespace changes
Inline
Side-by-side
boot/generate_boot_image.sh
View file @
2ee7b740
...
@@ -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
...
...
Jens Korinth
@jk
mentioned in commit
a831b501
·
Jul 14, 2017
mentioned in commit
a831b501
mentioned in commit a831b5015df6bd8f8d23ddd334a3b1159392de92
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment