Rock64 Android 9 source code now available
#1
I have put the Rock64 Android 9 source code up here:
https://github.com/a9rock64/manifests

It boots but it needs work. 
Neither Ethernet or Wifi is properly configured.
It does not have gapps integrated.
Several more minor issues
On the plus side it looks like OTG/adb is working now.

This is not ready for a casual user.

If your are Android developer please give it a try and help fix the broken parts.
Send me email and I will give you write access to the repositories.
  Reply
#2
Ethernet is fixed now, it was using the wrong DTS.

Some changes made to the device tree by the guys in China. They have not been applied to the github build.


Code:
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64-android.dtsi b/arch/arm64/boot/dts/rockchip/rk3328-rock64-android.dtsi
old mode 100644
new mode 100755
index 02466317b1c2..ee6e6daf5ef5
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64-android.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64-android.dtsi
@@ -43,23 +43,25 @@
 
  vcc_host_5v: vcc-host-5v-regulator {
  compatible = "regulator-fixed";
- enable-active-high;
- gpio = <&gpio0 0 GPIO_ACTIVE_HIGH>;
- pinctrl-names = "default";
- pinctrl-0 = <&usb30_host_drv>;
+ //enable-active-high;
+ //gpio = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ //pinctrl-names = "default";
+ //pinctrl-0 = <&usb30_host_drv>;
  regulator-name = "vcc_host_5v";
  regulator-always-on;
+ regulator-boot-on;
  vin-supply = <&vcc_sys>;
  };
 
  vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
  compatible = "regulator-fixed";
- enable-active-high;
- gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>;
- pinctrl-names = "default";
- pinctrl-0 = <&usb20_host_drv>;
+ //enable-active-high;
+ //gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>;
+ //pinctrl-names = "default";
+ //pinctrl-0 = <&usb20_host_drv>;
  regulator-name = "vcc_host1_5v";
  regulator-always-on;
+ regulator-boot-on;
  vin-supply = <&vcc_sys>;
  };
 
@@ -98,6 +100,22 @@
  };
  };
 
+ spdif-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "rockchip,spdif";
+ simple-audio-card,cpu {
+ sound-dai = <&spdif>;
+ };
+ simple-audio-card,codec {
+ sound-dai = <&spdif_out>;
+ };
+ };
+
+ spdif_out: spdif-out {
+ compatible = "linux,spdif-dit";
+ #sound-dai-cells = <0>;
+ };
+
  vcc_phy: vcc-phy-regulator {
  compatible = "regulator-fixed";
  regulator-name = "vcc_phy";
@@ -111,6 +129,33 @@
  clock-output-names = "xin32k";
  #clock-cells = <0>;
  };
+
+ leds {
+ compatible = "gpio-leds";
+
+ //OUT2
+                  power-white {
+                          gpios = <&rk805 0 GPIO_ACTIVE_HIGH>;
+                          linux,default-trigger = "none";
+                          default-state = "on";
+                          mode = <0x23>;
+                  };
+      //OUT1
+                  standby-red {
+                          gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
+                          linux,default-trigger = "none";
+                          default-state = "on";
+                          mode = <0x23>;
+                  };
+                  //usb switch enable control
+                 usb-switch {
+                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+                         linux,default-trigger = "none";
+                         default-state = "on";
+                         mode = <0x23>;
+                 };
+
+ };
 };
 
 &codec {
@@ -155,8 +200,8 @@
  assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
  pinctrl-names = "default";
  pinctrl-0 = <&rgmiim1_pins>;
- tx_delay = <0x26>;
- rx_delay = <0x11>;
+ tx_delay = <0x19>;
+ rx_delay = <0x1a>;
  status = "okay";
 };
 
@@ -167,7 +212,7 @@
  assigned-clock-rate = <50000000>;
  assigned-clocks = <&cru SCLK_MAC2PHY>;
  assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>;
- status = "disabled";
+ status = "okay";
 };
 
 &gpu {
@@ -206,7 +251,7 @@
  };
 
  pwrkey {
- status = "disabled";
+ status = "okay";
  };
 
  gpio {
@@ -368,7 +413,7 @@
  };
  };
 
