Anybody working on Android for the Odroid-Go A?

Talking about OS and emulation core development
notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Fri Mar 27, 2020 6:56 am

Android 9.0.0_r55


Working:
Controls and Buttons
Battery info and charging
Sleep/resume - need patch as USB devices don't survive
USB keyboard mouse and Storage
Software accelerated graphics
Backlight
Ethernet

Build options:
Go defaults and Go launcher
Zram with a 256mb size
Swiftshader
64bit build - no memory usage increase noticed
Dalvik tuned for 1gb ram
Most app packages removed
Usually 180mb of free ram

Not Working:
Sound
Wifi - powers on but can't get scan results
Bluetooth
Hardware accelerated graphics - need help with this
Everything else you can think of


SD Card partitions :
p1 vfat32 Boot
p2 ext4 System partition
p3 ext4 data -This can be either be ext4 or f2fs the fstab is setup for both
p4 swap -Optional but usually a bad idea is this case. System/data already max out reads/writes swap would exacerbate this.

Controls mapping

Code: Select all


		|-----------------------------------------------------------|
		|    L1                                                R1   |
		|-----------------------------------------------------------|
		|         up         |-------------------|            X     |
		|    left   right    |                   |         Y     A  |
		|        down        |    LCD Display    |            B     |
		|                    |                   |                  |
		|                    |-------------------|                  |
		|           Vol+ Vol-     Start Select    Menu Back         |
		|-----------------------------------------------------------|      

Source is going to include 4 options for graphics but only one works. Going to release it as a zip for the device file should be able to drop in and build. If i find time to figure out git i may set that up somewhere.
  • 1. Swiftshader - The only option that currently works.
  • 2. Rockchip - Rockchip took drm_gralloc & drm_hwcomposer and heavily modded both to make their drivers. And heavily modded android for them to work. Should be able to strip the driver down to make it more generic or upgrade it to the same as the hikey driver which uses stock Mali Gralloc drivers. But we need this driver if we want Media acceleration-> VPU -> RGA->this driver
  • 3. Hikey960 Hwcompser/Gralloc -Works on paper - The android parts kinda worked - The kernel didn't, which hikey only uses this driver on 4.14+ kernels. Probably quickest/easiest route for GPU acceleration unless it requires a kernel update.
  • 4. Mesa, GBM Gralloc and HWComposer - Didn't try this yet but think kernel might be the hold up


Super rough and basic release files:
Link https://sourceforge.net/projects/androi ... nce/files/


Edit: rough draft going to update with more info and pics later.
Last edited by notime2d8 on Mon Apr 20, 2020 11:44 am, edited 13 times in total.
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
mad_ady
Posts: 7891
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 491 times
Been thanked: 348 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by mad_ady » Fri Mar 27, 2020 6:46 pm

Good luck in your endeavours!
These users thanked the author mad_ady for the post:
notime2d8 (Sat Mar 28, 2020 9:51 am)

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Sat Mar 28, 2020 10:46 am

I used my cam to record the screen with logcat running and found the issue with graphics not starting I'm getting this error:

E hwc-drm-resources: Failed to set atomic cap -1

Followed by:

E hwcomposer-drm: Can't initialize Drm object -1
E ComposerHal: failed to open hwcomposer device: operation not permitted

Then Android hardware composer crashes and then this loops. So it's either my kernel not allowing "atomic to be set" ... Or libdrm.... Or hwcomposer. I want to use a newer version of hwcomposer but rockchip has so many edits to their version and it's hard to tell what's needed for what.

Going to look at the kernel... Then update libdrm... Then update hwcomposer.... One of these should get me closer .. ๐Ÿค”
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Tue Mar 31, 2020 12:51 pm

Think I'm getting closer.... All of the graphics parts are loading but something is crashing surfaceflinger....really need to figure out something for logs. Still waiting for my USB Ethernet to come in.

Image
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Tue Mar 31, 2020 2:36 pm

Kinda irritated that Rockchip source doesn't work and that there are no sources for an android 9 device with a px30 or rk3326. Also what's causing the crash is no hwcomposer...i need to either write one.....or go back to trying to get the rockchip hwcomposer_drm and gralloc_drm working.
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
odroid
Site Admin
Posts: 34091
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 662 times
Been thanked: 609 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by odroid » Tue Mar 31, 2020 2:51 pm

Really appreciate sharing your Android OS development progress. :D

BTW, why do you want to run Android on the OGA? Is there any specific reason?
Since it has a relatively small and low-resolution display without touchscreen, the actual use cases will be very limited.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Tue Mar 31, 2020 3:12 pm

odroid wrote: โ†‘
Tue Mar 31, 2020 2:51 pm
Really appreciate sharing your Android OS development progress. :D

BTW, why do you want to run Android on the OGA? Is there any specific reason?
Since it has a relatively small and low-resolution display without touchscreen, the actual use cases will be very limited.
Don't really have a good reason...using it to pass time mostly. But i also like the user interface, apps, and customization. And i think that it would be just as useful or more as an android watch that has a smaller display...? And i won't know until after i get it running if it's useful or not. But no opensource handheld is complete without an Android port...or attempt.
These users thanked the author notime2d8 for the post:
mad_ady (Tue Mar 31, 2020 3:19 pm)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
odroid
Site Admin
Posts: 34091
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 662 times
Been thanked: 609 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by odroid » Tue Mar 31, 2020 4:48 pm

Yes! It is quite understandable.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Wed Apr 08, 2020 3:44 am

Welp... I was so close to giving up. Cause I didn't see any end in sight and kept running into roadblocks... I'm also just a tinkerer with no formal training. And I failed again getting the rockchip 9 SDK working. But I took what I learned and tried lineage again and behold:

Lineage OS 16 running on the odroidgo-a. I still consider this a fail because although it seems to run well...it's running off of swiftshader, and default gralloc. I couldn't get anything rockchip to work. The power button, USB keyboard/mouse, and suspend/resume works. I'm going to fix the rotation, then look to improve graphics, then buttons, then sound, then wifi, then backlight....?

Image
Image
Image
Last edited by notime2d8 on Sat Apr 11, 2020 3:51 pm, edited 1 time in total.
These users thanked the author notime2d8 for the post:
mad_ady (Wed Apr 08, 2020 2:05 pm)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Wed Apr 08, 2020 3:48 am

I kept running out of ram, so no luncher to show... I removed a lot of things trying to get it to come up. Also the buttons and joystick kinda works...
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
mad_ady
Posts: 7891
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 491 times
Been thanked: 348 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by mad_ady » Wed Apr 08, 2020 2:06 pm

Great progress!

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Fri Apr 10, 2020 7:42 am

Just a small update i got the orientation to work. I'm kinda salty though. I was in the weeds trying to figure out rotation. I updated surfaceflinger and it rotated weird.Then i updated phonewindowmanager.java...that worked but seemed wrong. Then I looked to see what the Nintendo Switch android project was doing and i found this in the boardconfig.mk : SF_PRIMARY_DISPLAY_ORIENTATION := 270 .....that's it. And it fixes the orientation wasted some hours. I could not find that searching anywhere online. The old build.prop "sf.hwrotation" no longer works for android 9.

Image]
Image
Image


Don't know what I'm working on next...I need to remove some services and apps to free ram and figure out why the launcher keeps crashing.
These users thanked the author notime2d8 for the post:
mad_ady (Fri Apr 10, 2020 3:32 pm)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Fri Apr 10, 2020 3:12 pm

I'm thinking about doing this for the key mapping it should allow navigating and all functions? Took me way too long to get this diagram to show right :D .....22 previews later.

