Advertisement
neochapay

ks

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