AOSP Build Steps Using github.com/ayufan-rock64/android-7.1
#1
Please provide step-by-step method to build 
rock64_20170809_stock_android_7.1.2_sdboot.img
Using source code provided @
https://github.com/rock64-linux
https://github.com/rockchip-linux
https://source.android.com/
https://android.googlesource.com/

Major task is to merge rock64-linux code with full ASOP and build it for Rock64

Regards.
#2
It is impossible. You can find all rock64-android sources and try to compile it yourself: https://github.com/rock64-android/.
Homepage: https://ayufan.eu

Releases:
Rock/Pro 64/Pinebook Pro: LinuxChromium OS
So/Pine A64/Pinebook: LinuxAndroid 6.0Android 7.1

Buy me a Beer
#3
I have repo initialised using :
repo init -u https://android.googlesource.com/platform/manifest -b android-7.1.2_r6
and than replaced default.xml content with
https://github.com/ayufan-rock64/android...nifest.xml
[<default remote="aosp" revision="refs/tags/android-7.1.2_r6" sync-j="4"/>]
Will it work ?
#4
Please check sync error:

error: Cannot fetch all (GitError: all update-ref: fatal: 75b3f7059f1c495f74a8b1e9943a65e8121d13d8^0: not a valid SHA1
)
Fetching project device-rockchip-rk3328
Exception in thread Thread-270:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/user/aosp/ROCK64/android-7.1.2_r6/.repo/repo/subcmds/sync.py", line 270, in _FetchProjectList
success = self._FetchHelper(opt, project, *args, **kwargs)
File "/home/user/aosp/ROCK64/android-7.1.2_r6/.repo/repo/subcmds/sync.py", line 314, in _FetchHelper
prune=opt.prune)
File "/home/user/aosp/ROCK64/android-7.1.2_r6/.repo/repo/project.py", line 1271, in Sync_NetworkHalf
self._InitMRef()
File "/home/user/aosp/ROCK64/android-7.1.2_r6/.repo/repo/project.py", line 2364, in _InitMRef
self._InitAnyMRef(R_M + self.manifest.branch)
File "/home/user/aosp/ROCK64/android-7.1.2_r6/.repo/repo/project.py", line 2376, in _InitAnyMRef
self.bare_git.UpdateRef(ref, dst, message=msg, detach=True)
File "/home/user/aosp/ROCK64/android-7.1.2_r6/.repo/repo/project.py", line 2673, in UpdateRef
self.update_ref(*cmdv)
File "/home/user/aosp/ROCK64/android-7.1.2_r6/.repo/repo/project.py", line 2747, in runner
(self._project.name, name, p.stderr))
GitError: all update-ref: fatal: 75b3f7059f1c495f74a8b1e9943a65e8121d13d8^0: not a valid SHA1


Seems to be revision issue of:

<project clone-depth="1" name="all" path="vendor/opengapps/sources/all" remote="opengapps" revision="75b3f7059f1c495f74a8b1e9943a65e8121d13d8" upstream="master"/>
#5
Updated to latest commit
opengapps/arm64 : 9448892d761662c8cafe566f4f96eb1aba016c38
opengapps/arm : cfd2c057d15672ecca049f921a9e68a6cb97ab07
in default.xml
Latest Commit picked from https://github.com/opengapps/
#6
After Source sync:
Command to build is:
cd ~/proj/kernel/
make ARCH=arm64 rockchip_defconfig
make -j8 ARCH=arm64 rk3328-rock64.img
cd ..
source build/envsetup.sh
lunch
29
make -j4
----------------------------------------------------------------------------------
24. rock64_regular-eng
25. rock64_regular-userdebug
26. rock64_regular-user
27. rock64_atv-eng
28. rock64_atv-userdebug
29. rock64_atv-user
----------------------------------------------------------------------------------
Please confirm kernel deconfig rockchip_defconfig

