This repository contains documentation, tools, and build recipes to create
React Native Skia for Embedded devices, with directory ready to use with
BR2_EXTERNAL.
Chose the appropriate “defconfig” for the target device (see list of included configurations below) with Buildroot-2021.02.9 and follow the instructons below
mkdir -p /opt/workshop/external/foss_dl
git clone https://github.com/nagra-opentv/buildroot-react-native-skia.git
wget https://buildroot.org/downloads/buildroot-2021.02.9.tar.gz
tar xf buildroot-2021.02.9.tar.gz
cd buildroot-2021.02.9
make BR2_EXTERNAL='<path to buildroot-react-native-skia>' BR2_DL_DIR=/opt/workshop/external/foss_dl raspberrypi3_rns_vc4_wayland_defconfig
make BR2_EXTERNAL='<path to buildroot-react-native-skia>' BR2_DL_DIR=/opt/workshop/external/foss_dlThis will download the needed sources, configure Buildroot, compile RNS, and
store images in output/ subdirectory.
You can use etcher to flash the output/images/sdcard.img to sdcard.
Then insert the flashed sdcard to RPI3 slot and boot it.
This setup already provides four test app bundle located at /opt/rns-samples/. You can login using username: root, password: root
mkdir /tmp/wayland
export XDG_RUNTIME_DIR=/tmp/wayland/
weston &Once we launch weston, we can use terminal or we can ssh to RPI and run the app using following commands.
export XDG_RUNTIME_DIR=/tmp/wayland/
ReactSkiaApp /opt/rns-samples/simpleView/SampleViewApp.bundle
ReactSkiaApp /opt/rns-samples/simpleTimer/SampleViewApp.bundle
ReactSkiaApp /opt/rns-samples/simpleNavigation/SampleViewApp.bundle
ReactSkiaApp /opt/rns-samples/simpleDemoScroll/SampleViewApp.bundleTo build more test apps you can refer to Build Code Section from RNS
raspberrypi3_rns_vc4_wayland_defconfig: Produces an 384MB image file atoutput/images/sdcard.imgfor the Raspberry Pi3 with Mesa3d-VC4 and Wayland. The image should be written raw to the sdcard, using a tool likeddor etcherraspberrypi3_rns_vc4_x11_defconfig: Produces an 384MB image file atoutput/images/sdcard.imgfor the Raspberry Pi3 with Mesa3d-VC4 and X11. The image should be written raw to the sdcard, using a tool likeddor etcherraspberrypi3_rns_defconfig: [Has GPU memory issues] Produces an 384MB image file atoutput/images/sdcard.imgfor the Raspberry Pi3 with RPI-UserLand. The image should be written raw to the sdcard, using a tool likeddor etcher
- On RPI-3 with raspberrypi3_rns_defconfig configuration we are getting
getGLError 0x505for bigger sample apps, even when GPU memory confugured to 512 MB. - On RPI-3 with Mesa3d-VC4 configuration we do not have any OpenGL Partial update extensions, which means every new frame we will redraw entire screen contents.