Skip to content

Instantly share code, notes, and snippets.

View 44670's full-sized avatar
🐢
I may be slow to respond.

44670

🐢
I may be slow to respond.
View GitHub Profile
@44670
44670 / gist:30a742f317b52780c41f3d6e256f218c
Last active August 30, 2023 11:41
Building upstream RISC-V GCC+binutils+newlib: the quick and dirty way
Building upstream RISC-V GCC+binutils+newlib: the quick and dirty way
September 5, 2017
There are a number of available options for building a RISC-V GCC toolchain. You might use the build system from the riscv/riscv-tools repository, or investigate toolchain generators such as crosstool-ng. However in the case of riscv-tools, it’s not always clear how this corresponds to the code in the relevant upstream projects. When investigating a potential bug, you often just want to build the latest upstream code with as little fuss as possible. For distribution purposes you’d probably want to perform a proper multi-stage build, but for a quick test you might find the following recipe useful:
git clone --depth=1 git://gcc.gnu.org/git/gcc.git gcc
git clone --depth=1 git://sourceware.org/git/binutils-gdb.git
git clone --depth=1 git://sourceware.org/git/newlib-cygwin.git
mkdir combined
cd combined
@44670
44670 / gist:42a1baa1fe770c2a37170ca0ad6f7737
Last active February 4, 2024 06:23
Allwinner D1 Set HDMI Resolution
HDMI_RESOLUTION=5 #720p
cd /sys/kernel/debug/dispdbg
echo disp0 > name; echo switch1 > command; echo 4 $HDMI_RESOLUTION 0 0 0x4 0x101 0 0 0 8 > param; echo 1 > start;