summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPraneeth Bajjuri2019-03-14 14:20:06 -0500
committerPraneeth Bajjuri2019-03-14 14:20:06 -0500
commit0c4322c13eb6af860ccc6d14d92dd2f485811166 (patch)
tree9b6062c172d0146dd14d8f22507d7abcf55d3cf8
parentc1d484007da6b03897013c6956c6aeb376e17920 (diff)
downloaddevice-ti-am65xevm-0c4322c13eb6af860ccc6d14d92dd2f485811166.tar.gz
device-ti-am65xevm-0c4322c13eb6af860ccc6d14d92dd2f485811166.tar.xz
device-ti-am65xevm-0c4322c13eb6af860ccc6d14d92dd2f485811166.zip
am65xevm: remove userdata resize from fastboot.sh
userdata image should use mke2fs for android pie instead of make_ext4fs.make_ext4fs is deprecated in pie. Removing the complete resize of userdata image section. Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
-rwxr-xr-xfastboot.sh64
1 files changed, 1 insertions, 63 deletions
diff --git a/fastboot.sh b/fastboot.sh
index 43fce55..7dbd258 100755
--- a/fastboot.sh
+++ b/fastboot.sh
@@ -136,67 +136,5 @@ ${FASTBOOT} flash vendor ${vendorimg}
136echo "Flashing FIT Boot Image" 136echo "Flashing FIT Boot Image"
137${FASTBOOT} flash boot ${bootfitimg} 137${FASTBOOT} flash boot ${bootfitimg}
138 138
139userdataimg_orig="${userdataimg}.orig" 139echo "Flashing userdata Image"
140if [ ! -f $userdataimg_orig ]; then
141 cp $userdataimg $userdataimg_orig
142else
143 cp $userdataimg_orig $userdataimg
144fi
145
146echo "Resizing userdata.img"
147resizefail=0
148userdatasize=`${FASTBOOT} getvar userdata_size 2>&1 | grep "userdata_size" | awk '{print$2}'`
149if [ -n "$userdatasize" ]; then
150 while [ 1 ];do
151 echo Current userdata partition size=${userdatasize} KB
152 if [ -d "./data" ]; then
153 echo "Removing data"
154 rm -rf ./data || resizefail=1
155 if [ $resizefail -eq 1 ]; then
156 echo "unable to remove data folder" && break
157 fi
158 fi
159 mkdir ./data
160 ./simg2img ${userdataimg} ${userdataimg}.raw
161 mount -o loop -o grpid -t ext4 ${userdataimg}.raw ./data || resizefail=1
162 if [ $resizefail -eq 1 ]; then
163 echo "Mount failed" && break
164 fi
165 ./make_ext4fs -s -l ${userdatasize}K -a data ${userdataimg} data/
166 sync
167 umount data
168 sync
169 rm -rf ./data
170 rm ${userdataimg}.raw
171 break
172 done
173else
174 resizefail=1
175fi
176
177if [ $resizefail -eq 1 ]; then
178 echo "userdata resize failed."
179 echo "Eg: sudo ./fastboot.sh"
180 echo "For now, we are defaulting to original userdata.img"
181 cp $userdataimg_orig $userdataimg
182fi
183${FASTBOOT} flash userdata ${userdataimg} 140${FASTBOOT} flash userdata ${userdataimg}
184
185#reboot now
186#${FASTBOOT} reboot
187
188#if [ $resizefail -eq 1 ]; then
189# echo "--------------------------------------------------"
190# echo "Attempt was made to resize the userdata partition image"
191# echo "to the size available on your SOM. But it failed either"
192# echo "because it failed to remove existing ./data folder or because"
193# echo "you are not running this script with superuser privileges"
194# echo "Don't panic! The script just loaded the original userdata.img"
195# echo "so, things should just work as expected. Just that the size"
196# echo "of /data will be smaller on target."
197# echo ""
198# echo "If you really want to resize userdata.img, remove any existing"
199# echo "./data folder and run \"sudo ./fastboot.sh\""
200# echo "For now, we are defaulting to original userdata.img"
201# echo "--------------------------------------------------"
202#fi