Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexandre Courbot Gnurou

View GitHub Profile
@Gnurou
Gnurou / gist:9505462f921d3ba3918e
Last active Dec 7, 2015
Falcon IMEM/DMEM dump functions
View gist:9505462f921d3ba3918e
static void
falcon_dump_imem(struct nvkm_device *device, u32 base)
{
u32 imem_size = nvkm_rd32(device, base + 0x108) & 0x1ff;
u32 i;
u32 buf[8];
imem_size *= 0x100;
nvkm_wr32(device, 0x0010a180, 0x1 << 25);
@Gnurou
Gnurou / gist:e42ec008c9fe378ae4c6
Created Oct 2, 2015
Prepare an Arch Linux Arm rootfs on an Android device
View gist:e42ec008c9fe378ae4c6
mount -obind /data/Linux/ArchLinuxArm /data/Linux/ArchLinuxArm
mount -t proc proc /data/Linux/ArchLinuxArm/proc
mount -obind /sys /data/Linux/ArchLinuxArm/sys/
mount -obind /dev /data/Linux/ArchLinuxArm/dev/
@Gnurou
Gnurou / extract_netlist.py
Last active Jan 19, 2016
Netlist firmware extraction script for use with Nouveau
View extract_netlist.py
#!/usr/bin/python3
# This little tool extracts the GR firmwares from NET*_img.bin files
# Usage: python3 extract_netlist.py NETB_img.bin
# Regions to extract with their file name
regions = {
0 : "fecs_data",
1 : "fecs_inst",
2 : "gpccs_data",
@Gnurou
Gnurou / gist:749930267e2ca4bc290b
Last active Sep 9, 2016
How to compile glmark2 under Linux/ARM with a special prefix
View gist:749930267e2ca4bc290b
./waf configure --with-flavors=drm-gl,drm-glesv2,wayland-gl,wayland-glesv2,x11-gl,x11-glesv2 --prefix=/opt/nouveau
./waf
./waf install
Compile issues? http://lists.freedesktop.org/archives/wayland-devel/2013-April/008497.html
@Gnurou
Gnurou / gist:9657726
Last active Aug 29, 2015
Configure Mesa for Nouveau/GBM usage
View gist:9657726
DRM: ./configure --prefix=$NVD --enable-tegra-experimental-api
Mesa: ./configure --without-dri-drivers --with-gallium-drivers=nouveau --enable-gallium-egl --enable-gbm --enable-egl --with-egl-platforms=drm,wayland --enable-gles1 --enable-gles2 --enable-opengl --prefix=$NVD
@Gnurou
Gnurou / tegrarcmboot.py
Last active Jan 3, 2016
Simple script that boots a kernel using tegrarcm by creating an image containing U-boot and the kernel concatenated.
View tegrarcmboot.py
#!/bin/python3
# Simple script that boots a kernel using tegrarcm by creating an image
# containing U-boot and the kernel concatenated.
#
# Usage: boot.py board.bct zImage tegraxx-board.dtb
#
# The files listed below must be present in the working directory and
# can be obtained from U-boot.
@Gnurou
Gnurou / 05-display.conf
Created Nov 12, 2013
Xorg display config for NVIDIA SHIELD.
View 05-display.conf
Section "Device"
Identifier "Default Device"
Driver "fbdev"
Option "Rotate" "CW"
EndSection
@Gnurou
Gnurou / Compile attr statically
Created Oct 30, 2013
How to make libtool produce static binaries even though it doesn't want to
View Compile attr statically
$ ./configure --host=arm-none-linux-gnueabi
$ LDFLAGS=-all-static make
# -all-static is not recognized by GCC but will be processed by libtool
@Gnurou
Gnurou / Kexec for ARM
Created Oct 28, 2013
Cross-compiling Kexec for ARM, how-to.
View Kexec for ARM
./bootstrap
LDFLAGS=-static ./configure --host=arm-none-linux-gnueabi --without-zlib --without-lzma
make
-> static binary in build/sbin/kexec
@Gnurou
Gnurou / SHIELD loopback initramfs script
Last active Oct 31, 2018
A minimal /init script for a Busybox initramfs that mounts a loopback device file from SHIELD's data partition as root and continue booting from it. It allows to have a non-intrusive Linux installation along with Android on SHIELD.
View SHIELD loopback initramfs script
#!/bin/sh
mkdir /proc
mkdir /sys
mkdir /d
/bin/mount /proc
/bin/mount /sys
echo /sbin/mdev >/proc/sys/kernel/hotplug
mdev -s
mkdir /roothost
mkdir /newroot