Студопедия

Главная страница Случайная страница

КАТЕГОРИИ:

АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторикаСоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника






Recommended: build your first Ubuntu image for a Nexus 4






This is an optional step, but an important one for newcomers. It will ensure your environment is correctly set up. You are going to build your first Ubuntu image for a Nexus 4 before building your port.

First, let’s speed up the incoming build process by enabling caching. Run this command on a terminal:

export USE_CCACHE=1

Then, source your path with a set of android build tools. Run this command now:

. build/envsetup.sh

See the list of build targets by running the lunch command

lunch

You're building on Linux

Lunch menu... pick a combo:

1. aosp_arm-eng

2. aosp_x86-eng

3. aosp_mips-eng

4. vbox_x86-eng

5. mini_armv7a_neon-userdebug

6. mini_x86-userdebug

7. aosp_grouper-userdebug

8. aosp_tilapia-userdebug

9. aosp_deb-userdebug

10. aosp_flo-userdebug

11. aosp_hammerhead-userdebug

12. aosp_mako-userdebug

13. aosp_manta-userdebug

Choose the device you want to build for (in this case, number 12: aosp_mako-userdebug)

As the last step, use the make command to build the final image.

make -j4 # Or any other amount of threads

And that’s it! If everything went well, you should now have a set of flashable images (boot, system, recovery) in the out/target/product/mako folder.

Flashing the image

After the build out/target/product/mako will have the device specific build artifacts such as boot.img, system.img, recovery.img which can be flashed using fastboot to the respective partitions like:

$ fastboot flash boot boot.img

$ fastboot flash recovery recovery.img

As our Ubuntu image is not built by the Android build system, the best approach is to just flash it directly using rootstock, like described bellow (from bootloader):

$ fastboot boot out/target/product/mako/recovery.img

$ bzr branch lp: project-rootstock-ng

$ cd project-rootstock-ng/

$./rootstock-touch-install vivid-preinstalled-touch-armhf.tar.gz out/target/product/mako/system.img

You can find the latest Ubuntu rootfs image at https://cdimage.ubuntu.com/ubuntu-touch/daily-preinstalled/current/vivid-preinstalled-touch-armhf.tar.gz.

Enabling a new device

If you're repository is compatible with the AOSP tree, it's just a matter of adding the device specific git repositories and the vendor files (usually blobs that you need to extract from the original android image). Once that is done, you should be able build a small android system image that can be used by Ubuntu Touch in order to make it fully compatible with the device.

Device

Add your device specific git repositories under phablet/device (" phablet" is the repository you cloned by following the previous build example and/or Touch/Building).

Make sure it's respecting the format used by AOSP (device/< vendor> /< device name>).


Поделиться с друзьями:

mylektsii.su - Мои Лекции - 2015-2024 год. (0.006 сек.)Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав Пожаловаться на материал