Android 9 Source Code

@goenjoy
It does not work.


EDGE does not start if uart1 is connected.
How to fix it?

Please describe in more detail the phenomena and steps of the problem, and what is the serial device you are connected to?

@goenjoy
I connected Gps receiver.
Vim1 and vim2 work perfect. EDGE does not boot…

image
First confirm the voltage matching, 3.3V level is needed.

In addition, read and write permission for this serial port is required:

chmod 777 /dev/ttyS2

uart tool test download




To sum up, UART2 should be used as a common serial port. The following modifications are required:

  • Firstly, confirm whether the voltage of serial device matches or not.
  • uart2 config:
&uart2 {
	status = "okay";
};

&fiq_debugger {
	rockchip,serial-id = <0xffffffff>;
	status = "okay";
};
  • read and write permission for this serial port is required
--- a/init.rk30board.rc
+++ b/init.rk30board.rc
@@ -229,7 +229,9 @@ on boot
     chmod 0666 /sys/class/wol/rst_mcu
        #add for buzzer
        chmod 0666 /sys/class/w25q128fw/buzzer
-
+       
+       #add for ttyS2
+       chmod 777 /dev/ttyS2
        #add for mac_addr
1 Like

@goenjoy
No no, voltage and other is correct, I use 3.3V on EDGE header.
I mean that:

  1. If EDGE was start firstly and then I connect GPS on uart1, GPS works good, I can see all data on uart1.
  2. If I connect GPS on uart1 firstly, and then push power button on EDGE, EDGE does not boot. It shows rockchip logo only.

Please describe the problem clearly later. Add the following modifications:
u-boot/

--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -212,6 +212,8 @@ static int __abortboot(int bootdelay)
 {
        int abort = 0;
        unsigned long ts;
+       
+       return abort;
3 Likes

It fixes my issue.
Thank you!

One question.: how to repack img form out folder?

1 Like
$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch rk3399-userdebug
$ ./mkimage.sh
$ ./pack_image.sh

Yes, I try it, but is works strange. If I add new files in out folder or modif some files, then repack img with commands “. /mkimage.sh” and “. /pack_image.sh”. Sometime ROM don’t contain new files, sometime contain.
I don’t understand why it happens…
May be need something more?

If you add files to eg. out/*/system it won’t repack into the images since there are other prebuilt files that tell the image maker tools to only use the files previously built and your added files aren’t included there.
It’s part of Google’s security I think to make sure partitions haven’t been tampered with.
Android OS’s before Oreo didn’t have this problem.

Anyway, if you add any extra files in the out folder
just run ‘make -j4’ again then your files will be included in the built files.
Then just run ‘./mkimage.sh’.
All your files will be included.

Changes to eg. build.prop won’t be saved as they are regenerated each time you run a build and has to match on each partition for the firmware to boot properly. You need to make changes to the source code eg. system.prop if you want this changed.

4 Likes

Oh, very interesting. Thank you so much!
Previously I built Nougaut and lower android…

I have issue with library for gps, it does not work in Pie.
I made library for gps (gps.default.so), I put it on system/lib/hw and system/lib64/hw but it does not work on EDGE Pie, but it works on other px5 devices on Oreo.
May be Pie has special path for gps?

1 Like

Just try it in only this directory:

system/lib/hw/gps.default.so

Why only system/lib/hw/ ?
I build library for gps, and it puts 32bit library on system/lib/hw and 64bit library on system/lib64/hw automatically.

Sorry, I thought you only compiled 32-bit libraries.

Also, I have two phone with Pie, and first has gps.default.so in vendor/lib/hw and vendor/lib64/hw folders.
But second has gps.default.so in vendor/lib64/hw folder only.

They have not gps.default.so files in system folder…

You can try the vendor folder too, just make sure they aren’t in the system partition too.
You might need to modify the source code of your gps driver.
Most Rockchip lib files are stored in the vendor instead of system partition now.

2 Likes

I tried to copy in vendor folder from system folder manually, but library does not work.

replace gps.default.so,Try making the following changes:

hlm@Server:/users/hlm/9_Edge/vendor/rockchip/common$ ls -l gps/ap6xxx
total 1836
-rwxrwxr-x 1 hlm hlm 1785780 Jun 27 17:32 glgps
-rwxrwxr-x 1 hlm hlm   54756 Jun 27 17:32 gps.default.so
-rwxrwxr-x 1 hlm hlm   10456 Jun 27 17:32 gpsconfig.xml
-rwxrwxr-x 1 hlm hlm   21864 Jun 27 17:32 gpslogd

hlm@Server:/users/hlm/9_Edge/vendor/rockchip/common$ git diff
diff --git a/gps/gps.mk b/gps/gps.mk
index d343134..199fbfe 100755
--- a/gps/gps.mk
+++ b/gps/gps.mk
@@ -1,11 +1,11 @@
 ###############################################################################
 # GPS HAL libraries
 LOCAL_PATH := $(call my-dir)
-ifeq ($(strip $(BLUETOOTH_USE_BPLUS)),true)
+#ifeq ($(strip $(BLUETOOTH_USE_BPLUS)),true)
 PRODUCT_COPY_FILES += \
     $(LOCAL_PATH)gps/ap6xxx/gps.default.so:system/lib/hw/gps.default.so \
     $(LOCAL_PATH)gps/ap6xxx/glgps:system/bin/glgps \
     $(LOCAL_PATH)gps/ap6xxx/gpslogd:system/bin/gpslogd \
     $(LOCAL_PATH)gps/ap6xxx/gpsconfig.xml:system/etc/gps/gpsconfig.xml
-endif
+#endif
2 Likes