Firefly Open Source Community

   Login   |   Register   |
New_Topic
12
New Topic
Print Previous Topic Next Topic

Please document how exactly a latest RK3399 Ubuntu rootfs is built

112

Credits

10

Prestige

12

Contribution

registered members

Rank: 2

Credits
112

Please document how exactly a latest RK3399 Ubuntu rootfs is built

Posted at 12/9/2017 21:13:42      View:8284 | Replies:10        Print      Only Author   [Copy Link] 1#
Last edited by cb182d In 12/12/2017 23:52 Editor

Please document how exactly a latest RK3399 Ubuntu rootfs is built

Currently there is a page related to RK3399 rootfs (http://wiki.t-firefly.com/index. ... Build_Ubuntu_rfs/en ) but this is severely out-dated. Following this guide, a system with nearly no working device will be built.

I tried the latest official Xubuntu image and it works well, but when I built my own rootfs with the official document, none of the following devices work properly:
1. Bluetooth
    Possibly missing firmware and /usr/local/bin/enable_bt ?
2. WiFi
    Firmware missing
3. GPU (OpenGL ES, libmali)
    I can see libmali-rk-midgard-dev and libmali-rk-midgard-4th-r13p0 in official Xubuntu rootfs, but copying libEGL.so/libGLESv2.so/etc. to my own rootfs results in "EGLUT: Failed to initialize EGL display" when running es2gears. doing a dpkg-repack results the same.
    Where can I download/create the libmali-rk-midgard-dev & libmali-rk-midgard-4th-r13p0 deb packages? How should them be installed?
4. Sound (rt5640)
    Device shows up, but no sound output.
5. Hardware video decoding

Adding rockchip firmware overlay (https://github.com/rockchip-linux/rk-rootfs-build) on GitHub will get WiFi working, but I googled for hours with no luck for other devices.
Reply

Use props Report

263

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
263
Posted at 12/12/2017 17:54:59        Only Author  2#
The above bug is based on the original rootfs made some changes
Reply

Use props Report

112

Credits

10

Prestige

12

Contribution

registered members

Rank: 2

Credits
112
Posted at 12/12/2017 23:22:58        Only Author  3#
luvings Posted at 12/12/2017 17:54
The above bug is based on the original rootfs made some changes

I managed to get sound working by restoring an "asound.state" provided by a friend of mine. Others are still not working.
That's not what an open source platform should be like. Everything should be well documented instead of a single Xubuntu img.
I'm also stuck at getting mainline u-boot & u-boot spl working so that I can use extlinux (which is significantly easier to play with & updating mainline kernel) instead of the heavily modified firefly u-boot, and I wonder if I could find some related doc or guide to get this working.
I saw firefly-rk3399 related packages in Debian and openSUSE repos, but there's not even a single doc/guide.
Reply

Use props Report

263

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
263
Posted at 12/13/2017 16:02:29        Only Author  4#
Last edited by luvings In 12/13/2017 16:08 Editor

the process  of making rootfs is really not good record.
Menu->Multimedia->PulseAudio Volume Control->Configuration->select one card working, close anothers

asound.state.rar

1.62 KB, Down times: 11

Reply

Use props Report

92

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
92
Posted at 12/14/2017 16:02:40        Only Author  5#
About GPU (OpenGL ES)
You should link libmali.so\libEGL.so to libmali-rk-midgard-4th-r13p0.so
Reply

Use props Report

112

Credits

10

Prestige

12

Contribution

registered members

Rank: 2

Credits
112
Posted at 12/15/2017 01:27:56        Only Author  6#
Rudis Posted at 12/14/2017 16:02
About GPU (OpenGL ES)
You should link libmali.so\libEGL.so to libmali-rk-midgard-4th-r13p0.so

The "EGLUT: Failed to initialize EGL display" error only ocurred when I linked both files. if I don't do that, it will either use mesa EGL and software rendering, or show an error indicating it cannot load libEGL, if no mesa libEGL is present.
Reply

Use props Report

112

Credits

10

Prestige

12

Contribution

registered members

Rank: 2

Credits
112
Posted at 12/16/2017 16:01:41        Only Author  7#
Rudis Posted at 12/14/2017 16:02
About GPU (OpenGL ES)
You should link libmali.so\libEGL.so to libmali-rk-midgard-4th-r13p0.so

Actually glmark2-es2-drm is working (full screen), but glmark2-es2 fails with EGLUT 0x3003, which means the display is not initialized, so I think that's some issue related to X11 DDX.
Reply

Use props Report

112

Credits

10

Prestige

12

Contribution

registered members

Rank: 2

Credits
112
Posted at 12/16/2017 22:02:12        Only Author  8#
Rudis Posted at 12/14/2017 16:02
About GPU (OpenGL ES)
You should link libmali.so\libEGL.so to libmali-rk-midgard-4th-r13p0.so

Well, I found that the official Xubuntu image is using custom X11 server. Maybe missing the (rockchip modified) X11 is the root cause.
Reply

Use props Report

92

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
92
Posted at 12/18/2017 09:06:45        Only Author  9#
Last edited by Rudis In 12/18/2017 09:08 Editor

You can find the libmali for X11 on https://github.com/rockchip-linux/libmali

The marching version is libmali-midgard-t86x-r13p0.so https://github.com/rockchip-linu ... b/aarch64-linux-gnu

I had tested it before.
Reply

Use props Report

92

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
92
Posted at 12/18/2017 09:23:32        Only Author  10#
Last edited by Rudis In 12/18/2017 09:25 Editor

You can try it.

You can modify /usr/include/EGL/eglplatform.h


  1.     struct gbm_device;
  2.     struct gbm_surface;

  3.     typedef struct gbm_device * EGLNativeDisplayType;
  4.     typedef struct gbm_surface * EGLNativeWindowType;
  5.     typedef void * EGLNativePixmapType;

  6.     /* EGL 1.2 types, renamed for consistency in EGL 1.3 */
  7.     typedef EGLNativeDisplayType NativeDisplayType;
  8.     typedef EGLNativePixmapType  NativePixmapType;
  9.     typedef EGLNativeWindowType NativeWindowType;
Copy the code


to

  1.     struct gbm_device;
  2.     struct gbm_surface;

  3.     #if defined(__GBM__)
  4.     typedef struct gbm_device * EGLNativeDisplayType;
  5.     typedef struct gbm_surface * EGLNativeWindowType;
  6.     typedef void * EGLNativePixmapType;
  7.     #elif defined(__unix__)
  8.     #include <X11/Xlib.h>
  9.     #include <X11/Xutil.h>
  10.     typedef Display *EGLNativeDisplayType;
  11.     typedef Pixmap EGLNativePixmapType;
  12.     typedef Window EGLNativeWindowType;
  13.     #endif

  14.     typedef EGLNativeWindowType NativeWindowType;
  15.     typedef EGLNativePixmapType NativePixmapType;
  16.     typedef EGLNativeDisplayType NativeDisplayType;
Copy the code

Reply

Use props Report

Return to List
12
You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list