Last active
August 29, 2015 14:10
-
-
Save arturo182/eb3e6838d894f38757f1 to your computer and use it in GitHub Desktop.
MerSDK
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
# adding a new device | |
cd $HOME | |
# target | |
SFFE_SB2_TARGET=/parentroot/$MER_ROOT/targets/$VENDOR-$DEVICE-armv7hl | |
sudo mkdir -p $SFFE_SB2_TARGET | |
sudo tar --numeric-owner -pxjf Jolla-update9-Sailfish_SDK_Target-armv7hl.tar.bz2 -C $SFFE_SB2_TARGET | |
sudo chown -R $USER $SFFE_SB2_TARGET | |
cd $SFFE_SB2_TARGET | |
grep :$(id -u): /etc/passwd >> etc/passwd | |
grep :$(id -g): /etc/group >> etc/group | |
sb2-init -d -L "--sysroot=/" -C "--sysroot=/" -c /usr/bin/qemu-arm-dynamic -m sdk-build -n -N -t / $VENDOR-$DEVICE-armv7hl /opt/cross/bin/armv7hl-meego-linux-gnueabi-gcc | |
sb2 -t $VENDOR-$DEVICE-armv7hl -m sdk-install -R rpm --rebuilddb | |
sb2 -t $VENDOR-$DEVICE-armv7hl -m sdk-install -R zypper ar -G http://repo.merproject.org/releases/mer-tools/rolling/builds/armv7hl/packages/ mer-tools-rolling | |
sb2 -t $VENDOR-$DEVICE-armv7hl -m sdk-install -R zypper ref --force | |
# spec | |
cd $ANDROID_ROOT | |
cat <<EOF > rpm/droid-hal-$DEVICE.spec | |
# device is the cyanogenmod codename for the device | |
# eg mako = Nexus 4 | |
%define device $DEVICE | |
# vendor is used in device/%vendor/%device/ | |
%define vendor $VENDOR | |
%include rpm/droid-hal-device.inc | |
EOF | |
rpm/helpers/add_new_device.sh | |
COMPOSITOR_CFGS=rpm/device-$VENDOR-$DEVICE-configs/var/lib/environment/compositor | |
mkdir -p $COMPOSITOR_CFGS | |
cat <<EOF >$COMPOSITOR_CFGS/droid-hal-device.conf | |
# Config for $VENDOR/$DEVICE | |
HYBRIS_EGLPLATFORM=fbdev | |
QT_QPA_PLATFORM=hwcomposer | |
LIPSTICK_OPTIONS=-plugin evdevtouch:/dev/input/event0 \ | |
-plugin evdevkeyboard:keymap=/usr/share/qt5/keymaps/droid.qmap | |
EOF | |
# create .rpm files | |
mb2 -t $VENDOR-$DEVICE-armv7hl -s rpm/droid-hal-device.inc build | |
mb2 -t $VENDOR-$DEVICE-armv7hl -s rpm/droid-hal-$DEVICE.spec build | |
# create the repo | |
mkdir -p $ANDROID_ROOT/droid-local-repo/$DEVICE | |
rm -f $ANDROID_ROOT/droid-local-repo/$DEVICE/droid-hal-*rpm | |
mv RPMS/*${DEVICE}* $ANDROID_ROOT/droid-local-repo/$DEVICE | |
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install ssu domain sales | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install ssu dr sdk | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -m sdk-install ssu ar local-$DEVICE-hal file://$ANDROID_ROOT/droid-local-repo/$DEVICE | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper install droid-hal-$DEVICE-devel | |
# build middleware | |
cd $MER_ROOT/devel/mer-hybris | |
PKG=libhybris | |
cd $PKG | |
mb2 -s rpm/$PKG.spec -t $VENDOR-$DEVICE-armv7hl build | |
mkdir -p $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/ | |
rm -f $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/*.rpm | |
mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG | |
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-build zypper rm mesa-llvmpipe | |
PKG=qt5-qpa-hwcomposer-plugin | |
cd ../$PKG | |
mb2 -s rpm/$PKG.spec -t $VENDOR-$DEVICE-armv7hl build | |
mkdir -p $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/ | |
rm -f $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/*.rpm | |
mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG | |
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref | |
PKG=sensorfw | |
SPEC=sensorfw-qt5-hybris | |
cd ../$PKG | |
mb2 -s rpm/$SPEC.spec -t $VENDOR-$DEVICE-armv7hl build | |
mkdir -p $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/ | |
rm -f $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/*.rpm | |
mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG | |
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref | |
PKG=ngfd-plugin-droid-vibrator | |
SPEC=$PKG | |
cd ../$PKG | |
mb2 -s rpm/$SPEC.spec -t $VENDOR-$DEVICE-armv7hl build | |
mkdir -p $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/ | |
rm -f $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/*.rpm | |
mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG | |
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref | |
PKG=qt5-feedback-haptics-droid-vibrator | |
SPEC=$PKG | |
cd ../$PKG | |
mb2 -s rpm/$SPEC.spec -t $VENDOR-$DEVICE-armv7hl build | |
mkdir -p $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/ | |
rm -f $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/*.rpm | |
mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG | |
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref | |
PKG=pulseaudio-modules-droid | |
SPEC=$PKG | |
cd ../$PKG | |
mb2 -s rpm/$SPEC.spec -t $VENDOR-$DEVICE-armv7hl build | |
mkdir -p $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/ | |
rm -f $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/*.rpm | |
mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG | |
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref | |
PKG=qtscenegraph-adaptation | |
SPEC=qtscenegraph-adaptation-droid | |
cd ../$PKG | |
mb2 -s rpm/$SPEC.spec -t $VENDOR-$DEVICE-armv7hl build | |
mkdir -p $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/ | |
rm -f $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/*.rpm | |
mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG | |
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref |
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
# rebuilding sailfish | |
cd $ANDROID_ROOT | |
# create .rpm files | |
mb2 -t $VENDOR-$DEVICE-armv7hl -s rpm/droid-hal-device.inc build | |
mb2 -t $VENDOR-$DEVICE-armv7hl -s rpm/droid-hal-$DEVICE.spec build | |
# update the repo | |
mkdir -p $ANDROID_ROOT/droid-local-repo/$DEVICE | |
rm -f $ANDROID_ROOT/droid-local-repo/$DEVICE/droid-hal-*rpm | |
mv RPMS/*${DEVICE}* $ANDROID_ROOT/droid-local-repo/$DEVICE | |
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -m sdk-install ssu ar local-$DEVICE-hal file://$ANDROID_ROOT/droid-local-repo/$DEVICE | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install ssu lr | |
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref | |
# create .ks file | |
mb2 -t $VENDOR-$DEVICE-armv7hl -s hybris/droid-hal-configs/rpm/droid-hal-configs.spec build | |
HA_REPO="repo --name=adaptation0-$DEVICE-@RELEASE@" | |
sed -e "s|^$HA_REPO.*$|$HA_REPO --baseurl=file://$ANDROID_ROOT/droid-local-repo/$DEVICE|" $ANDROID_ROOT/installroot/usr/share/kickstarts/Jolla-@RELEASE@-$DEVICE-@[email protected] > tmp/Jolla-@RELEASE@-$DEVICE-@[email protected] | |
rpm/helpers/process_patterns.sh | |
# build it | |
RELEASE=1.0.8.19 # update 8 | |
RELEASE=1.1.0.38 # update 9 | |
EXTRA_NAME=-my1 | |
sudo mic create fs --arch armv7hl \ | |
--tokenmap=ARCH:armv7hl,RELEASE:$RELEASE,EXTRA_NAME:$EXTRA_NAME \ | |
--record-pkgs=name,url \ | |
--outdir=sfa-$DEVICE-ea-$RELEASE$EXTRA_NAME \ | |
--pack-to=sfa-$DEVICE-ea-$RELEASE$EXTRA_NAME.tar.bz2 \ | |
$ANDROID_ROOT/tmp/Jolla-@RELEASE@-$DEVICE-@[email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment