Last active
March 24, 2019 12:40
-
-
Save vknecht/a4c4a00ecbee472b6f3d7ed01e24509a to your computer and use it in GitHub Desktop.
Kickstart for a Nemo Mobile mic-image on idol3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DisplayName: GlacierUX/armv7hl (release) 1 | |
# KickstartType: release | |
# SuggestedImageType: fs | |
# SuggestedArchitecture: armv7hl | |
lang en_US.UTF-8 | |
keyboard us | |
###user --name nemo --groups audio,video --password nemo | |
user --name nemo --groups audio,input,video --password nemo | |
timezone --utc UTC | |
### Commands from /tmp/sandbox/usr/share/ssu/kickstart/part/default | |
part / --size 500 --ondisk sda --fstype=ext4 | |
## No suitable configuration found in /tmp/sandbox/usr/share/ssu/kickstart/bootloader | |
#repo --name=adaptation-community-idol3-@RELEASE@ --baseurl=http://repo.merproject.org/obs/nemo:/testing:/hw:/TCL:/idol3/sailfishos_@RELEASE@/ | |
#repo --name=adaptation-community-common-idol3-@RELEASE@ --baseurl=http://repo.merproject.org/obs/nemo:/devel:/hw:/common/sailfishos_latest/ | |
repo --name=adaptation-community-idol3-@RELEASE@ --baseurl=http://repo.merproject.org/obs/nemo:/devel:/hw:/TCL:/idol3/sailfish_latest_@ARCH@/ | |
repo --name=adaptation-community-common-idol3-@RELEASE@ --baseurl=http://repo.merproject.org/obs/nemo:/devel:/hw:/common/sailfish_latest_@ARCH@/ | |
repo --name=mer-core --baseurl=http://repo.merproject.org/obs/home:/neochapay:/mer:/core/latest_armv7hl | |
repo --name=mer-qt5 --baseurl=http://repo.merproject.org/obs/home:/neochapay:/mer:/qt56/latest_armv7hl | |
repo --name=mer-mw --baseurl=http://repo.merproject.org/obs/home:/neochapay:/mer:/mw/latest_armv7hl | |
repo --name=nemo-ux --baseurl=http://repo.merproject.org/obs/home:/neochapay:/mer:/nemo-devel-ux/latest_armv7hl | |
### Needed for ssu-kickstart-configuration-jolla BuilRequires in droid-config-$DEVICE | |
repo --name=jolla --baseurl=https://releases.jolla.com/releases/3.0.1.11/jolla/armv7hl/ | |
%packages | |
### From https://build.merproject.org/package/view_file/nemo:devel:hw:TCL:idol3/_pattern/jolla-hw-adaptation-idol3?expand=1 | |
### commented the Jolla ones... | |
droid-hal-idol3 | |
droid-hal-idol3-img-boot | |
droid-hal-idol3-kernel-modules | |
droid-config-idol3-sailfish | |
droid-config-idol3-pulseaudio-settings | |
droid-config-idol3-policy-settings | |
droid-config-idol3-preinit-plugin | |
droid-config-idol3-flashing | |
droid-config-idol3-bluez5 | |
droid-hal-version-idol3 | |
libhybris-libEGL | |
libhybris-libGLESv2 | |
libhybris-libwayland-egl | |
hybris-libsensorfw-qt5 | |
ngfd-plugin-native-vibrator | |
qt5-feedback-haptics-native-vibrator | |
qt5-plugin-generic-evdev | |
pulseaudio-modules-droid | |
pulseaudio-modules-droid-glue | |
qt5-qtmultimedia-plugin-mediaservice-gstmediacapture | |
qt5-qtwayland-wayland_egl | |
qt5-qpa-hwcomposer-plugin | |
qtscenegraph-adaptation | |
gstreamer1.0 | |
gstreamer1.0-plugins-good | |
gstreamer1.0-plugins-base | |
gstreamer1.0-plugins-bad | |
nemo-gstreamer1.0-interfaces | |
gstreamer1.0-droid | |
mce-plugin-libhybris | |
usb-moded | |
usb-moded-defaults-android | |
usb-moded-developer-mode-android | |
usb-moded-connection-sharing-android-config | |
rfkill | |
#jolla-devicelock-daemon-encsfa | |
geoclue-provider-hybris | |
qt5-qtmultimedia-plugin-mediaservice-irisradio | |
#jolla-mediaplayer-radio | |
#jolla-settings-system-flashlight | |
sd-utils | |
### end from pattern | |
### Excluded, mainly due to conflict with nemomobile packages | |
-jolla-firstsession | |
-jolla-settings-system | |
-lipstick-jolla-home-qt5 | |
-jolla-settings-networking | |
-jolla-startupwizard | |
-jolla-settings-accounts | |
-jolla-settings-system-developermode | |
-sailfish-settings-networking | |
-jolla-developer-mode | |
-usb-moded-defaults-android | |
### @TODO : replace with nemomobile infos (/etc/os-release) | |
sailfish-version-variant | |
### Needed for /sbin/ifconfig, and busybox-static is missing | |
net-tools | |
busybox-static | |
### Useful packages | |
less | |
mce-tools | |
### Nemo packages, inspired from https://gist.github.com/neochapay/59d7ac23691f97b683104c93aff23266 | |
lipstick-glacier-home-qt5 | |
glacier-calc | |
glacier-camera | |
glacier-contacts | |
glacier-dialer | |
glacier-filemuncher | |
glacier-gallery | |
glacier-music | |
glacier-settings | |
passwd | |
vim | |
nemo-firstsession | |
nemo-mobile-session-wayland | |
#just for test | |
qt5-plugin-platform-eglfs | |
qt5-plugin-platform-linuxfb | |
qt5-plugin-platform-minimal | |
qt5-plugin-platform-offscreen | |
%end | |
### Missing : Commands from /tmp/sandbox/usr/share/ssu/kickstart/attachment/idol3 | |
%attachment | |
/boot/hybris-boot.img | |
/boot/hybris-updater-script | |
/boot/hybris-updater-unpack.sh | |
/boot/update-binary | |
%end | |
%pre | |
export SSU_RELEASE_TYPE=release | |
### begin 01_init | |
touch $INSTALL_ROOT/.bootstrap | |
### end 01_init | |
%end | |
%post | |
export SSU_RELEASE_TYPE=release | |
### begin 01_arch-hack | |
if [ "@ARCH@" == armv7hl ] || [ "@ARCH@" == armv7tnhl ]; then | |
# Without this line the rpm does not get the architecture right. | |
echo -n "@ARCH@-meego-linux" > /etc/rpm/platform | |
# Also libzypp has problems in autodetecting the architecture so we force tha as well. | |
# https://bugs.meego.com/show_bug.cgi?id=11484 | |
echo "arch = @ARCH@" >> /etc/zypp/zypp.conf | |
fi | |
### end 01_arch-hack | |
### begin 01_rpm-rebuilddb | |
# Rebuild db using target's rpm | |
echo -n "Rebuilding db using target rpm.." | |
rm -f /var/lib/rpm/__db* | |
rpm --rebuilddb | |
echo "done" | |
### end 01_rpm-rebuilddb | |
### begin 50_oneshot | |
# exit boostrap mode | |
rm -f /.bootstrap | |
# export some important variables until there's a better solution | |
export LANG=en_US.UTF-8 | |
export LC_COLLATE=en_US.UTF-8 | |
export GSETTINGS_BACKEND=gconf | |
# run the oneshot triggers for root and first user uid | |
UID_MIN=$(grep "^UID_MIN" /etc/login.defs | tr -s " " | cut -d " " -f2) | |
DEVICEUSER=`getent passwd $UID_MIN | sed 's/:.*//'` | |
if [ -x /usr/bin/oneshot ]; then | |
su -c "/usr/bin/oneshot --mic" | |
su -c "/usr/bin/oneshot --mic" $DEVICEUSER | |
fi | |
### end 50_oneshot | |
### begin 60_ssu | |
if [ "$SSU_RELEASE_TYPE" = "rnd" ]; then | |
[ -n "@RNDRELEASE@" ] && ssu release -r @RNDRELEASE@ | |
[ -n "@RNDFLAVOUR@" ] && ssu flavour @RNDFLAVOUR@ | |
# RELEASE is reused in RND setups with parallel release structures | |
# this makes sure that an image created from such a structure updates from there | |
[ -n "@RELEASE@" ] && ssu set update-version @RELEASE@ | |
ssu mode 2 | |
else | |
[ -n "@RELEASE@" ] && ssu release @RELEASE@ | |
ssu mode 4 | |
fi | |
### end 60_ssu | |
%end | |
%post --nochroot | |
export SSU_RELEASE_TYPE=release | |
### begin 50_os-release | |
( | |
CUSTOMERS=$(find $INSTALL_ROOT/usr/share/ssu/features.d -name 'customer-*.ini' \ | |
|xargs --no-run-if-empty sed -n 's/^name[[:space:]]*=[[:space:]]*//p') | |
cat $INSTALL_ROOT/etc/os-release | |
echo "SAILFISH_CUSTOMER=\"${CUSTOMERS//$'\n'/ }\"" | |
) > $IMG_OUT_DIR/os-release | |
### end 50_os-release | |
%end | |
%pack | |
export SSU_RELEASE_TYPE=release | |
### Missing : ### begin hybris | |
pushd $IMG_OUT_DIR | |
DEVICE=idol3 | |
VERSION_FILE=./os-release | |
source $VERSION_FILE | |
# Locate rootfs tar.bz2 archive. | |
for filename in *.tar.bz2; do | |
GEN_IMG_BASE=$(basename $filename .tar.bz2) | |
done | |
if [ ! -e "$GEN_IMG_BASE.tar.bz2" ]; then | |
echo "No rootfs archive found, exiting ..." | |
exit 1 | |
fi | |
IMG_SIZE=$(du -h $GEN_IMG_BASE.tar.bz2 | cut -f1) | |
# Output filenames | |
DST_IMG_BASE=$ID-$DEVICE-$SAILFISH_FLAVOUR-$VERSION_ID@EXTRA_NAME@ | |
DST_IMG=$DST_IMG_BASE.tar.bz2 | |
# Copy boot image, updater scripts and updater binary into updater .zip tree. | |
mkdir -p updater/META-INF/com/google/android | |
mv update-binary updater/META-INF/com/google/android/update-binary | |
mv hybris-updater-script updater/META-INF/com/google/android/updater-script | |
mv hybris-updater-unpack.sh updater/updater-unpack.sh | |
mv hybris-boot.img updater/hybris-boot.img | |
# Temporarily move the rootfs into the updater directory | |
mv $GEN_IMG_BASE.tar.bz2 updater/$DST_IMG | |
# Update updater-script with image details. | |
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 | |
# pack updater .zip | |
pushd updater | |
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 | |
popd # updater | |
# Move the rootfs back out of the updater directory | |
mv updater/$DST_IMG $GEN_IMG_BASE.tar.bz2 | |
# Clean up updater .zip working directory. | |
rm -rf updater | |
popd # $IMG_OUT_DIR | |
### end hybris | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Probably misses important dependencies pulled by excluded jolla packages.
The device bootloops after reaching systemd Timers target even after masking d-h-i, ofono and wlan module loading.