diff --git a/targets/mini2440.conf b/targets/mini2440.conf new file mode 100644 index 0000000..d4a446a --- /dev/null +++ b/targets/mini2440.conf @@ -0,0 +1,37 @@ +#!/bin/bash + +IMAGE_MB=512 +MIRROR=http://mirrors.kernel.org/debian +SYSTEM=debian +ARCH=armel +SUITE=wheezy + +read -r -d '' EXTRA_PACKAGES << EOF +dosfstools +kmod +less +locales +parted +vim-tiny +EOF + +HOSTNAME=mini2440 +LOCALE=en_US.UTF-8 + +post_install() { + find "${ROOTFS}/usr/share/doc" ! -name copyright -type f -delete + find "${ROOTFS}/usr/share/doc" -type d -delete > /dev/null 2>&1 + rm -rf "${ROOTFS}/usr/share/man/"* + rm -rf "${ROOTFS}/usr/share/info/"* + rm -rf "${ROOTFS}/usr/share/lintian/"* + + cat >> "${ROOTFS}/etc/securetty" << EOF + +s3c2410_serial0 +EOF + sed -i 's/1:2345/# 1:2345/' "${ROOTFS}/etc/inittab" + echo "T1:23:respawn:/sbin/getty -L s3c2410_serial0 115200 vt100" >> "${ROOTFS}/etc/inittab" + cp -r "${DIBS}/targets/mini2440_overlay/"* "${ROOTFS}" + run_target /usr/sbin/update-rc.d tscal_check defaults + run_target /usr/sbin/update-rc.d fb_fix defaults +} diff --git a/targets/mini2440_overlay/etc/apt/apt.conf.d/02nocache b/targets/mini2440_overlay/etc/apt/apt.conf.d/02nocache new file mode 100644 index 0000000..fa32f81 --- /dev/null +++ b/targets/mini2440_overlay/etc/apt/apt.conf.d/02nocache @@ -0,0 +1,4 @@ +Dir::Cache { + srcpkgcache ""; + pkgcache ""; +} diff --git a/targets/mini2440_overlay/etc/dpkg/dpkg.cfg.d/01_smalldisk b/targets/mini2440_overlay/etc/dpkg/dpkg.cfg.d/01_smalldisk new file mode 100644 index 0000000..f56cfd9 --- /dev/null +++ b/targets/mini2440_overlay/etc/dpkg/dpkg.cfg.d/01_smalldisk @@ -0,0 +1,13 @@ +# block documentation +path-exclude /usr/share/doc/* +# keep copyright files for legal reasons +path-include /usr/share/doc/*/copyright +path-exclude /usr/share/man/* +path-exclude /usr/share/groff/* +path-exclude /usr/share/info/* +# lintian stuff is small, but really unnecessary +path-exclude /usr/share/lintian/* +path-exclude /usr/share/linda/* +# block non-us locales +path-exclude /usr/share/locale/* +path-include /usr/share/locale/en* diff --git a/targets/mini2440_overlay/etc/fstab b/targets/mini2440_overlay/etc/fstab new file mode 100644 index 0000000..6638278 --- /dev/null +++ b/targets/mini2440_overlay/etc/fstab @@ -0,0 +1 @@ +devpts /dev/pts devpts gid=5,mode=620 0 0 diff --git a/targets/mini2440_overlay/etc/init.d/fb_fix b/targets/mini2440_overlay/etc/init.d/fb_fix new file mode 100755 index 0000000..7e4f96b --- /dev/null +++ b/targets/mini2440_overlay/etc/init.d/fb_fix @@ -0,0 +1,18 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: fb_fix +# Required-Start: $all +# Required-Stop: +# X-Start-Before: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Disable cursor, screen saver and clear screen. +### END INIT INFO + +case "$1" in + start) + echo -ne '\033[?17;0;0c' > /dev/tty1 + echo -ne "\033[9;0]\033[14;0]" > /dev/tty1 + echo -ne '\033[2J' > /dev/tty1 + ;; +esac diff --git a/targets/mini2440_overlay/etc/init.d/tscal_check b/targets/mini2440_overlay/etc/init.d/tscal_check new file mode 100755 index 0000000..2f6c998 --- /dev/null +++ b/targets/mini2440_overlay/etc/init.d/tscal_check @@ -0,0 +1,22 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: tscal_check +# Required-Start: $all +# Required-Stop: +# X-Start-Before: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Check for TSLib calibration. +### END INIT INFO + +PTRCAL=/etc/pointercal + +case "$1" in + start) + if [ ! -f $PTRCAL ]; then + echo "No pointercal file, starting touchscreen calibration..." + . /etc/profile + /usr/bin/ts_calibrate > /dev/null 2>&1 & + fi + ;; +esac diff --git a/targets/mini2440_overlay/etc/profile.d/touchscreen.sh b/targets/mini2440_overlay/etc/profile.d/touchscreen.sh new file mode 100755 index 0000000..fc9c76e --- /dev/null +++ b/targets/mini2440_overlay/etc/profile.d/touchscreen.sh @@ -0,0 +1,6 @@ +export TSLIB_CALIBFILE=/etc/pointercal +export TSLIB_CONFFILE=/etc/ts.conf +export TSLIB_TSDEVICE=/dev/input/event1 +export TSLIB_FBDEVICE=/dev/fb0 +export TSLIB_CONSOLEDEVICE=/dev/tty1 +export TSLIB_PLUGINDIR=/usr/lib/ts diff --git a/targets/mini2440_overlay/etc/ts.conf b/targets/mini2440_overlay/etc/ts.conf new file mode 100644 index 0000000..0930971 --- /dev/null +++ b/targets/mini2440_overlay/etc/ts.conf @@ -0,0 +1,5 @@ +module_raw input +module pthres pmin=1 +module variance delta=30 +module dejitter delta=100 +module linear diff --git a/targets/mini2440_overlay/usr/bin/ts_calibrate b/targets/mini2440_overlay/usr/bin/ts_calibrate new file mode 100755 index 0000000..330767a Binary files /dev/null and b/targets/mini2440_overlay/usr/bin/ts_calibrate differ diff --git a/targets/mini2440_overlay/usr/bin/ts_harvest b/targets/mini2440_overlay/usr/bin/ts_harvest new file mode 100755 index 0000000..0f197b1 Binary files /dev/null and b/targets/mini2440_overlay/usr/bin/ts_harvest differ diff --git a/targets/mini2440_overlay/usr/bin/ts_print b/targets/mini2440_overlay/usr/bin/ts_print new file mode 100755 index 0000000..87357e1 Binary files /dev/null and b/targets/mini2440_overlay/usr/bin/ts_print differ diff --git a/targets/mini2440_overlay/usr/bin/ts_print_raw b/targets/mini2440_overlay/usr/bin/ts_print_raw new file mode 100755 index 0000000..cedc4bf Binary files /dev/null and b/targets/mini2440_overlay/usr/bin/ts_print_raw differ diff --git a/targets/mini2440_overlay/usr/bin/ts_test b/targets/mini2440_overlay/usr/bin/ts_test new file mode 100755 index 0000000..25eeb62 Binary files /dev/null and b/targets/mini2440_overlay/usr/bin/ts_test differ diff --git a/targets/mini2440_overlay/usr/lib/libts-1.0.so.0 b/targets/mini2440_overlay/usr/lib/libts-1.0.so.0 new file mode 120000 index 0000000..71e4ea0 --- /dev/null +++ b/targets/mini2440_overlay/usr/lib/libts-1.0.so.0 @@ -0,0 +1 @@ +libts-1.0.so.0.0.0 \ No newline at end of file diff --git a/targets/mini2440_overlay/usr/lib/libts-1.0.so.0.0.0 b/targets/mini2440_overlay/usr/lib/libts-1.0.so.0.0.0 new file mode 100755 index 0000000..b58cb19 Binary files /dev/null and b/targets/mini2440_overlay/usr/lib/libts-1.0.so.0.0.0 differ diff --git a/targets/mini2440_overlay/usr/lib/libts.so b/targets/mini2440_overlay/usr/lib/libts.so new file mode 120000 index 0000000..71e4ea0 --- /dev/null +++ b/targets/mini2440_overlay/usr/lib/libts.so @@ -0,0 +1 @@ +libts-1.0.so.0.0.0 \ No newline at end of file diff --git a/targets/mini2440_overlay/usr/lib/pkgconfig/tslib-1.0.pc b/targets/mini2440_overlay/usr/lib/pkgconfig/tslib-1.0.pc new file mode 100644 index 0000000..4594898 --- /dev/null +++ b/targets/mini2440_overlay/usr/lib/pkgconfig/tslib-1.0.pc @@ -0,0 +1,10 @@ +prefix=/opt/tslib/install +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: tslib +Description: Touchscreen Access Library +Version: 1.1.0 +Libs: -L${libdir} -lts +Cflags: -I${includedir} diff --git a/targets/mini2440_overlay/usr/lib/pkgconfig/tslib.pc b/targets/mini2440_overlay/usr/lib/pkgconfig/tslib.pc new file mode 100644 index 0000000..4594898 --- /dev/null +++ b/targets/mini2440_overlay/usr/lib/pkgconfig/tslib.pc @@ -0,0 +1,10 @@ +prefix=/opt/tslib/install +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: tslib +Description: Touchscreen Access Library +Version: 1.1.0 +Libs: -L${libdir} -lts +Cflags: -I${includedir} diff --git a/targets/mini2440_overlay/usr/lib/ts/dejitter.so b/targets/mini2440_overlay/usr/lib/ts/dejitter.so new file mode 100755 index 0000000..e4d10b8 Binary files /dev/null and b/targets/mini2440_overlay/usr/lib/ts/dejitter.so differ diff --git a/targets/mini2440_overlay/usr/lib/ts/input.so b/targets/mini2440_overlay/usr/lib/ts/input.so new file mode 100755 index 0000000..0ead846 Binary files /dev/null and b/targets/mini2440_overlay/usr/lib/ts/input.so differ diff --git a/targets/mini2440_overlay/usr/lib/ts/linear.so b/targets/mini2440_overlay/usr/lib/ts/linear.so new file mode 100755 index 0000000..9a902b0 Binary files /dev/null and b/targets/mini2440_overlay/usr/lib/ts/linear.so differ diff --git a/targets/mini2440_overlay/usr/lib/ts/pthres.so b/targets/mini2440_overlay/usr/lib/ts/pthres.so new file mode 100755 index 0000000..b1d7aaa Binary files /dev/null and b/targets/mini2440_overlay/usr/lib/ts/pthres.so differ diff --git a/targets/mini2440_overlay/usr/lib/ts/variance.so b/targets/mini2440_overlay/usr/lib/ts/variance.so new file mode 100755 index 0000000..108e0a8 Binary files /dev/null and b/targets/mini2440_overlay/usr/lib/ts/variance.so differ