spacepaste

  1.  
  2. # DisplayName: Jolla a5ultexx/@ARCH@ (release) 1
  3. # KickstartType: release
  4. # DeviceModel: a5ultexx
  5. # DeviceVariant: a5ultexx
  6. # SuggestedImageType: fs
  7. # SuggestedArchitecture: armv7hl
  8. user --name nemo --groups audio,input,video --password nemo
  9. lang en_US.UTF-8
  10. timezone --utc UTC
  11. keyboard us
  12. ### Commands from /tmp/sandbox/usr/share/ssu/kickstart/part/default
  13. part / --size 500 --ondisk sda --fstype=ext4
  14. ## No suitable configuration found in /tmp/sandbox/usr/share/ssu/kickstart/bootloader
  15. repo --name=adaptation-community-a5ultexx-@RELEASE@ --baseurl=http://repo.merproject.org/obs/nemo:/devel:/hw:/samsung:/a5ultexx/sailfish_latest_@ARCH@/
  16. repo --name=adaptation-community-a5ultexx-@RELEASE@ --baseurl=file:///home/marco/hadk/droid-local-repo/a5ultexx
  17. repo --name=adaptation-community-common-a5ultexx-@RELEASE@ --baseurl=http://repo.merproject.org/obs/nemo:/devel:/hw:/common/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. %packages
  22. @Jolla Configuration a5ultexx
  23. %end
  24. %attachment
  25. ### Commands from /tmp/sandbox/usr/share/ssu/kickstart/attachment/a5ultexx
  26. /boot/hybris-boot.img
  27. /boot/hybris-updater-script
  28. /boot/hybris-updater-unpack.sh
  29. /boot/update-binary
  30. %end
  31. %pre
  32. export SSU_RELEASE_TYPE=release
  33. ### begin 01_init
  34. touch $INSTALL_ROOT/.bootstrap
  35. ### end 01_init
  36. %end
  37. %post
  38. export SSU_RELEASE_TYPE=release
  39. ### begin 01_arch-hack
  40. if [ "@ARCH@" == armv7hl ] || [ "@ARCH@" == armv7tnhl ]; then
  41. # Without this line the rpm does not get the architecture right.
  42. echo -n "@ARCH@-meego-linux" > /etc/rpm/platform
  43. # Also libzypp has problems in autodetecting the architecture so we force tha as well.
  44. # https://bugs.meego.com/show_bug.cgi?id=11484
  45. echo "arch = @ARCH@" >> /etc/zypp/zypp.conf
  46. fi
  47. ### end 01_arch-hack
  48. ### begin 01_rpm-rebuilddb
  49. # Rebuild db using target's rpm
  50. echo -n "Rebuilding db using target rpm.."
  51. rm -f /var/lib/rpm/__db*
  52. rpm --rebuilddb
  53. echo "done"
  54. ### end 01_rpm-rebuilddb
  55. ### begin 50_oneshot
  56. # exit boostrap mode
  57. rm -f /.bootstrap
  58. # export some important variables until there's a better solution
  59. export LANG=en_US.UTF-8
  60. export LC_COLLATE=en_US.UTF-8
  61. export GSETTINGS_BACKEND=gconf
  62. # run the oneshot triggers for root and first user uid
  63. UID_MIN=$(grep "^UID_MIN" /etc/login.defs | tr -s " " | cut -d " " -f2)
  64. DEVICEUSER=`getent passwd $UID_MIN | sed 's/:.*//'`
  65. if [ -x /usr/bin/oneshot ]; then
  66. su -c "/usr/bin/oneshot --mic"
  67. su -c "/usr/bin/oneshot --mic" $DEVICEUSER
  68. fi
  69. ### end 50_oneshot
  70. ### begin 60_ssu
  71. if [ "$SSU_RELEASE_TYPE" = "rnd" ]; then
  72. [ -n "@RNDRELEASE@" ] && ssu release -r @RNDRELEASE@
  73. [ -n "@RNDFLAVOUR@" ] && ssu flavour @RNDFLAVOUR@
  74. # RELEASE is reused in RND setups with parallel release structures
  75. # this makes sure that an image created from such a structure updates from there
  76. [ -n "@RELEASE@" ] && ssu set update-version @RELEASE@
  77. ssu mode 2
  78. else
  79. [ -n "@RELEASE@" ] && ssu release @RELEASE@
  80. ssu mode 4
  81. fi
  82. ### end 60_ssu
  83. ### begin 70_sdk-domain
  84. export SSU_DOMAIN=@RNDFLAVOUR@
  85. if [ "$SSU_RELEASE_TYPE" = "release" ] && [[ "$SSU_DOMAIN" = "public-sdk" ]];
  86. then
  87. ssu domain sailfish
  88. fi
  89. ### end 70_sdk-domain
  90. %end
  91. %post --nochroot
  92. export SSU_RELEASE_TYPE=release
  93. ### begin 50_os-release
  94. (
  95. CUSTOMERS=$(find $INSTALL_ROOT/usr/share/ssu/features.d -name 'customer-*.ini' \
  96. |xargs --no-run-if-empty sed -n 's/^name[[:space:]]*=[[:space:]]*//p')
  97. cat $INSTALL_ROOT/etc/os-release
  98. echo "SAILFISH_CUSTOMER=\"${CUSTOMERS//$'\n'/ }\""
  99. ) > $IMG_OUT_DIR/os-release
  100. ### end 50_os-release
  101. %end
  102. %pack
  103. export SSU_RELEASE_TYPE=release
  104. ### begin hybris
  105. pushd $IMG_OUT_DIR
  106. DEVICE=a5ultexx
  107. VERSION_FILE=./os-release
  108. source $VERSION_FILE
  109. # Locate rootfs tar.bz2 archive.
  110. for filename in *.tar.bz2; do
  111. GEN_IMG_BASE=$(basename $filename .tar.bz2)
  112. done
  113. if [ ! -e "$GEN_IMG_BASE.tar.bz2" ]; then
  114. echo "No rootfs archive found, exiting ..."
  115. exit 1
  116. fi
  117. IMG_SIZE=$(du -h $GEN_IMG_BASE.tar.bz2 | cut -f1)
  118. # Output filenames
  119. DST_IMG_BASE=$ID-$DEVICE-$SAILFISH_FLAVOUR-$VERSION_ID@EXTRA_NAME@
  120. DST_IMG=$DST_IMG_BASE.tar.bz2
  121. # Copy boot image, updater scripts and updater binary into updater .zip tree.
  122. mkdir -p updater/META-INF/com/google/android
  123. mv update-binary updater/META-INF/com/google/android/update-binary
  124. mv hybris-updater-script updater/META-INF/com/google/android/updater-script
  125. mv hybris-updater-unpack.sh updater/updater-unpack.sh
  126. mv hybris-boot.img updater/hybris-boot.img
  127. # Temporarily move the rootfs into the updater directory
  128. mv $GEN_IMG_BASE.tar.bz2 updater/$DST_IMG
  129. # Update updater-script with image details.
  130. 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
  131. # pack updater .zip
  132. pushd updater
  133. 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
  134. popd # updater
  135. # Move the rootfs back out of the updater directory
  136. mv updater/$DST_IMG $GEN_IMG_BASE.tar.bz2
  137. # Clean up updater .zip working directory.
  138. rm -rf updater
  139. popd # $IMG_OUT_DIR
  140. ### end hybris
  141. %end
  142.