1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2025-04-21 12:27:27 +03:00

nanonote-files: cleanup the file structure. update version to 201204

This commit is contained in:
Xiangfu
2012-04-09 14:21:55 +08:00
parent 9d550b847a
commit 223a158fbe
94 changed files with 2 additions and 20 deletions

View File

@@ -0,0 +1,116 @@
#!/bin/sh
__VERSION__=2011-03-07
if [ "$1" == "flash" ] && [ "$#" == "3" ]; then
case "$2" in
"bootloader")
echo "not implenment"
#flash_eraseall /dev/mtd0
exit 0
;;
"kernel")
echo "flashing kernel ..."
flash_eraseall /dev/mtd1
nandwrite -p /dev/mtd1 "$3"
exit 0
;;
"rootfs")
echo "flashing rootfs ..."
ubiformat /dev/mtd2 -f "$3"
exit 0
;;
"data")
echo "flashing data partition ..."
ubiformat /dev/mtd3 -f "$3"
exit 0
;;
esac
fi
if [ "$1" == "mount" ] && [ "$#" == "3" ]; then
if [ "$2" == "rootfs" ] || [ "$2" == "data" ]; then
MOUNT_POINT="$3"
if [ "$2" == "rootfs" ]; then
PARTITION="2"
elif [ "$2" == "data" ]; then
PARTITION="3"
fi
mkdir -p $MOUNT_POINT
if [ "$?" != "0" ]; then
echo "mkdir -p $MOUNT_POINT Fail"
exit 1
fi
ubiattach /dev/ubi_ctrl -m ${PARTITION}
DEV_UBI=`dmesg | grep "UBI: attached mtd${PARTITION} to" | cut -d ":" -f 2 | cut -d " " -f 5`
mount -t ubifs ${DEV_UBI}_0 $MOUNT_POINT
exit 0
fi
fi
if [ "$1" == "format_data_default" ]; then
ubiformat /dev/mtd3 -y
ubiattach /dev/ubi_ctrl -m 3
ubimkvol /dev/ubi1 -s 1480MiB -N data
# test in xiangfu's nanonote. 1486 is the MAX size we can make
# so we using 1480 for now
exit 0
fi
if [ "$1" == "fw_setenv_default" ]; then
fw_setenv bootargs mem=32M console=tty0 console=ttyS0,57600n8 ubi.mtd=2 rootfstype=ubifs root=ubi0:rootfs rw rootwait consoleblank=30 quiet
fw_setenv bootcmd nand read 0x80600000 0x400000 0x280000\;bootm
fw_setenv bootargsfromsd mem=32M console=tty0 console=ttyS0,57600n8 rootfstype=ext2 root=/dev/mmcblk0p1 rw rootwait
fw_setenv bootcmdfromsd mmc init\; ext2load mmc 0 0x80600000 /boot/uImage\; bootm
fw_setenv bootdelay 0
fw_setenv baudrate 57600
fw_setenv loads_echo 1
fw_setenv stdin serial
fw_setenv stderr serial
fw_setenv stdout serial
fw_setenv bootcmdf1 mmc init\; ext2load mmc 0:1 0x80600000 /boot/uImage\; bootm
fw_setenv bootargsf1 mem=32M console=tty0 console=ttyS0,57600n8 rootfstype=ext2 root=/dev/mmcblk0p1 rw rootwait
fw_setenv bootcmdf2 mmc init\; ext2load mmc 0:2 0x80600000 /boot/uImage\; bootm
fw_setenv bootargsf2 mem=32M console=tty0 console=ttyS0,57600n8 rootfstype=ext2 root=/dev/mmcblk0p2 rw rootwait
fw_setenv bootcmdf3 mmc init\; ext2load mmc 0:3 0x80600000 /boot/uImage\; bootm
fw_setenv bootargsf3 mem=32M console=tty0 console=ttyS0,57600n8 rootfstype=ext2 root=/dev/mmcblk0p3 rw rootwait
fw_setenv bootcmdf4 mtdparts default\;ubi part rootfs\;ubifsmount rootfs\;ubifsload 0x80600000 /boot/uImage\; bootm
fw_setenv bootargsf4 mem=32M console=tty0 console=ttyS0,57600n8 ubi.mtd=2 rootfstype=ubifs root=ubi0:rootfs rw rootwait
fw_setenv silent 1
echo "fw_setenv finished, check u-boot env by fw_printenv"
exit 0
fi
echo "\
Usage: $0 [ command ] [ <para1> <para2> <para3> ]
flash bootloader|kernel|rootfs|data image_file
flash nand partition using <image_file>
mount rootfs|data mount_point
mount nand partition
format_data_default
lookinside for more detari
NOTICE:
this command will format data
partition, create a default
1400MB volume, named 'data',
ALL data will lost after run.
fw_setenv_default
reset bootloader default variable
lookinside for more detail
NOTICE:
this command write hardcode
variables to nand, so it must
run once before you want change
change it.
script file for Qi Hardware Ben NanoNote
written by: Xiangfu Liu (xiangfu@sharism.cc)
written with Emacs in Ben NanoNote
version: ${__VERSION__}
Report bugs to developer@lists.qi-hardware.com"
exit 0

