Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1.  
  2.  
  3. sd=$(date +%F\ %T)
  4. echo "build start: $sd"
  5.  
  6. if [ -e "rms.sh" ]; then
  7. ./rms.sh
  8. fi
  9.  
  10. cd ../
  11.  
  12. export TARGET_PRODUCT=harmony
  13. export TARGET_MODEL=Adam
  14. export TARGET_BOOTLOADER_BOARD_NAME=smba1006
  15. export TARGET_BOOTLOADER_BOARD_NUMBER=7379Y_V11
  16. export BOARD_GPS_LIBRARIES=libgps
  17. export TARGET_GPS_MODULE=gps_module_default
  18. export USB_GADGET_MODULE_PATH=./kernel/drivers/usb/gadget
  19. source build/envsetup.sh
  20.  
  21. m -j12
  22.  
  23. make_result=$?
  24.  
  25. se=$(date +%F\ %T)
  26.  
  27. time1=$(($(date +%s -d "$se") - $(date +%s -d "$sd")))
  28.  
  29. hour=$(($time1/3600))
  30. minute=$((($time1%3600)/60))
  31. second=$((($time1%60)))
  32.  
  33. echo "build end: $se ($hour:$minute:$second)"
  34.  
  35. cd ./nvflash
  36.  
  37. if [ $make_result != 0 ]; then
  38. echo
  39. echo "~~~~~~~~~~~~~~~build failed~~~~~~~~~~~~~~pls to check~~~~~~~~~~~~~~~~"
  40. echo
  41.  
  42. exit
  43. fi
  44.  
  45. echo "start to update image..."
  46.  
  47. if [ ! -d tmp_img ]; then
  48. mkdir tmp_img
  49. fi
  50.  
  51. #:<<!
  52. cp -rufp ../out/target/product/harmony/bootloader.bin ./tmp_img/bootloader.bin
  53. cp -rufp ../out/target/product/harmony/boot.img ./tmp_img/boot.img
  54. cp -rufp ../out/target/product/harmony/recovery.img ./tmp_img/recovery.img
  55. cp -rufp ../out/target/product/harmony/system.img ./tmp_img/system.img
  56. cd tmp_img
  57. chmod 755 *
  58. cd ..
  59.  
  60. cp -rufp ../out/target/product/harmony/bootloader.bin ./bootloader.bin
  61. cp -rufp ../out/target/product/harmony/boot.img ./boot.img
  62. cp -rufp ../out/target/product/harmony/recovery.img ./recovery.img
  63. cp -rufp ../out/target/product/harmony/system.img ./system.img
  64. #!
  65. chmod 755 *.bin
  66. chmod 755 *.img
  67.  
  68.  
  69.  
  70. :<<!
  71. if [ ../out/target/product/harmony/bootloader.bin -nt bootloader.bin ]; then
  72. cp -rufp ../out/target/product/harmony/bootloader.bin ./tmp_img/bootloader.bin
  73. else
  74. if [ -e ./tmp_img/bootloader.bin ]; then
  75. rm ./tmp_img/bootloader.bin
  76. fi
  77. fi
  78.  
  79. if [ ../out/target/product/harmony/boot.img -nt boot.img ]; then
  80. cp -rufp ../out/target/product/harmony/boot.img ./tmp_img/boot.img
  81. else
  82.  
  83. if [ -e ./tmp_img/boot.img ]; then
  84. rm ./tmp_img/boot.img
  85. fi
  86. fi
  87.  
  88. if [ ../out/target/product/harmony/recovery.img -nt recovery.img ]; then
  89. cp -rufp ../out/target/product/harmonyrecovery.img ./tmp_img/recovery.img
  90. else
  91. if [ -e ./tmp_img/recovery.img ]; then
  92. rm ./tmp_img/recovery.img
  93. fi
  94. fi
  95.  
  96. if [ ../out/target/product/harmony/system.img -nt system.img ]; then
  97. cp -rufp ../out/target/product/harmony/system.img ./tmp_img/system.img
  98. else
  99. if [ -e ./tmp_img/system.img ]; then
  100. rm ./tmp_img/system.img
  101. fi
  102. fi
  103.  
  104.  
  105. scp -rp ./tmp_img/* navy@192.168.7.131:/home/navy/nvflash_1002
  106. !
  107.  
  108.  
  109.  
  110. echo "update done, use download.sh to download images"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement