Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sd=$(date +%F\ %T)
- echo "build start: $sd"
- if [ -e "rms.sh" ]; then
- ./rms.sh
- fi
- cd ../
- export TARGET_PRODUCT=harmony
- export TARGET_MODEL=Adam
- export TARGET_BOOTLOADER_BOARD_NAME=smba1006
- export TARGET_BOOTLOADER_BOARD_NUMBER=7379Y_V11
- export BOARD_GPS_LIBRARIES=libgps
- export TARGET_GPS_MODULE=gps_module_default
- export USB_GADGET_MODULE_PATH=./kernel/drivers/usb/gadget
- source build/envsetup.sh
- m -j12
- make_result=$?
- se=$(date +%F\ %T)
- time1=$(($(date +%s -d "$se") - $(date +%s -d "$sd")))
- hour=$(($time1/3600))
- minute=$((($time1%3600)/60))
- second=$((($time1%60)))
- echo "build end: $se ($hour:$minute:$second)"
- cd ./nvflash
- if [ $make_result != 0 ]; then
- echo
- echo "~~~~~~~~~~~~~~~build failed~~~~~~~~~~~~~~pls to check~~~~~~~~~~~~~~~~"
- echo
- exit
- fi
- echo "start to update image..."
- if [ ! -d tmp_img ]; then
- mkdir tmp_img
- fi
- #:<<!
- cp -rufp ../out/target/product/harmony/bootloader.bin ./tmp_img/bootloader.bin
- cp -rufp ../out/target/product/harmony/boot.img ./tmp_img/boot.img
- cp -rufp ../out/target/product/harmony/recovery.img ./tmp_img/recovery.img
- cp -rufp ../out/target/product/harmony/system.img ./tmp_img/system.img
- cd tmp_img
- chmod 755 *
- cd ..
- cp -rufp ../out/target/product/harmony/bootloader.bin ./bootloader.bin
- cp -rufp ../out/target/product/harmony/boot.img ./boot.img
- cp -rufp ../out/target/product/harmony/recovery.img ./recovery.img
- cp -rufp ../out/target/product/harmony/system.img ./system.img
- #!
- chmod 755 *.bin
- chmod 755 *.img
- :<<!
- if [ ../out/target/product/harmony/bootloader.bin -nt bootloader.bin ]; then
- cp -rufp ../out/target/product/harmony/bootloader.bin ./tmp_img/bootloader.bin
- else
- if [ -e ./tmp_img/bootloader.bin ]; then
- rm ./tmp_img/bootloader.bin
- fi
- fi
- if [ ../out/target/product/harmony/boot.img -nt boot.img ]; then
- cp -rufp ../out/target/product/harmony/boot.img ./tmp_img/boot.img
- else
- if [ -e ./tmp_img/boot.img ]; then
- rm ./tmp_img/boot.img
- fi
- fi
- if [ ../out/target/product/harmony/recovery.img -nt recovery.img ]; then
- cp -rufp ../out/target/product/harmonyrecovery.img ./tmp_img/recovery.img
- else
- if [ -e ./tmp_img/recovery.img ]; then
- rm ./tmp_img/recovery.img
- fi
- fi
- if [ ../out/target/product/harmony/system.img -nt system.img ]; then
- cp -rufp ../out/target/product/harmony/system.img ./tmp_img/system.img
- else
- if [ -e ./tmp_img/system.img ]; then
- rm ./tmp_img/system.img
- fi
- fi
- scp -rp ./tmp_img/* navy@192.168.7.131:/home/navy/nvflash_1002
- !
- echo "update done, use download.sh to download images"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement