Advertisement
neochapay

Untitled

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