==============================================================
make u-boot image as below
cd ~/proj/u-boot/
make rk3328_box_defconfig
make ARCHV=aarch64 -j8
==============================================================
make full image at same place using
mkimage.sh
/rockdev/Image-rock64_atv will be geneated
==============================================================
#7
[ 99% 32224/32225] Target system fs image: out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system.img
FAILED: /bin/bash -c "(mkdir -p out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/ out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates && rm -rf out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"fs_type=ext4\" >> out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"system_size=1610612736\" >> out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"userdata_fs_type=ext4\" >> out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"cache_size=69206016\" >> out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"extfs_sparse_flag=-s\" >> out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >> out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"selinux_fc=out/target/product/rk3328/root/file_contexts.bin\" >> out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"skip_fsck=true\" >> out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (PATH=out/host/linux-x86/bin/:\$PATH ./build/tools/releasetools/build_image.py out/target/product/rk3328/system out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system_image_info.txt out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/rk3328/system || ( echo \"Out of space? the tree size of out/target/product/rk3328/system is (MB): \" 1>&2 ; du -sm out/target/product/rk3328/system 1>&2; if [ \"ext4\" == \"ext4\" ]; then maxsize=1610612736; if [ \"\" == \"true\" ]; then maxsize=\$((maxsize - 4096 * 4096)); fi; echo \"The max is \$(( maxsize / 1048576 )) MB.\" 1>&2 ; else echo \"The max is \$(( 1610612736 / 1048576 )) MB.\" 1>&2 ; fi; mkdir -p out/dist; cp out/target/product/rk3328/installed-files.txt out/dist/installed-files-rescued.txt; exit 1 ) )"
error: failed to build out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system.img from out/target/product/rk3328/system
Running: mkuserimg.sh -s out/target/product/rk3328/system out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 1610612736 -D out/target/product/rk3328/system -L system out/target/product/rk3328/root/file_contexts.bin
make_ext4fs -s -T -1 -S out/target/product/rk3328/root/file_contexts.bin -L system -l 1610612736 -a system out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/rk3328/system out/target/product/rk3328/system
error: ext4_allocate_best_fit_partial: failed to allocate 16191 blocks, out of space?
Creating filesystem with parameters:
Size: 1610612736
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 6144
Label: system
Blocks: 393216
Block groups: 12
Reserved block group size: 95
Out of space? the tree size of out/target/product/rk3328/system is (MB):
1886 out/target/product/rk3328/system
The max is 1536 MB.
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

#### make failed to build some targets (03:45:39 (hh:mmConfuseds)) ####
#8
(08-31-2017, 09:21 PM)birender.s Wrote: error: failed to build out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system.img from out/target/product/rk3328/system
Running: mkuserimg.sh -s out/target/product/rk3328/system out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 1610612736 -D out/target/product/rk3328/system -L system out/target/product/rk3328/root/file_contexts.bin
make_ext4fs -s -T -1 -S out/target/product/rk3328/root/file_contexts.bin -L system -l 1610612736 -a system out/target/product/rk3328/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/rk3328/system out/target/product/rk3328/system
error: ext4_allocate_best_fit_partial: failed to allocate 16191 blocks, out of space?
Creating filesystem with parameters:
Size: 1610612736
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 6144
Label: system
Blocks: 393216
Block groups: 12
Reserved block group size: 95
Out of space? the tree size of out/target/product/rk3328/system is (MB):
1886 out/target/product/rk3328/system
The max is 1536 MB.
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

#### make failed to build some targets (03:45:39 (hh:mmConfuseds)) ####
You can change the following to increase the system image size:

/device/rockchip/rk3328/BoardConfig.mk
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648

//This is for 2GB size, you can change it to anything that still fits on the EMMC or SDCard.

You must also increase the system.img size in the parameter file so the firmware can boot.
Start by increasing the offset before @system and then adjust all the partition offsets after that too.
This should be for 2GB system partition.