View File

@@ -0,0 +1,36 @@
#! /bin/bash
export CMD=nupdf
export EXT=pdf
export i=0
export PDF_PATH=~/
echo -e `basename $0` "\t\tVersion: 2012-02-02"
echo "Searching for *.$EXT files. It may take a while..."
echo " "
rm -f /tmp/fsel.tmp 2>/dev/null
touch /tmp/fsel.tmp
for aa in `find ${PDF_PATH} -name "*.$EXT" -type f -print` ; do
i=`expr $i + 1` ;
echo $i $aa >>/tmp/fsel.tmp ;
done
export B=`cat /tmp/fsel.tmp`
if [ "$B" == "" ]; then
echo "No pdf file found"
exit
fi
export A=`dialog --menu "Select a File" 0 50 20 $B --stdout`
if test $A > 0
then
export C=`grep "^$A" /tmp/fsel.tmp`
export D=`echo $C | cut -d' ' -f2 -`
$CMD $D
else
echo "No file selected!"
fi

View File

@@ -0,0 +1,14 @@
#!/bin/sh
#usage: wav2png.sh file.wav
BASE=${1%.wav}
PNG=$BASE.png
WAV=$BASE.wav
DAT=$BASE.dat
#echo $BASE,$PNG,$WAV,$DAT
sox $WAV $DAT
grep -v '^;' $DAT >$DAT.clean
FREQ=`head -1 $DAT|tr -d ';'`
echo -e "set terminal png; set title '$FREQ';set output '$PNG'; plot '$DAT.clean' w l lt 2" | gnuplot

View File

@@ -0,0 +1,31 @@
#!/bin/sh
cd /lib/modules/`uname -r`
echo jz4740-mmc.0 > /sys/bus/platform/drivers/jz4740-mmc/unbind
insmod at86rf230.ko
insmod spi_atben.ko
cd ${HOME}
iz add wpan-phy0
if [ "$1" == "2" ]; then
ip link set wpan0 address de:ad:be:af:ca:fe:ba:b2
else
ip link set wpan0 address de:ad:be:af:ca:fe:ba:b1
fi
ifconfig wpan0 up
if [ "$1" == "2" ]; then
iz assoc wpan0 777 1 11 short
izchat 777 8001 1
#dirtpan 777 8001 1 'ifconfig tun0 10.8.0.2 dstaddr 10.8.0.1 up' &
else
rm -f /tmp/lease
izcoordinator -d 1 -l /tmp/lease -i wpan0 -p 0x777 -s 1 -c 11 &
izchat 777 1 8001
#dirtpan 777 1 8001 'ifconfig tun0 10.8.0.1 dstaddr 10.8.0.2 up' &
fi

View File

@@ -0,0 +1 @@
source /root/.tclshrc

View File

@@ -0,0 +1,3 @@
title=abook
icon=skin:icons/abook.png
exec=/usr/bin/abook

View File

@@ -0,0 +1,3 @@
title=aewan
icon=skin:icons/aewan.png
exec=/usr/bin/aewan

View File

@@ -0,0 +1,3 @@
title=ASEPRITE
icon=skin:icons/ase.png
exec=/usr/bin/aseprite

View File

@@ -0,0 +1,2 @@
title=bard
exec=/usr/bin/bard

View File

@@ -0,0 +1,4 @@
title=bard
icon=skin:icons/Bard32.png
exec=/usr/local/bin/bard
params=

View File

@@ -0,0 +1,4 @@
title=bc
icon=skin:icons/calc.png
params=-l
exec=/usr/bin/bc

View File

@@ -0,0 +1,3 @@
title=calcurse
icon=skin:icons/calcurse.png
exec=/usr/bin/calcurse

View File

@@ -0,0 +1,3 @@
title=centerim
icon=skin:icons/irc.png
exec=/usr/bin/centerim

View File

@@ -0,0 +1,3 @@
title=ctronome
icon=skin:icons/ctronome.png
exec=/usr/bin/ctronome

View File

@@ -0,0 +1,4 @@
title=DGClock
icon=skin:icons/dgclock.png
exec=/usr/bin/dgclock
wrapper=true

View File

@@ -0,0 +1,3 @@
title=elinks
icon=skin:icons/browser.png
exec=/usr/bin/elinks

View File

@@ -0,0 +1,3 @@
title=emacs
icon=skin:icons/emacs.png
exec=/usr/bin/emacs

View File

@@ -0,0 +1,3 @@
title=gjay
icon=skin:icons/gjay.png
exec=/usr/bin/gjay

View File

@@ -0,0 +1,3 @@
title=GMU
icon=skin:icons/gmu.png
exec=/usr/bin/gmu

View File

@@ -0,0 +1,4 @@
title=Gnuplot
icon=skin:icons/gnuplot.png
exec=/usr/bin/gnuplot
params=

View File

@@ -0,0 +1,3 @@
title=gtkguitune
icon=skin:icons/gtkguitune.png
exec=/usr/bin/gtkguitune

View File

@@ -0,0 +1,2 @@
title=hnb
exec=/usr/bin/hnb

View File

@@ -0,0 +1,3 @@
title=ikog.py
icon=skin:icons/utilities-terminal.png
exec=/usr/bin/ikog.py

View File

@@ -0,0 +1,3 @@
title=joe
icon=skin:icons/editor.png
exec=/usr/bin/joe

View File

@@ -0,0 +1,3 @@
title=lingot
icon=skin:icons/lingot.png
exec=/usr/bin/lingot

View File

@@ -0,0 +1,4 @@
title=links
icon=skin:icons/links.png
exec=/usr/bin/links
params=-driver svgalib -mode 320x240x16M32 -download-dir /root/ http://en.qi-hardware.com/wiki/Main_Page

View File

@@ -0,0 +1,4 @@
title=lynx
icon=skin:icons/lynx.png
exec=/bin/sh
params=--login -c /usr/bin/lynx

View File

@@ -0,0 +1,3 @@
title=mathomatic
icon=skin:icons/mathomatic.png
exec=/usr/bin/mathomatic

View File

@@ -0,0 +1,3 @@
title=mcabber
icon=skin:icons/mcabber.png
exec=/usr/bin/mcabber

View File

@@ -0,0 +1,3 @@
title=minicom
icon=skin:icons/utilities-terminal.png
exec=/usr/bin/minicom

View File

@@ -0,0 +1,4 @@
title=MPlayer
icon=skin:icons/mplayer.png
exec=/usr/bin/alfilesel
params=-t "MPlayer: Select Video" -p /root/ -f "ogg;ogv;mkv;webm;avi;mpg;mpeg" -- mplayer

View File

@@ -0,0 +1,3 @@
title=mutt
icon=skin:icons/mutt.png
exec=/usr/bin/mutt

View File

@@ -0,0 +1,4 @@
title=NanoMap
icon=skin:icons/nanomap.png
exec=/usr/bin/NanoMap
params=-qws

View File

@@ -0,0 +1,3 @@
title=netsurf
icon=skin:icons/utilities-terminal.png
exec=/usr/bin/netsurf@BROKEN #don't know how to exit

View File