Code: Select all


		|-----------------------------------------------------------|
		|    L1                                                R1   |
		|-----------------------------------------------------------|
		|         up         |-------------------|            X     |
		|    left   right    |                   |         Y     A  |
		|        down        |    LCD Display    |            B     |
		|                    |                   |                  |
		|                    |-------------------|                  |
		|           Vol+ Vol-     Start Select    Menu Back         |
		|-----------------------------------------------------------|      
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
mad_ady
Posts: 7891
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 491 times
Been thanked: 348 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by mad_ady » Fri Apr 10, 2020 3:34 pm

Ram usage seems to be a problem... Any idea if Android can make use of swap? Also you can try a different launcher

User avatar
rooted
Posts: 7595
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 656 times
Been thanked: 173 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by rooted » Fri Apr 10, 2020 4:00 pm

Zram swap is what should be enabled, it's what phone manufacturers have been using for years but I used it before that when it was called compcache.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Sat Apr 11, 2020 1:14 am

Yeah, i haven't actually ran out of ram or gotten anything closed from low memory. I have a 1gb swap partition enabled and ZRam with 128mb as it's size. I just figured more actual ram is better and wanted to lean android out some. Going to work out sound today, finish keymap, and the backlight. I'll try to figure out how to do a test release after that.
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

turtle
Posts: 1
Joined: Sat Apr 11, 2020 10:51 pm
languages_spoken: english
ODROIDs: Odroid Go
Has thanked: 0
Been thanked: 0
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by turtle » Sat Apr 11, 2020 10:54 pm

notime2d8 wrote: โ†‘
Fri Apr 10, 2020 7:42 am
Just a small update i got the orientation to work. I'm kinda salty though. I was in the weeds trying to figure out rotation. I updated surfaceflinger and it rotated weird.Then i updated phonewindowmanager.java...that worked but seemed wrong. Then I looked to see what the Nintendo Switch android project was doing and i found this in the boardconfig.mk : SF_PRIMARY_DISPLAY_ORIENTATION := 270 .....that's it. And it fixes the orientation wasted some hours. I could not find that searching anywhere online. The old build.prop "sf.hwrotation" no longer works for android 9.

Image]
Image
Image


Don't know what I'm working on next...I need to remove some services and apps to free ram and figure out why the launcher keeps crashing.
I've been working on custom roms for my devices on the side (not the Odroid Go Advance) and a tip for the low ram is to turn on Android Go defaults. You can do this by adding
"$(call inherit-product, build/target/product/go_defaults.mk)" to your device.mk

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Wed Apr 15, 2020 4:20 pm

So nothing major to update but i did realize that Lineage OS uses more ram than AOSP for features that we don't really need...? So I'm changing back over to AOSP. I'm also migrating to Android 10 this week and cleaning up my source before i share them. I figured that a newer base will give us more time to work on it and keep it relevant. Still working on sound and getting USB storage to work as well. Which the USB storage thing is weird, usually you just need the fstab entries for android to auto mount. I couldn't get that to work first try. I may be trying to do too much with my USB hub...it has Ethernet, and 3 ports which i usually have my keyboard/mouse, wifi/bluetooth stick, and jump drive plugged in. I need to check current draw.
These users thanked the author notime2d8 for the post (total 2):
rooted (Wed Apr 15, 2020 9:33 pm) • odroid (Thu Apr 16, 2020 9:41 am)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Sat Apr 18, 2020 1:31 pm

Good news and bad news.

Bad news first, Still no sound and I couldn't get android 10 to boot again, don't know what changed. So Android 10 is on hold for now until I figure out what i did differently.

Good news, I downloaded and built Android 9.0.0_r52 while failing to boot Android 10. I got the backlight working and USB storage. I kinda setup a git and posted initial release files in the first post all for Android 9.0.0_r52 also with poor instructions on how to build it yourself. Also the launcher is crashing again and my fix I used for Lineage is not working. So if you try it out, use a keyboard and mouse, download and install a launcher. I download a SNES emulator and ROM onto a USB drive and it was not that bad. Definitely worse than the Ubuntu versions though. Came back full circle just to play Mario again. Now that I've gotten android 9 and Lineage OS 16 to start I'm so confused on why I can't get the Rockchip Android 9 SDK to work.

Please recommend tweaks, apps, and patches.

Going forward I'm working on sound, Ethernet, wifi, bluetooth, then GPU support. Saving the hard stuff for last.
These users thanked the author notime2d8 for the post (total 2):
mad_ady (Sat Apr 18, 2020 1:43 pm) • odroid (Mon Apr 20, 2020 10:14 am)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Mon Apr 20, 2020 11:41 am

Aye, I have issues focusing and work randomly still no sound...I was trying to get it working with tinyalsa going to try alsa now. But in my randomness I did add an overlay configuration which disabled a bunch of unnecessary stuff like cell, sms, rotation, split screen, etc... And it also let me enable Ethernet settings so I don't need to use a script to set it up. You just plug in your USB dongle, Ethernet cable, and you get a connection pop-up on the taskbar. It also shows some info in settings... Also made some tweaks to swiftshader while trying to figure out why the colors are swapped... Lowered the memory requirements. And I changed the fstab so that the boot partition is mounted as an sdcard now.

Also tvlauncher seems like the best option to use. You can navigate everything with the controls.

Image
Image

Edit:
These are the changes made to Swiftshader:

textureMemory from 256mb to 128mb
VertexRoutineCacheSize from 1024mb to 64mb
pixelRoutineCacheSize from 1024mb to 64mb
setupRoutineCacheSize from 1024mb to 64mb

These were potential options to change but I left them the same as I don't think they will help:

TextureSampleQuality 2
MipmapQuality 1
PerspectiveCorrection true
TranscendentalPrecision 2
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
mad_ady
Posts: 7891
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 491 times
Been thanked: 348 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by mad_ady » Mon Apr 20, 2020 1:27 pm

Are the colors inverted also during video playback?
These users thanked the author mad_ady for the post:
notime2d8 (Mon Apr 20, 2020 1:39 pm)

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Mon Apr 20, 2020 1:39 pm

mad_ady wrote: โ†‘
Mon Apr 20, 2020 1:27 pm
Are the colors inverted also during video playback?
Hey that's an excellent question. I haven't tried video playback yet but that would help me narrow down the issue.
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
mad_ady
Posts: 7891
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 491 times
Been thanked: 348 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by mad_ady » Mon Apr 20, 2020 2:04 pm

I've seen inverted colors in video (hardware) encoding on xu4 before, caused by having the wrong pixel format I think...

User avatar
odroid
Site Admin
Posts: 34091
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 662 times
Been thanked: 609 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by odroid » Mon Apr 20, 2020 2:31 pm

It seems to be BGR instead of RGB.
I think the LCD device driver might have an option to reverse the color order.
These users thanked the author odroid for the post:
notime2d8 (Tue Apr 21, 2020 12:38 am)

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Tue Apr 21, 2020 12:52 am

odroid wrote: โ†‘
Mon Apr 20, 2020 2:31 pm
It seems to be BGR instead of RGB.
I think the LCD device driver might have an option to reverse the color order.
Thanks, I think this has me in the right track. The odroidgo2.dts has this set as the color"

Code: Select all

 dsi,format = <MIPI_DSI_FMT_RGB888>;
And the driver dw-mipi-dsi.c has these options to set:

Code: Select all

MIPI_DSI_FMT_RGB888
MIPI_DSI_FMT_RGB666
MIPI_DSI_FMT_RGB666_PACKED
MIPI_DSI_FMT_RGB565

But the Swiftshader FrameBufferAndroid.cpp has these lines:

Code: Select all

		case HAL_PIXEL_FORMAT_RGB_888:
			// Frame buffers are expected to have 16-bit or 32-bit colors, not 24-bit.
			TRACE("Unsupported frame buffer format RGB_888"); ASSERT(false);
			format = FORMAT_R8G8B8;   // Wrong component order.
			break;
		default:
			TRACE("Unsupported frame buffer format %d", buffer->format); ASSERT(false);
			format = FORMAT_NULL;
			break;
		}

		stride = buffer->stride * Surface::bytes(format);
		return framebuffer;
	}
