Skip to content

Instantly share code, notes, and snippets.

--
-- Fiio X3II
--
FIIOX3II = {}
-- call with nil to get automatic name
function FIIOX3II.dump_ipl(file)
if file == nil then
file = "fiio_x3ii_ipl.bin"
end
#!/bin/bash
# run from root of repository
# create a list of all button names
BTN_LIST=$(grep -RE '#define[[:space:]]*BUTTON_[[:alnum:]]+[[:space:]]+[[:xdigit:]xX]+' firmware/ | awk '{ print($2) }' | sort | uniq)
BTN_LIST=$(echo "$BTN_LIST" | awk 'BEGIN { list = ""; } {list = list " " $0; } END { print(list); }')
echo "Button list: $BTN_LIST"
# ask the script which ones are defined for each target
./check_defines.sh ../www/buildserver/builds $BTN_LIST
#/bin/bash
TMPDIR="./tmp-check-defines"
SEARCH_DIRS="apps/ firmware/ uisimulator/"
function usage()
{
echo "Usage: $0 <build file> <define 1> [<define 2>...]"
echo "If the define name is suffixed with @ or ~, the tool will also print its value"
echo "Furthermore, if a regex follows the @, the tool will try to list all defines"
Button list: BUTTON_01 BUTTON_02 BUTTON_03 BUTTON_04 BUTTON_05 BUTTON_06 BUTTON_07 BUTTON_08 BUTTON_A BUTTON_AB BUTTON_BACK BUTTON_BOTTOMLEFT BUTTON_BOTTOMMIDDLE BUTTON_BOTTOMRIGHT BUTTON_BWD BUTTON_CANCEL BUTTON_CENTER BUTTON_DISPLAY BUTTON_DOWN BUTTON_EIGHT BUTTON_ENTER BUTTON_EQ BUTTON_F1 BUTTON_F2 BUTTON_F3 BUTTON_FF BUTTON_FFWD BUTTON_FIVE BUTTON_FOUR BUTTON_FUNC BUTTON_FWD BUTTON_HOLD BUTTON_HOME BUTTON_LEFT BUTTON_M BUTTON_MAIN BUTTON_MENU BUTTON_MIDLEFT BUTTON_MIDRIGHT BUTTON_MINUS BUTTON_MODE BUTTON_MULTIMEDIA BUTTON_NEXT BUTTON_NONE BUTTON_OFF BUTTON_OK BUTTON_ON BUTTON_ONE BUTTON_PLAY BUTTON_PLAYLIST BUTTON_PLAYPAUSE BUTTON_PLUS BUTTON_POWER BUTTON_POWERPLAY BUTTON_PRESET BUTTON_PREV BUTTON_PREVNEXT BUTTON_REC BUTTON_REDRAW BUTTON_REL BUTTON_REMOTE BUTTON_REPEAT BUTTON_REPEATAB BUTTON_RETURN BUTTON_REW BUTTON_REWIND BUTTON_RIGHT BUTTON_SELECT BUTTON_SEVEN BUTTON_SHORTCUT BUTTON_SIX BUTTON_STOP BUTTON_TAP BUTTON_THREE BUTTON_TOPLEFT BUTTON_TOPMIDDLE BUTTON_TOPRIGHT BUTTON_TOUCH BUTTON_TOUCHSCREEN B
#!/bin/sh
cat /dev/icx_nvp/001 > /contents/bti.rgb
constants
{
}
options
{
productVersion = "000.003.023";
componentVersion = "000.003.023";
driveTag = 0x0;
flags = 0x0;
@pamaury
pamaury / sa3ara.lua
Last active November 21, 2016 22:14
--
-- Philips GoGear SA3ARA
--
SA3ARA = {}
function SA3ARA.lcd_send(is_data, data)
STMP.lcdif.send_pio(is_data, {data})
end
function SA3ARA.lcd_init_seq_0()
#/bin/bash
TMPDIR="./tmp-build-all"
function usage()
{
echo "Usage: $0 <build file>"
echo "Example:"
echo "$0 ../www/buildserver/builds"
exit 1
@pamaury
pamaury / nwz_install.txt
Created January 27, 2017 22:21
How to install NWZ bootloader
All examples below are for NWZ-E580, but the same applies for other targets:
at the root of rockbox resposotory:
> mkdir build_nwze580_bl
> cd build_nwze580_bl
> ../tools/configure
# select NWZ-E580 Series
# Select (B)ootloader
> make
> make -C ../rbutil/mknwzboot
# NOTE: mknwzboot requires to install libcrypto++-dev
@pamaury
pamaury / bfin_enc.txt
Created January 28, 2017 23:57
Investigation of encryption on blackfin devices (DAC-HA300 and HA-P90)
enc -> dec
00 -> 00
ff -> ff
80 -> 90 (1000 -> 1001)
40 -> 30 (0100 -> 0011)
e0 -> 10 (1110 -> 0001)
20 -> 60 (0010 -> 0110)
c0 -> 70 (1100 -> 0111)
a0 -> c0 (1010 -> 1100)
60 -> 80 (0110 -> 1000)