summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Dufour2013-02-05 11:27:57 +0100
committerCyril Jourdan2013-02-11 13:22:45 +0100
commit03cdc92525306fc272048366ad07dc7f586459e4 (patch)
tree2eff5d4fafb9e273d2eac8dad1ee38386f443405
parentb9477e3a00ef54fa789fff1da33a3c48c2f7aabc (diff)
common/tools/flashfs: add autoswitch flashfs, refs #3745
-rw-r--r--common/tools/flashfs/.gitignore1
-rwxr-xr-xcommon/tools/flashfs/Makefile14
-rw-r--r--common/tools/flashfs/image_autoswitch/200/autoconf/NOPRUNE0
-rw-r--r--common/tools/flashfs/image_autoswitch/200/bin/NOPRUNE0
-rw-r--r--common/tools/flashfs/image_autoswitch/200/etc/config/NOPRUNE0
-rw-r--r--common/tools/flashfs/image_autoswitch/200/etc/network/NOPRUNE0
-rwxr-xr-xcommon/tools/flashfs/image_autoswitch/200/etc/rcS.d/99custom1
-rw-r--r--common/tools/flashfs/image_autoswitch/200/tmp/NOPRUNE0
-rw-r--r--common/tools/flashfs/image_autoswitch/500/bin/NOPRUNE0
-rw-r--r--common/tools/flashfs/image_autoswitch/500/etc/NOPRUNE0
-rw-r--r--common/tools/flashfs/image_autoswitch/500/etc/init.d/NOPRUNE0
-rw-r--r--common/tools/flashfs/image_autoswitch/500/etc/network/NOPRUNE0
-rw-r--r--common/tools/flashfs/image_autoswitch/500/etc/plcdrv.conf14
-rw-r--r--common/tools/flashfs/image_autoswitch/500/lib/modules/NOPRUNE0
14 files changed, 28 insertions, 2 deletions
diff --git a/common/tools/flashfs/.gitignore b/common/tools/flashfs/.gitignore
index e54e845ea1..3dbf1b2b2a 100644
--- a/common/tools/flashfs/.gitignore
+++ b/common/tools/flashfs/.gitignore
@@ -1,2 +1,3 @@
/flashfs.500.jffs2
/flashfs.200.jffs2
+/flashfs.autoswitch.jffs2
diff --git a/common/tools/flashfs/Makefile b/common/tools/flashfs/Makefile
index 9070c8ffeb..2e283e295f 100755
--- a/common/tools/flashfs/Makefile
+++ b/common/tools/flashfs/Makefile
@@ -6,19 +6,29 @@ BLOCK_SIZE= 65536 #for spansion S29GL064A10
# and at least 5 x (size of a block)
FLASHDISK_SIZE_200 = 524288
FLASHDISK_SIZE_500 = 1048576
+FLASHDISK_SIZE_AUTOSWITCH = 1048576
DIR=$(CURDIR)
FLASHFS_BIN = mkfs.jffs2
IMAGE_500 = $(DIR)/image_500
IMAGE_200 = $(DIR)/image_200
+IMAGE_AUTOSWITCH = $(DIR)/image_autoswitch
TMP_IMAGE = /tmp/fimage
FLASHDISK_500 = $(DIR)/flashfs.500.jffs2
FLASHDISK_200 = $(DIR)/flashfs.200.jffs2
+FLASHDISK_AUTOSWITCH = $(DIR)/flashfs.autoswitch.jffs2
-all: buildjffs2-500 buildjffs2-200
+all: buildjffs2-500 buildjffs2-200 autoswitch
+
+autoswitch: buildjffs2-AUTOSWITCH
+
+help:
+ @echo ' all - make all flashfs'
+ @echo ' autoswitch - make autoswitch specific flashfs'
+ @echo ' clean - clean generated binaries'
clean:
- rm -rf $(FLASHDISK_500) $(FLASHDISK_200) $(TMP_IMAGE)
+ rm -rf $(FLASHDISK_500) $(FLASHDISK_200) $(FLASHDISK_AUTOSWITCH) $(TMP_IMAGE)
buildjffs2-%:
rm -rf $(TMP_IMAGE)
diff --git a/common/tools/flashfs/image_autoswitch/200/autoconf/NOPRUNE b/common/tools/flashfs/image_autoswitch/200/autoconf/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/common/tools/flashfs/image_autoswitch/200/autoconf/NOPRUNE
diff --git a/common/tools/flashfs/image_autoswitch/200/bin/NOPRUNE b/common/tools/flashfs/image_autoswitch/200/bin/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/common/tools/flashfs/image_autoswitch/200/bin/NOPRUNE
diff --git a/common/tools/flashfs/image_autoswitch/200/etc/config/NOPRUNE b/common/tools/flashfs/image_autoswitch/200/etc/config/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/common/tools/flashfs/image_autoswitch/200/etc/config/NOPRUNE
diff --git a/common/tools/flashfs/image_autoswitch/200/etc/network/NOPRUNE b/common/tools/flashfs/image_autoswitch/200/etc/network/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/common/tools/flashfs/image_autoswitch/200/etc/network/NOPRUNE
diff --git a/common/tools/flashfs/image_autoswitch/200/etc/rcS.d/99custom b/common/tools/flashfs/image_autoswitch/200/etc/rcS.d/99custom
new file mode 100755
index 0000000000..1a2485251c
--- /dev/null
+++ b/common/tools/flashfs/image_autoswitch/200/etc/rcS.d/99custom
@@ -0,0 +1 @@
+#!/bin/sh
diff --git a/common/tools/flashfs/image_autoswitch/200/tmp/NOPRUNE b/common/tools/flashfs/image_autoswitch/200/tmp/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/common/tools/flashfs/image_autoswitch/200/tmp/NOPRUNE
diff --git a/common/tools/flashfs/image_autoswitch/500/bin/NOPRUNE b/common/tools/flashfs/image_autoswitch/500/bin/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/common/tools/flashfs/image_autoswitch/500/bin/NOPRUNE
diff --git a/common/tools/flashfs/image_autoswitch/500/etc/NOPRUNE b/common/tools/flashfs/image_autoswitch/500/etc/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/common/tools/flashfs/image_autoswitch/500/etc/NOPRUNE
diff --git a/common/tools/flashfs/image_autoswitch/500/etc/init.d/NOPRUNE b/common/tools/flashfs/image_autoswitch/500/etc/init.d/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/common/tools/flashfs/image_autoswitch/500/etc/init.d/NOPRUNE
diff --git a/common/tools/flashfs/image_autoswitch/500/etc/network/NOPRUNE b/common/tools/flashfs/image_autoswitch/500/etc/network/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/common/tools/flashfs/image_autoswitch/500/etc/network/NOPRUNE
diff --git a/common/tools/flashfs/image_autoswitch/500/etc/plcdrv.conf b/common/tools/flashfs/image_autoswitch/500/etc/plcdrv.conf
new file mode 100644
index 0000000000..6460ac5228
--- /dev/null
+++ b/common/tools/flashfs/image_autoswitch/500/etc/plcdrv.conf
@@ -0,0 +1,14 @@
+OPTIONS=""
+
+for i in $(cat /proc/cmdline)
+do
+ if [[ "${i%%=*}" == "plcdrv" ]]
+ then
+ plcdrv=${i##plcdrv=}
+ fi
+ if [[ "${i%%=*}" == "plcfw" ]]
+ then
+ plcfw=${i##plcfw=}
+ fi
+done
+
diff --git a/common/tools/flashfs/image_autoswitch/500/lib/modules/NOPRUNE b/common/tools/flashfs/image_autoswitch/500/lib/modules/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/common/tools/flashfs/image_autoswitch/500/lib/modules/NOPRUNE