I don't think that it's giving me this error because gralloc forces either 16bit or 32bit and Swiftshader is doing either 16 or 32 bit. So to fix this i should just have to change the odroidgo2.dts file from the rgb888 24bit to the RGB565 16 bit option and everything should look and work okay then?
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Tue Apr 21, 2020 3:39 am

Yeah so none of that worked....Let me know if you find any other spots to try.
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
odroid
Site Admin
Posts: 34091
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 662 times
Been thanked: 609 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by odroid » Tue Apr 21, 2020 9:15 am

I have no idea. Sorry.:(

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Tue Apr 21, 2020 10:54 am

odroid wrote: โ†‘
Tue Apr 21, 2020 9:15 am
I have no idea. Sorry.:(
Lol, all good. Not worried about it right now. I figure the issue will resolve itself once I get more of the graphics working.
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

joy
Posts: 1215
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 103 times
Been thanked: 140 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by joy » Tue Apr 21, 2020 1:08 pm

Hi @notime2d8,
Can you try this patch to fix colorspace issue?

rockchip drm driver treats rgb888 as bgr888 in case of PX30 platform (rk3326),
and there are some exceptional codes to swap colorspace by force in case of DRM_FORMAT_BGR888.

I guess that in case of Android case, the swap option may be activated.
I'm not sure this patch can fix it because I don't fully understand the driver and need to study it more,
but, if you're available, please test this patch. ;)

Code: Select all

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index e9c7593..343e8ab 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -528,6 +528,10 @@
 
 static bool has_rb_swapped(uint32_t format)
 {
+#if defined(CONFIG_ARCH_ROCKCHIP_ODROIDGO2)
+	/* Disable rb_swap by force */
+	return false;
+#endif
 	switch (format) {
 	case DRM_FORMAT_XBGR8888:
 	case DRM_FORMAT_ABGR8888:
I've tested this swap option on Ubuntu case and I got forced BGR display.
One different thing between Ubuntu and your Android is that rb_swap option is off in case of Ubuntu.
Attachments
0001_goa_kernel_disable_rbswap.diff.zip
(493 Bytes) Downloaded 7 times
These users thanked the author joy for the post:
notime2d8 (Tue Apr 21, 2020 3:10 pm)

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Tue Apr 21, 2020 3:11 pm

joy wrote: โ†‘
Tue Apr 21, 2020 1:08 pm
Hi @notime2d8,
Can you try this patch to fix colorspace issue?

rockchip drm driver treats rgb888 as bgr888 in case of PX30 platform (rk3326),
and there are some exceptional codes to swap colorspace by force in case of DRM_FORMAT_BGR888.

I guess that in case of Android case, the swap option may be activated.
I'm not sure this patch can fix it because I don't fully understand the driver and need to study it more,
but, if you're available, please test this patch. ;)

Code: Select all

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index e9c7593..343e8ab 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -528,6 +528,10 @@
 
 static bool has_rb_swapped(uint32_t format)
 {
+#if defined(CONFIG_ARCH_ROCKCHIP_ODROIDGO2)
+	/* Disable rb_swap by force */
+	return false;
+#endif
 	switch (format) {
 	case DRM_FORMAT_XBGR8888:
 	case DRM_FORMAT_ABGR8888:
I've tested this swap option on Ubuntu case and I got forced BGR display.
One different thing between Ubuntu and your Android is that rb_swap option is off in case of Ubuntu.
Unfortunately this did not work. Thanks though, i'll look for some other options in that file.
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

joy
Posts: 1215
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 103 times
Been thanked: 140 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by joy » Tue Apr 21, 2020 3:39 pm

notime2d8 wrote: โ†‘
Tue Apr 21, 2020 3:11 pm
joy wrote: โ†‘
Tue Apr 21, 2020 1:08 pm
Hi @notime2d8,
Can you try this patch to fix colorspace issue?

rockchip drm driver treats rgb888 as bgr888 in case of PX30 platform (rk3326),
and there are some exceptional codes to swap colorspace by force in case of DRM_FORMAT_BGR888.

I guess that in case of Android case, the swap option may be activated.
I'm not sure this patch can fix it because I don't fully understand the driver and need to study it more,
but, if you're available, please test this patch. ;)

Code: Select all

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index e9c7593..343e8ab 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -528,6 +528,10 @@
 
 static bool has_rb_swapped(uint32_t format)
 {
+#if defined(CONFIG_ARCH_ROCKCHIP_ODROIDGO2)
+	/* Disable rb_swap by force */
+	return false;
+#endif
 	switch (format) {
 	case DRM_FORMAT_XBGR8888:
 	case DRM_FORMAT_ABGR8888:
I've tested this swap option on Ubuntu case and I got forced BGR display.
One different thing between Ubuntu and your Android is that rb_swap option is off in case of Ubuntu.
Unfortunately this did not work. Thanks though, i'll look for some other options in that file.
It didn't help...
Thanks for your confirmation and feedback. :)

crashoverride
Posts: 4938
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 283 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by crashoverride » Wed Apr 22, 2020 2:06 am

The DRM driver is not the place to fix this. The MIPI connection effectively replaces a HDMI cable. There are no display panels that are alpha capable; therefore, there is never a need to output alpha "over the wire" anymore than there is a need to rewire a HDMI cable. The panel expects a fixed color configuration, and that is what is specified in the device tree. The VOP, on the other hand, supports many color formats including those with alpha. It converts the framebuffer format to wire format (MIPI) automatically. Somewhere Android (not kernel / device tree) will specify the framebuffer color format it wants from those offered by the DRM driver. This would be the place to patch (Android source code/configuration).
These users thanked the author crashoverride for the post (total 2):
joy (Wed Apr 22, 2020 2:29 pm) • notime2d8 (Wed Apr 22, 2020 11:10 pm)

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Fri Apr 24, 2020 9:50 am

Zero progress so far but wasted a whole lot of time....I tried to boot a newer kernel...Failed.....I tried to back port some changes that i needed....kinda failed....So I'm restarting on the kernel and going to try to make sure that it boots Ubuntu and Android. I also needed to pick up recent changes since my sources were from February.

As soon as i get the kernel up, I'm going to add double buffering to fix the screen tearing, then try to get part of the graphics working (gralloc), then try to fix the color in swiftshader. I really want to figure out the gpu, i ran android in a headless mode and it Zoomed without the graphics layer or swiftshader hogging the CPU.
These users thanked the author notime2d8 for the post:
rooted (Fri Apr 24, 2020 3:05 pm)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
rooted
Posts: 7595
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 656 times
Been thanked: 173 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by rooted » Fri Apr 24, 2020 3:06 pm

I always wondered if you could run Android headless, now we know.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Fri Apr 24, 2020 3:49 pm

rooted wrote: โ†‘
Fri Apr 24, 2020 3:06 pm
I always wondered if you could run Android headless, now we know.
Yeah, I didn't know either until I was looking at a beagle bone black project to borrow ideas from. They got Android 10 running on 512mb of ram.

On my cell and can't find the git with the changes they are posted somewhere. But the link to the announcement is here:
https://www.opersys.com/blog/android-10 ... bone-black
These users thanked the author notime2d8 for the post:
rooted (Fri Apr 24, 2020 6:28 pm)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Thu Apr 30, 2020 4:48 am

So this is where I'm stuck at. I switched back to the rockchip sources and trying to work out the graphics. So far I'm stuck at this spot. Android runs in the background followed by numerous "failed to allocate cpu memory" errors. I don't think Android will be useful without the gpu working.


Image


On a side note I did find something interesting. Khadas has started working on Android 10 for their RK3399 platforms. On their GitHub they have a rockchip 4.19 kernel. A quick try to get it to boot was a no-go though with a frozen display and no uart output. They also have a few new sources - a new gralloc for bifrost gpus like we use and new Mali drivers for it too. They also have a swiftshader driver that supplements Vulkan support. If I can get the new kernel going I can try using the newer drm hwcomposer and Mali gralloc drivers... or if I can figure out how the gpu is trying to allocate memory get Android 9 working with gpu support.
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Thu Apr 30, 2020 10:52 am

Yoooo, I got the 4.19 kernel to start!!!!! No output on the display just over uart though. Attaching boot log so you know I'm not lying :D Everything seems to be working or detected except the display. What was causing the kernel panic and freezing was the naming change for the VPU. The 4.4 Kernel used &vpu_combo the 4.19 kernel uses branched out vpu defines....like &vpu_mmu and 4 others..

Code: Select all

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd042]
[    0.000000] Linux version 4.19.101 (ken@ken-HP-EliteBook-2570p) (gcc version 7.5.0 (Linaro GCC 7.5-2019.12)) #6 SMP PREEMPT Wed Apr 29 20:23:0
[    0.000000] Machine model: Hardkernel ODROID-GO2
[    0.000000] cma: Reserved 128 MiB at 0x0000000035c00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] random: get_random_bytes called from start_kernel+0xb0/0x4fc with crng_init=0
[    0.000000] percpu: Embedded 22 pages/cpu s57360 r0 d32752 u90112
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 249864
[    0.000000] Kernel command line: root=/dev/mmcblk0p2 rootfstype=ext4 rootwait init=/init fbcon=rotate:3 consoleblank=0 androidboot.console=tt8
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 839724K/1015808K available (13758K kernel code, 1476K rwdata, 3360K rodata, 4288K init, 2147K bss, 45012K reserved, 13107)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 43591 entries in 171 pages
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU priority boosting: priority 1 delay 500 ms.
[    0.000000]  Tasks RCU enabled.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000009] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.001696] Console: colour dummy device 80x25
[    0.001777] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=80000)
[    0.001801] pid_max: default: 32768 minimum: 301
[    0.002050] Security Framework initialized
[    0.002070] SELinux:  Initializing.
[    0.002348] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.002374] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.005049] ASID allocator initialised with 32768 entries
[    0.005244] rcu: Hierarchical SRCU implementation.
[    0.007623] smp: Bringing up secondary CPUs ...
[    0.008718] Detected VIPT I-cache on CPU1
[    0.008822] CPU1: Booted secondary processor 0x0000000001 [0x410fd042]
[    0.010233] Detected VIPT I-cache on CPU2
[    0.010325] CPU2: Booted secondary processor 0x0000000002 [0x410fd042]
[    0.011578] Detected VIPT I-cache on CPU3
[    0.011665] CPU3: Booted secondary processor 0x0000000003 [0x410fd042]
[    0.011861] smp: Brought up 1 node, 4 CPUs
[    0.011912] SMP: Total of 4 processors activated.
[    0.011929] CPU features: detected: 32-bit EL0 Support
[    0.018040] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.018070] CPU: All CPU(s) started at EL2
[    0.018123] alternatives: patching kernel code
[    0.020252] devtmpfs: initialized
[    0.047445] Registered cp15_barrier emulation handler
[    0.047483] Registered setend emulation handler
[    0.048202] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370867519511994 ns
[    0.048241] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.055049] pinctrl core: initialized pinctrl subsystem
[    0.056925] NET: Registered protocol family 16
[    0.057843] schedtune: configured to support 5 boost groups
[    0.058165] audit: initializing netlink subsys (disabled)
[    0.058482] audit: type=2000 audit(0.056:1): state=initialized audit_enabled=0 res=1
[    0.060151] cpuidle: using governor ladder
[    0.060388] cpuidle: using governor menu
[    0.061145] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.064595] DMA: preallocated 4096 KiB pool for atomic allocations
[    0.116912] cryptd: max_cpu_qlen set to 1000
[    0.117987] rockchip-pm rockchip-suspend: not set pwm-regulator-config
[    0.119693] vcc_host: supplied by vcc3v8_sys
[    0.123706] SCSI subsystem initialized
[    0.124026] usbcore: registered new interface driver usbfs
[    0.124094] usbcore: registered new interface driver hub
[    0.124290] usbcore: registered new device driver usb
[    0.124381] media: Linux media interface: v0.10
[    0.124443] videodev: Linux video capture interface: v2.00
[    0.124527] pps_core: LinuxPPS API ver. 1 registered
[    0.124540] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.124573] PTP clock support registered
[    0.125748] Advanced Linux Sound Architecture Driver Initialized.
[    0.126657] Bluetooth: Core ver 2.22
[    0.126734] NET: Registered protocol family 31
[    0.126747] Bluetooth: HCI device and connection manager initialized
[    0.126769] Bluetooth: HCI socket layer initialized
[    0.126787] Bluetooth: L2CAP socket layer initialized
[    0.126846] Bluetooth: SCO socket layer initialized
[    0.128354] clocksource: Switched to clocksource arch_sys_counter
[    0.265135] FS-Cache: Loaded
[    0.280429] NET: Registered protocol family 2
[    0.281430] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes)
[    0.281480] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.281640] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[    0.282017] TCP: Hash tables configured (established 8192 bind 8192)
[    0.282264] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.282322] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.282629] NET: Registered protocol family 1
[    0.285959] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    0.293047] Initialise system trusted keyrings
[    0.293404] workingset: timestamp_bits=45 max_order=18 bucket_order=0
[    0.304290] Registering sdcardfs 0.1
[    0.304707] fuse init (API version 7.27)
[    0.316986] NET: Registered protocol family 38
[    0.317561] Key type asymmetric registered
[    0.317580] Asymmetric key parser 'x509' registered
[    0.317685] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.318085] io scheduler noop registered
[    0.318454] io scheduler cfq registered (default)
[    0.318472] io scheduler mq-deadline registered
[    0.318485] io scheduler kyber registered
[    0.318680] io scheduler bfq registered
[    0.325830] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[    0.326019] pwm-backlight backlight: Linked as a consumer to regulator.0
[    0.326519] mpp_service mpp-srv: probe start
[    0.327007] mpp_service mpp-srv: probe success
[    0.327989] iommu: Adding device ff442400.vdpu to group 0
[    0.328037] mpp_vdpu2 ff442400.vdpu: Linked as a consumer to ff442800.iommu
[    0.328316] mpp_vdpu2 ff442400.vdpu: probe device
[    0.329565] mpp_vdpu2 ff442400.vdpu: probing finish
[    0.330282] iommu: Adding device ff442000.vepu to group 0
[    0.330332] mpp_vepu2 ff442000.vepu: Linked as a consumer to ff442800.iommu
[    0.330430] mpp_vepu2 ff442000.vepu: probe device
[    0.331456] mpp_vepu2 ff442000.vepu: probing finish
[    0.338873] dma-pl330 ff240000.dmac: Loaded driver for PL330 DMAC-241330
[    0.338905] dma-pl330 ff240000.dmac:         DBUFF-128x8bytes Num_Chans-8 Num_Peri-32 Num_Events-16
[    0.339474] rockchip-pvtm ff010000.syscon:pmu-pvtm: failed to get rst 0 pmu
[    0.339847] rockchip-pvtm ff148000.syscon:pvtm: failed to get rst 0 core
[    0.340816] rockchip-system-monitor rockchip-system-monitor: system monitor probe
[    0.341792] Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled
[    0.342755] ff158000.serial: ttyS1 at MMIO 0xff158000 (irq = 12, base_baud = 2500000) is a 16550A
[    1.085757] console [ttyS1] enabled
[    1.090218] ff160000.serial: ttyS2 at MMIO 0xff160000 (irq = 13, base_baud = 1500000) is a 16550A
[    1.102915] random: fast init done
[    1.103422] iommu: Adding device ff470000.vop to group 2
[    1.106883] random: crng init done
[    1.111748] rockchip-vop ff470000.vop: Linked as a consumer to ff470f00.iommu
[    1.125135] rockchip-drm display-subsystem: Linked as a consumer to ff470000.vop
[    1.133176] rockchip-drm display-subsystem: Linked as a consumer to ff450000.dsi
[    1.141062] rockchip-drm display-subsystem: devfreq is not set
[    1.147451] rockchip-drm display-subsystem: bound ff470000.vop (ops vop_component_ops)
[    1.155437] rockchip-drm display-subsystem: failed to bind ff450000.dsi (ops dw_mipi_dsi_ops): -517
[    1.164902] rockchip-drm display-subsystem: master bind failed: -517
[    1.175833] mali ff400000.gpu: Power control initialization failed
[    1.182715] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.190324] brd: module loaded
[    1.209038] loop: module loaded
[    1.213263] zram: Added device: zram0
[    1.218069] libphy: Fixed MDIO Bus: probed
[    1.222379] tun: Universal TUN/TAP device driver, 1.6
[    1.227834] PPP generic driver version 2.4.2
[    1.232432] PPP BSD Compression module registered
[    1.237172] PPP Deflate Compression module registered
[    1.242282] PPP MPPE Compression module registered
[    1.247102] NET: Registered protocol family 24
[    1.251566] PPTP driver version 0.8.5
[    1.255657] usbcore: registered new interface driver rt2500usb
[    1.261564] usbcore: registered new interface driver rt73usb
[    1.267292] usbcore: registered new interface driver rt2800usb
[    1.273203] usbcore: registered new interface driver rtl8187
[    1.278922] usbcore: registered new interface driver rtl8xxxu
[    1.284736] usbcore: registered new interface driver rtl8150
[    1.290464] usbcore: registered new interface driver r8152
[    1.296019] usbcore: registered new interface driver asix
[    1.301488] usbcore: registered new interface driver ax88179_178a
[    1.307654] usbcore: registered new interface driver cdc_ether
[    1.313559] usbcore: registered new interface driver smsc75xx
[    1.319373] usbcore: registered new interface driver smsc95xx
[    1.325187] usbcore: registered new interface driver rndis_host
[    1.331186] usbcore: registered new interface driver cdc_ncm
[    1.336922] usbcore: registered new interface driver cdc_mbim
[    1.343403] rockchip-usb2phy ff2c0000.syscon:usb2-phy@100: Requested PHY is disabled
[    1.351216] dwc2 ff300000.usb: ff300000.usb supply vusb_d not found, using dummy regulator
[    1.359666] dwc2 ff300000.usb: Linked as a consumer to regulator.0
[    1.365971] dwc2 ff300000.usb: ff300000.usb supply vusb_a not found, using dummy regulator
[    1.374502] dwc2 ff300000.usb: Configuration mismatch. dr_mode forced to host
[    1.391916] dwc2 ff300000.usb: dwc2_check_params: Invalid parameter lpm_clock_gating=1
[    1.399871] dwc2 ff300000.usb: dwc2_check_params: Invalid parameter besl=1
[    1.406770] dwc2 ff300000.usb: dwc2_check_params: Invalid parameter hird_threshold_en=1
[    1.415512] dwc2 ff300000.usb: DWC OTG Controller
[    1.420296] dwc2 ff300000.usb: new USB bus registered, assigned bus number 1
[    1.427423] dwc2 ff300000.usb: irq 21, io mem 0xff300000
[    1.433149] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    1.441444] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.448689] usb usb1: Product: DWC OTG Controller
[    1.453422] usb usb1: Manufacturer: Linux 4.19.101 dwc2_hsotg
[    1.459207] usb usb1: SerialNumber: ff300000.usb
[    1.464860] hub 1-0:1.0: USB hub found
[    1.468713] hub 1-0:1.0: 1 port detected
[    1.473910] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.480478] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.486726] ohci-platform: OHCI generic platform driver
[    1.492472] usbcore: registered new interface driver cdc_wdm
[    1.498215] usbcore: registered new interface driver uas
[    1.503653] usbcore: registered new interface driver usb-storage
[    1.509745] usbcore: registered new interface driver xpad
[    1.515638] i2c /dev entries driver
[    1.521284] rk808 0-0020: chip id: 0x8170
[    1.525834] rk808 0-0020: source: on=0x80, off=0x08
[    1.530907] rk808 0-0020: support dcdc3 fb mode:-22, 232537136
[    1.537043] rk808 0-0020: support pmic reset mode:0,1
[    1.548554] rk808-regulator rk808-regulator: there is no dvs0 gpio
[    1.554820] rk808-regulator rk808-regulator: there is no dvs1 gpio
[    1.561128] DCDC_REG1: supplied by vcc3v8_sys
[    1.567841] DCDC_REG2: supplied by vcc3v8_sys
[    1.574675] DCDC_REG3: supplied by vcc3v8_sys
[    1.580930] DCDC_REG4: supplied by vcc3v8_sys
[    1.587448] LDO_REG1: supplied by vcc3v8_sys
[    1.593184] LDO_REG2: supplied by vcc3v8_sys
[    1.599805] LDO_REG3: supplied by vcc3v8_sys
[    1.606354] LDO_REG4: supplied by vcc3v8_sys
[    1.613072] LDO_REG5: supplied by vcc3v8_sys
[    1.619974] LDO_REG6: supplied by vcc3v8_sys
[    1.626494] LDO_REG7: supplied by vcc3v8_sys
[    1.632328] LDO_REG8: supplied by vcc3v8_sys
[    1.638092] LDO_REG9: supplied by vcc3v8_sys
[    1.643835] BOOST: supplied by vcc3v8_sys
[    1.648315] boost: Bringing 4700000uV into 5000000-5000000uV
[    1.656485] OTG_SWITCH: supplied by boost
[    1.662049] rk817-battery rk817-battery: DMA mask not set
[    1.667726] rk817-battery rk817-battery: fb_temperature missing!
[    1.673767] rk817-battery rk817-battery: energy_mode missing!
[    1.679546] rk817-battery rk817-battery: zero_reserve_dsoc missing!
[    1.693313] rk817-bat: initialized yet..
[    1.713354] rk817-charger rk817-charger: DMA mask not set
[    1.718936] rk817-charger rk817-charger: power_dc2otg missing!
[    1.724801] rk817-charger rk817-charger: otg5v_suspend_enable missing!
[    1.731826] rk817-charger rk817-charger: Linked as a consumer to regulator.17
[    1.740150] ------------[ cut here ]------------
[    1.744893] WARNING: CPU: 3 PID: 1 at drivers/regulator/core.c:2338 _regulator_disable+0xc0/0x198
[    1.759559] ---[ end trace 16462dcabb13053c ]---
[    1.773948] rk808-rtc rk808-rtc: registered as rtc0
[    1.782758] IR NEC protocol handler initialized
[    1.788811] iommu: Adding device ff4a0000.rkisp1 to group 3
[    1.794463] rkisp1 ff4a0000.rkisp1: Linked as a consumer to ff4a8000.iommu
[    1.801617] rkisp1 ff4a0000.rkisp1: rkisp driver version: v00.01.05
[    1.808661] rkisp1 ff4a0000.rkisp1: Entity type for entity rkisp1-isp-subdev was not initialized!
[    1.819073] rkisp1 ff4a0000.rkisp1: Entity type for entity rockchip-mipi-dphy-rx was not initialized!
[    1.828948] usbcore: registered new interface driver uvcvideo
[    1.834740] USB Video Class driver (1.1.1)
[    1.839864] rockchip-iodomain ff010000.syscon:io-domains: Linked as a consumer to regulator.10
[    1.849622] rockchip-iodomain ff140000.syscon:io-domains: Linked as a consumer to regulator.6
[    1.859025] rockchip-iodomain ff140000.syscon:io-domains: Linked as a consumer to regulator.11
[    1.861748] usb 1-1: new full-speed USB device number 2 using dwc2
[    1.878457] rockchip-thermal ff280000.tsadc: Missing tshut mode property, using default (cru)
[    1.887022] rockchip-thermal ff280000.tsadc: Missing tshut-polarity property, using default (low)
[    1.896682] rockchip-thermal ff280000.tsadc: tsadc is probed successfully!
[    1.904800] device-mapper: uevent: version 1.0.3
[    1.910120] device-mapper: ioctl: 4.39.0-ioctl (2018-04-03) initialised: dm-devel@redhat.com
[    1.919165] usbcore: registered new interface driver btusb
[    1.925359] cpu cpu0: Failed to get soc performance value
[    1.930984] cpu cpu0: Failed to get soc info
[    1.935309] cpu cpu0: Failed to get leakage
[    1.939959] cpu cpu0: Linked as a consumer to regulator.4
[    1.958307] cpu cpu0: temp=32272, pvtm=55278 (54830 + 448)
[    1.964954] cpu cpu0: pvtm-volt-sel=2
[    1.968762] cpu cpu0: Dropping the link to regulator.4
[    1.974706] cpu cpu0: Linked as a consumer to regulator.4
[    1.980318] cpu cpu0: Dropping the link to regulator.4
[    1.986046] cpu cpu0: Linked as a consumer to regulator.4
[    1.992590] cpu cpu0: avs=1
[    1.995788] cpu cpu0: l=0 h=2147483647 hyst=5000 l_limit=0 h_limit=0
[    2.004942] cpu cpu0: failed to find power_model node
[    2.011221] Synopsys Designware Multimedia Card Interface Driver
[    2.018284] dwmmc_rockchip ff370000.dwmmc: IDMAC supports 32-bit address mode.
[    2.025881] dwmmc_rockchip ff370000.dwmmc: Using internal DMA controller.
[    2.032697] dwmmc_rockchip ff370000.dwmmc: Version ID is 270a
[    2.038528] dwmmc_rockchip ff370000.dwmmc: DW MMC controller at irq 22,32 bit host data width,256 deep fifo
[    2.048427] dwmmc_rockchip ff370000.dwmmc: Linked as a consumer to regulator.12
[    2.056117] dwmmc_rockchip ff370000.dwmmc: Linked as a consumer to regulator.11
[    2.063570] dwmmc_rockchip ff370000.dwmmc: Got CD GPIO
[    2.072064] usb 1-1: New USB device found, idVendor=046d, idProduct=c534, bcdDevice=29.01
[    2.080298] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.084438] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    2.087441] usb 1-1: Product: USB Receiver
[    2.087446] usb 1-1: Manufacturer: Logitech
[    2.120551] ledtrig-cpu: registered to indicate activity on CPUs
[    2.126701] hidraw: raw HID events driver (C) Jiri Kosina
[    2.136252] input: Logitech USB Receiver as /devices/platform/ff300000.usb/usb1/1-1/1-1:1.0/0003:046D:C534.0001/input/input0
[    2.202921] hid-generic 0003:046D:C534.0001: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-ff300000.usb-1/input0
[    2.204224] mmc_host mmc0: Bus speed (slot 0) = 150000000Hz (slot req 150000000Hz, actual 150000000HZ div = 0)
[    2.221610] input: Logitech USB Receiver Mouse as /devices/platform/ff300000.usb/usb1/1-1/1-1:1.1/0003:046D:C534.0002/input/input1
[    2.237505] input: Logitech USB Receiver Consumer Control as /devices/platform/ff300000.usb/usb1/1-1/1-1:1.1/0003:046D:C534.0002/input/input2
[    2.305810] input: Logitech USB Receiver System Control as /devices/platform/ff300000.usb/usb1/1-1/1-1:1.1/0003:046D:C534.0002/input/input3
[    2.319289] hid-generic 0003:046D:C534.0002: input,hiddev96,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-ff300000.usb-1/input1
[    2.332117] usbcore: registered new interface driver usbhid
[    2.337708] usbhid: USB HID core driver
[    2.342182] ashmem: initialized
[    2.345958] rockchip,bus bus-apll: Linked as a consumer to regulator.3
[    2.356302] rockchip-saradc ff288000.saradc: Linked as a consumer to regulator.8
[    2.366200] usbcore: registered new interface driver snd-usb-audio
[    2.373466] rk817-codec rk817-codec: DMA mask not set
[    2.378686] rk808 0-0020: No cache used with register defaults set!
[    2.388236] xt_time: kernel timezone is -0000
[    2.392684] IPVS: Registered protocols (TCP, UDP, SCTP, AH, ESP)
[    2.398955] IPVS: Connection hash table configured (size=4096, memory=64Kbytes)
[    2.406542] IPVS: ipvs loaded.
[    2.409629] IPVS: [rr] scheduler registered.
[    2.413948] IPVS: [wrr] scheduler registered.
[    2.418315] IPVS: [lc] scheduler registered.
[    2.422593] IPVS: [wlc] scheduler registered.
[    2.426979] IPVS: [fo] scheduler registered.
[    2.431259] IPVS: [ovf] scheduler registered.
[    2.435641] IPVS: [lblc] scheduler registered.
[    2.440103] IPVS: [lblcr] scheduler registered.
[    2.444636] IPVS: [dh] scheduler registered.
[    2.448911] IPVS: [sh] scheduler registered.
[    2.453186] IPVS: [sed] scheduler registered.
[    2.457545] IPVS: [nq] scheduler registered.
[    2.461832] IPVS: ftp: loaded support on port[0] = 21
[    2.467032] gre: GRE over IPv4 demultiplexor driver
[    2.471938] ip_gre: GRE over IPv4 tunneling driver
[    2.478004] IPv4 over IPsec tunneling driver
[    2.483345] ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
[    2.489928] Initializing XFRM netlink socket
[    2.493964] dwmmc_rockchip ff370000.dwmmc: Successfully tuned phase to 195
[    2.494745] NET: Registered protocol family 10
[    2.501117] mmc0: new ultra high speed SDR104 SDXC card at address aaaa
[    2.507185] Segment Routing with IPv6
[    2.513990] mmcblk0: mmc0:aaaa SR64G 59.5 GiB 
[    2.516160] mip6: Mobile IPv6
[    2.522290]  mmcblk0: p1 p2 p3
[    2.524488] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.533692] ip6_gre: GRE over IPv6 tunneling driver
[    2.539316] NET: Registered protocol family 17
[    2.543845] NET: Registered protocol family 15
[    2.548509] Bridge firewalling registered
[    2.553454] Bluetooth: RFCOMM socket layer initialized
[    2.558806] Bluetooth: RFCOMM ver 1.11
[    2.562736] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.568071] Bluetooth: BNEP filters: protocol multicast
[    2.573315] Bluetooth: BNEP socket layer initialized
[    2.578323] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.584332] Bluetooth: HIDP socket layer initialized
[    2.589385] l2tp_core: L2TP core driver, V2.0
[    2.593756] l2tp_ip: L2TP IP encapsulation support (L2TPv3)
[    2.599404] l2tp_netlink: L2TP netlink interface
[    2.604106] l2tp_eth: L2TP ethernet pseudowire support (L2TPv3)
[    2.610093] l2tp_debugfs: L2TP debugfs support
[    2.614588] l2tp_ip6: L2TP IP encapsulation support for IPv6 (L2TPv3)
[    2.621083] 8021q: 802.1Q VLAN Support v1.8
[    2.626096] NET: Registered protocol family 21
[    2.630853] Registered RDS/tcp transport
[    2.634803] [WLAN_RFKILL]: Enter rfkill_wlan_init
[    2.639877] [BT_RFKILL]: Enter rfkill_rk_init
[    2.644558] Key type dns_resolver registered
[    2.649548] batman_adv: B.A.T.M.A.N. advanced 2018.3 (compatibility version 15) loaded
[    2.659362] registered taskstats version 1
[    2.663514] Loading compiled-in X.509 certificates
[    2.668429] zswap: default zpool zbud not available
[    2.673367] zswap: pool creation failed
[    2.677620] Key type ._fscrypt registered
[    2.681655] Key type .fscrypt registered
[    2.686469] Key type encrypted registered
[    2.692068] rga2: Driver loaded successfully ver:4.00
[    2.697447] rga2: Module initialized.
[    2.725646] rockchip-drm display-subsystem: devfreq is not set
[    2.731927] rockchip-drm display-subsystem: bound ff470000.vop (ops vop_component_ops)
[    2.739893] rockchip-drm display-subsystem: failed to bind ff450000.dsi (ops dw_mipi_dsi_ops): -517
[    2.749164] rockchip-drm display-subsystem: master bind failed: -517
[    2.756080] panel-simple-dsi ff450000.dsi.0: Linked as a consumer to regulator.14
[    2.763626] panel-simple-dsi ff450000.dsi.0: ff450000.dsi.0 supply vsp not found, using dummy regulator
[    2.773084] panel-simple-dsi ff450000.dsi.0: Linked as a consumer to regulator.0
[    2.780576] panel-simple-dsi ff450000.dsi.0: ff450000.dsi.0 supply vsn not found, using dummy regulator
[    2.790099] panel-simple-dsi ff450000.dsi.0: Linked as a consumer to regulator.13
[    2.797729] panel-simple-dsi ff450000.dsi.0: reset-pin gpio = 112, active = 0
[    2.805962] mali ff400000.gpu: Linked as a consumer to regulator.3
[    2.812940] mali ff400000.gpu: dev_pm_opp_set_regulators: no regulator (shadercores) found: -19
[    2.821797] mali ff400000.gpu: Failed to get leakage
[    2.827138] mali ff400000.gpu: pvtm-volt-sel=2
[    2.832048] mali ff400000.gpu: avs=0
[    2.835717] W : [File] : drivers/gpu/arm/bifrost/platform/rk/mali_kbase_config_rk.c; [Line] : 112; [Func] : kbase_platform_rk_init(); power-o.
[    2.851339] mali ff400000.gpu: GPU identified as 0x3 arch 7.0.9 r0p0 status 0
[    2.858867] mali ff400000.gpu: No memory group manager is configured
[    2.866305] mali ff400000.gpu: l=0 h=2147483647 hyst=5000 l_limit=0 h_limit=0
[    2.873920] mali ff400000.gpu: Using configured power model mali-simple-power-model, and fallback mali-simple-power-model
[    2.886231] mali ff400000.gpu: Probed as mali0
[    2.891855] rockchip-dmc dmc: Linked as a consumer to regulator.3
[    2.898064] rockchip-dmc dmc: current ATF version 0x105!
[    2.903385] rockchip-dmc dmc: read tf version 0x105!
[    2.910017] rockchip-dmc dmc: Failed to get leakage
[    2.915542] rockchip-dmc dmc: pvtm-volt-sel=2
[    2.920412] rockchip-dmc dmc: avs=0
[    2.923988] rockchip-dmc dmc: failed to get vop bandwidth to dmc rate
[    2.930441] rockchip-dmc dmc: failed to get vop pn to msch rl
[    2.936436] rockchip-dmc dmc: l=-2147483648 h=2147483647 hyst=0 l_limit=0 h_limit=0
[    2.953950] devfreq devfreq1: Couldn't update frequency transition information.
[    2.961954] asoc-simple-card rk817-sound: ASoC: DAPM unknown pin Headphones
[    2.971158] devfreq devfreq0: Couldn't update frequency transition information.
[    2.979350] asoc-simple-card rk817-sound: rk817-hifi <-> ff070000.i2s mapping ok
[    2.986793] asoc-simple-card rk817-sound: ASoC: no sink widget found for MIC_IN
[    2.994124] asoc-simple-card rk817-sound: ASoC: Failed to add route Mic Jack -> direct -> MIC_IN
[    3.002912] asoc-simple-card rk817-sound: ASoC: no source widget found for HPOL
[    3.010222] asoc-simple-card rk817-sound: ASoC: Failed to add route HPOL -> direct -> Headphone Jack
[    3.019354] asoc-simple-card rk817-sound: ASoC: no source widget found for HPOR
[    3.026663] asoc-simple-card rk817-sound: ASoC: Failed to add route HPOR -> direct -> Headphone Jack
[    3.036822] input: rockchip,rk817-codec Headphones as /devices/platform/rk817-sound/sound/card0/input6
[    3.047888] rockchip-drm display-subsystem: devfreq is not set
[    3.054076] rockchip-drm display-subsystem: bound ff470000.vop (ops vop_component_ops)
[    3.062042] rockchip-drm display-subsystem: failed to bind ff450000.dsi (ops dw_mipi_dsi_ops): -517
[    3.071268] rockchip-drm display-subsystem: master bind failed: -517
[    3.079209] rockchip-drm display-subsystem: devfreq is not set
[    3.085376] rockchip-drm display-subsystem: bound ff470000.vop (ops vop_component_ops)
[    3.093366] rockchip-drm display-subsystem: failed to bind ff450000.dsi (ops dw_mipi_dsi_ops): -517
[    3.102624] rockchip-drm display-subsystem: master bind failed: -517
[    3.110637] rk808-rtc rk808-rtc: setting system clock to 2020-04-30 01:33:48 UTC (1588210428)
[    3.119932] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    3.121798] asoc-simple-card rk817-sound: ASoC: DAPM unknown pin Headphones
[    3.129167] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    3.141411] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    3.146017] rkisp1 ff4a0000.rkisp1: clear unready subdev num: 1
[    3.150043] cfg80211: failed to load regulatory.db
[    3.156435] rockchip-mipi-dphy-rx: No link between dphy and sensor
[    3.166960] rockchip-mipi-dphy-rx: No link between dphy and sensor
[    3.173172] rkisp1: update sensor failed
[    3.177117] ALSA device list:
[    3.180094]   #0: rockchip,rk817-codec
[    3.184099] of_dma_request_slave_channel: dma-names property of node '/serial@ff158000' missing or empty
[    3.193606] ttyS1 - failed to request DMA, use interrupt mode
[    3.206046] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null)
[    3.213624] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    3.221368] devtmpfs: mounted
[    3.229273] Freeing unused kernel memory: 4288K
[    3.233911] Run /init as init process
[    3.280656] init: init first stage started!
[    3.286073] init: Using Android DT directory /proc/device-tree/firmware/android/
[    3.293745] init: First stage mount skipped (missing/incompatible fstab in device tree)
[    3.301915] init: Skipped setting INIT_AVB_VERSION (not in recovery mode)
These users thanked the author notime2d8 for the post:
mad_ady (Thu Apr 30, 2020 2:21 pm)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
rooted
Posts: 7595
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 656 times
Been thanked: 173 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by rooted » Thu Apr 30, 2020 1:16 pm

Surprisingly few errors in the log, that's good progress.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Wed May 06, 2020 3:17 pm

mad_ady wrote: โ†‘
Mon Apr 20, 2020 2:04 pm
I've seen inverted colors in video (hardware) encoding on xu4 before, caused by having the wrong pixel format I think...
Been busy with a few other projects and life. But I finally tested YouTube and it worked surprisingly well without any skips on "full screen" on the stock browser...but that's without sound. And the colors were inverted on that as well.

Image

Also ran a speed test to see how my USB Ethernet was doing, 26.2down 10.8up. Still trying to get the sound, wifi, and 4.19 kernel going. The sound has no logcat errors and everything seems to be working....but no output on my USB headphones or built in speaker. I'd be happy with just some buzzing at this point.

Image
These users thanked the author notime2d8 for the post (total 3):
rooted (Wed May 06, 2020 3:43 pm) • odroid (Wed May 06, 2020 3:49 pm) • joy (Thu May 07, 2020 8:43 am)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
mad_ady
Posts: 7891
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 491 times
Been thanked: 348 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by mad_ady » Wed May 06, 2020 3:41 pm

Obligatory question - is sound muted?

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Wed May 06, 2020 3:53 pm

mad_ady wrote: โ†‘
Wed May 06, 2020 3:41 pm
Obligatory question - is sound muted? Image
Lol, I know right. It's not though unfortunately. And I've been using tinyalsa...If I can't get it working I'm going to try alsa and try sound the way the Android-x86 project does. Going to double check how Android does volume levels first and selects sound components.
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Fri May 08, 2020 6:10 pm

