Advertisement
Guest User

Untitled

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