Skip to content

Commit

Permalink
mtk6580: linux-harmony: Don't add custom firmware directories, now ha…
Browse files Browse the repository at this point in the history
…ndled by firmwared
  • Loading branch information
FlorentRevest committed Jul 20, 2019
1 parent 342f867 commit d36ea92
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 27 deletions.
48 changes: 48 additions & 0 deletions meta-mtk6580/README-system-dir
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/system/ directory build instructions
=====================================

The /system/ directory available on the mooneye platform and provided in
prebuilt form by android_mooneye-lp.bb is a tricky mix of an original WearOS
/system and some recompiled parts. This is due to the half-closed nature of
Android Wear. This file explains you how to rebuild manually your own /system
dir.

We first need to adb pull a /system directory from a living WearOS 8.0.0
installation and then modify it with some symlinks:
adb pull /system/ system
cd system/
rm -rf app/ fake-libs fonts/ framework/ media/ priv-app/

This installation wouldn't be enough because libhybris needs a patched bionic.
Thankfully, this part is open-source so we can download and recompile it. (This
may take a while)
### Download
curl https://storage.googleapis.com/git-repo-downloads/repo > repo
chmod a+x repo
mkdir -p android-o/
cd android-o
../repo init -u https://github.com/AsteroidOS/android_manifest -b android-wear-8.0.0_r1
../repo sync

### Build (can only be done in bash)
. build/envsetup.sh
mmma bionic

### Installation
cp out/target/product/generic/root/init ../system/bin/
cp -r out/target/product/generic/system/* ../system/
chmod +x ../system/bin/*

libhybris headers
=================

The second part of this tarball contains header files to compile against
libhybris. There is a script in the libhybris distribution that can pull
the header files from the downloaded android distribution (above).

git clone https://github.com/libhybris/libhybris
./libhybris/utils/extract_headers.sh android-dory include

With the system and include directories, you can create the system-dir tarball:

tar zcvf system.tar.gz system include

This file was deleted.

1 change: 0 additions & 1 deletion meta-mtk6580/recipes-kernel/linux/linux-harmony_lp-mr1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ SRC_URI = "git://github.com/OpenWatchProject/android_kernel_mediatek_mt6580;prot
file://0010-sec_dev-Fix-firmware-loading.patch \
file://0011-Disable-new-gcc-7.1.1-warnings.patch \
file://0012-ARM-uaccess-remove-put_user-code-duplication.patch \
file://0013-firmware_class-Load-firmwares-from-Android-directori.patch \
"
SRCREV = "b1ebbe66774b96f03fb440860d328a119b7f9a6b"
LINUX_VERSION ?= "3.10"
Expand Down

0 comments on commit d36ea92

Please sign in to comment.