/device/rockchip/rk3328/rk3328_box/parameter.txt
CMDLINE: androidboot.baseband=N/A androidboot.selinux=disabled androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init mtdparts=rk29xxnand:0x00002000@0x00002000(uboot),0x00002000@0x00004000(trust),0x00002000@0x00006000(misc),0x00008000@0x00008000(resource),0x0000A000@0x00010000(kernel),0x00010000@0x0001A000(boot),0x00010000@0x0002A000(recovery),0x00038000@0x0003A000(backup),0x00040000@0x00072000(cache),0x00400000@0x000B2000(system),0x00008000@0x004B2000(metadata),0x00002000@0x004BA000(baseparamer),-@0x004BC000(userdata)

0x00400000@0x000B2000(system)
before @ is the size, after @ is the location.
0x00400000 in hex is 4194304 decimal * 512 / 1024 / 1024 = 2048MB(2GB)
0x000B2000(old location) + 0x00400000(size) = 0x004B2000 (The same as the new location of metadata)
So adjust al the locations of partitions metadata, baseparameter, userdata after system too.
#9
MicroSD card Flash.
1. rock64_20170809_stock_android_7.1.2_sdboot.img is getting flashed properly.
2. https://github.com/ayufan-rock64/android...17-r79.zip causing issue in flash.
3. Local build is causing same flash issue as in step 2.

Error
Invalid archive image
The archive should contain one and only one top image file.

Please help to convert as done in:
https://github.com/ayufan-rock64/android...17-r79.zip
to
https://github.com/ayufan-rock64/android...raw.img.gz
=======================================================
Need method to generate proper .img file
xz -z Image-rock64_atv.img
=======================================================
#10
========================================================================================
Copied ./RKTools/linux/Linux_Pack_Firmware/rockdev files into
./rockdev
renamed Image-rock64_regular folder to Image.
./mkupdate.sh

update.img 1.6GB generated
but android-7.1-rock-64-rock64_atv-v0.2.17-r79-raw.img is 2GB
update.img still not working.
========================================================================================
Decoded
https://jenkins.ayufan.eu/blue/organizat...peline/40/

for below commands
./mkimage.sh
cp vendor/ayufan/rockchip/idbloader.img rockdev/Image-rock64_atv/
vendor/ayufan/rockchip/rkimage rockdev/Image-rock64_atv/ rockdev/Image-rock64_atv-raw.img
========================================================================================


Possibly Related Threads…
Thread Author Replies Views Last Post
  Rock64 No Audio @ Debian 12 dmitrymyadzelets 1 45 Today, 06:56 AM
Last Post: diederik
  Rock64 bricked shawwwn 7 5,390 Yesterday, 12:22 PM
Last Post: dmitrymyadzelets
  Rock64 won't boot luminosity7 10 3,751 03-16-2024, 08:33 AM
Last Post: dmitrymyadzelets
  Rock64 doesn't boot dstallmo 1 232 03-16-2024, 08:29 AM
Last Post: dmitrymyadzelets
  How well does Rock64 deal with HDR and Atmos on Kodi? drvlikhell 3 1,733 04-29-2023, 04:24 AM
Last Post: newestssd
  OpenWRT on the Rock64 CanadianBacon 12 7,734 04-24-2023, 12:40 PM
Last Post: arunkhan
  Rock64 board not working, no HDMI no Ethernet. EDited 3 3,356 01-17-2023, 02:31 PM
Last Post: Flagtrax
  ROCK64 v3 can it boot from USB? Tsagualsa 4 1,927 11-29-2022, 11:31 AM
Last Post: Macgyver
  rock64 v3 spiflash Macgyver 0 690 11-28-2022, 02:18 PM
Last Post: Macgyver
  my rock64 dosen't work rookie_267 0 891 10-07-2022, 07:50 PM
Last Post: rookie_267

Forum Jump:


Users browsing this thread: 2 Guest(s)