Advertisement
Guest User

Untitled

a guest
Mar 29th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.50 KB | None | 0 0
  1. # DisplayName: Mer hammerhead/armv7hl (release) 1
  2. # KickstartType: release
  3. # DeviceModel: hammerhead
  4. # DeviceVariant: hammerhead
  5. # SuggestedImageType: fs
  6. # SuggestedArchitecture: armv7hl
  7.  
  8. lang en_US.UTF-8
  9. timezone --utc UTC
  10. keyboard us
  11. rootpw --plaintext nemo
  12. user --name nemo --groups audio,input,video --password nemo
  13.  
  14. ### Commands from /tmp/sandbox/usr/share/ssu/kickstart/part/default
  15. part / --size 2000 --ondisk sda --fstype=ext4
  16.  
  17. ## No suitable configuration found in /tmp/sandbox/usr/share/ssu/kickstart/bootloader
  18.  
  19. #repo --name=adaptation0-hammerhead --baseurl=http://repo.merproject.org/obs/home:/neochapay:/hw:/lge:/hammerhead/mer_latest_armv7hl/
  20. repo --name=adaptation0-hammerhead --baseurl=http://repo.merproject.org/obs/nemo:/testing:/hw:/lge:/hammerhead/sailfish_latest_armv7hl/
  21. repo --name=mer-core --baseurl=http://repo.merproject.org/obs/home:/neochapay:/mer:/core/latest_armv7hl/
  22. repo --name=nemo-devel-ux --baseurl=http://repo.merproject.org/obs/home:/neochapay:/mer:/nemo-devel-ux/latest_armv7hl/
  23.  
  24. %packages
  25. droid-config-hammerhead
  26. droid-hal-hammerhead
  27. droid-hal-version-hammerhead
  28. droid-hal-hammerhead-kernel-modules
  29.  
  30. findutils
  31. passwd
  32.  
  33. openssh-clients
  34. openssh-server
  35. qt5-qtdeclarative-qmlscene
  36. bluez5-tools
  37.  
  38. glacier-calc
  39. glacier-camera
  40. glacier-contacts
  41. glacier-dialer
  42. glacier-filemuncher
  43. glacier-gallery
  44. glacier-music
  45. glacier-settings
  46.  
  47. lipstick-glacier-home-qt5
  48. %end
  49.  
  50. %attachment
  51. ### Commands from /tmp/sandbox/usr/share/ssu/kickstart/attachment/hammerhead
  52. /boot/hybris-boot.img
  53. /boot/hybris-updater-script
  54. /boot/hybris-updater-unpack.sh
  55. /boot/update-binary
  56.  
  57. %end
  58.  
  59. %pre
  60. export SSU_RELEASE_TYPE=release
  61. ### begin 01_init
  62. touch $INSTALL_ROOT/.bootstrap
  63. ### end 01_init
  64. %end
  65.  
  66. %post
  67. export SSU_RELEASE_TYPE=release
  68. ### begin 01_arch-hack
  69. if [ "armv7hl" == armv7hl ] || [ "armv7hl" == armv7tnhl ]; then
  70. # Without this line the rpm does not get the architecture right.
  71. echo -n "armv7hl-meego-linux" > /etc/rpm/platform
  72.  
  73. # Also libzypp has problems in autodetecting the architecture so we force tha as well.
  74. # https://bugs.meego.com/show_bug.cgi?id=11484
  75. echo "arch = armv7hl" >> /etc/zypp/zypp.conf
  76. fi
  77. ### end 01_arch-hack
  78. ### begin 01_rpm-rebuilddb
  79. # Rebuild db using target's rpm
  80. echo -n "Rebuilding db using target rpm.."
  81. rm -f /var/lib/rpm/__db*
  82. rpm --rebuilddb
  83. echo "done"
  84. ### end 01_rpm-rebuilddb
  85. ### begin 50_oneshot
  86. # exit boostrap mode
  87. rm -f /.bootstrap
  88.  
  89. # export some important variables until there's a better solution
  90. export LANG=en_US.UTF-8
  91. export LC_COLLATE=en_US.UTF-8
  92. export GSETTINGS_BACKEND=gconf
  93.  
  94. # run the oneshot triggers for root and first user uid
  95. UID_MIN=$(grep "^UID_MIN" /etc/login.defs | tr -s " " | cut -d " " -f2)
  96. DEVICEUSER=`getent passwd $UID_MIN | sed 's/:.*//'`
  97.  
  98. if [ -x /usr/bin/oneshot ]; then
  99. su -c "/usr/bin/oneshot --mic"
  100. su -c "/usr/bin/oneshot --mic" $DEVICEUSER
  101. fi
  102. ### end 50_oneshot
  103. ### begin 60_ssu
  104. #if [ "$SSU_RELEASE_TYPE" = "rnd" ]; then
  105. # [ -n "@RNDRELEASE@" ] && ssu release -r @RNDRELEASE@
  106. # [ -n "@RNDFLAVOUR@" ] && ssu flavour @RNDFLAVOUR@
  107. # # RELEASE is reused in RND setups with parallel release structures
  108. # # this makes sure that an image created from such a structure updates from there
  109. # [ -n "2.1.3.7" ] && ssu set update-version 2.1.3.7
  110. # ssu mode 2
  111. #else
  112. # [ -n "2.1.3.7" ] && ssu release 2.1.3.7
  113. # ssu mode 4
  114. #fi
  115. ### end 60_ssu
  116. ### begin 70_sdk-domain
  117.  
  118. export SSU_DOMAIN=@RNDFLAVOUR@
  119.  
  120. if [ "$SSU_RELEASE_TYPE" = "release" ] && [[ "$SSU_DOMAIN" = "public-sdk" ]];
  121. then
  122. ssu domain nemo
  123. fi
  124. ### end 70_sdk-domain
  125. %end
  126.  
  127. %post --nochroot
  128. export SSU_RELEASE_TYPE=release
  129. ### begin 01_release
  130. if [ -n "$IMG_NAME" ]; then
  131. echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release
  132. fi
  133. ### end 01_release
  134. ### begin hammerhead
  135. cp $INSTALL_ROOT/etc/sailfish-release $IMG_OUT_DIR
  136. ### end hammerhead
  137. %end
  138.  
  139. %pack
  140. export SSU_RELEASE_TYPE=release
  141. ### begin hybris
  142. pushd $IMG_OUT_DIR
  143.  
  144. DEVICE=hammerhead
  145.  
  146. VERSION_FILE=./sailfish-release
  147. source $VERSION_FILE
  148.  
  149. # Locate rootfs tar.bz2 archive.
  150. for filename in *.tar.bz2; do
  151. GEN_IMG_BASE=$(basename $filename .tar.bz2)
  152. done
  153.  
  154. if [ ! -e "$GEN_IMG_BASE.tar.bz2" ]; then
  155. echo "No rootfs archive found, exiting ..."
  156. exit 1
  157. fi
  158.  
  159. IMG_SIZE=$(du -h $GEN_IMG_BASE.tar.bz2 | cut -f1)
  160.  
  161. # Output filenames
  162. DST_IMG_BASE=$ID-$DEVICE-$SAILFISH_FLAVOUR-$VERSION_ID-20180201
  163. DST_IMG=$DST_IMG_BASE.tar.bz2
  164.  
  165. # Copy boot image, updater scripts and updater binary into updater .zip tree.
  166. mkdir -p updater/META-INF/com/google/android
  167.  
  168. mv update-binary updater/META-INF/com/google/android/update-binary
  169. mv hybris-updater-script updater/META-INF/com/google/android/updater-script
  170. mv hybris-updater-unpack.sh updater/updater-unpack.sh
  171. mv hybris-boot.img updater/hybris-boot.img
  172.  
  173. # Temporarily move the rootfs into the updater directory
  174. mv $GEN_IMG_BASE.tar.bz2 updater/$DST_IMG
  175.  
  176. # Update updater-script with image details.
  177. sed -i -e "s %VERSION% $VERSION_ID g" -e "s %IMAGE_FILE% $DST_IMG g" -e "s %IMAGE_SIZE% $IMG_SIZE g" updater/META-INF/com/google/android/updater-script
  178.  
  179. # pack updater .zip
  180. pushd updater
  181. zip -r ../$DST_IMG_BASE.zip META-INF/com/google/android/update-binary META-INF/com/google/android/updater-script updater-unpack.sh hybris-boot.img $DST_IMG_BASE.ks $DST_IMG
  182. popd # updater
  183.  
  184. # Move the rootfs back out of the updater directory
  185. mv updater/$DST_IMG $GEN_IMG_BASE.tar.bz2
  186.  
  187. # Clean up updater .zip working directory.
  188. rm -rf updater
  189.  
  190. popd # $IMG_OUT_DIR
  191. ### end hybris
  192. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement