Skip to content

Commit

Permalink
nano: avoid creating system.img in build
Browse files Browse the repository at this point in the history
flash.sh was creating a system.img when creating the SD card image,
avoid that. This also prevents a bug in flash.sh which creates a loop
device and does not remove it after finishing.
  • Loading branch information
alfonsosanchezbeato committed Apr 15, 2019
1 parent 12e59d8 commit 0873329
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions build-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ if [ "$board" = nano ]; then
rm jetson.img
cd Linux_for_Tegra
patch -p1 < ../../tarball-parts/nano/create-jetson-nano-sd-card-image.sh.patch
patch -p1 < ../../tarball-parts/nano/flash.sh.patch
sudo ./create-jetson-nano-sd-card-image.sh -o jetson.img -s 600M -r 200
popd
mv "$outdir"/Linux_for_Tegra/jetson.img "$final_tree"
Expand Down
9 changes: 9 additions & 0 deletions tarball-parts/nano/create-jetson-nano-sd-card-image.sh.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
fi
}
trap cleanup EXIT
@@ -148,7 +148,7 @@
echo "${script_name} - creating signed images"

# Generate flashcmd.txt for signing images
- BOARDID="3448" FAB="${rev}" "${l4t_dir}/flash.sh" "--no-flash" "p3448-0000-sd" "mmcblk0p1"
+ BOARDID="3448" FAB="${rev}" "${l4t_dir}/flash.sh" "-r" "--no-flash" "p3448-0000-sd" "mmcblk0p1"

if [ ! -f "${bootloader_dir}/flashcmd.txt" ]; then
echo "ERROR: ${bootloader_dir}/flashcmd.txt not found" > /dev/stderr
@@ -169,7 +171,12 @@
{
echo "${script_name} - create partitions"
Expand Down
13 changes: 13 additions & 0 deletions tarball-parts/nano/flash.sh.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- a/flash.sh 2019-03-13 08:45:13.000000000 +0100
+++ b/flash.sh 2019-04-15 14:46:38.445259529 +0200
@@ -1873,10 +1873,6 @@
APP_TAG+="-e s/APPFILE/${localsysfile}/ ";
if [ "${skip_systemimg}" != "true" ]; then
echo "Reusing existing ${localsysfile}... ";
- if [ ! -e "${localsysfile}" ]; then
- echo "file does not exist.";
- exit 1;
- fi;
echo "done.";
else
echo "Skip generating ${localsysfile}";

0 comments on commit 0873329

Please sign in to comment.