I got USB audio working!!! Super excited about that... So I can now tell if any of the audio is working. I was guessing on changes before..with no good way to get logcat output. I'm thinking now... I just need to figure out routing and how to get the speakers to switch on... Should be my mixer_paths.xml or audio_policy_configuration.xml file... Which I thought I set those right already so probably not that simple...I was guessing again based off the options in the rk817_codec.c file and how rockchip set the rk616 codec for Android.



Does anyone know if the Ubuntu builds have alsa files and can send me a copy? Like an asound.state or audio.conf file?
These users thanked the author notime2d8 for the post (total 2):
rooted (Fri May 08, 2020 6:11 pm) • mad_ady (Fri May 08, 2020 8:00 pm)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Tue May 12, 2020 11:55 am

So this was unexpected. But in my randomness I got Bluetooth working. And it's working amazing. I connected to a Bluetooth mouse, speaker, and headphones. I couldn't detect any lag and it displayed the battery stats. Bluetooth audio also works with sbc and aac codecs.

I'm using a module based off the rtl8821cu. I was trying to get WiFi working on it in between working on sound


Image
These users thanked the author notime2d8 for the post (total 4):
odroid (Tue May 12, 2020 11:56 am) • mad_ady (Tue May 12, 2020 1:40 pm) • rooted (Tue May 12, 2020 11:36 pm) • joy (Mon May 18, 2020 3:00 pm)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
mad_ady
Posts: 7891
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 491 times
Been thanked: 348 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by mad_ady » Tue May 12, 2020 1:41 pm

