Advertisement
Guest User

Untitled

a guest
Nov 14th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.02 KB | None | 0 0
  1. # DisplayName: Jolla bullhead/aarch64 (release) 1
  2. # KickstartType: release
  3. # SuggestedImageType: fs
  4. # SuggestedArchitecture: aarch64
  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=adaptation0-bullhead-2.0.1.11 --baseurl=file:///home/mgh01/mer/android/droid/droid-local-repo/bullhead
  17. repo --name=strace --baseurl=http://repo.merproject.org/obs/home:/mgrover:/branches:/mer-tools:/devel/aarch64/
  18. repo --name=mer-core --baseurl=http://repo.merproject.org/obs/mer-core:/aarch64:/devel:/fixup/Core_aarch64/
  19.  
  20. %packages
  21. automake
  22. basesystem
  23. bash
  24. busybox-static
  25. binutils
  26. bluez
  27. boardname
  28. bsdtar
  29. build
  30. cmake
  31. connman
  32. coreutils
  33. crda
  34. deltarpm
  35. e2fsprogs
  36. file
  37. filesystem
  38. fontpackages-filesystem
  39. gcc
  40. gcc-c++
  41. gdb
  42. git
  43. glib2
  44. glibc-devel
  45. iproute
  46. iputils
  47. kbd
  48. libtool
  49. lsb-release
  50. make
  51. meego-rpm-config
  52. #mer-kickstarter
  53. mer-release
  54. #mic
  55. mpc
  56. net-tools
  57. ngfd
  58. nss
  59. ofono
  60. oneshot
  61. openssh-clients
  62. openssh-server
  63. #osc
  64. pam
  65. passwd
  66. patch
  67. perl
  68. pkgconfig
  69. prelink
  70. procps
  71. psmisc
  72. qt5-qttools-kmap2qmap
  73. readline
  74. repomd-pattern-builder
  75. rootfiles
  76. rpm
  77. rpm-build
  78. setup
  79. shadow-utils
  80. shared-mime-info
  81. ssu
  82. ssu-ks
  83. strace
  84. time
  85. usbutils
  86. util-linux
  87. vim
  88. iw
  89. wayland
  90. wayland-devel
  91. wpa_supplicant
  92. xdg-user-dirs
  93. zlib
  94. zlib-devel
  95. zypper
  96. libhybris*
  97. droid-config-bullhead
  98. droid-config-bullhead-patterns
  99. droid-config-bullhead-preinit-plugin
  100. droid-config-bullhead-sailfish
  101. droid-hal-bullhead
  102. droid-hal-bullhead-detritus
  103. droid-hal-bullhead-devel
  104. droid-hal-bullhead-img-boot
  105. droid-hal-bullhead-img-recovery
  106. droid-hal-bullhead-kernel
  107. droid-hal-bullhead-kernel-modules
  108. droid-hal-bullhead-tools
  109. droid-hal-version-bullhead
  110. droid-hal-version-bullhead-doc
  111. %end
  112.  
  113. %attachment
  114. ### Commands from /tmp/sandbox/usr/share/ssu/kickstart/attachment/bullhead
  115. /boot/hybris-boot.img
  116. /boot/hybris-updater-script
  117. /boot/hybris-updater-unpack.sh
  118. /boot/update-binary
  119.  
  120. %end
  121.  
  122. %pre
  123. export SSU_RELEASE_TYPE=release
  124. ### begin 01_init
  125. touch $INSTALL_ROOT/.bootstrap
  126. ### end 01_init
  127. %end
  128.  
  129. %post
  130. export SSU_RELEASE_TYPE=release
  131. ### begin 01_arch-hack
  132. if [ "aarch64" == armv7hl ] || [ "aarch64" == armv7tnhl ]; then
  133. # Without this line the rpm does not get the architecture right.
  134. echo -n "aarch64-meego-linux" > /etc/rpm/platform
  135.  
  136. # Also libzypp has problems in autodetecting the architecture so we force tha as well.
  137. # https://bugs.meego.com/show_bug.cgi?id=11484
  138. echo "arch = aarch64" >> /etc/zypp/zypp.conf
  139. fi
  140. ### end 01_arch-hack
  141. ### begin 01_rpm-rebuilddb
  142. # Rebuild db using target's rpm
  143. echo -n "Rebuilding db using target rpm.."
  144. rm -f /var/lib/rpm/__db*
  145. rpm --rebuilddb
  146. echo "done"
  147. ### end 01_rpm-rebuilddb
  148. ### begin 50_oneshot
  149. # exit boostrap mode
  150. rm -f /.bootstrap
  151.  
  152. # export some important variables until there's a better solution
  153. export LANG=en_US.UTF-8
  154. export LC_COLLATE=en_US.UTF-8
  155. export GSETTINGS_BACKEND=gconf
  156.  
  157. # run the oneshot triggers for root and first user uid
  158. UID_MIN=$(grep "^UID_MIN" /etc/login.defs | tr -s " " | cut -d " " -f2)
  159. DEVICEUSER=`getent passwd $UID_MIN | sed 's/:.*//'`
  160.  
  161. if [ -x /usr/bin/oneshot ]; then
  162. su -c "/usr/bin/oneshot --mic"
  163. su -c "/usr/bin/oneshot --mic" $DEVICEUSER
  164. fi
  165. ### end 50_oneshot
  166. ### begin 60_ssu
  167. if [ "$SSU_RELEASE_TYPE" = "rnd" ]; then
  168. [ -n "@RNDRELEASE@" ] && ssu release -r @RNDRELEASE@
  169. [ -n "@RNDFLAVOUR@" ] && ssu flavour @RNDFLAVOUR@
  170. # RELEASE is reused in RND setups with parallel release structures
  171. # this makes sure that an image created from such a structure updates from there
  172. [ -n "2.0.1.11" ] && ssu set update-version 2.0.1.11
  173. ssu mode 2
  174. else
  175. [ -n "2.0.1.11" ] && ssu release 2.0.1.11
  176. ssu mode 4
  177. fi
  178. ### end 60_ssu
  179. ### begin 70_sdk-domain
  180.  
  181. export SSU_DOMAIN=@RNDFLAVOUR@
  182.  
  183. if [ "$SSU_RELEASE_TYPE" = "release" ] && [[ "$SSU_DOMAIN" = "public-sdk" ]];
  184. then
  185. ssu domain sailfish
  186. fi
  187. ### end 70_sdk-domain
  188. %end
  189.  
  190. %post --nochroot
  191. export SSU_RELEASE_TYPE=release
  192. ### begin 01_release
  193. if [ -n "$IMG_NAME" ]; then
  194. echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release
  195. fi
  196. ### end 01_release
  197. ### begin bullhead
  198. cp $INSTALL_ROOT/etc/sailfish-release $IMG_OUT_DIR
  199. ### end bullhead
  200. %end
  201.  
  202. %pack
  203. export SSU_RELEASE_TYPE=release
  204. ### begin hybris
  205. pushd $IMG_OUT_DIR
  206.  
  207. DEVICE=bullhead
  208.  
  209. VERSION_FILE=./sailfish-release
  210. source $VERSION_FILE
  211.  
  212. # Locate rootfs tar.bz2 archive.
  213. for filename in *.tar.bz2; do
  214. GEN_IMG_BASE=$(basename $filename .tar.bz2)
  215. done
  216.  
  217. if [ ! -e "$GEN_IMG_BASE.tar.bz2" ]; then
  218. echo "No rootfs archive found, exiting ..."
  219. exit 1
  220. fi
  221.  
  222. IMG_SIZE=$(du -h $GEN_IMG_BASE.tar.bz2 | cut -f1)
  223.  
  224. # Output filenames
  225. DST_IMG_BASE=$ID-$DEVICE-$SAILFISH_FLAVOUR-$VERSION_ID-ghosalmartin
  226. DST_IMG=$DST_IMG_BASE.tar.bz2
  227.  
  228. # Copy boot image, updater scripts and updater binary into updater .zip tree.
  229. mkdir -p updater/META-INF/com/google/android
  230.  
  231. mv update-binary updater/META-INF/com/google/android/update-binary
  232. mv hybris-updater-script updater/META-INF/com/google/android/updater-script
  233. mv hybris-updater-unpack.sh updater/updater-unpack.sh
  234. mv hybris-boot.img updater/hybris-boot.img
  235.  
  236. # Temporarily move the rootfs into the updater directory
  237. mv $GEN_IMG_BASE.tar.bz2 updater/$DST_IMG
  238.  
  239. # Update updater-script with image details.
  240. 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
  241.  
  242. # pack updater .zip
  243. pushd updater
  244. 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
  245. popd # updater
  246.  
  247. # Move the rootfs back out of the updater directory
  248. mv updater/$DST_IMG $GEN_IMG_BASE.tar.bz2
  249.  
  250. # Clean up updater .zip working directory.
  251. rm -rf updater
  252.  
  253. popd # $IMG_OUT_DIR
  254. ### end hybris
  255. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement