Merge branch 'master' of github.com:NIN101/N900_RescueOS

This commit is contained in:
Albert S. 2015-04-05 12:37:46 +02:00
commit 421ec7ca47
50 changed files with 1154 additions and 3252 deletions

View File

@ -1,3 +1,15 @@
=======================
1.1-gnoutchd 2015-04-??
NEW code_reset (can reset the security lock code)
NEW cfdisk, pg, setterm, ul
(these utilities were left out of previous builds in part because
ncurses was disabled at the time that the util-linux package was built)
NEW nano syntax highlighting files updated
NEW kernel rebuilt
REMOVED depmod, iconv, locale support
DEVELOP Kernel and roofs builds now fully automated with buildroot
1.1 2013-06-30
==============
FIX Correclty detach ubifs (thx, Pali)

60
HACKING Normal file
View File

@ -0,0 +1,60 @@
====================
RescueOS build HOWTO
These instructions are for folks who want to modify RescueOS and make their
own images. If you just want to use RescueOS on your N900, you'll want to
get one of the prebuilt images and look at 'documentation.txt' for usage
info.
RescueOS images are modified buildroot images. This source distribution is
just a collection of config files, patches, etc. that configure and customize
buildroot builds.
You'll need a GNU/Linux system to host the build. You'll need 'git' and
'quilt' to checkout the RescueOS source and apply our buildroot patches,
respectively. Once that's done, you'll also need to satisfy buildroot's
prerequisites; we'll address that later.
These files are meant to be used with version 2013.02 of buildroot. (Ports to
newer versions are welcome.)
Start by unpacking the RescueOS and buildroot sources into separate
directories. We recommend putting the two directories next to each other under
a common parent directory:
$ mkdir rescueos-build
$ cd rescueos-build
Use git to checkout the RescueOS source. It will go into a subdirectory named
'N900_RescueOS'.
$ git clone <rescueos repository url>
Fetch, verify, and unpack the buildroot source. It will end up in a
subdirectory named 'buildroot-2013.02'.
$ wget http://www.buildroot.org/downloads/buildroot-2013.02.tar.bz2
$ wget http://www.buildroot.org/downloads/buildroot-2013.02.tar.bz2.sign
$ gpg --recv-keys B025BA8B59C36319
$ gpg --verify buildroot-2013.02.tar.bz2.sign
$ tar --extract --bzip --file buildroot-2013.02.tar.bz2
Buildroot's prerequisites are documented in the "System requirements" section
of the buildroot manual ('buildroot-2013.02/docs/manual/manual.html'). Install them if necessary.
Now apply our buildroot patches with quilt.
$ cd buildroot-2013.02
$ QUILT_PATCHES=../N900_RescueOS/buildroot-patches quilt push -a
Point buildroot to the RescueOS configuration:
$ make defconfig BR2_DEFCONFIG=../N900_RescueOS/buildrootconfig
Invoke buildroot to build RescueOS:
$ make
Buildroot will download and build a whole bunch of packages, starting with the
cross-compiling toolchain. When it's done, kernel and cramfs images will be
left in 'buildroot-2013.02/output/images'.

View File

@ -0,0 +1,42 @@
Avoid GCC 4.6 segfaults
Buildroot's attempt to build a GCC 4.6.x cross-compilation toolchain might fail
with something like
/some/path/buildroot-2013.02/output/toolchain/gcc-4.6.3/libgcc/../gcc/libgcc2.c: In function __negdi2:
/some/path/buildroot-2013.02/output/toolchain/gcc-4.6.3/libgcc/../gcc/libgcc2.c:72:1: internal compiler error: Segmentation fault
This patch is revision 191605 for GCC 4.7.x
(<https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=191605>). Applying it
to 4.6.x seems to prevent this crash.
Save this file as
buildroot-2013.02/toolchain/gcc/4.6.3/999-ira-int.patch
to have buildroot apply this patch to GCC 4.6.x source before trying to build
it.
See also <https://gcc.gnu.org/ml/gcc-help/2014-03/msg00049.html>
Index: buildroot-2013.02/toolchain/gcc/4.6.3/999-ira-int.patch
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ buildroot-2013.02/toolchain/gcc/4.6.3/999-ira-int.patch 2015-03-29 00:09:28.000000000 -0400
@@ -0,0 +1,18 @@
+--- gcc-4_7-branch/gcc/ira-int.h 2012/09/21 09:19:39 191604
++++ gcc-4_7-branch/gcc/ira-int.h 2012/09/21 10:08:35 191605
+@@ -1138,8 +1138,13 @@
+ ira_allocno_object_iter_cond (ira_allocno_object_iterator *i, ira_allocno_t a,
+ ira_object_t *o)
+ {
+- *o = ALLOCNO_OBJECT (a, i->n);
+- return i->n++ < ALLOCNO_NUM_OBJECTS (a);
++ int n = i->n++;
++ if (n < ALLOCNO_NUM_OBJECTS (a))
++ {
++ *o = ALLOCNO_OBJECT (a, n);
++ return true;
++ }
++ return false;
+ }
+
+ /* Loop over all objects associated with allocno A. In each

View File

@ -0,0 +1,13 @@
Index: buildroot-2013.02/package/linux-firmware/linux-firmware.mk
===================================================================
--- buildroot-2013.02.orig/package/linux-firmware/linux-firmware.mk 2015-03-29 19:37:39.000000000 -0400
+++ buildroot-2013.02/package/linux-firmware/linux-firmware.mk 2015-03-29 19:40:20.000000000 -0400
@@ -4,7 +4,7 @@
#
#############################################################
-LINUX_FIRMWARE_VERSION = 65a5163b8bb77bd7759efa3ca780867fcaed89b0
+LINUX_FIRMWARE_VERSION = 76b366df2afdde9811fdd5fc128d1779e26e7be7
LINUX_FIRMWARE_SITE = http://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
LINUX_FIRMWARE_SITE_METHOD = git

View File

@ -0,0 +1,33 @@
Index: buildroot-2013.02/package/linux-firmware/Config.in
===================================================================
--- buildroot-2013.02.orig/package/linux-firmware/Config.in 2013-02-28 16:48:28.000000000 -0500
+++ buildroot-2013.02/package/linux-firmware/Config.in 2015-03-29 19:48:36.000000000 -0400
@@ -71,6 +71,11 @@
help
Realtek 8712
+config BR2_PACKAGE_LINUX_FIRMWARE_TI_WL1251
+ bool "TI wl1251"
+ help
+ Firmware files for wl1251 WLAN module
+
config BR2_PACKAGE_LINUX_FIRMWARE_TI_WL127X
bool "TI wl127X"
help
Index: buildroot-2013.02/package/linux-firmware/linux-firmware.mk
===================================================================
--- buildroot-2013.02.orig/package/linux-firmware/linux-firmware.mk 2015-03-29 19:40:20.000000000 -0400
+++ buildroot-2013.02/package/linux-firmware/linux-firmware.mk 2015-03-29 19:45:47.000000000 -0400
@@ -57,6 +57,12 @@
LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8787) += \
mrvl/sd8787_uapsta.bin LICENCE.Marvell
+# wl1251
+LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_TI_WL1251) += \
+ ti-connectivity/wl1251-fw.bin \
+ ti-connectivity/wl1251-nvs.bin \
+ LICENCE.ti-connectivity
+
# wl127x
LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_TI_WL127X) += \
ti-connectivity/wl1271-fw-2.bin \

View File

@ -0,0 +1,19 @@
Index: buildroot-2013.02/package/nano/nano.mk
===================================================================
--- buildroot-2013.02.orig/package/nano/nano.mk 2015-03-31 20:35:07.000000000 -0400
+++ buildroot-2013.02/package/nano/nano.mk 2015-03-31 21:29:58.000000000 -0400
@@ -18,10 +18,14 @@
define NANO_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(@D)/src/nano $(TARGET_DIR)/usr/bin/nano
+ mkdir -p $(TARGET_DIR)/usr/share/nano
+ $(INSTALL) -t $(TARGET_DIR)/usr/share/nano -m 0644 \
+ $(@D)/doc/syntax/*.nanorc
endef
define NANO_UNINSTALL_TARGET_CMDS
rm -f $(TARGET_DIR)/usr/bin/nano
+ rm -rf $(TARGET_DIR)/usr/share/nano
endef
$(eval $(autotools-package))

View File

@ -0,0 +1,51 @@
Index: buildroot-2013.02/package/Config.in
===================================================================
--- buildroot-2013.02.orig/package/Config.in 2015-03-31 16:47:43.000000000 -0400
+++ buildroot-2013.02/package/Config.in 2015-03-31 16:48:41.000000000 -0400
@@ -250,6 +250,7 @@
source "package/lshw/Config.in"
source "package/lsuio/Config.in"
source "package/lvm2/Config.in"
+source "package/maemo-code-reset/Config.in"
source "package/mdadm/Config.in"
source "package/media-ctl/Config.in"
source "package/memtester/Config.in"
Index: buildroot-2013.02/package/maemo-code-reset/Config.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ buildroot-2013.02/package/maemo-code-reset/Config.in 2015-03-31 16:47:43.000000000 -0400
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_MAEMO_CODE_RESET
+ bool "maemo-code-reset"
+ select BR2_PACKAGE_MAEMO_LIBCAL
+ help
+ Reset the lock code of a Nokia N900.
+
+ Derived from the Mameo code-reset package
+ (<http://maemo.org/packages/view/code-reset/>)
+
+ (This is a RescueOS-specific package inserted by patching; see
+ N900_RescueOS/buildroot-patches/pkg-maemo-code-reset.patch)
Index: buildroot-2013.02/package/maemo-code-reset/maemo-code-reset.mk
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ buildroot-2013.02/package/maemo-code-reset/maemo-code-reset.mk 2015-03-31 16:47:43.000000000 -0400
@@ -0,0 +1,18 @@
+#
+# maemo-code-reset
+#
+
+MAEMO_CODE_RESET_VERSION = 0.1
+MAEMO_CODE_RESET_SOURCE = code-reset_$(MAEMO_CODE_RESET_VERSION).tar.gz
+MAEMO_CODE_RESET_SITE = http://repository.maemo.org/extras-devel/pool/fremantle/free/source/c/code-reset/
+MAEMO_CODE_RESET_DEPENDENCIES = maemo-libcal
+
+define MAEMO_CODE_RESET_BUILD_CMDS
+ $(TARGET_CC) -lcrypt -lcal $(@D)/code_reset.c -o $(@D)/code_reset
+endef
+
+define MAEMO_CODE_RESET_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/code_reset $(TARGET_DIR)/usr/sbin
+endef
+
+$(eval $(generic-package))

View File

@ -0,0 +1,77 @@
Index: buildroot-2013.02/package/Config.in
===================================================================
--- buildroot-2013.02.orig/package/Config.in 2015-03-31 16:22:39.000000000 -0400
+++ buildroot-2013.02/package/Config.in 2015-03-31 17:12:47.000000000 -0400
@@ -457,6 +457,7 @@
source "package/libusb/Config.in"
source "package/libusb-compat/Config.in"
source "package/libv4l/Config.in"
+source "package/maemo-libcal/Config.in"
source "package/mtdev/Config.in"
source "package/neardal/Config.in"
source "package/pcsc-lite/Config.in"
Index: buildroot-2013.02/package/maemo-libcal/Config.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ buildroot-2013.02/package/maemo-libcal/Config.in 2015-03-31 16:22:39.000000000 -0400
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_MAEMO_LIBCAL
+ bool "maemo-libcal"
+ help
+ Maemo devices (such as the Nokia N900) have a "calibration" storage
+ area where various bits of configuration data are kept. CAL is a
+ Maemo-specific C API for reading and writing this data.
+
+ This package installs a free-software reimplementation of this API
+ from the Community SSU project
+ (<https://github.com/community-ssu/libcal>)
+
+ (This is a RescueOS-specific package inserted by patching; see
+ N900_RescueOS/buildroot-patches/pkg-maemo-libcal.patch)
Index: buildroot-2013.02/package/maemo-libcal/maemo-libcal.mk
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ buildroot-2013.02/package/maemo-libcal/maemo-libcal.mk 2015-03-31 16:22:39.000000000 -0400
@@ -0,0 +1,26 @@
+#
+# maemo-libcal
+#
+
+MAEMO_LIBCAL_VERSION = d4c5fd9293ddb693c9b032b4c084cd0343b3ea26
+MAEMO_LIBCAL_SITE = https://github.com/community-ssu/libcal.git
+MAEMO_LIBCAL_SITE_METHOD = git
+MAEMO_LIBCAL_INSTALL_STAGING = YES
+
+define MAEMO_LIBCAL_BUILD_CMDS
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all
+endef
+
+define MAEMO_LIBCAL_INSTALL_STAGING_CMDS
+ $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install
+endef
+
+define MAEMO_LIBCAL_INSTALL_TARGET_CMDS
+ $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
+endef
+
+define MAEMO_LIBCAL_CLEAN_CMDS
+ -$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(generic-package))
Index: buildroot-2013.02/package/maemo-libcal/maemo-libcal-fix-makefile.patch
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ buildroot-2013.02/package/maemo-libcal/maemo-libcal-fix-makefile.patch 2015-03-31 17:01:15.000000000 -0400
@@ -0,0 +1,11 @@
+diff -ur libcal.orig/Makefile libcal/Makefile
+--- libcal.orig/Makefile 2015-03-31 16:59:00.000000000 -0400
++++ libcal/Makefile 2015-03-31 16:59:45.000000000 -0400
+@@ -12,5 +12,5 @@
+ install -m 644 cal.h "$(DESTDIR)/usr/include/"
+ install -m 644 libcal.pc "$(DESTDIR)/usr/lib/pkgconfig/"
+ install -m 755 libcal.so.1.0.0 "$(DESTDIR)/usr/lib/"
+- ln -s libcal.so.1.0.0 "$(DESTDIR)/usr/lib/libcal.so.1"
+- ln -s libcal.so.1.0.0 "$(DESTDIR)/usr/lib/libcal.so"
++ ln -sf libcal.so.1.0.0 "$(DESTDIR)/usr/lib/libcal.so.1"
++ ln -sf libcal.so.1.0.0 "$(DESTDIR)/usr/lib/libcal.so"

6
buildroot-patches/series Normal file
View File

@ -0,0 +1,6 @@
gcc46-avoid-segfault.patch
linux-firmware-version-bump.patch
linux-firmware-wl1251.patch
nano-add-syntax-highlighting.patch
pkg-maemo-libcal.patch
pkg-maemo-code-reset.patch

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.19.3
# Sun Oct 30 22:37:23 2011
# Busybox version: 1.21.0
# Mon Mar 30 15:58:20 2015
#
CONFIG_HAVE_DOT_CONFIG=y
@ -42,6 +42,7 @@ CONFIG_FEATURE_CLEAN_UP=y
CONFIG_FEATURE_UTMP=y
CONFIG_FEATURE_WTMP=y
CONFIG_FEATURE_PIDFILE=y
CONFIG_PID_FILE_PATH="/var/run"
CONFIG_FEATURE_SUID=y
CONFIG_FEATURE_SUID_CONFIG=y
CONFIG_FEATURE_SUID_CONFIG_QUIET=y
@ -54,7 +55,7 @@ CONFIG_FEATURE_HAVE_RPC=y
#
# Build Options
#
CONFIG_STATIC=y
# CONFIG_STATIC is not set
# CONFIG_PIE is not set
# CONFIG_NOMMU is not set
# CONFIG_BUILD_LIBBUSYBOX is not set
@ -62,7 +63,10 @@ CONFIG_STATIC=y
# CONFIG_FEATURE_SHARED_BUSYBOX is not set
CONFIG_LFS=y
CONFIG_CROSS_COMPILER_PREFIX=""
CONFIG_SYSROOT=""
CONFIG_EXTRA_CFLAGS=""
CONFIG_EXTRA_LDFLAGS=""
CONFIG_EXTRA_LDLIBS=""
#
# Debugging Options
@ -92,7 +96,8 @@ CONFIG_PREFIX="./_install"
# CONFIG_FEATURE_SYSTEMD is not set
CONFIG_FEATURE_RTMINMAX=y
CONFIG_PASSWORD_MINLEN=6
CONFIG_MD5_SIZE_VS_SPEED=2
CONFIG_MD5_SMALL=1
CONFIG_SHA3_SMALL=1
CONFIG_FEATURE_FAST_TOP=y
CONFIG_FEATURE_ETC_NETWORKS=y
CONFIG_FEATURE_USE_TERMIOS=y
@ -101,6 +106,7 @@ CONFIG_FEATURE_EDITING_MAX_LEN=1024
# CONFIG_FEATURE_EDITING_VI is not set
CONFIG_FEATURE_EDITING_HISTORY=255
CONFIG_FEATURE_EDITING_SAVEHISTORY=y
# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set
CONFIG_FEATURE_REVERSE_SEARCH=y
CONFIG_FEATURE_TAB_COMPLETION=y
# CONFIG_FEATURE_USERNAME_COMPLETION is not set
@ -140,6 +146,7 @@ CONFIG_FEATURE_CPIO_P=y
CONFIG_GUNZIP=y
CONFIG_GZIP=y
CONFIG_FEATURE_GZIP_LONG_OPTIONS=y
CONFIG_GZIP_FAST=0
CONFIG_LZOP=y
# CONFIG_LZOP_COMPR_HIGH is not set
# CONFIG_RPM2CPIO is not set
@ -173,11 +180,13 @@ CONFIG_DATE=y
CONFIG_FEATURE_DATE_ISOFMT=y
# CONFIG_FEATURE_DATE_NANO is not set
CONFIG_FEATURE_DATE_COMPAT=y
CONFIG_HOSTID=y
CONFIG_ID=y
CONFIG_GROUPS=y
CONFIG_TEST=y
CONFIG_FEATURE_TEST_64=y
CONFIG_TOUCH=y
CONFIG_FEATURE_TOUCH_SUSV3=y
CONFIG_TR=y
CONFIG_FEATURE_TR_CLASSES=y
CONFIG_FEATURE_TR_EQUIV=y
@ -220,7 +229,6 @@ CONFIG_FOLD=y
CONFIG_FSYNC=y
CONFIG_HEAD=y
CONFIG_FEATURE_FANCY_HEAD=y
CONFIG_HOSTID=y
CONFIG_INSTALL=y
CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y
CONFIG_LN=y
@ -257,6 +265,7 @@ CONFIG_SEQ=y
CONFIG_SHA1SUM=y
CONFIG_SHA256SUM=y
CONFIG_SHA512SUM=y
CONFIG_SHA3SUM=y
CONFIG_SLEEP=y
CONFIG_FEATURE_FANCY_SLEEP=y
CONFIG_FEATURE_FLOAT_SLEEP=y
@ -304,7 +313,7 @@ CONFIG_FEATURE_AUTOWIDTH=y
CONFIG_FEATURE_HUMAN_READABLE=y
#
# Common options for md5sum, sha1sum, sha256sum, sha512sum
# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
#
CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
@ -369,7 +378,6 @@ CONFIG_FEATURE_VI_SETOPTS=y
CONFIG_FEATURE_VI_SET=y
CONFIG_FEATURE_VI_WIN_RESIZE=y
CONFIG_FEATURE_VI_ASK_TERMINAL=y
CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
CONFIG_AWK=y
CONFIG_FEATURE_AWK_LIBM=y
# CONFIG_CMP is not set
@ -461,6 +469,7 @@ CONFIG_DELUSER=y
# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
CONFIG_GETTY=y
CONFIG_LOGIN=y
# CONFIG_LOGIN_SESSION_AS_CHILD is not set
# CONFIG_PAM is not set
CONFIG_LOGIN_SCRIPTS=y
CONFIG_FEATURE_NOLOGIN=y
@ -469,6 +478,7 @@ CONFIG_PASSWD=y
CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
CONFIG_CRYPTPW=y
# CONFIG_CHPASSWD is not set
CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des"
CONFIG_SU=y
CONFIG_FEATURE_SU_SYSLOG=y
CONFIG_FEATURE_SU_CHECKS_SHELLS=y
@ -487,14 +497,14 @@ CONFIG_LSATTR=y
# Linux Module Utilities
#
CONFIG_MODINFO=y
CONFIG_MODPROBE_SMALL=y
CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y
CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y
# CONFIG_INSMOD is not set
# CONFIG_RMMOD is not set
# CONFIG_LSMOD is not set
# CONFIG_MODPROBE_SMALL is not set
# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
CONFIG_INSMOD=y
CONFIG_RMMOD=y
CONFIG_LSMOD=y
# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
# CONFIG_MODPROBE is not set
CONFIG_MODPROBE=y
# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
# CONFIG_DEPMOD is not set
@ -508,9 +518,9 @@ CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set
# CONFIG_FEATURE_MODUTILS_ALIAS is not set
# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set
CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
CONFIG_FEATURE_MODUTILS_ALIAS=y
CONFIG_FEATURE_MODUTILS_SYMBOLS=y
CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
@ -518,6 +528,12 @@ CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
# Linux System Utilities
#
# CONFIG_BLOCKDEV is not set
CONFIG_MDEV=y
CONFIG_FEATURE_MDEV_CONF=y
CONFIG_FEATURE_MDEV_RENAME=y
CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
CONFIG_FEATURE_MDEV_EXEC=y
CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
# CONFIG_REV is not set
CONFIG_ACPID=y
CONFIG_FEATURE_ACPID_COMPAT=y
@ -561,12 +577,6 @@ CONFIG_IPCS=y
CONFIG_LOSETUP=y
# CONFIG_LSPCI is not set
# CONFIG_LSUSB is not set
CONFIG_MDEV=y
CONFIG_FEATURE_MDEV_CONF=y
CONFIG_FEATURE_MDEV_RENAME=y
CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
CONFIG_FEATURE_MDEV_EXEC=y
CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
CONFIG_MKSWAP=y
CONFIG_FEATURE_MKSWAP_UUID=y
CONFIG_MORE=y
@ -608,9 +618,11 @@ CONFIG_FEATURE_VOLUMEID_EXT=y
CONFIG_FEATURE_VOLUMEID_BTRFS=y
CONFIG_FEATURE_VOLUMEID_REISERFS=y
CONFIG_FEATURE_VOLUMEID_FAT=y
CONFIG_FEATURE_VOLUMEID_EXFAT=y
CONFIG_FEATURE_VOLUMEID_HFS=y
CONFIG_FEATURE_VOLUMEID_JFS=y
CONFIG_FEATURE_VOLUMEID_XFS=y
CONFIG_FEATURE_VOLUMEID_NILFS=y
CONFIG_FEATURE_VOLUMEID_NTFS=y
CONFIG_FEATURE_VOLUMEID_ISO9660=y
CONFIG_FEATURE_VOLUMEID_UDF=y
@ -618,6 +630,7 @@ CONFIG_FEATURE_VOLUMEID_LUKS=y
CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
CONFIG_FEATURE_VOLUMEID_CRAMFS=y
CONFIG_FEATURE_VOLUMEID_ROMFS=y
CONFIG_FEATURE_VOLUMEID_SQUASHFS=y
CONFIG_FEATURE_VOLUMEID_SYSV=y
CONFIG_FEATURE_VOLUMEID_OCFS2=y
CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
@ -729,7 +742,7 @@ CONFIG_PING=y
# CONFIG_PING6 is not set
CONFIG_FEATURE_FANCY_PING=y
# CONFIG_WHOIS is not set
# CONFIG_FEATURE_IPV6 is not set
CONFIG_FEATURE_IPV6=y
# CONFIG_FEATURE_UNIX_LOCAL is not set
# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set
# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
@ -831,6 +844,7 @@ CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
CONFIG_TUNCTL=y
CONFIG_FEATURE_TUNCTL_UG=y
# CONFIG_UDHCPC6 is not set
# CONFIG_UDHCPD is not set
# CONFIG_DHCPRELAY is not set
# CONFIG_DUMPLEASES is not set
@ -877,6 +891,7 @@ CONFIG_FEATURE_MIME_CHARSET=""
# Process Utilities
#
# CONFIG_IOSTAT is not set
CONFIG_LSOF=y
# CONFIG_MPSTAT is not set
# CONFIG_NMETER is not set
# CONFIG_PMAP is not set
@ -884,6 +899,13 @@ CONFIG_FEATURE_MIME_CHARSET=""
CONFIG_PSTREE=y
# CONFIG_PWDX is not set
# CONFIG_SMEMCAP is not set
CONFIG_TOP=y
CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
CONFIG_FEATURE_TOP_SMP_CPU=y
CONFIG_FEATURE_TOP_DECIMALS=y
CONFIG_FEATURE_TOP_SMP_PROCESS=y
CONFIG_FEATURE_TOPMEM=y
CONFIG_UPTIME=y
CONFIG_FEATURE_UPTIME_UTMP_SUPPORT=y
CONFIG_FREE=y
@ -898,18 +920,12 @@ CONFIG_FEATURE_PIDOF_OMIT=y
# CONFIG_PKILL is not set
CONFIG_PS=y
CONFIG_FEATURE_PS_WIDE=y
CONFIG_FEATURE_PS_LONG=y
# CONFIG_FEATURE_PS_TIME is not set
# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
# CONFIG_RENICE is not set
# CONFIG_BB_SYSCTL is not set
CONFIG_TOP=y
CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
CONFIG_FEATURE_TOP_SMP_CPU=y
CONFIG_FEATURE_TOP_DECIMALS=y
CONFIG_FEATURE_TOP_SMP_PROCESS=y
CONFIG_FEATURE_TOPMEM=y
CONFIG_FEATURE_SHOW_THREADS=y
CONFIG_WATCH=y
@ -1004,6 +1020,7 @@ CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
# CONFIG_LOGREAD is not set
# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
# CONFIG_FEATURE_KMSG_SYSLOG is not set
# CONFIG_KLOGD is not set
# CONFIG_FEATURE_KLOGD_KLOGCTL is not set
# CONFIG_LOGGER is not set

View File

@ -6,6 +6,7 @@ notable:
mounting maemo /
EMMC access(can mount maemo home and MyDocs partition)
Lock code reset
WiFi support
USB mass-storage mode
USB networking
@ -44,9 +45,11 @@ anyway, correct?
-fsck file system checks
-Resetting the lock code (without reflashing)
-and more...
Booting the initrd
Booting RescueOS
~~~~~~~~~~~~~~~
Note: You can not store persistent data in / as everything happens in RAM. Of
course, it becomes possible when you mount the EMMC or sd card on the
@ -55,10 +58,40 @@ corresponding mountpoint.
Note: It comes without any promises and without any warranty. Therefore you
are doing everything at your own risk.
flasher-3.5 -k 2.6.37 -n initrd.img -l -b"rootdelay root=/dev/ram0"
To load RescueOS onto an N900, you'll need a USB data cable, a PC, and one of
the following flashers:
wait for "suitable device not found..." and connect the N900 to your
Linux box through USB.
- 0xFFFF - the Open Free Fiasco Firmware Flasher
Free/open source, but only runs on GNU/Linux.
Packaged for Ubuntu and Debian as '0xffff':
http://packages.ubuntu.com/source/0xffff
https://packages.debian.org/sid/0xffff
Discussion: http://talk.maemo.org/showthread.php?t=87996
Source repo: https://github.com/pali/0xFFFF
- maemo_flasher v3.5 - the original proprietary flasher from Nokia
Windows, MacOS, GNU/Linux
Official distribution site is gone. Archive copies at:
https://web.archive.org/web/20131117084237/http://skeiron.org/tablets-dev/maemo_dev_env_downloads/
Documentation:
http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Development_Environment/Maemo_Flasher-3.5
Switch the N900 completely off. If it is plugged into a charger, a PC, or
anything else by its USB port, unplug it and wait about 10 seconds to give the
charger software time to shut down. Don't connect it to the PC just yet.
Startup the flasher and get it ready to load RescueOS. For 0xFFFF, the
incantation is:
0xFFFF -m kernel:zImage -m initfs:rootfs.cramfs -l -b 'rootdelay root=/dev/ram0'
For maemo_flasher, it's:
flasher-3.5 -k zImage -n rootfs.cramfs -l -b"rootdelay root=/dev/ram0"
You'll get a message like "suitable device not found...", but the flasher
should block and wait. Now connect the N900 to the PC with the data cable; the
flasher should detect the device, upload RescueOS, launch it, and then exit.
~~~~~~~~~~~~~~~
@ -77,6 +110,11 @@ This scripts mounts the maemo root to /mnt/maemo.
/rescueOS/umount-maemo-root.sh
Lock code reset
---------------
code_reset
# This will set the lock code back to the default ('12345').
USB Networking
-------------
/rescueOS/usbnetworking-enable.sh

84
fs-overlay/etc/init.d/rcS Executable file
View File

@ -0,0 +1,84 @@
#!/bin/sh
EMULATOR=0
VERSION="1.1"
mount -t sysfs none /sys
mount -n -t proc none /proc
echo 200 > /sys/class/backlight/acx565akm/brightness
mount -t tmpfs -o size=64k,mode=0755 tmpfs /dev
mkdir /dev/pts
mount -t devpts devpts /dev/pts
mount -t tmpfs -o rw,noexec,nosuid,mode=0755 tmpfs /run
mount -t tmpfs -o rw,mode=0755 tmpfs /root/
mount -t tmpfs -o rw,nosuid,nodev tmpfs /tmp/
echo /sbin/mdev.sh > /proc/sys/kernel/hotplug
mdev -s
find /sys/devices/* -name modalias | while read module ; do
modprobe `cat $module` 2> /dev/null
done
hwclock -s
hostname -F /etc/hostname
modprobe leds-lp5523
/sbin/battery-watchdog &
#/rescueOS/charge21.bash > /run/batterylog &
clear
echo "Disclaimer: This system comes without any warranty. Use it at your own risk."
sleep 3
clear
echo "Welcome to N900 Rescue Initrd $VERSION"
echo
/sbin/loadkmap < /rescueOS/nokia-n900.kmap
for i in 2 3 7 8 ; do
echo 25 > /sys/class/leds/lp5523\:channel$i/brightness
done
autostart_script=`grep -q autostart /proc/cmdline && cat /proc/cmdline | sed -e 's/.*autostart=\(.*\)/\1/'`
if [ -n "$autostart_script" ] ; then
echo "Running $autostart_script"
$autostart_script
fi
touch /run/resolv.conf
echo "The root password is: rootme"
#Being helpful for beginners, and annoying for "power users"
echo "Start an FTP server with anonymous up and downloads everywhere? y/n"
read result;
if [ "$result" = "y" ] ; then
tcpsvd -v 0.0.0.0 21 ftpd -w &
fi
echo "Start telnetd? y/n"
read result;
if [ "$result" = "y" ] ; then
telnetd
fi
echo "Start usb-networking? y/n"
read result;
if [ "$result" = "y" ] ; then
/rescueOS/usbnetworking-enable.sh
fi
#node mess
if [ -e /sys/block/mmcblk0 ] && [ -e /sys/block/mmcblk1 ] ; then
echo -n "1" > /run/internal_nodenr
else
echo -n "0" > /run/internal_nodenr
fi
if [ "$EMULATOR" = "1" ] ; then
udhcpc eth0
fi
#We are done.

4
fs-overlay/etc/inittab Normal file
View File

@ -0,0 +1,4 @@
::sysinit:/etc/init.d/rcS
tty1::respawn:-/bin/bash
ttyS0::respawn:-/bin/bash
::shutdown:/bin/sh /rescueOS/shutdown-cleanup

1
fs-overlay/etc/passwd Normal file
View File

@ -0,0 +1 @@
root:$1$sz.20p5a$c40FElyGq0cIfHXeQQChQ/:0:0:root:/root:/bin/bash

1
fs-overlay/etc/profile Normal file
View File

@ -0,0 +1 @@
PS1="\w\$ "

1
fs-overlay/etc/resolv.conf Symbolic link
View File

@ -0,0 +1 @@
/run/resolv.conf

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -0,0 +1 @@
Apparently most scripts here are not completed, dumb and based on assumptations. Use them if you know what you are doing...

236
fs-overlay/rescueOS/charge21.bash Executable file
View File

@ -0,0 +1,236 @@
#/bin/bash
#Original by ShadowJK. http://enivax.net/jk/n900/
if [ -e /run/charger-runned ] ; then
echo "Script already started. Delete run/charger-runned if you are sure no other instance is running"
exit
fi
touch /run/charger-runned
echo "Charger: " $(cat /sys/devices/platform/musb_hdrc/charger)
I2CGET=/usr/bin/i2cget
I2CSET=/usr/bin/i2cset
if pgrep bme_RX-51; then
echo "BME is running. Exiting."
exit
fi
configure()
{
echo -n "Pre-Config Status: " $($I2CGET -y 2 0x6b 0x00)
echo -n ", " $($I2CSET -y 2 0x6b 0x00) "."
# Disable charger for configuration:
# $I2CSET -y 2 0x6b 0x01 0xcc # No limit, 3.4V weak threshold, enable term, charger disable
# Register 0x04
# 8: reset
# 4: 27.2mV # charge current
# 2: 13.6mV
# 1: 6.8mV
# 8: N/A
# 4: 13.6mV # termination current
# 2: 6.8mV
# 1: 3.4mV
# 7-1250 6-1150 5-1050 4-950 3-850 2-750 1-650 0-550
# 7-400 6-350 5-300 4-250 3-200 2-150 1-100 0-50
$I2CSET -y -m 0xFF 2 0x6b 0x04 0x42;
# Register 0x02
# 8: .640 V
# 4: .320 V
# 2: .160 V
# 1: .080
# 8: .040
# 4: .020 (+ 3.5)
# 2: otg pin active at high (default 1)
# 1: enable otg pin
$I2CSET -y -m 0xfc 2 0x6b 0x02 0x8c;
REGV=4200
# 4.24 = 3.5 + .640 + .08 + .02 = 94
# 4.22 = 3.5 + ,640 + .08 = 90
# 4.2 = 3.5 + .640 + .040 + .02 = 8c
# 4.16 = 3.5 + .640V + .020 = 84
# 4.1 = 3.5 + .320 + .160 + .08 + .04 = 78
# 4.0 = 3.5 + .320 + .160 + .02 = 64
# 3.9 = 3.5 + .320 + .080 = 50
# Register 0x1
# 8: 00 = 100, 01 = 500, 10 = 800mA
# 4: 11 = no limit
# 2: 200mV weak threshold default 1
# 1: 100mV weak treshold defsult 1 (3.4 - 3.7)
# 8: enable termination
# 4: charger disable
# 2: high imp mode
# 1: boost
$I2CSET -y 2 0x6b 0x01 0x08;
#hotswap: c0
#normal: c8
# Register 0x00
# 8: Read: OTG Pin Status
# Write: Timer Reset
# 4: Enable Stat Pin
# 2: Stat : 00 Ready 01 In Progress
# 1: : 10 Done 11 Fault
# 8: Boost Mode
# 4: Fault: 000 Normal 001 VBUS OVP 010 Sleep Mode
# 2: 011 Poor input or Vbus < UVLO
# 1: 100 Battery OVP 101 Thermal Shutdown
# 110 Timer Fault 111 NA
$I2CSET -y 2 0x6b 0x00 0x00;
# Softstart
$I2CSET -y 2 0x6b 0x01 0xc8;
sleep 1
#echo " Unlimited: " $($I2CGET -y 2 0x6b 0x00)
#$I2CSET -y 2 0x6b 0x00 0x80 # timer reset
cat /sys/devices/platform/musb_hdrc/charger >/dev/null
}
configure
# Initialize variables
FULL=0
MODE="STANDBY"
WALLCHARGER=0
# Assuming a nice round number 20mOhm for bq27200 sense resistor
RS=21
# Assuming this much resistance between charger and battery
CR=131
BQPATH="/sys/class/power_supply/bq27200-0"
get_nac ()
{
NAC=$(cat $BQPATH/charge_now)
NAC=$((NAC/1000))
}
get_rsoc ()
{
RSOC=$(cat $BQPATH/capacity)
}
get_volt ()
{
VOLT=$(cat $BQPATH/voltage_now)
VOLT=$((VOLT/1000))
}
get_rate ()
{
RATE=$(cat $BQPATH/current_now)
RATE=$((RATE/1000))
RATE=$((-RATE))
}
calculate_system_use ()
{
SYSTEM_USE=$(( ($REGV *1000 - $VOLT*1000) / $CR - $RATE ))
if [ $(($SYSTEM_USE+$RATE)) -gt 950 ] ; then
SYSTEM_USE=$((950-RATE))
fi
}
decode_status()
{
S=$1
SOTG=$((S/128))
S=$((S-SOTG*128))
SSPIN=$((S/64))
S=$((S-SSPIN*64))
SSTAT=$((S/16))
S=$((S-SSTAT*16))
SBOOST=$((S/8))
S=$((S-SBOOST*8))
SFAULT=$((S))
# if [ $SSTAT -eq 0 ] ; then
# echo charger status: Ready
# fi
# if [ $SSTAT -eq 1 ] ; then
# echo charger status: InProgress
# fi
# if [ $SSTAT -eq 2 ] ; then
# echo charger status: Done
# fi
if [ $SSTAT -eq 3 ] || [ $SFAULT -ne 0 ]; then
echo -n $(date) charger status: Fault:
case $SFAULT in
0 )
echo NoFault ;;
1 )
echo VbusOVP ;;
2 )
echo SleepMode ;;
3 )
echo Poor Input or VBus UnderVoltage ;;
4 )
echo Battery Overvoltage Protection ;;
5 )
echo Thermal Shutdown ;;
6 )
echo TimerFault ;;
7 )
echo Unknown ;;
esac
fi
}
SLEEPTIME=15
while true ; do
STATUS=$($I2CGET -y 2 0x6b 0x00)
#echo $STATUS
$I2CSET -y -m 0x80 2 0x6b 0x00 0x80; # timer reset
get_nac
get_rsoc
get_volt
get_rate
# Sanity
if [ $VOLT -gt 4200 ] ; then
echo "***CRITICAL*** Battery voltage $VOLT exceeds 4.2V!!!"
exit 2
fi
if [ $MODE == "STANDBY" ] ; then
if [ $STATUS == 0x10 ] || [ $STATUS == 0x90 ] ; then
MODE="CHARGING" ; SLEEPTIME=5
echo $(date) "standby -> CHARGING. Current available capacity: " $NAC "mAh, " $RSOC " percent."
WALLCHARGER=$(cat /sys/devices/platform/musb_hdrc/charger)
fi
fi
if [ $MODE == "CHARGING" ] ; then
if [ $STATUS == 0x00 ] ; then
MODE="STANDBY" ; SLEEPTIME=15
echo $(date) "charging -> STANDBY. Current available capacity: " $NAC "mAh, " $RSOC " percent."
WALLCHARGER=0
# This will stop USB from eating power as long as you haven't plugged it into a PC
# #### echo 0 > /sys/devices/platform/musb_hdrc/connect
fi
fi
if [ $STATUS == 0x20 ] && [ $FULL == 0 ] ; then
echo "Charge done"
#echo $(date) "FULL: " $NAC "mAh" >> /home/user/MyDocs/charger.log
FULL=1
fi
if [ $STATUS == 0x00 ] && [ $FULL == 1 ] ; then
FULL=0
fi
calculate_system_use
decode_status $STATUS
echo Status: $STATUS Mode: $MODE Full: $FULL Wall: $WALLCHARGER Voltage: $VOLT NAC: $NAC level: $RSOC % Rate: $RATE System: "-"$SYSTEM_USE Ch: $(($SYSTEM_USE+$RATE))
sleep $SLEEPTIME
done

View File

@ -0,0 +1,2 @@
#!/bin/sh
tcpsvd -v 0.0.0.0 21 ftpd -w &

View File

@ -0,0 +1,3 @@
#!/bin/sh
#uhh..
telnetd &

View File

@ -0,0 +1,183 @@
#!/bin/sh
#might fix some devices nodes if they have been messed up.
#atm we don't care whether they exist already or not...
#mknod parts by Pali
sh /rescueOS/mount-maemo-root.sh
if [ ! -e /run/maemo-root-mounted ] ; then
echo "mount of maemo root failed, giving up."
exit
fi
mknod /mnt/maemo/dev/console c 5 1
mknod /mnt/maemo/dev/fb0 c 29 0
mknod /mnt/maemo/dev/fb1 c 29 1
mknod /mnt/maemo/dev/fb2 c 29 2
mknod /mnt/maemo/dev/full c 1 7
mknod /mnt/maemo/dev/kmem c 1 2
mknod /mnt/maemo/dev/mem c 1 1
mknod /mnt/maemo/dev/mtd0 c 90 0
mknod /mnt/maemo/dev/mtd0ro c 90 1
mknod /mnt/maemo/dev/mtd1 c 90 2
mknod /mnt/maemo/dev/mtd1ro c 90 3
mknod /mnt/maemo/dev/mtd2 c 90 4
mknod /mnt/maemo/dev/mtd2ro c 90 5
mknod /mnt/maemo/dev/mtd3 c 90 6
mknod /mnt/maemo/dev/mtd3ro c 90 7
mknod /mnt/maemo/dev/mtd4 c 90 8
mknod /mnt/maemo/dev/mtd4ro c 90 9
mknod /mnt/maemo/dev/mtd5 c 90 10
mknod /mnt/maemo/dev/mtd5ro c 90 11
mknod /mnt/maemo/dev/null c 1 3
mknod /mnt/maemo/dev/port c 1 4
mknod /mnt/maemo/dev/random c 1 8
mknod /mnt/maemo/dev/tty c 5 0
mknod /mnt/maemo/dev/ttyS0 c 4 64
mknod /mnt/maemo/dev/ttyS1 c 4 65
mknod /mnt/maemo/dev/ttyS2 c 4 66
mknod /mnt/maemo/dev/tty0 c 4 0
mknod /mnt/maemo/dev/urandom c 1 9
mknod /mnt/maemo/dev/zero c 1 5
mknod /mnt/maemo/dev/loop0 b 7 0
mknod /mnt/maemo/dev/loop1 b 7 1
mknod /mnt/maemo/dev/loop2 b 7 2
mknod /mnt/maemo/dev/loop3 b 7 3
mknod /mnt/maemo/dev/loop4 b 7 4
mknod /mnt/maemo/dev/loop5 b 7 5
mknod /mnt/maemo/dev/loop6 b 7 6
mknod /mnt/maemo/dev/loop7 b 7 7
mknod /mnt/maemo/dev/ram0 b 1 0
mknod /mnt/maemo/dev/ram1 b 1 1
mknod /mnt/maemo/dev/ram10 b 1 10
mknod /mnt/maemo/dev/ram11 b 1 11
mknod /mnt/maemo/dev/ram12 b 1 12
mknod /mnt/maemo/dev/ram13 b 1 13
mknod /mnt/maemo/dev/ram14 b 1 14
mknod /mnt/maemo/dev/ram15 b 1 15
mknod /mnt/maemo/dev/ram16 b 1 16
mknod /mnt/maemo/dev/ram2 b 1 2
mknod /mnt/maemo/dev/ram3 b 1 3
mknod /mnt/maemo/dev/ram4 b 1 4
mknod /mnt/maemo/dev/ram5 b 1 5
mknod /mnt/maemo/dev/ram6 b 1 6
mknod /mnt/maemo/dev/ram7 b 1 7
mknod /mnt/maemo/dev/ram8 b 1 8
mknod /mnt/maemo/dev/ram9 b 1 9
ln -s /proc/kcore /mnt/maemo/dev/core
ln -s ram1 /mnt/maemo/dev/ram
mkdir /mnt/maemo/dev/pts
chmod 755 /mnt/maemo/dev/pts
chmod 600 /mnt/maemo/dev/console
chmod 660 /mnt/maemo/dev/fb0
chmod 660 /mnt/maemo/dev/fb1
chmod 660 /mnt/maemo/dev/fb2
chmod 666 /mnt/maemo/dev/full
chmod 640 /mnt/maemo/dev/kmem
chmod 660 /mnt/maemo/dev/loop0
chmod 660 /mnt/maemo/dev/loop1
chmod 660 /mnt/maemo/dev/loop2
chmod 660 /mnt/maemo/dev/loop3
chmod 660 /mnt/maemo/dev/loop4
chmod 660 /mnt/maemo/dev/loop5
chmod 660 /mnt/maemo/dev/loop6
chmod 660 /mnt/maemo/dev/loop7
chmod 640 /mnt/maemo/dev/mem
chmod 600 /mnt/maemo/dev/mtd0
chmod 600 /mnt/maemo/dev/mtd0ro
chmod 600 /mnt/maemo/dev/mtd1
chmod 600 /mnt/maemo/dev/mtd1ro
chmod 600 /mnt/maemo/dev/mtd2
chmod 600 /mnt/maemo/dev/mtd2ro
chmod 600 /mnt/maemo/dev/mtd3
chmod 600 /mnt/maemo/dev/mtd3ro
chmod 600 /mnt/maemo/dev/mtd4
chmod 600 /mnt/maemo/dev/mtd4ro
chmod 600 /mnt/maemo/dev/mtd5
chmod 600 /mnt/maemo/dev/mtd5ro
chmod 666 /mnt/maemo/dev/null
chmod 640 /mnt/maemo/dev/port
chmod 660 /mnt/maemo/dev/ram0
chmod 660 /mnt/maemo/dev/ram1
chmod 660 /mnt/maemo/dev/ram10
chmod 660 /mnt/maemo/dev/ram11
chmod 660 /mnt/maemo/dev/ram12
chmod 660 /mnt/maemo/dev/ram13
chmod 660 /mnt/maemo/dev/ram14
chmod 660 /mnt/maemo/dev/ram15
chmod 660 /mnt/maemo/dev/ram16
chmod 660 /mnt/maemo/dev/ram2
chmod 660 /mnt/maemo/dev/ram3
chmod 660 /mnt/maemo/dev/ram4
chmod 660 /mnt/maemo/dev/ram5
chmod 660 /mnt/maemo/dev/ram6
chmod 660 /mnt/maemo/dev/ram7
chmod 660 /mnt/maemo/dev/ram8
chmod 660 /mnt/maemo/dev/ram9
chmod 666 /mnt/maemo/dev/random
chmod 666 /mnt/maemo/dev/tty
chmod 660 /mnt/maemo/dev/ttyS0
chmod 660 /mnt/maemo/dev/ttyS1
chmod 660 /mnt/maemo/dev/ttyS2
chmod 600 /mnt/maemo/dev/tty0
chmod 444 /mnt/maemo/dev/urandom
chmod 666 /mnt/maemo/dev/zero
chown root:tty /mnt/maemo/dev/console
chown root:video /mnt/maemo/dev/fb0
chown root:video /mnt/maemo/dev/fb1
chown root:video /mnt/maemo/dev/fb2
chown root:root /mnt/maemo/dev/full
chown root:kmem /mnt/maemo/dev/kmem
chown root:disk /mnt/maemo/dev/loop0
chown root:disk /mnt/maemo/dev/loop1
chown root:disk /mnt/maemo/dev/loop2
chown root:disk /mnt/maemo/dev/loop3
chown root:disk /mnt/maemo/dev/loop4
chown root:disk /mnt/maemo/dev/loop5
chown root:disk /mnt/maemo/dev/loop6
chown root:disk /mnt/maemo/dev/loop7
chown root:kmem /mnt/maemo/dev/mem
chown root:root /mnt/maemo/dev/mtd0
chown root:root /mnt/maemo/dev/mtd0ro
chown root:root /mnt/maemo/dev/mtd1
chown root:root /mnt/maemo/dev/mtd1ro
chown root:root /mnt/maemo/dev/mtd2
chown root:root /mnt/maemo/dev/mtd2ro
chown root:root /mnt/maemo/dev/mtd3
chown root:root /mnt/maemo/dev/mtd3ro
chown root:root /mnt/maemo/dev/mtd4
chown root:root /mnt/maemo/dev/mtd4ro
chown root:root /mnt/maemo/dev/mtd5
chown root:root /mnt/maemo/dev/mtd5ro
chown root:root /mnt/maemo/dev/null
chown root:kmem /mnt/maemo/dev/port
chown root:disk /mnt/maemo/dev/ram0
chown root:disk /mnt/maemo/dev/ram1
chown root:disk /mnt/maemo/dev/ram10
chown root:disk /mnt/maemo/dev/ram11
chown root:disk /mnt/maemo/dev/ram12
chown root:disk /mnt/maemo/dev/ram13
chown root:disk /mnt/maemo/dev/ram14
chown root:disk /mnt/maemo/dev/ram15
chown root:disk /mnt/maemo/dev/ram16
chown root:disk /mnt/maemo/dev/ram2
chown root:disk /mnt/maemo/dev/ram3
chown root:disk /mnt/maemo/dev/ram4
chown root:disk /mnt/maemo/dev/ram5
chown root:disk /mnt/maemo/dev/ram6
chown root:disk /mnt/maemo/dev/ram7
chown root:disk /mnt/maemo/dev/ram8
chown root:disk /mnt/maemo/dev/ram9
chown root:root /mnt/maemo/dev/random
chown root:tty /mnt/maemo/dev/tty
chown root:dialout /mnt/maemo/dev/ttyS0
chown root:dialout /mnt/maemo/dev/ttyS1
chown root:dialout /mnt/maemo/dev/ttyS2
chown root:tty /mnt/maemo/dev/tty0
chown root:root /mnt/maemo/dev/urandom
chown root:root /mnt/maemo/dev/zero

View File

@ -0,0 +1,2 @@
#!/bin/sh
rmmod g_file_storage

View File

@ -0,0 +1,7 @@
#!/bin/bash
rmmod g_nokia
nodenr=$(cat /run/internal_nodenr)
modprobe g_file_storage file=/dev/mmcblk"$nodenr"p2,/dev/mmcblk"$nodenr"p1 stall=0 removable=1

View File

@ -0,0 +1,8 @@
#!/bin/sh
[ -d /mnt/maemo ] || mkdir /mnt/maemo/
if [ -e /run/maemo-root-mounted ] ; then
echo "A system script already mounted the rootfs of maemo to /mnt/maemo" ;
exit ;
fi
ubiattach /dev/ubi_ctrl -m 5
mount -t ubifs -o rw,bulk_read,no_chk_data_crc ubi0:rootfs /mnt/maemo && touch /run/maemo-root-mounted

Binary file not shown.

1
fs-overlay/rescueOS/rcS Symbolic link
View File

@ -0,0 +1 @@
/etc/init.d/rcS

View File

@ -0,0 +1,13 @@
#!/bin/sh
ermsg()
{
echo $1
exit
}
[ -e /run/wlan.conf ] || ermsg "Yeah, please run wpa_passphrase [essid] [password ] > /run/wlan.conf first."
modprobe wl1251_spi
#Works for my router, probably for yours too, if not, then not :-)
sleep 1;
wpa_supplicant -Dwext -iwlan0 -c/run/wlan.conf &

View File

@ -0,0 +1,35 @@
umount_maemo()
{
sync
umount /mnt/maemo
ubidetach /dev/ubi_ctrl -d 0
}
cd /
echo "Sending all processes the TERM signal..."
kill -15 -1
umount_maemo
sleep 1
echo "Sending all processes the KILL signal..."
kill -9 -1
umount_maemo
echo "Unmounting filesystems..."
umount -a -r 2> /dev/null
sync
#reset timer.
sleep 3
[ -f /run/charger-runned ] && i2cset -y -m 0x80 2 0x6b 0x04 0x80
sleep 1
echo
echo "RescueOS says good bye - have a good day."
sleep 3
poweroff -f

View File

@ -0,0 +1,11 @@
#!/bin/sh
ermsg()
{
echo "Couldn't unmount. Most likely your fault. Are you in /mnt/maemo?";
exit;
}
sync
umount /mnt/maemo || ermsg
ubidetach /dev/ubi_ctrl -d 0
rm /run/maemo-root-mounted

View File

@ -0,0 +1,3 @@
#!/bin/sh
#Yeah...
rmmod g_nokia

View File

@ -0,0 +1,8 @@
#!/bin/sh
sh /rescueOS/mass-storage-disable.sh
modprobe g_nokia
ifconfig usb0 down
ifconfig usb0 192.168.2.15 up
ifconfig usb0 netmask 255.255.255.0
#route add default gw 192.168.178.14
route add 192.168.2.14 usb0

View File

@ -0,0 +1,28 @@
#!/bin/sh
#Modified, we warn only now....
#fill_charger()
#{
#usb=`cat /sys/bus/platform/devices/twl4030_usb/vbus`
#wall=`cat /sys/bus/platform/devices/musb_hdrc/charger`
#if [ "$usb" = "on" ] || [ "$wall" = 1 ] ; then
#charger=1
#else
#charger=0
#fi
#}
while [ true ] ; do
cap=`cat /sys/class/power_supply/bq27200-0/capacity`
#fill_charger
#if [ $cap -le 55 -a $charger -eq 0 ] ; then
if [ $cap -le 45 ] ; then
#echo "Attention: Plugin the charger soon to not run out of power. Current: $cap%. To disable this message, type \"stfu\""
echo "Attention: Charge the battery (by running the charger script) to not run out of power. Current: $cap%. To disable this message, type \"stfu\""
fi
sleep 20
done

3
fs-overlay/sbin/mdev.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
[ -e /lib/firmware/$FIRMWARE ] || echo -1 > /sys/$DEVPATH/loading
/sbin/mdev

2
fs-overlay/sbin/stfu Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
killall battery-watchdog

View File

@ -0,0 +1,46 @@
#!/bin/sh
# udhcpc script edited by Tim Riker <Tim@Rikers.org>
RESOLV_CONF="/etc/resolv.conf"
[ -n "$1" ] || { echo "Error: should be called from udhcpc"; exit 1; }
NETMASK=""
[ -n "$subnet" ] && NETMASK="netmask $subnet"
BROADCAST="broadcast +"
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
case "$1" in
deconfig)
echo "Setting IP address 0.0.0.0 on $interface"
ifconfig $interface 0.0.0.0
;;
renew|bound)
echo "Setting IP address $ip on $interface"
ifconfig $interface $ip $NETMASK $BROADCAST
if [ -n "$router" ] ; then
echo "Deleting routers"
while route del default gw 0.0.0.0 dev $interface ; do
:
done
metric=0
for i in $router ; do
echo "Adding router $i"
route add default gw $i dev $interface metric $((metric++))
done
fi
echo "Setting $RESOLV_CONF"
[ -n "$domain" ] && echo "search $domain" >> $RESOLV_CONF
for i in $dns ; do
echo " Adding DNS server $i"
echo "nameserver $i" >> $RESOLV_CONF
done
;;
esac
exit 0

View File

@ -0,0 +1,36 @@
From 4dc2cc73fa172892f817440877565018aa2f07c9 Mon Sep 17 00:00:00 2001
From: Felipe Balbi <balbi@ti.com>
Date: Wed, 2 Oct 2013 08:00:48 -0500
Subject: [PATCH] net: wireless: wl1251: update firmware path
Backported from 9f55c6201354183345fa06c6986668d159b6507f
TI firmwares are located under ti-connectivity
directory. Update path to make sure driver can
find and load firmware blob.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Backported-by: Daniel Gnoutcheff <daniel@gnoutcheff.name>
---
drivers/net/wireless/wl1251/wl1251.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/wl1251/wl1251.h b/drivers/net/wireless/wl1251/wl1251.h
index a7f98a7..f705b5d 100644
--- a/drivers/net/wireless/wl1251/wl1251.h
+++ b/drivers/net/wireless/wl1251/wl1251.h
@@ -425,8 +425,8 @@ void wl1251_disable_interrupts(struct wl1251 *wl);
#define CHIP_ID_1271_PG10 (0x4030101)
#define CHIP_ID_1271_PG20 (0x4030111)
-#define WL1251_FW_NAME "wl1251-fw.bin"
-#define WL1251_NVS_NAME "wl1251-nvs.bin"
+#define WL1251_FW_NAME "ti-connectivity/wl1251-fw.bin"
+#define WL1251_NVS_NAME "ti-connectivity/wl1251-nvs.bin"
#define WL1251_POWER_ON_SLEEP 10 /* in miliseconds */
--
1.9.1

File diff suppressed because it is too large Load Diff

17
post-build.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -e
target="$1"
delfiles="
$target/etc/init.d/rcK
$target/etc/init.d/S20urandom
$target/etc/init.d/S40network
$target/etc/securetty"
for file in $delfiles ; do
[ ! -e "$file" ] || rm "$file"
done
[ ! -e "$target/usr/share/getopt" ] || rm -r "$target/usr/share/getopt"