You're making super progress! Congratulations!

valadaa48
Posts: 81
Joined: Mon Feb 17, 2020 1:35 pm
languages_spoken: english
ODROIDs: odroid go advance
Has thanked: 3 times
Been thanked: 8 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by valadaa48 » Tue May 12, 2020 1:49 pm

Nice progress! What kernel tree are you building against? I would be curious to give a newer kernel a try.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Tue May 12, 2020 1:55 pm

valadaa48 wrote: โ†‘
Tue May 12, 2020 1:49 pm
Nice progress! What kernel tree are you building against? I would be curious to give a newer kernel a try.

Still the 4.4 kernel. I tried the 4.19 kernel and can get it to boot and start android. But no video output on the screen even though the screen was recognized and initialized like normal.I was meaning to do a new thread just for the new kernel. I feel like I'm missing something simple on the video. But i need that kernel working for updated DRM, dma-buf, and ION drivers. I'm going to work on it again at some point.
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

valadaa48
Posts: 81
Joined: Mon Feb 17, 2020 1:35 pm
languages_spoken: english
ODROIDs: odroid go advance
Has thanked: 3 times
Been thanked: 8 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by valadaa48 » Tue May 12, 2020 1:59 pm

If you can send me the link to the tree you were using I'd be curious to take a look. What did you do about the dts file?

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Tue May 12, 2020 2:39 pm

