Development Resources

Talking about OS and emulation core development
crashoverride
Posts: 5220
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 400 times
Contact:

Development Resources

Post by crashoverride »

Last edited by crashoverride on Tue Feb 18, 2020 3:03 pm, edited 2 times in total.
These users thanked the author crashoverride for the post (total 4):
kamots (Fri Jan 03, 2020 3:29 am) • Paspartout (Fri Jan 03, 2020 4:56 am) • rooted (Wed Feb 26, 2020 2:04 am) • iminai (Tue Sep 01, 2020 1:53 pm)

mad_ady
Posts: 9095
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: 597 times
Been thanked: 584 times
Contact:

Re: Development Resources

Post by mad_ady »

Well hello... What's that? Sounds nifty!

pmprog
Posts: 102
Joined: Thu Oct 18, 2018 4:01 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 27 times
Been thanked: 1 time
Contact:

Re: Development Resources

Post by pmprog »

Is libgo2 going to be the library for accessing display, inputs, gpio etc? Or will libraries like SDL work?

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

Re: Development Resources

Post by crashoverride »

libgo2 provides simplified access to the hardware. It is similar in concept to the "odroid-go-common" provided for the original GO:
https://github.com/OtherCrashOverride/g ... nts/odroid

The library handles display (including hardware bitblit and backlight), input (gamepad), audio (including path and volume), and battery status.

SDL will work assuming the target dependencies are met (KMS, X11, Wayland).
These users thanked the author crashoverride for the post:
pmprog (Mon Dec 30, 2019 3:14 am)

pmprog
Posts: 102
Joined: Thu Oct 18, 2018 4:01 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 27 times
Been thanked: 1 time
Contact:

Re: Development Resources

Post by pmprog »

Thanks. Will libgo2 be open source too?

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

Re: Development Resources

Post by crashoverride »

pmprog wrote:
Mon Dec 30, 2019 3:29 am
Will libgo2 be open source too?
Yes! The github link will be posted in the first post of this thread when its released.
These users thanked the author crashoverride for the post:
pmprog (Mon Dec 30, 2019 5:39 am)

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

Re: Development Resources

Post by crashoverride »

Updated first post with links to libgo2, emulationstation-go2, and retrorun-go2.
These users thanked the author crashoverride for the post (total 5):
Paspartout (Fri Jan 03, 2020 4:56 am) • pmprog (Fri Jan 03, 2020 5:47 am) • odroid (Fri Jan 03, 2020 9:05 am) • joy (Fri Jan 03, 2020 9:26 am) • rooted (Mon Jan 06, 2020 12:12 am)

SlappyMcPhee
Posts: 105
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: XU4 (3 of them)
Has thanked: 6 times
Been thanked: 5 times
Contact:

Re: Development Resources

Post by SlappyMcPhee »

thanks for the resources!
Owner The Retro Arena and Odroid Retro Arena

maker_gamer
Posts: 20
Joined: Tue Jan 07, 2020 2:50 pm
languages_spoken: english
ODROIDs: Odroid Go, Odroid Go Advanced
Has thanked: 4 times
Been thanked: 7 times
Contact:

Re: Development Resources

Post by maker_gamer »

