Skip to content

Instantly share code, notes, and snippets.

Linux version 5.12.0-rc1-opendingux-00102-g500660ddcf4e (paul@frank) (mipsel-linux-gcc.br_real (Buildroot 2020.11-220-gbeaf138c38) 10.2.0, GNU ld (GNU Binutils) 2.34) #1989 Wed Mar 3 22:00:48 WET 2021
CPU0 revision is: 2ed1024f (Ingenic XBurst)
FPU revision is: 00330000
MIPS: machine is GCW Zero Prototype
cma: Reserved 16 MiB at 0x00c00000
Primary instruction cache 16kB, VIVT, 4-way, linesize 32 bytes.
Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 4-way, linesize 128 bytes.
Zone ranges:
Normal [mem 0x0000000000000000-0x000000000fffffff]
@pcercuei
pcercuei / embed.cmake
Last active March 28, 2023 19:14
Embed a binary blob into a C program with CMake
set(EMBEDDED_FILE "" CACHE PATH "Path to the file to embed (optional)")
if (EMBEDDED_FILE)
file(SIZE ${EMBEDDED_FILE} EMBEDDED_FILE_SIZE)
file(GENERATE OUTPUT ${CMAKE_BINARY_DIR}/empty.c CONTENT "")
set_source_files_properties(${CMAKE_BINARY_DIR}/empty.c PROPERTIES GENERATED TRUE)
add_library(empty OBJECT ${CMAKE_BINARY_DIR}/empty.c)
add_custom_command(OUTPUT payload.o
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
11-14 11:01:56.568 9767 9767 D GmsMultiArchLoader: Loading mapbox-gl from /data/user/0/com.whatsapp/cache/.gmscore/lib/armeabi-v7a/libmapbox-gl.so
11-14 11:01:56.563 9767 9767 W com.whatsapp: type=1400 audit(0.0:244): avc: granted { execute } for path="/data/data/com.whatsapp/cache/.gmscore/lib/armeabi-v7a/libmapbox-gl.so" dev="mmcblk0p28" ino=26716 scontext=u:r:untrusted_app:s0:c91,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c91,c256,c512,c768 tclass=file app=com.whatsapp
11-14 11:01:56.571 9767 9767 E com.whatsapp: ----- class 'Lcom/mapbox/mapboxsdk/storage/FileSource;' cl=0x12fc7540 -----
11-14 11:01:56.571 9767 9767 E com.whatsapp: objectSize=228 (172 from super)
11-14 11:01:56.571 9767 9767 E com.whatsapp: access=0x8008.0001
11-14 11:01:56.571 9767 9767 E com.whatsapp: super='java.lang.Class<java.lang.Object>' (cl=0x0)
11-14 11:01:56.571 9767 9767 E com.whatsapp: vtable (8 entries, 11 in super):
11-14 11:01:56.571 9767 9767 E com.whatsapp: 0: void com.mapbox.mapboxsdk
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include "rg350.dts"
/ {
compatible = "ylm,rg280m", "ingenic,jz4770";
model = "Anbernic RG-280M";
spi {
#include <stdint.h>
typedef uint32_t u32;
static u32 palette[256];
void c8_to_yuv(const u32 *src, u32 *dst_y, unsigned int w, unsigned int h)
{
unsigned int i, line, col;
u32 *dst_u = dst_y + 1 * (w * h) / 4;
#!/usr/bin/env python3
# Lesspass git-credential helper
import argparse
from subprocess import run
def main():
parser = argparse.ArgumentParser()
parser.add_argument('site', action="store", type=str,
text data bss dec hex filename
410730 350 0 411080 645c8 ./net/mac80211/mac80211.o
367964 7649 3728 379341 5c9cd ./drivers/staging/rtl8188eu/r8188eu.o
230612 8356 8448 247416 3c678 ./tools/perf/tests/perf-in.o
169150 105 1168 170423 299b7 ./net/wireless/nl80211.o
157312 484 144 157940 268f4 ./tools/perf/libtraceevent-in.o
145336 321 1248 146905 23dd9 ./drivers/media/v4l2-core/videodev.o
137268 65308 0 202576 31750 ./net/wireless/trace.o
126810 48108 512 175430 2ad46 ./fs/ext4/super.o
#!/usr/bin/env python
from sys import argv
def get_char_id(charname):
id_names = [
'Viridia',
'Greennill',
'Skyly',
'Bluefull',
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 895ca88..a2e4054 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -378,7 +378,7 @@ void CenterCamera(char override) {
int xStoppingDistance = 0; // How much distance it will take for the camera to come to
// a complete stop if it starts slowing down now.
- for (uint i = abs(static_cast<uint>(cameraXVel)); i > 0; i--) {
+ for (uint i = abs(static_cast<int>(cameraXVel)); i > 0; i--) {
gcw0:~ $ glmark2-es2-drm -s 640x480 --off-screen
=======================================================
glmark2 2017.07
=======================================================
OpenGL Information
GL_VENDOR: etnaviv
GL_RENDERER: Vivante GC860 rev 4621
GL_VERSION: OpenGL ES 2.0 Mesa 20.0.0-devel
=======================================================
[build] use-vbo=false: FPS: 130 FrameTime: 7.692 ms