@@ -0,0 +1,3 @@
title=nightsky
icon=skin:icons/nightsky.png
exec=/usr/bin/nightsky

View File

@@ -0,0 +1,4 @@
title=NuPDF
icon=skin:icons/editor.png
exec=/usr/bin/alfilesel
params=-t "NuPDF: Select File" -p /root/ -f "pdf;PDF" -- nupdf

View File

@@ -0,0 +1,4 @@
title=PDF
icon=skin:icons/generic.png
exec=/usr/bin/pick-pdf
params=/root/

View File

@@ -0,0 +1,2 @@
title=pyclock
exec=/usr/bin/pyclock

View File

@@ -0,0 +1,3 @@
title=qc
icon=skin:icons/calc.png
exec=/usr/bin/qc

View File

@@ -0,0 +1,4 @@
title=qStarDict
icon=skin:icons/qstardict.png
exec=/usr/bin/qstardict
params=-qws

View File

@@ -0,0 +1,3 @@
title=sc
icon=skin:icons/sc.png
exec=/usr/bin/sc

View File

@@ -0,0 +1,4 @@
title=sdcv
icon=skin:icons/stardict.png
exec=/usr/bin/sdcv
params=--utf8-output

View File

@@ -0,0 +1,3 @@
title=snownews
icon=skin:icons/leaf_red.png
exec=/usr/bin/snownews

View File

@@ -0,0 +1,3 @@
title=StarDict
icon=skin:icons/stardict.png
exec=/usr/bin/stardict

View File

@@ -0,0 +1,3 @@
title=tunec
icon=skin:icons/utilities-terminal.png
exec=/usr/bin/tunec

View File

@@ -0,0 +1,3 @@
title=vim
icon=skin:icons/vim.png
exec=/usr/bin/vim

View File

@@ -0,0 +1,4 @@
title=w3m
icon=skin:icons/w3m.png
exec=/usr/bin/w3m
params=http://en.qi-hardware.com/wiki/Main_Page

View File

@@ -0,0 +1,4 @@
title=zgv
icon=skin:icons/zgv.png
exec=/usr/bin/zgv
params=/root/

View File

@@ -0,0 +1,4 @@
title=Alex4
icon=skin:icons/allegro.png
exec=/usr/bin/alex4

View File

@@ -0,0 +1,4 @@
title=Allegro Demo
icon=skin:icons/allegro.png
exec=/usr/bin/shooter

View File

@@ -0,0 +1,3 @@
title=backgammon
icon=skin:icons/backgammon.png
exec=/usr/bin/backgammon.sh

View File

@@ -0,0 +1,4 @@
title=Brainless
icon=skin:icons/brainless.png
exec=/usr/bin/brainless-jfbterm
params=

View File

@@ -0,0 +1,4 @@
title=dunnet
icon=skin:icons/emacs.png
exec=/usr/bin/emacs
params=-batch -l dunnet

View File

@@ -0,0 +1,4 @@
title=freedroid
exec=/usr/bin/freedroid
icon=skin:icons/freedroid.png
params=-q

View File

@@ -0,0 +1,3 @@
title=gnuchess
icon=skin:icons/chess.png
exec=/usr/bin/gnuchess

View File

@@ -0,0 +1,4 @@
title=gottet
icon=skin:icons/gottet.png
exec=/usr/bin/gottet
params=-qws

View File

@@ -0,0 +1,4 @@
title=qball
icon=skin:icons/qball.png
exec=/usr/bin/qball
params=-qws

View File

@@ -0,0 +1,4 @@
title=sokoban
icon=skin:icons/gforth.png
exec=/usr/bin/gforth
params=sokoban.fs -e sokoban -e bye

View File

@@ -0,0 +1,3 @@
title=Supertux
icon=skin:icons/supertux.png
exec=/usr/bin/supertux

View File

@@ -0,0 +1,4 @@
title=tetris
icon=skin:icons/tetris.png
exec=/usr/sbin/setfont2
params=/usr/share/setfont2/un-fuzzy-6x10-font.pnm; /usr/bin/tetris

View File

@@ -0,0 +1,4 @@
title=Tile
icon=skin:icons/tile.png
exec=/usr/bin/Tile
params=-qws

