Advertisement
Guest User

Untitled

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