valadaa48 wrote: โ†‘
Tue May 12, 2020 1:59 pm
If you can send me the link to the tree you were using I'd be curious to take a look. What did you do about the dts file?
So below is the link to the kernel, then the quick changes to add the device, and then the dts I used. The DTS is mostly the same but &vpu_combo is branched out in the newer kernel to serperate devices.

https://github.com/khadas/linux/tree/khadas-edge-Qt

Code: Select all

--- /kernel/arch/arm64/Kconfig.platforms
+++ linux-khadas-edge-Qt/arch/arm64/Kconfig.platforms
@@ -164,13 +164,6 @@
 	  This enables support for the ARMv8 based Rockchip chipsets,
 	  like the RK3368.
 
+config ARCH_ROCKCHIP_ODROIDGO2
+	bool "Hardkkernel's ODROID-GO2 Board"
+	depends on ARCH_ROCKCHIP
+	help
+	  This enables support for Hardkernel ODROID-GO2
+	  based on Rockchip RK3326.
+
 config ARCH_SEATTLE
 	bool "AMD Seattle SoC Family"
 	help

--- kernel/arch/arm64/boot/dts/rockchip/Makefile
+++ linux-khadas-edge-Qt/arch/arm64/boot/dts/rockchip/Makefile
@@ -53,7 +53,7 @@
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroidgo2-linux.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-edp-avb.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-tve1030g-avb.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge-android.dtb
-dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge.dtb
dts.zip
(7.04 KiB) Downloaded 4 times
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 48
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by notime2d8 » Sat May 23, 2020 2:35 pm