Crash, will any of the "frontends" have bindings for scripting languages? I suspect Lua would be the easiest to bind out the gate given there's ton's of info on it ( https://www.google.com/search?q=how+to+ ... to+c%2B%2B )

Given this is on aarch64, a scripted language performance should be a non-impact for this machine.

Plus, having scripting bindings would be inviting for more folks to extend this platform. Personally, I've not done any C++ in 25yrs. Anymore I've to hammer things out in Bash, Python, Perl, Lua (and if necessary JavaScript) for my SysAdmin work.

Thanks for all your hard work. Looking forward to my Go Advance and seeing what I can do with it beyond just playing games.

Cheers, MG

pmprog
Posts: 102
Joined: Thu Oct 18, 2018 4:01 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 27 times
Been thanked: 1 time
Contact:

Re: Development Resources

Post by pmprog »

crashoverride wrote:
Fri Dec 27, 2019 5:12 pm
Libgo2
https://github.com/OtherCrashOverride/libgo2
I was expecting to see some GPIO functions in here, but there don't seem to be any, will there be? or are there other references for that?

Also, am I correct in thinking that the go2_presenter_post is what pushes the screen buffer to the LCD?

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

Re: Development Resources

Post by crashoverride »

maker_gamer wrote:
Thu Jan 09, 2020 3:00 pm
will any of the "frontends" have bindings for scripting languages?
I can only speak for the RetroRun frontend (since I wrote it). It is a command line program that can be called from a script language like BASH. It does not host any script engines.
pmprog wrote:
Fri Jan 10, 2020 12:43 am
I was expecting to see some GPIO functions in here, but there don't seem to be any, will there be?
There are not currently any GPIO functions. While they can certainly be added at a later date, I anticipated that developers would rather use a port of WIRING(PI).
These users thanked the author crashoverride for the post (total 2):
rooted (Fri Jan 10, 2020 1:40 pm) • pmprog (Fri Jan 10, 2020 4:11 pm)

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

Re: Development Resources

Post by crashoverride »

pmprog wrote:
Fri Jan 10, 2020 12:43 am
Also, am I correct in thinking that the go2_presenter_post is what pushes the screen buffer to the LCD?
Yes.

A "display" and "presenter" are created:
https://github.com/OtherCrashOverride/r ... pp#L70-L71

Then a "surface" is created to draw on:
https://github.com/OtherCrashOverride/r ... eo.cpp#L92

After a "surface" is drawn on, it is given to the "presenter" to display with optional rotation:
https://github.com/OtherCrashOverride/r ... #L193-L197

The presenter makes a copy of the surface so that it can immediately be re-used without "tearing". The copy is then queued for display at the next VSYNC.
These users thanked the author crashoverride for the post:
pmprog (Fri Jan 10, 2020 4:12 pm)

mad_ady
Posts: 9095
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: 597 times
Been thanked: 584 times
Contact:

Re: Development Resources

Post by mad_ady »

@crashoverride am I correct to assume the code is rockchip specific and can't be used to rotate the framebuffer on C2, right?

pmprog
Posts: 102
Joined: Thu Oct 18, 2018 4:01 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 27 times
Been thanked: 1 time
Contact:

Re: Development Resources

Post by pmprog »

crashoverride wrote:
Fri Jan 10, 2020 8:57 am
I anticipated that developers would rather use a port of WIRING(PI).
Thanks. I'll be happy to use whatever, just want sure what was available.
crashoverride wrote:
Fri Jan 10, 2020 10:29 am
After a "surface" is drawn on, it is given to the "presenter" to display with optional rotation:

The presenter makes a copy of the surface so that it can immediately be re-used without "tearing". The copy is then queued for display at the next VSYNC.
Forgive me then, but what's the "display" for? Why is it separate from the presenter?

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

Re: Development Resources

Post by crashoverride »

pmprog wrote:
Fri Jan 10, 2020 4:19 pm
what's the "display" for? Why is it separate from the presenter?
A "display" object wraps a Linux DRI display device (/dev/dri/card0). All surface allocations are made from this device per Linux KMS/DRM API. This API requires that a "surface" (GEM buffer) be attached to a "framebuffer" which can then be shown by a "display":
https://github.com/OtherCrashOverride/l ... play.h#L69
https://github.com/OtherCrashOverride/l ... play.h#L84
https://github.com/OtherCrashOverride/l ... play.h#L61

The "presenter" is effectively a mini-compositor that provides a simple way to drive the display. This eliminates the need for each program to have its own display management code. In addition to maintaining surface/framebuffer mappings, it also provides triple buffering (threaded operation) and rotation transparently. Applications may still directly drive the display using the above mentioned APIs. These are the same APIs used by the "presenter" itself.
These users thanked the author crashoverride for the post (total 2):
pmprog (Fri Jan 10, 2020 7:16 pm) • apd (Wed Jul 08, 2020 2:07 am)

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

Re: Development Resources

Post by crashoverride »

mad_ady wrote:
Fri Jan 10, 2020 3:55 pm
am I correct to assume the code is rockchip specific and can't be used to rotate the framebuffer on C2, right?
libgo2 uses Linux DRI/KMS/DRM APIs. These are not available on the C2 (or N2) currently. It also uses Rockchip's librga for rotation.

The libgo2 API could theoretically be adapted to C2/N2 in the future. However, at the moment, it is Rockchip specific.
These users thanked the author crashoverride for the post (total 2):
mad_ady (Fri Jan 10, 2020 5:50 pm) • joy (Fri Jan 10, 2020 6:24 pm)

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

Re: Development Resources

Post by crashoverride »

I posted a port of GO1's prosystem (Atari 7800) to GO2. This example serves to illustrate the use of libgo2:
https://github.com/OtherCrashOverride/prosystem-go2

1) A display and presenter are created:
https://github.com/OtherCrashOverride/p ... #L307-L308