- usb2 {
+ /*usb2 {
  usb20_host_drv: usb20-host-drv {
  rockchip,pins = <0 27 RK_FUNC_GPIO &pcfg_pull_none>;
  };
@@ -378,7 +423,7 @@
  usb30_host_drv: usb30-host-drv {
  rockchip,pins = <0 0 RK_FUNC_GPIO &pcfg_pull_none>;
  };
- };
+ };*/
 };
 
 &pwm3 {
@@ -393,28 +438,33 @@
  ir_key1 {
  rockchip,usercode = <0x4040>;
  rockchip,key_table =
- <0xf2 KEY_REPLY>,
- <0xba KEY_BACK>,
- <0xf4 KEY_UP>,
- <0xf1 KEY_DOWN>,
- <0xef KEY_LEFT>,
- <0xee KEY_RIGHT>,
- <0xbd KEY_HOME>,
- <0xea KEY_VOLUMEUP>,
- <0xe3 KEY_VOLUMEDOWN>,
- <0xe2 KEY_SEARCH>,
- <0xb2 KEY_POWER>,
- <0xbc KEY_MUTE>,
- <0xec KEY_MENU>,
- <0xbf 0x190>,
- <0xe0 0x191>,
- <0xe1 0x192>,
- <0xe9 183>,
- <0xe6 248>,
- <0xe8 185>,
- <0xe7 186>,
- <0xf0 388>,
- <0xbe 0x175>;
+ <0xf2   KEY_REPLY>,
+                         <0xba   KEY_BACK>,
+                         <0xf4   KEY_UP>,
+                         <0xf1   KEY_DOWN>,
+                         <0xef   KEY_LEFT>,
+                         <0xee   KEY_RIGHT>,
+                         <0xe5   KEY_HOME>,
+                         <0xe7   KEY_VOLUMEUP>,
+                         <0xe8   KEY_VOLUMEDOWN>,
+                         <0xb2   KEY_POWER>,
+                         <0xf5   KEY_MUTE>,
+                         <0xe2   KEY_MENU>,
+                         <0xf3   KEY_DELETE>,

+                         <0xff   KEY_0>,
+                         <0xfe   KEY_1>,
+                         <0xfd   KEY_2>,
+                         <0xfc   KEY_3>,
+                         <0xfb   KEY_4>,
+                         <0xfa   KEY_5>,
+                         <0xf9   KEY_6>,
+                         <0xf8   KEY_7>,
+                         <0xf7   KEY_8>,
+                         <0xf6   KEY_9>,
+                         <0xb8   388>,
+                         <0xe0   KEY_SEARCH>;
+
  };
 
  ir_key2 {
@@ -510,6 +560,7 @@
  pinctrl-names = "default";
  pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
  supports-sd;
+ //supports-emmc;
  status = "okay";
  vmmc-supply = <&vcc_sd>;
 };
@@ -528,6 +579,13 @@
  };
 };
 
+&spdif {
+ #sound-dai-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spdifm0_tx>;
+ status = "okay";
+};
+
 &threshold {
  temperature = <90000>; /* millicelsius */
 };
@@ -574,6 +632,7 @@
 };
 
 &usb20_otg {
+ //dr_mode = "host";
  status = "okay";
 };
 
diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
old mode 100644
new mode 100755
index f15b053ff577..5a9d8862ce8f
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -234,6 +234,16 @@
  clock-names = "i2s_clk", "i2s_hclk";
  dmas = <&dmac 14>, <&dmac 15>;
  dma-names = "tx", "rx";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s1_mclk
+                              &i2s1_sclk
+                              &i2s1_lrckrx
+                              &i2s1_lrcktx
+                              &i2s1_sdi
+                              &i2s1_sdo
+                              &i2s1_sdio1
+                              &i2s1_sdio2
+                              &i2s1_sdio3>;
  status = "disabled";
  };
 
@@ -265,7 +275,7 @@
  dmas = <&dmac 10>;
  dma-names = "tx";
  pinctrl-names = "default";
- pinctrl-0 = <&spdifm2_tx>;
+ pinctrl-0 = <&spdifm0_tx>;
  status = "disabled";
  };
 
@@ -1426,9 +1436,9 @@
  SYS_STATUS_SUSPEND      786000
  SYS_STATUS_VIDEO_1080P  786000
  SYS_STATUS_VIDEO_4K     786000
- SYS_STATUS_VIDEO_4K_10B 933000
- SYS_STATUS_PERFORMANCE  933000
- SYS_STATUS_BOOST        933000
+ SYS_STATUS_VIDEO_4K_10B 786000
+ SYS_STATUS_PERFORMANCE  786000
+ SYS_STATUS_BOOST        786000
  >;
  auto-min-freq = <786000>;
  auto-freq-en = <0>;
diff --git a/logo.bmp b/logo.bmp
old mode 100644
new mode 100755
index 6457146cfcc6..a967e26f22f0
Binary files a/logo.bmp and b/logo.bmp differ
diff --git a/logo_kernel.bmp b/logo_kernel.bmp
old mode 100644
new mode 100755
index 191bcec3d963..a967e26f22f0
Binary files a/logo_kernel.bmp and b/logo_kernel.bmp differ
  Reply
#3
Fetching from both USA and China manifests have some error, hope it can be fixed.

