Guest User

Untitled

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