2) A surface is created and memory mapped for the emulator to draw on:
https://github.com/OtherCrashOverride/p ... #L310-L311

3) Audio and input (gamepad) are initialized:
https://github.com/OtherCrashOverride/p ... main.c#L74
https://github.com/OtherCrashOverride/p ... main.c#L84

4) The render loop is then entered. The gamepad is sampled. The simulator is then stepped a single frame. This produces both audio and video:
https://github.com/OtherCrashOverride/p ... main.c#L89
https://github.com/OtherCrashOverride/p ... ain.c#L342

5) The audio is submitted and buffered by libgo2:
https://github.com/OtherCrashOverride/p ... main.c#L79

6) The surface is submitted and buffered+rotated by libgo2:
https://github.com/OtherCrashOverride/p ... #L344-L348

7) The render loop then repeats at step #4.
These users thanked the author crashoverride for the post (total 7):
mad_ady (Fri Jan 24, 2020 12:59 am) • rooted (Fri Jan 24, 2020 1:17 am) • midwan (Fri Jan 24, 2020 5:53 am) • pmprog (Fri Jan 24, 2020 7:51 am) • alxm (Mon Jan 27, 2020 11:24 pm) • joy (Fri Feb 14, 2020 2:00 pm) • apd (Wed Jul 08, 2020 2:06 am)

mad_ady
Posts: 9095
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: 597 times
Been thanked: 584 times
Contact:

Re: Development Resources

Post by mad_ady »

This would be the shortest but most complex Odroid Magazine article ever :D

shanti
Posts: 332
Joined: Fri Feb 15, 2019 3:12 am
languages_spoken: english, spanish
ODROIDs: Odroid N2
Has thanked: 92 times
Been thanked: 125 times
Contact:

Re: Development Resources

Post by shanti »

For libgo2, other than to compile, is Lua needed after that? any possibility for alternative compile method?

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

Re: Development Resources

Post by crashoverride »

shanti wrote:
Sat Jan 25, 2020 7:30 am
For libgo2, other than to compile, is Lua needed after that?
Premake generates 'make' files or project files for IDEs such as Visual Studio and XCode. Lua is only used in the construction of these files.
https://premake.github.io/

Install premake4:

Code: Select all

sudo apt install premake4
Generate makefile in the libgo2 repo:

Code: Select all

premake4 gmake
make
These users thanked the author crashoverride for the post:
shanti (Sat Jan 25, 2020 2:07 pm)

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

Re: Development Resources

Post by crashoverride »

shanti wrote:
Sat Jan 25, 2020 7:30 am
any possibility for alternative compile method?
The compile uses standard 'make' and GCC (sudo apt install build-essential). I do not currently have any plans to change it.

shanti
Posts: 332
Joined: Fri Feb 15, 2019 3:12 am
languages_spoken: english, spanish
ODROIDs: Odroid N2
Has thanked: 92 times
Been thanked: 125 times
Contact:

Re: Development Resources

Post by shanti »

Thanks I was not aware of Premake :)

shanti
Posts: 332
Joined: Fri Feb 15, 2019 3:12 am
languages_spoken: english, spanish
ODROIDs: Odroid N2
Has thanked: 92 times
Been thanked: 125 times
Contact:

Re: Development Resources

Post by shanti »

Trying to cross-compile, first error:

Code: Select all

../../src/display.c:42:10: fatal error: rga/RgaApi.h: No such file or directory
 #include <rga/RgaApi.h>
compiled librga from here https://github.com/rockchip-linux/librga and it seems at least on my build (with default settings) librga is installed to "include/rk_rga" so I manually edit the display.c from <rga/RgaApi.h> to <rk_rga/RgaApi.h>

Second error:

Code: Select all

../../src/display.c: In function 'go2_surface_blit':
../../src/display.c:632:8: error: 'rga_info_t' {aka 'struct rga_info'} has no member named 'scale_mode'
     src.scale_mode = 2;
        ^