And colors are fixed now!!!!

Image

Posting the patch here in case anyone else struggle to fix it like I did. I couldn't find the info anywhere. Well I did after I realized that I needed to edit the egl files:

Code: Select all

  
frameworks/native/opengl/libs/EGL/eglApi.cpp
  
    if (a == 0) {
        if (colorDepth <= 16) {
            *format = HAL_PIXEL_FORMAT_RGB_565;
        } else {
            if (componentType == EGL_COLOR_COMPONENT_TYPE_FIXED_EXT) {
                if (colorDepth > 24) {
                    *format = HAL_PIXEL_FORMAT_RGBA_1010102;
                } else {
 -               *format = HAL_PIXEL_FORMAT_RGBX_8888;
+               *format = HAL_PIXEL_FORMAT_BGRA_8888;
                }
            } else {
                *format = HAL_PIXEL_FORMAT_RGBA_FP16;
            }
        }
    } else {
        if (componentType == EGL_COLOR_COMPONENT_TYPE_FIXED_EXT) {
            if (colorDepth > 24) {
                *format = HAL_PIXEL_FORMAT_RGBA_1010102;
            } else {
 -               *format = HAL_PIXEL_FORMAT_RGBX_8888;
+               *format = HAL_PIXEL_FORMAT_BGRA_8888;
            }
        } else {
            *format = HAL_PIXEL_FORMAT_RGBA_FP16;
        }
    }
}
These users thanked the author notime2d8 for the post (total 4):
mad_ady (Sat May 23, 2020 3:16 pm) • rooted (Sun May 24, 2020 4:41 am) • odroid (Mon May 25, 2020 9:29 am) • joy (Mon May 25, 2020 5:46 pm)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
mad_ady
Posts: 7891
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 491 times
Been thanked: 348 times
Contact:

Re: Anybody working on Android for the Odroid-Go A?

Post by mad_ady » Sat May 23, 2020 3:22 pm

Congratulations! Are you working on a public release?

Post Reply

Return to โ€œPlatform developmentโ€

Who is online

Users browsing this forum: No registered users and 3 guests