View File

@@ -0,0 +1,3 @@
title=vitetris
icon=skin:icons/vitetris.png
exec=/usr/bin/vitetris

View File

@@ -0,0 +1,3 @@
title=worm
icon=skin:icons/worm.png
exec=/usr/bin/worm

View File

@@ -0,0 +1,3 @@
title=4th
icon=skin:icons/4th.png
exec=/usr/bin/4th

View File

@@ -0,0 +1,3 @@
title=gforth
icon=skin:icons/gforth.png
exec=/usr/bin/gforth

View File

@@ -0,0 +1,3 @@
title=guile
icon=skin:icons/guile.png
exec=/usr/bin/guile

View File

@@ -0,0 +1,3 @@
title=lua
icon=skin:icons/lua.png
exec=/usr/bin/lua

View File

@@ -0,0 +1,3 @@
title=GNU Octave
icon=skin:icons/octave.png
exec=/usr/bin/octave

View File

@@ -0,0 +1,3 @@
title=python
icon=skin:icons/python.png
exec=/usr/bin/python

View File

@@ -0,0 +1,3 @@
title=tcl
icon=skin:icons/tclsh.png
exec=/usr/bin/tclsh8.5

View File

@@ -0,0 +1,4 @@
title=ash(Color)
icon=skin:icons/utilities-terminal.png
exec=/usr/bin/setfont
params=/usr/share/kbd/consolefonts/kernel-6x11-font; /bin/ash --login

View File

@@ -0,0 +1,4 @@
title=ash(Default)
icon=skin:icons/utilities-terminal.png
exec=/usr/sbin/setfont2
params=/usr/share/setfont2/un-fuzzy-6x10-font.pnm; /usr/bin/loadunimap /usr/share/setfont2/ben_uni.trans; /bin/ash --login

View File

@@ -0,0 +1,4 @@
title=bash
icon=skin:icons/utilities-terminal.png
exec=/bin/bash
params=--login

View File

@@ -0,0 +1,4 @@
title=byobu
icon=skin:icons/utilities-terminal.png
exec=/bin/touch
params=/var/run/utmp; /usr/bin/byobu

View File

@@ -0,0 +1,4 @@
title=fbterm
icon=skin:icons/utilities-terminal.png
exec=/usr/bin/fbterm
params=-- /bin/ash --login

View File

@@ -0,0 +1,3 @@
title=jfbterm
icon=skin:icons/utilities-terminal.png
exec=/usr/bin/jfbterm

View File

@@ -0,0 +1,3 @@
title=nanoterm
icon=skin:icons/utilities-terminal.png
exec=/usr/bin/nanoterm

View File

@@ -0,0 +1,3 @@
title=screen
icon=skin:icons/utilities-terminal.png
exec=/usr/sbin/screen

View File

@@ -0,0 +1,4 @@
title=alsamixer
icon=skin:icons/alsamixer.png
exec=/usr/bin/alsamixer
params=-Vall

View File

@@ -0,0 +1,3 @@
title=htop
icon=skin:icons/htop.png
exec=/usr/bin/htop

View File

@@ -0,0 +1,4 @@
title=mc
icon=skin:icons/mc.png
exec=/usr/bin/mc
params=~/ ~/

View File

@@ -0,0 +1,3 @@
title=mediatomb
icon=skin:icons/mediatomb.png
exec=/usr/bin/mediatomb

View File

@@ -0,0 +1,3 @@
title= poweroff
icon=skin:icons/poweroff.png
exec=/sbin/poweroff

View File

@@ -0,0 +1,3 @@
title=powertop
icon=skin:icons/powertop.png
exec=/usr/bin/powertop

View File

@@ -0,0 +1,3 @@
title=reboot
icon=skin:icons/reboot.png
exec=/sbin/reboot

View File

@@ -0,0 +1,4 @@
title=start-listener
icon=skin:icons/listener.png
exec=/usr/bin/listener
params= ; sleep 1

View File

@@ -0,0 +1,4 @@
title=stop-listener
icon=skin:icons/listener.png
exec=/usr/bin/killall
params= -s 9 listener; cd /usr/share/listener && ash

Binary file not shown.