Skip to content

Instantly share code, notes, and snippets.

/*
* IPL (Initial Program Loader, integrated inside CPU)
* Will load first 8k from NAND (SPL) into cache and execute it from there.
*
* SPL (Secondary Program Loader)
* Will load special U-Boot version (NUB) from NAND and execute it. This SPL
* has to fit into 8kByte. It sets up the CPU and configures the SDRAM
* controller and the NAND controller so that the special U-Boot image can be
* loaded from NAND to SDRAM.
*
/*
* Board: JZ-YKS (rev 1) "jz01"
*
* CPU: JZ4725B
* SDRAM: MT48LC32M16A2P-75
* NAND: K9GAG08U0M
*
* CPU datasheet quotes:
* Operating frequency 360MHz (360000000Hz) CPUSPEED, CFG_CPU_SPEED
* External oscillator 12MHz (12000000Hz) EXTCLK, CFG_EXTAL
@tpimh
tpimh / black.css
Last active August 29, 2015 14:01
LOR Wiki styles
body {
background: #000;
color: #C8C8C8;
margin: 0;
padding: 0;
}
body, input, select {
font: 95% sans-serif, tahoma;
}
a {
@echo off
set MDRV=%~d0
set PATH=
set MSYSTEM=MINGW32
%MDRV%\msys\1.0\bin\sed.exe -i 's/.*\/mingw/%MDRV% \/mingw/g' %MDRV%\msys\1.0\etc\fstab
%MDRV%\msys\1.0\msys.bat --mintty
for i in /mingw/addons/* ; do
if [ -d $i ]; then
if [ -d $i/bin ]; then
export PATH="$PATH:$i/bin"
fi
if [ -d $i/include ]; then
export CPATH="$CPATH;$i/include"
fi
if [ -d $i/lib ]; then
export LIBRARY_PATH="$LIBRARY_PATH;$i/lib"
@tpimh
tpimh / tl.sh
Created December 26, 2015 15:05
#!/bin/sh
Y='\033[1;33m'
G='\033[1;30m'
L='\033[1;37m'
N='\033[0m'
C='█'
H=1
W=2
for i in $(seq 1 $W); do
[CCode (lower_case_cprefix = "Gamepad_", cheader_filename = "gamepad/Gamepad.h")]
namespace Gamepad {
[CCode (cname = "struct Gamepad_device", free_function = "")]
[Compact]
public class Device {
[CCode (cname = "deviceID")]
public uint device_id;
public string description;
valac -o test first.vala second.vala main.vala
# OR
# ???
valac -o test first.vala second.vala main.vala
# OR
valac -C first.vala --internal-vapi=first.vapi --header=first.h --internal-header=first_internal.h
valac -C second.vala --vapidir=. --pkg first --internal-vapi=second.vapi --header=second.h --internal-header=second_internal.h
valac -C main.vala --vapidir=. --pkg first --pkg second --internal-vapi=main.vapi --header=main.h --internal-header=main_internal.h
gcc -c $CFLAGS -I. first.c
gcc -c $CFLAGS -I. second.c
gcc -c $CFLAGS -I. main.c
diff --git a/configure b/configure
index c2db298..02a39bd 100755
--- a/configure
+++ b/configure
@@ -98,7 +98,7 @@ fi
tryldflag () {
printf "checking whether linker accepts %s... " "$2"
echo "typedef int x;" > "$tmpc"
-if $CC $LDFLAGS_TRY -nostdlib -shared "$2" -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
+if $CC $LDFLAGS_TRY -nostdlib -shared "$2" "$tmpc" >/dev/null 2>&1 ; then