Fetching project platform_bootable_recovery
error: no such remote ref 422a32faa7c3bcf8f0fdf760cea8227c006baa98

Also a problem to download prebuilt folders & external/gradle
error: unable to read sha1 file of x86/3.10/kernel-qemu (0d527a01ed33dd6f9d628640f57e5d0d442bffaa)
error: unable to read sha1 file of x86/3.18/kernel-qemu2 (dc1db093bf5082636bad71d1138bc0e595cf3a6a)
error: unable to read sha1 file of x86/4.9/kernel-qemu2 (aeaa98c719d54f05cbcfe7315389084ecc920d73)
error: unable to read sha1 file of x86/kernel-qemu (e36d86c1aa02419ec9c4fcedd1391ae2aa8c4c12)
error: unable to read sha1 file of x86/kernel-vbox (cb1d7135e6d18a779e25c4446f72365ca8bb368e)
error: unable to read sha1 file of x86/pc-bios/Android.mk (9c998653531d07b7ae465904a022c5e1060fef44)
error: unable to read sha1 file of x86/pc-bios/bios-256k.bin (fab9da2b3f1ed9209d9245138e5521363313b005)
error: unable to read sha1 file of x86/pc-bios/bios.bin (1281f4212be232e8de1201610ab92bcc60effd54)
error: unable to read sha1 file of x86/pc-bios/efi-virtio.rom (935c9274005d709f0651742bd461c9d8f8e7972d)
error: unable to read sha1 file of x86/pc-bios/kvmvapic.bin (045f5c2884823428b6e947c4474dc3d2e6446669)
error: unable to read sha1 file of x86/pc-bios/linuxboot.bin (130103fb739228a6869aaf1b174b9d20c13378fc)
error: unable to read sha1 file of x86/pc-bios/linuxboot_dma.bin (238a195d3869995067f158d243d852778d38a736)
error: unable to read sha1 file of x86/pc-bios/vgabios-cirrus.bin (0c4d25346b352dc94802558f89c2a1d1044b240c)
error: unable to read sha1 file of x86/pc-bios/vgabios-virtio.bin (71e22fc868c8dc358437c438427d1ff67a1980bc)
error: unable to read sha1 file of x86/vmlinux-vbox (8b718f5259212872b4dec0cacd701cd7d23bf233)
error: unable to read sha1 file of x86_64/3.10/kernel-qemu (b976887db4610147f513b97c4216fa471e98fd6d)
error: unable to read sha1 file of x86_64/3.18/kernel-qemu2 (f5688737fbcc649c938eaf8fc27a7ed809c21176)
error: unable to read sha1 file of x86_64/4.4/kernel-qemu2 (3f123aa4458ca79abd4b91977ed42979a401474f)
error: unable to read sha1 file of x86_64/4.9/kernel-qemu2 (3f123aa4458ca79abd4b91977ed42979a401474f)
error: unable to read sha1 file of x86_64/kernel-qemu (5c4ba0f757392c0b7f58cbf29f79731c26bc4d95)
  Reply
#4
I have fixed that, I forgot to check in a file.

It is still not working correctly. I am trying to fix problem with u-boot and DRAM initialization.
  Reply
#5
I've checked in code that should build now. But now that I added gapps it GPFs during boot.

To disable gapps remote this line:
rk3328/device.mk:$(call inherit-product, vendor/opengapps/build/opengapps-packages.mk)

Maybe someone else can get this working.
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Latest Android Build and associated kernel source Vasant 4 194 08-20-2019, 07:01 PM
Last Post: Vasant
  Android 9 + DAC addon card with rock64 AlexS 0 52 08-08-2019, 03:10 AM
Last Post: AlexS
  How to build Android 9 for the Rock64 dazza5000 10 451 07-30-2019, 12:42 AM
Last Post: AlexS
  Storage in Android kevin 1 202 07-29-2019, 07:05 PM
Last Post: DonnaAlfaro
  Android Oreo 8.1 source code shinymetal 10 1,754 07-18-2019, 01:37 PM
Last Post: dazza5000
  Rock64 poor community situation totalgaara 2 263 07-13-2019, 03:12 AM
Last Post: totalgaara
  Android 9 for Rock64? Blinky 38 5,862 07-08-2019, 06:37 PM
Last Post: tllim
  Android Images (ROCK64) pineadmin 59 34,335 06-27-2019, 09:25 AM
Last Post: AlexS
  Cannot flash android 9 rockchip tool totalgaara 0 131 06-22-2019, 03:47 AM
Last Post: totalgaara
  Rooting Android TV 7.1 for Rock64? x79ftw 0 180 05-30-2019, 12:17 AM
Last Post: x79ftw

Forum Jump:


Users browsing this thread: 1 Guest(s)