Advertisement
adeen-s

Untitled

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