[Pixel C Android Development] followmsi:
Again some time for PixelC ... and a short demonstration on how to build your own TWRP from sources ..

Yes .. and too many discussions here. :)

(MXC89F)

repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r32

repo sync -n -j 4 && repo sync -l -j 12

git clone https://github.com/omnirom/android_external_busybox

git checkout android-6.0

git clone https://github.com/omnirom/android_bootable_recovery

git checkout android-6.0

copy busybox folder into /external inside build-tree

replace /bootable/recovery with the new recovery folder

. build/envsetup.sh

lunch aosp_dragon-userdebug

export CROSS_COMPILE=aarch64-linux-gnu-

export ARCH=ARM64

make -j8 recoveryimage

compiling .. compiling .......

Install: out/target/product/dragon/recovery/root/sbin/teamwin

target C++: recovery <= bootable/recovery/twrp.cpp

target C++: recovery <= bootable/recovery/fixContexts.cpp

target C++: recovery <= bootable/recovery/twrpTar.cpp

target C++: recovery <= bootable/recovery/twrpDU.cpp

target C++: recovery <= bootable/recovery/twrpDigest.cpp

target C++: recovery <= bootable/recovery/find_file.cpp

target C++: recovery <= bootable/recovery/infomanager.cpp

target C++: recovery <= bootable/recovery/data.cpp

target C++: recovery <= bootable/recovery/partition.cpp

target C++: recovery <= bootable/recovery/partitionmanager.cpp

target C++: recovery <= bootable/recovery/progresstracking.cpp

target C++: recovery <= bootable/recovery/twinstall.cpp

target C++: recovery <= bootable/recovery/twrp-functions.cpp

target C++: recovery <= bootable/recovery/openrecoveryscript.cpp

target C: recovery <= bootable/recovery/digest/md5.c

target C: recovery <= bootable/recovery/tarWrite.c

target Executable: recovery (out/target/product/dragon/obj/EXECUTABLES/recovery_intermediates/LINKED/recovery)

target Unpacked: recovery (out/target/product/dragon/obj/EXECUTABLES/recovery_intermediates/PACKED/recovery)

target Symbolic: recovery (out/target/product/dragon/symbols/recovery/root/sbin/recovery)

target Strip: recovery (out/target/product/dragon/obj/EXECUTABLES/recovery_intermediates/recovery)

Install: out/target/product/dragon/recovery/root/sbin/recovery

----- Making recovery image ------

Copying baseline ramdisk...

Modifying ramdisk contents...

prebuilts/misc/scripts/vboot_signer/vboot_signer.sh prebuilts/misc/linux-x86/futility/futility out/target/product/dragon/recovery.img.unsigned external/vboot_reference/tests/devkeys/kernel_data_key.vbpubk external/vboot_reference/tests/devkeys/kernel_data_key.vbprivk external/vboot_reference/tests/devkeys/kernel_subkey.vbprivk out/target/product/dragon/recovery.img.keyblock out/target/product/dragon/recovery.img

signing out/target/product/dragon/recovery.img.unsigned with external/vboot_reference/tests/devkeys/kernel_data_key.vbprivk to generate out/target/product/dragon/recovery.img

----- Made recovery image: out/target/product/dragon/recovery.img --------

#### make completed successfully (05:57 (mm:ss)) ####

/out/target/product/dragon# ll

total 56824

drwxr-xr-x 9 root root 4096 May 27 14:30 ./

drwxr-xr-x 3 root root 4096 May 27 14:24 ../

-rw-r--r-- 1 root root 21 May 27 14:25 android-info.txt

-rw-r--r-- 1 root root 8732672 May 27 14:30 boot.img

-rw-r--r-- 1 root root 1208 May 27 14:30 boot.img.keyblock

-rw-r--r-- 1 root root 8652800 May 27 14:30 boot.img.unsigned

-rw-r--r-- 1 root root 73752 May 27 14:24 clean_steps.mk

drwxr-xr-x 2 root root 4096 May 27 14:30 fake_packages/

-rw-r--r-- 1 root root 7628648 May 27 14:30 kernel

drwxr-xr-x 14 root root 4096 May 27 14:30 obj/

drwxr-xr-x 6 root root 4096 May 27 14:25 obj_arm/

-rw-r--r-- 1 root root 807 May 27 14:24 previous_build_config.mk

-rw-r--r-- 1 root root 1020200 May 27 14:30 ramdisk.img

-rw-r--r-- 1 root root 5555360 May 27 14:30 ramdisk-recovery.img

drwxr-xr-x 3 root root 4096 May 27 14:25 recovery/

-rw-r--r-- 1 root root 13266944 May 27 14:30 recovery.img

-rw-r--r-- 1 root root 1208 May 27 14:30 recovery.img.keyblock

-rw-r--r-- 1 root root 13187072 May 27 14:30 recovery.img.unsigned

drwxr-xr-x 9 root root 4096 May 27 14:30 root/

drwxr-xr-x 5 root root 4096 May 27 14:30 symbols/

drwxr-xr-x 8 root root 4096 May 27 14:30 system/

This recovery.img should boot and work on Pixel C ..

But no USB is working .. and other fixes are missing.

All the rest is done "manually" .. inside ramdisk-recovery.img

At least the way I do it :)

Now .. I have changed the make command ..

make -j8 recoveryimage

to

make -j8

and try to build the complete AOSP ROM ..