../../src/display.c: In function 'go2_presenter_post':
../../src/display.c:1003:15: warning: implicit declaration of function 'c_RkRgaColorFill'; did you mean 'c_RkRgaBlit'? [-Wimplicit-function-declaration]
     int ret = c_RkRgaColorFill(&dst);
               ^~~~~~~~~~~~~~~~
               c_RkRgaBlit
make[1]: *** [Makefile:133: obj/Debug/display.o] Error 1
make: *** [Makefile:17: go2] Error 2
any ideas?
Last edited by shanti on Sun Jan 26, 2020 3:09 am, edited 1 time in total.

AreaScout
Posts: 1615
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4
Has thanked: 97 times
Been thanked: 270 times
Contact:

Re: Development Resources

Post by AreaScout »

    @shanti

    Use this repo https://github.com/rockchip-linux/linux-rga.git so ->

    Code: Select all

    git clone https://github.com/rockchip-linux/linux-rga.git
    cd linux-rga
    sudo mkdir /usr/local/include/rga
    sudo cp *.h /usr/local/include/rga/.
    make -j3 PROJECT_DIR=/home/odroid/linux-rga/
    sudo cp lib/librga.so /usr/local/lib/.
    sudo ldconfig
    
    edit: disable debug, by setting DEBUG := y to DEBUG := n inside the Makefile

    RG
    Last edited by AreaScout on Sat Jan 25, 2020 8:59 pm, edited 1 time in total.
    These users thanked the author AreaScout for the post:
    shanti (Sun Jan 26, 2020 3:09 am)

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

    Re: Development Resources

    Post by crashoverride »

    As noted by @AreaScout, the librga.so repo is:
    https://github.com/rockchip-linux/linux-rga.git

    The compile procedure used is:

    Code: Select all

    mkdir build
    make CFLAGS=-fPIC PROJECT_DIR=build
    
    # Library
    cp build/lib/librga.so /usr/local/lib/aarch64-linux-gnu/
    
    # Headers
    cp drmrga.h /usr/local/include/rga/
    cp rga.h /usr/local/include/rga/
    cp RgaApi.h /usr/local/include/rga/
    cp RockchipRgaMacro.h /usr/local/include/rga/
    
    These users thanked the author crashoverride for the post:
    shanti (Sun Jan 26, 2020 3:09 am)

    shanti
    Posts: 332
    Joined: Fri Feb 15, 2019 3:12 am
    languages_spoken: english, spanish
    ODROIDs: Odroid N2
    Has thanked: 92 times
    Been thanked: 125 times
    Contact:

    Re: Development Resources

    Post by shanti »

    Thanks, that did it:)

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

    Re: Development Resources

    Post by crashoverride »

    I have added libgo2 support to RetroArch for full rotation (menus and games). I will be posting a link to this resource after further testing.

    Compile:

    Code: Select all

    ./configure --enable-alsa --enable-udev --enable-kms --disable-opengl1 --disable-opengl --enable-egl --enable-opengles --enable-opengles3 --disable-wayland --disable-x11
    make
    
    The repo can be found here:
    https://github.com/OtherCrashOverride/retroarch-go2

    This repo servers as an example for anyone wanting to upstream GO Advance platform support. Currently, support is 'hacked' into an existing file:
    https://github.com/OtherCrashOverride/r ... /drm_ctx.c

    Integration will involve 1) copying the above to a new file name, 2) linking with libgo2, and 3) adding a '--with-libgo2' configure option to use both 1 and 2.
    https://github.com/OtherCrashOverride/r ... kefile#L32

    Note that the retroarch-go2 repo is unsupported. I have no plans to develop it further.
    Last edited by crashoverride on Tue Feb 18, 2020 3:02 pm, edited 1 time in total.
    These users thanked the author crashoverride for the post (total 3):
    joy (Fri Feb 14, 2020 2:01 pm) • shanti (Sat Feb 22, 2020 8:49 am) • Christian_Haitian (Sun Aug 30, 2020 4:15 am)

    valadaa48
    Posts: 242
    Joined: Mon Feb 17, 2020 1:35 pm
    languages_spoken: english
    ODROIDs: odroid go advance
    Has thanked: 16 times
    Been thanked: 62 times
    Contact:

    Re: Development Resources

    Post by valadaa48 »

    @crashoverride, would you mind pasting the changes to RetroArch? I would like to assist in testing and development. If you're not comfortable posting publicly then feel free to IM me.

    Also, what toolchain are you using and are you cross compiling on your linux box or on the odroid go itself? Curious because of the required dependencies (headers, libs).

    Thanks!

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

    Re: Development Resources

    Post by crashoverride »

    valadaa48 wrote:
    Mon Feb 17, 2020 1:37 pm
    would you mind pasting the changes to RetroArch?
    I plan to post the changes tomorrow (my timezone). I needed to validate the changes which meant adding 3D support to RetroRun for comparison.
    valadaa48 wrote:
    Mon Feb 17, 2020 1:37 pm
    what toolchain are you using and are you cross compiling on your linux box or on the odroid go itself?
    I use an arm64 and armhf rootfs (chroot with qemu) on x86 for compiling the 64bit and 32bit versions respectively. The compiler used is GCC from the Ubuntu apt repo. Standard headers/libs are all install using 'apt install'. The libgo2 library and headers are from the github repo in the first topic of this forum thread.

    valadaa48
    Posts: 242
    Joined: Mon Feb 17, 2020 1:35 pm
    languages_spoken: english
    ODROIDs: odroid go advance
    Has thanked: 16 times
    Been thanked: 62 times
    Contact:

    Re: Development Resources

    Post by valadaa48 »

    Thanks @crashoverride. My setup is similar.

    I'm trying to track down the precise source for the mali drivers so I can slipstream them into my linux build. Does anyone know the location?

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

    Re: Development Resources

    Post by crashoverride »

    valadaa48 wrote:
    Tue Feb 18, 2020 4:30 am
    I'm trying to track down the precise source for the mali drivers so I can slipstream them into my linux build. Does anyone know the location?
    https://github.com/rockchip-linux/libmali/tree/master

    valadaa48
    Posts: 242
    Joined: Mon Feb 17, 2020 1:35 pm
    languages_spoken: english
    ODROIDs: odroid go advance
    Has thanked: 16 times
    Been thanked: 62 times
    Contact:

    Re: Development Resources

    Post by valadaa48 »

    Thanks got it. I setup an Archlinux rootfs but soon learned that Arch doesn't support mixed arm64/arm32 and the pcsx_rearmed I built for arm64 didn't have anywhere near the performance of your 32bit build so I had to abandon it. Looking forward to your retroarch port for me to test and help develop where I can. Thanks!

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

    Re: Development Resources

    Post by crashoverride »

    I have added the RetroArch repo link to the first post and edited my previous post on the topic.
    These users thanked the author crashoverride for the post:
    shanti (Tue Feb 18, 2020 4:50 pm)

    valadaa48
    Posts: 242
    Joined: Mon Feb 17, 2020 1:35 pm
    languages_spoken: english
    ODROIDs: odroid go advance
    Has thanked: 16 times
    Been thanked: 62 times
    Contact:

    Re: Development Resources

    Post by valadaa48 »

    Thanks, it runs very well!

    kernelspace
    Posts: 12
    Joined: Sat Aug 20, 2016 9:56 am
    languages_spoken: english
    ODROIDs: ODROID-C0 ODROID-GO
    Has thanked: 0
    Been thanked: 3 times
    Contact:

    Re: Development Resources

    Post by kernelspace »

    Does anybody have any notes on how to set up a cross compile toolchain and chroot for the odroid go advance?

    Also it occurs to me that we could probably write an SDL2 backend on top of libgo2. I was planning to use SDL2 for a game, but I'd really like to target this hardware also.

    maker_gamer
    Posts: 20
    Joined: Tue Jan 07, 2020 2:50 pm
    languages_spoken: english
    ODROIDs: Odroid Go, Odroid Go Advanced
    Has thanked: 4 times
    Been thanked: 7 times
    Contact:

    Re: Development Resources

    Post by maker_gamer »

    I'm interested too so I can bring some non-game utils over.

    valadaa48
    Posts: 242
    Joined: Mon Feb 17, 2020 1:35 pm
    languages_spoken: english
    ODROIDs: odroid go advance
    Has thanked: 16 times
    Been thanked: 62 times
    Contact:

    Re: Development Resources

    Post by valadaa48 »

    Copy the stock image into a qemu aarch64 image and boot it up. apt install all the utilities. You can even just qemu chroot into the image as well.

    hzulla
    Posts: 12
    Joined: Tue Feb 25, 2020 6:06 pm
    languages_spoken: english, german
    ODROIDs: Odroid Go Advance
    Has thanked: 0
    Been thanked: 0
    Contact:

    Re: Development Resources

    Post by hzulla »

    Hi. What are the plans for the kernel drivers, do you expect to upstream them to the mainline kernel? I'd love to see a Kernel 5.x on this thing.

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

    Re: Development Resources

    Post by crashoverride »

    hzulla wrote:
    Tue Feb 25, 2020 8:16 pm
    What are the plans for the kernel drivers, do you expect to upstream them to the mainline kernel?
    I can only speak for myself when I say I do not currently have any plans to upstream drivers. HardKernel maintains the kernel, and I do not speak for them.
    https://github.com/hardkernel/linux/tre ... dgoA-4.4.y
    hzulla wrote:
    Tue Feb 25, 2020 8:16 pm
    I'd love to see a Kernel 5.x on this thing.
    I do not know the status of RK3326 in Kernel 5.x. The current LTS kernel continues to receive security updates.
    https://github.com/rockchip-linux/kernel

    robDevs
    Posts: 15
    Joined: Wed Feb 19, 2020 11:16 pm
    languages_spoken: english
    ODROIDs: Odroid Go, Odoid Go Advance(soon)
    Has thanked: 5 times
    Been thanked: 0
    Contact:

    Re: Development Resources

    Post by robDevs »

    Any chance of some install instructions for libgo? I'm all for tinkering just don't have time to search forums...

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

    Re: Development Resources

    Post by crashoverride »

    robDevs wrote:
    Wed Mar 04, 2020 9:57 am
    Any chance of some install instructions for libgo?
    It is detailed a couple of posts above this one:
    viewtopic.php?f=194&p=284648#p278825

    riq
    Posts: 25
    Joined: Fri Feb 14, 2020 9:18 pm
    languages_spoken: english
    Has thanked: 4 times
    Been thanked: 7 times
    Contact:

    Re: Development Resources

    Post by riq »

    crashoverride wrote:
    Mon Dec 30, 2019 3:12 am
    SDL will work assuming the target dependencies are met (KMS, X11, Wayland).
    what's the correct way to compile libsdl2 ?

    I'm trying with:

    Code: Select all

    ./configure --disable-video-opengl --enable-video-kmsdrm --disable-video-x11 --enable-video-directfb
    but when I run any of the libsdl tests (like testsprite2) I got:

    Code: Select all

    odroid@goadvance:~/src/SDL/test$ ./testsprite2 
    INFO: Couldn't initialize video driver: No available video device
    Any idea? Thanks!

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

    Re: Development Resources

    Post by crashoverride »

    riq wrote:
    Thu Mar 05, 2020 11:48 am
    what's the correct way to compile libsdl2 ?
    See this forum post for details:
    viewtopic.php?f=194&t=38045#p284753
    These users thanked the author crashoverride for the post:
    riq (Thu Mar 05, 2020 12:54 pm)

    aidootk
    Posts: 1
    Joined: Tue Mar 10, 2020 11:02 am
    languages_spoken: english
    Has thanked: 1 time
    Been thanked: 0
    Contact:

    Re: Development Resources

    Post by aidootk »

    riq wrote:
    Thu Mar 05, 2020 11:48 am
    crashoverride wrote:
    Mon Dec 30, 2019 3:12 am
    SDL will work assuming the target dependencies are met (KMS, X11, Wayland).
    what's the correct way to compile libsdl2 ?

    I'm trying with:

    Code: Select all

    ./configure --disable-video-opengl --enable-video-kmsdrm --disable-video-x11 --enable-video-directfb
    but when I run any of the libsdl tests (like testsprite2) I got:

    Code: Select all

    odroid@goadvance:~/src/SDL/test$ ./testsprite2 
    INFO: Couldn't initialize video driver: No available video device
    Any idea? Thanks!
    libsdl2 depends on linux-rga libsm-dev libudev-dev libxext-dev libdrm-dev libgbm-dev zlib1g-dev libasound2-dev libfreetype6-dev libgles2-mesa-dev libgles3-mesa-dev.
    You should make sure libdrm-dev, libgbm-dev, linux-rga are installed.
    When you finished running

    Code: Select all

    ./configure --disable-video-opengl --enable-video-kmsdrm --disable-video-x11 --enable-video-directfb
    "kmsdrm" should be in "Video drivers" list,
    then, make and make install.

    PaulF8080
    Posts: 71
    Joined: Fri Feb 14, 2020 9:40 am
    languages_spoken: english
    ODROIDs: go, go advance, xu4
    Has thanked: 0
    Been thanked: 9 times
    Contact:

    Re: Development Resources

    Post by PaulF8080 »

    Interesting thread. About rotation. in my opinion it is not an operation. If you load images by row you just switch to loading by column. For motion you just swap X and Y.

    I compiled an arm64 SDL2 program without loading any tools. Configure followed by make worked out of the box on the stock image.

    robDevs
    Posts: 15
    Joined: Wed Feb 19, 2020 11:16 pm
    languages_spoken: english
    ODROIDs: Odroid Go, Odoid Go Advance(soon)
    Has thanked: 5 times
    Been thanked: 0
    Contact:

    Re: Development Resources

    Post by robDevs »

    crashoverride wrote:
    Wed Mar 04, 2020 10:03 am
    robDevs wrote:
    Wed Mar 04, 2020 9:57 am
    Any chance of some install instructions for libgo?
    It is detailed a couple of posts above this one:
    viewtopic.php?f=194&p=284648#p278825
    I've got to be missing something. What do I do with libgo after compiling it?

    Edit: I think I've figured it out. After compiling I just needed to create /usr/include/go2/, copy the header files there, copy the .so file to /usr/lib/.

    PaulF8080
    Posts: 71
    Joined: Fri Feb 14, 2020 9:40 am
    languages_spoken: english
    ODROIDs: go, go advance, xu4
    Has thanked: 0
    Been thanked: 9 times
    Contact:

    Re: Development Resources

    Post by PaulF8080 »

    More on rotation. I seem to remember SDL having a rotate parameter and wondered how they did it.

    It turns out the frame buffer driver has a rotate parameter according to https://www.toradex.com/community/quest ... -mode.html

    Code: Select all

    odroid@goadvance:~$ ls /sys/class/graphics/fb0
    bits_per_pixel  blank  console  cursor  dev  device  mode  modes  name  pan  power  rotate  state  stride  subsystem  uevent  virtual_size
    So I guess you can ignore my rambling above. :-)

    I bought serial port kit from https://ameridroid.com/
    PCB connector and USB serial. I ordered it and showed up in two days. It came from 600 miles south of me in Portland, OR.

    I can now see debug messages when I run an SDL programs.

    Slaminger
    Posts: 236
    Joined: Tue Jul 16, 2019 12:30 am
    languages_spoken: English, French
    ODROIDs: XU4, N2, N2+, C2, C4, OGA, OGA-BE, H2+, OGS, OGST
    Location: Canada
    Has thanked: 21 times
    Been thanked: 57 times
    Contact:

    Re: Development Resources

    Post by Slaminger »

    What would the easiest way to backport the kernel and uboot stuff from 20 to 19? ubuntu 20 changed some dependencies and its like chasing a rabbit down a hole trying to get retroarch running right via the .deb install, I was thinking it might be easier to just put the new kernel/uboot into the ubuntu 19 image so I don't have to keep trying to fight with rr

    User avatar
    meveric
    Posts: 11386
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 60 times
    Been thanked: 444 times
    Contact:

    Re: Development Resources

    Post by meveric »

    uboot and kernel should not have any dependencies.. you should be able to install the 20.04 uboot and kernel on 19.xx image without issues.
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

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

    Re: Development Resources

    Post by crashoverride »

    Slaminger wrote:
    Tue Jun 02, 2020 12:30 am
    What would the easiest way to backport the kernel and uboot stuff from 20 to 19?
    There are no dependencies that I am aware of. The kernel and uboot should be capable of running any modern Linux distribution (Ubuntu, Fedora, Arch, etc).
    See also:
    https://wiki.odroid.com/odroid_go_advance/build_uboot
    https://wiki.odroid.com/odroid_go_advance/build_kernel

    (Note that I do not package uboot/kernel/bootini. They are provided by HardKernel.)

    Post Reply

    Return to “Platform development”

    Who is online

    Users browsing this forum: No registered users and 1 guest