got already one compiling error .. https://groups.google.com/forum/#!topic/android-x86/xtmwv4Dw8l0

after 1 hour compiling :(

I am running on Ubunutu 16.04 LTS .. maybe too new :)

Cheers

Update:

I have tried to compile the system.img 2 times .. always the same error message. (link above - but not reloc 42 error)

Just this one ..

build/core/host_shared_library_internal.mk:51: recipe for target 'out/host/linux-x86/obj/lib/libartd.so' failed

Changing back to 14.04 is too easy :)

So I have tried to find antoher way on 16.04 ...

And I found this here ... https://android-review.googlesource.com/#/c/223100/

Changed the file "HOST_x86_common.mk" accordingly .. and it was compiling .. fine :)

make_ext4fs -s -T -1 -S out/target/product/dragon/root/file_contexts -L system -l 3728470016 -a system out/target/product/dragon/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/dragon/system out/target/product/dragon/system

Creating filesystem with parameters:

Size: 3728470016

Block size: 4096

Blocks per group: 32768

Inodes per group: 8128

Inode size: 256

Journal blocks: 14222

Label: system

Blocks: 910271

Block groups: 28

Reserved block group size: 223

Created filesystem with 1925/227584 inodes and 145331/910271 blocks

build_verity_tree -A aee087a5be3b982978c923f566a94613496b417f2af592639bc80d141e34dfe7 out/target/product/dragon/obj/PACKAGING/systemimage_intermediates/system.img /tmp/tmp5UYeJC_verity_images/verity.img

system/extras/verity/build_verity_metadata.py 3728470016 /tmp/tmp5UYeJC_verity_images/verity_metadata.img 394a1be0f5918289832884e72a33de724a2cb8d1ac7bc83795afc6d22c5de150 aee087a5be3b982978c923f566a94613496b417f2af592639bc80d141e34dfe7 /dev/block/platform/700b0600.sdhci/by-name/APP out/host/linux-x86/bin/verity_signer build/target/product/security/verity.pk8

append2simg out/target/product/dragon/obj/PACKAGING/systemimage_intermediates/system.img /tmp/tmp5UYeJC_verity_images/verity_metadata.img

append2simg out/target/product/dragon/obj/PACKAGING/systemimage_intermediates/system.img /tmp/tmp5UYeJC_verity_images/verity.img

Install system fs image: out/target/product/dragon/system.img

out/target/product/dragon/system.img+out/target/product/dragon/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=3836777472 blocksize=4224 total=566260212 reserve=38759424

#### make completed successfully (01:38:26 (hh:mm:ss)) ####

out/target/product/dragon# ll

total 614068

drwxr-xr-x 13 root root 4096 May 27 21:12 ./

drwxr-xr-x 3 root root 4096 May 27 19:35 ../

-rw-r--r-- 1 root root 21 May 27 19:36 android-info.txt

-rw-r--r-- 1 root root 8732672 May 27 20:56 boot.img

-rw-r--r-- 1 root root 1208 May 27 20:56 boot.img.keyblock

-rw-r--r-- 1 root root 8652800 May 27 20:56 boot.img.unsigned

drwxr-xr-x 2 root root 4096 May 27 20:47 cache/

-rw-r--r-- 1 root root 8388912 May 27 20:47 cache.img

-rw-r--r-- 1 root root 73752 May 27 19:35 clean_steps.mk

drwxr-xr-x 4 root root 4096 May 27 20:56 data/

drwxr-xr-x 2 root root 4096 May 27 20:59 fake_packages/

drwxr-xr-x 5 root root 4096 May 27 20:05 gen/

-rw-r--r-- 1 root root 83513 May 27 21:12 installed-files.txt

-rw-r--r-- 1 root root 7628648 May 27 20:05 kernel

drwxr-xr-x 16 root root 4096 May 27 21:12 obj/

drwxr-xr-x 6 root root 4096 May 27 19:36 obj_arm/

-rw-r--r-- 1 root root 807 May 27 19:35 previous_build_config.mk

-rw-r--r-- 1 root root 1020202 May 27 20:56 ramdisk.img

-rw-r--r-- 1 root root 5555367 May 27 21:05 ramdisk-recovery.img

drwxr-xr-x 3 root root 4096 May 27 19:36 recovery/

-rw-r--r-- 1 root root 13266944 May 27 21:05 recovery.img

-rw-r--r-- 1 root root 1208 May 27 21:05 recovery.img.keyblock

-rw-r--r-- 1 root root 13187072 May 27 21:05 recovery.img.unsigned

drwxr-xr-x 9 root root 4096 May 27 20:56 root/

drwxr-xr-x 7 root root 4096 May 27 20:56 symbols/

drwxr-xr-x 14 root root 4096 May 27 21:06 system/

-rw-r--r-- 1 root root 562117476 May 27 21:12 system.img

drwxr-xr-x 5 root root 4096 May 27 21:06 vendor/

And now we have a new Dragon AOSP Rom ... 6.0.1_r32

Maybe I will upload the system.img via Update.ZIP :)

Cheers

EDIT:

Here it is .. Update.ZIP_PixelC_Ryu_AOSP_6.0.1-r32_system.img_v160527.zip

Download: https://onedrive.live.com/?authkey=!ABLdSOKIeXgg_XU&id=479EB75F5DD9DA59!117&cid=479EB75F5DD9DA59