* [PATCH 2/3] defaultenv-2: introduce /env/rc.d
2015-01-13 6:21 ` [PATCH 1/3] defaultenv-2: fix misplace NV dir in env Jean-Christophe PLAGNIOL-VILLARD
@ 2015-01-13 6:21 ` Jean-Christophe PLAGNIOL-VILLARD
2015-01-13 8:25 ` Sascha Hauer
2015-01-13 6:21 ` [PATCH 3/3] defaultenv-2: create a specific defaultenv for splash Jean-Christophe PLAGNIOL-VILLARD
2015-01-13 8:11 ` [PATCH 1/3] defaultenv-2: fix misplace NV dir in env Sascha Hauer
2 siblings, 1 reply; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2015-01-13 6:21 UTC (permalink / raw)
To: barebox
as we now will use symlink on /env/rc.d to specify init order
the script will be store in /env/init
so any board can overwrite them or add script that need to run before a
default one
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
arch/arm/boards/archosg9/env/rc.d/020-bootsource | 1 +
.../at91sam9m10ihd/env/init/{mtdparts-002-m25p80 => mtdparts-m25p80} | 0
.../boards/at91sam9m10ihd/env/init/{mtdparts-001-nand => mtdparts-nand} | 0
arch/arm/boards/at91sam9m10ihd/env/rc.d/010-splash | 1 +
arch/arm/boards/at91sam9m10ihd/env/rc.d/101-mtdparts-nand | 1 +
arch/arm/boards/at91sam9m10ihd/env/rc.d/102-mtdparts-m25p80 | 1 +
arch/arm/boards/beagle/env/rc.d/100-mtdparts-nand | 1 +
.../arm/boards/beaglebone/defaultenv-beaglebone/rc.d/050-usb-limit-1300 | 1 +
arch/arm/boards/ccxmx51/env/rc.d/101-mtdparts-nand | 1 +
arch/arm/boards/clep7212/env/rc.d/020-bootsource | 1 +
.../boards/efika-mx-smartbook/defaultenv-efikasb/rc.d/020-bootsource | 1 +
arch/arm/boards/embedsky-e9/defaultenv-e9/rc.d/020-bootsource | 1 +
arch/arm/boards/friendlyarm-mini2440/env/rc.d/101-mtdparts-nand | 1 +
arch/arm/boards/guf-vincell/env/rc.d/101-mtdparts-nand | 1 +
arch/arm/boards/highbank/env/init/{001-dtb-probe => dtb-probe} | 0
arch/arm/boards/highbank/env/rc.d/001-dtb-probe | 1 +
.../imx233-olinuxino/defaultenv-imx233-olinuxino/rc.d/011-automount-sd | 1 +
arch/arm/boards/karo-tx25/env/rc.d/101-mtdparts-nand | 1 +
arch/arm/boards/mx31moboard/env/rc.d/101-mtdparts-nor | 1 +
.../phytec-phycore-am335x/defaultenv-phycore-am335x/rc.d/020-bootsource | 1 +
.../defaultenv-phycore-am335x/rc.d/080-init-usbserial | 1 +
arch/arm/boards/phytec-phycore-imx31/env/rc.d/101-mtdparts-nand | 1 +
arch/arm/boards/phytec-phycore-imx31/env/rc.d/102-mtdparts-nor | 1 +
arch/arm/boards/phytec-phycore-imx35/env/rc.d/101-mtdparts-nand | 1 +
arch/arm/boards/phytec-phycore-imx35/env/rc.d/102-mtdparts-nor | 1 +
.../phytec-phyflex-am335x/defaultenv-phyflex-am335x/rc.d/020-bootsource | 1 +
arch/arm/boards/raspberry-pi/env/rc.d/070-bootargs-base | 1 +
arch/arm/boards/telit-evk-pro3/env/rc.d/101-mtdparts-nand | 1 +
arch/arm/boards/telit-evk-pro3/env/rc.d/200-usb | 1 +
arch/arm/boards/versatile/env/rc.d/102-mtdparts-nor | 1 +
defaultenv/defaultenv-2-base/bin/init | 2 +-
defaultenv/defaultenv-2-base/rc.d/010-automount | 1 +
defaultenv/defaultenv-2-base/rc.d/020-ps1 | 1 +
33 files changed, 30 insertions(+), 1 deletion(-)
create mode 120000 arch/arm/boards/archosg9/env/rc.d/020-bootsource
rename arch/arm/boards/at91sam9m10ihd/env/init/{mtdparts-002-m25p80 => mtdparts-m25p80} (100%)
rename arch/arm/boards/at91sam9m10ihd/env/init/{mtdparts-001-nand => mtdparts-nand} (100%)
create mode 120000 arch/arm/boards/at91sam9m10ihd/env/rc.d/010-splash
create mode 120000 arch/arm/boards/at91sam9m10ihd/env/rc.d/101-mtdparts-nand
create mode 120000 arch/arm/boards/at91sam9m10ihd/env/rc.d/102-mtdparts-m25p80
create mode 120000 arch/arm/boards/beagle/env/rc.d/100-mtdparts-nand
create mode 120000 arch/arm/boards/beaglebone/defaultenv-beaglebone/rc.d/050-usb-limit-1300
create mode 120000 arch/arm/boards/ccxmx51/env/rc.d/101-mtdparts-nand
create mode 120000 arch/arm/boards/clep7212/env/rc.d/020-bootsource
create mode 120000 arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/rc.d/020-bootsource
create mode 120000 arch/arm/boards/embedsky-e9/defaultenv-e9/rc.d/020-bootsource
create mode 120000 arch/arm/boards/friendlyarm-mini2440/env/rc.d/101-mtdparts-nand
create mode 120000 arch/arm/boards/guf-vincell/env/rc.d/101-mtdparts-nand
rename arch/arm/boards/highbank/env/init/{001-dtb-probe => dtb-probe} (100%)
create mode 120000 arch/arm/boards/highbank/env/rc.d/001-dtb-probe
create mode 120000 arch/arm/boards/imx233-olinuxino/defaultenv-imx233-olinuxino/rc.d/011-automount-sd
create mode 120000 arch/arm/boards/karo-tx25/env/rc.d/101-mtdparts-nand
create mode 120000 arch/arm/boards/mx31moboard/env/rc.d/101-mtdparts-nor
create mode 120000 arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/rc.d/020-bootsource
create mode 120000 arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/rc.d/080-init-usbserial
create mode 120000 arch/arm/boards/phytec-phycore-imx31/env/rc.d/101-mtdparts-nand
create mode 120000 arch/arm/boards/phytec-phycore-imx31/env/rc.d/102-mtdparts-nor
create mode 120000 arch/arm/boards/phytec-phycore-imx35/env/rc.d/101-mtdparts-nand
create mode 120000 arch/arm/boards/phytec-phycore-imx35/env/rc.d/102-mtdparts-nor
create mode 120000 arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/rc.d/020-bootsource
create mode 120000 arch/arm/boards/raspberry-pi/env/rc.d/070-bootargs-base
create mode 120000 arch/arm/boards/telit-evk-pro3/env/rc.d/101-mtdparts-nand
create mode 120000 arch/arm/boards/telit-evk-pro3/env/rc.d/200-usb
create mode 120000 arch/arm/boards/versatile/env/rc.d/102-mtdparts-nor
create mode 120000 defaultenv/defaultenv-2-base/rc.d/010-automount
create mode 120000 defaultenv/defaultenv-2-base/rc.d/020-ps1
diff --git a/arch/arm/boards/archosg9/env/rc.d/020-bootsource b/arch/arm/boards/archosg9/env/rc.d/020-bootsource
new file mode 120000
index 0000000..ee2daee
--- /dev/null
+++ b/arch/arm/boards/archosg9/env/rc.d/020-bootsource
@@ -0,0 +1 @@
+../init/bootsource
\ No newline at end of file
diff --git a/arch/arm/boards/at91sam9m10ihd/env/init/mtdparts-002-m25p80 b/arch/arm/boards/at91sam9m10ihd/env/init/mtdparts-m25p80
similarity index 100%
rename from arch/arm/boards/at91sam9m10ihd/env/init/mtdparts-002-m25p80
rename to arch/arm/boards/at91sam9m10ihd/env/init/mtdparts-m25p80
diff --git a/arch/arm/boards/at91sam9m10ihd/env/init/mtdparts-001-nand b/arch/arm/boards/at91sam9m10ihd/env/init/mtdparts-nand
similarity index 100%
rename from arch/arm/boards/at91sam9m10ihd/env/init/mtdparts-001-nand
rename to arch/arm/boards/at91sam9m10ihd/env/init/mtdparts-nand
diff --git a/arch/arm/boards/at91sam9m10ihd/env/rc.d/010-splash b/arch/arm/boards/at91sam9m10ihd/env/rc.d/010-splash
new file mode 120000
index 0000000..f00f86e
--- /dev/null
+++ b/arch/arm/boards/at91sam9m10ihd/env/rc.d/010-splash
@@ -0,0 +1 @@
+../init/splash
\ No newline at end of file
diff --git a/arch/arm/boards/at91sam9m10ihd/env/rc.d/101-mtdparts-nand b/arch/arm/boards/at91sam9m10ihd/env/rc.d/101-mtdparts-nand
new file mode 120000
index 0000000..5d21650
--- /dev/null
+++ b/arch/arm/boards/at91sam9m10ihd/env/rc.d/101-mtdparts-nand
@@ -0,0 +1 @@
+../init/mtdparts-nand
\ No newline at end of file
diff --git a/arch/arm/boards/at91sam9m10ihd/env/rc.d/102-mtdparts-m25p80 b/arch/arm/boards/at91sam9m10ihd/env/rc.d/102-mtdparts-m25p80
new file mode 120000
index 0000000..b94f17f
--- /dev/null
+++ b/arch/arm/boards/at91sam9m10ihd/env/rc.d/102-mtdparts-m25p80
@@ -0,0 +1 @@
+../init/mtdparts-m25p80
\ No newline at end of file
diff --git a/arch/arm/boards/beagle/env/rc.d/100-mtdparts-nand b/arch/arm/boards/beagle/env/rc.d/100-mtdparts-nand
new file mode 120000
index 0000000..5d21650
--- /dev/null
+++ b/arch/arm/boards/beagle/env/rc.d/100-mtdparts-nand
@@ -0,0 +1 @@
+../init/mtdparts-nand
\ No newline at end of file
diff --git a/arch/arm/boards/beaglebone/defaultenv-beaglebone/rc.d/050-usb-limit-1300 b/arch/arm/boards/beaglebone/defaultenv-beaglebone/rc.d/050-usb-limit-1300
new file mode 120000
index 0000000..205f223
--- /dev/null
+++ b/arch/arm/boards/beaglebone/defaultenv-beaglebone/rc.d/050-usb-limit-1300
@@ -0,0 +1 @@
+../init/usb-limit-1300
\ No newline at end of file
diff --git a/arch/arm/boards/ccxmx51/env/rc.d/101-mtdparts-nand b/arch/arm/boards/ccxmx51/env/rc.d/101-mtdparts-nand
new file mode 120000
index 0000000..5d21650
--- /dev/null
+++ b/arch/arm/boards/ccxmx51/env/rc.d/101-mtdparts-nand
@@ -0,0 +1 @@
+../init/mtdparts-nand
\ No newline at end of file
diff --git a/arch/arm/boards/clep7212/env/rc.d/020-bootsource b/arch/arm/boards/clep7212/env/rc.d/020-bootsource
new file mode 120000
index 0000000..ee2daee
--- /dev/null
+++ b/arch/arm/boards/clep7212/env/rc.d/020-bootsource
@@ -0,0 +1 @@
+../init/bootsource
\ No newline at end of file
diff --git a/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/rc.d/020-bootsource b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/rc.d/020-bootsource
new file mode 120000
index 0000000..ee2daee
--- /dev/null
+++ b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/rc.d/020-bootsource
@@ -0,0 +1 @@
+../init/bootsource
\ No newline at end of file
diff --git a/arch/arm/boards/embedsky-e9/defaultenv-e9/rc.d/020-bootsource b/arch/arm/boards/embedsky-e9/defaultenv-e9/rc.d/020-bootsource
new file mode 120000
index 0000000..ee2daee
--- /dev/null
+++ b/arch/arm/boards/embedsky-e9/defaultenv-e9/rc.d/020-bootsource
@@ -0,0 +1 @@
+../init/bootsource
\ No newline at end of file
diff --git a/arch/arm/boards/friendlyarm-mini2440/env/rc.d/101-mtdparts-nand b/arch/arm/boards/friendlyarm-mini2440/env/rc.d/101-mtdparts-nand
new file mode 120000
index 0000000..5d21650
--- /dev/null
+++ b/arch/arm/boards/friendlyarm-mini2440/env/rc.d/101-mtdparts-nand
@@ -0,0 +1 @@
+../init/mtdparts-nand
\ No newline at end of file
diff --git a/arch/arm/boards/guf-vincell/env/rc.d/101-mtdparts-nand b/arch/arm/boards/guf-vincell/env/rc.d/101-mtdparts-nand
new file mode 120000
index 0000000..5d21650
--- /dev/null
+++ b/arch/arm/boards/guf-vincell/env/rc.d/101-mtdparts-nand
@@ -0,0 +1 @@
+../init/mtdparts-nand
\ No newline at end of file
diff --git a/arch/arm/boards/highbank/env/init/001-dtb-probe b/arch/arm/boards/highbank/env/init/dtb-probe
similarity index 100%
rename from arch/arm/boards/highbank/env/init/001-dtb-probe
rename to arch/arm/boards/highbank/env/init/dtb-probe
diff --git a/arch/arm/boards/highbank/env/rc.d/001-dtb-probe b/arch/arm/boards/highbank/env/rc.d/001-dtb-probe
new file mode 120000
index 0000000..58ee2b5
--- /dev/null
+++ b/arch/arm/boards/highbank/env/rc.d/001-dtb-probe
@@ -0,0 +1 @@
+../init/dtb-probe
\ No newline at end of file
diff --git a/arch/arm/boards/imx233-olinuxino/defaultenv-imx233-olinuxino/rc.d/011-automount-sd b/arch/arm/boards/imx233-olinuxino/defaultenv-imx233-olinuxino/rc.d/011-automount-sd
new file mode 120000
index 0000000..c7c49e4
--- /dev/null
+++ b/arch/arm/boards/imx233-olinuxino/defaultenv-imx233-olinuxino/rc.d/011-automount-sd
@@ -0,0 +1 @@
+../init/automount-sd
\ No newline at end of file
diff --git a/arch/arm/boards/karo-tx25/env/rc.d/101-mtdparts-nand b/arch/arm/boards/karo-tx25/env/rc.d/101-mtdparts-nand
new file mode 120000
index 0000000..5d21650
--- /dev/null
+++ b/arch/arm/boards/karo-tx25/env/rc.d/101-mtdparts-nand
@@ -0,0 +1 @@
+../init/mtdparts-nand
\ No newline at end of file
diff --git a/arch/arm/boards/mx31moboard/env/rc.d/101-mtdparts-nor b/arch/arm/boards/mx31moboard/env/rc.d/101-mtdparts-nor
new file mode 120000
index 0000000..0bf4f45
--- /dev/null
+++ b/arch/arm/boards/mx31moboard/env/rc.d/101-mtdparts-nor
@@ -0,0 +1 @@
+../init/mtdparts-nor
\ No newline at end of file
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/rc.d/020-bootsource b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/rc.d/020-bootsource
new file mode 120000
index 0000000..ee2daee
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/rc.d/020-bootsource
@@ -0,0 +1 @@
+../init/bootsource
\ No newline at end of file
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/rc.d/080-init-usbserial b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/rc.d/080-init-usbserial
new file mode 120000
index 0000000..8f3ef95
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/rc.d/080-init-usbserial
@@ -0,0 +1 @@
+../init/init-usbserial
\ No newline at end of file
diff --git a/arch/arm/boards/phytec-phycore-imx31/env/rc.d/101-mtdparts-nand b/arch/arm/boards/phytec-phycore-imx31/env/rc.d/101-mtdparts-nand
new file mode 120000
index 0000000..5d21650
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-imx31/env/rc.d/101-mtdparts-nand
@@ -0,0 +1 @@
+../init/mtdparts-nand
\ No newline at end of file
diff --git a/arch/arm/boards/phytec-phycore-imx31/env/rc.d/102-mtdparts-nor b/arch/arm/boards/phytec-phycore-imx31/env/rc.d/102-mtdparts-nor
new file mode 120000
index 0000000..0bf4f45
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-imx31/env/rc.d/102-mtdparts-nor
@@ -0,0 +1 @@
+../init/mtdparts-nor
\ No newline at end of file
diff --git a/arch/arm/boards/phytec-phycore-imx35/env/rc.d/101-mtdparts-nand b/arch/arm/boards/phytec-phycore-imx35/env/rc.d/101-mtdparts-nand
new file mode 120000
index 0000000..5d21650
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-imx35/env/rc.d/101-mtdparts-nand
@@ -0,0 +1 @@
+../init/mtdparts-nand
\ No newline at end of file
diff --git a/arch/arm/boards/phytec-phycore-imx35/env/rc.d/102-mtdparts-nor b/arch/arm/boards/phytec-phycore-imx35/env/rc.d/102-mtdparts-nor
new file mode 120000
index 0000000..0bf4f45
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-imx35/env/rc.d/102-mtdparts-nor
@@ -0,0 +1 @@
+../init/mtdparts-nor
\ No newline at end of file
diff --git a/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/rc.d/020-bootsource b/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/rc.d/020-bootsource
new file mode 120000
index 0000000..ee2daee
--- /dev/null
+++ b/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/rc.d/020-bootsource
@@ -0,0 +1 @@
+../init/bootsource
\ No newline at end of file
diff --git a/arch/arm/boards/raspberry-pi/env/rc.d/070-bootargs-base b/arch/arm/boards/raspberry-pi/env/rc.d/070-bootargs-base
new file mode 120000
index 0000000..af70d5c
--- /dev/null
+++ b/arch/arm/boards/raspberry-pi/env/rc.d/070-bootargs-base
@@ -0,0 +1 @@
+../init/bootargs-base
\ No newline at end of file
diff --git a/arch/arm/boards/telit-evk-pro3/env/rc.d/101-mtdparts-nand b/arch/arm/boards/telit-evk-pro3/env/rc.d/101-mtdparts-nand
new file mode 120000
index 0000000..5d21650
--- /dev/null
+++ b/arch/arm/boards/telit-evk-pro3/env/rc.d/101-mtdparts-nand
@@ -0,0 +1 @@
+../init/mtdparts-nand
\ No newline at end of file
diff --git a/arch/arm/boards/telit-evk-pro3/env/rc.d/200-usb b/arch/arm/boards/telit-evk-pro3/env/rc.d/200-usb
new file mode 120000
index 0000000..a08347f
--- /dev/null
+++ b/arch/arm/boards/telit-evk-pro3/env/rc.d/200-usb
@@ -0,0 +1 @@
+../init/usb
\ No newline at end of file
diff --git a/arch/arm/boards/versatile/env/rc.d/102-mtdparts-nor b/arch/arm/boards/versatile/env/rc.d/102-mtdparts-nor
new file mode 120000
index 0000000..0bf4f45
--- /dev/null
+++ b/arch/arm/boards/versatile/env/rc.d/102-mtdparts-nor
@@ -0,0 +1 @@
+../init/mtdparts-nor
\ No newline at end of file
diff --git a/defaultenv/defaultenv-2-base/bin/init b/defaultenv/defaultenv-2-base/bin/init
index 34807bc..63e400f 100644
--- a/defaultenv/defaultenv-2-base/bin/init
+++ b/defaultenv/defaultenv-2-base/bin/init
@@ -45,7 +45,7 @@ fi
[ -n ${login_cmd} ] && global.console.input_allow=0
-for i in /env/init/*; do
+for i in /env/rc.d/*; do
. $i
done
diff --git a/defaultenv/defaultenv-2-base/rc.d/010-automount b/defaultenv/defaultenv-2-base/rc.d/010-automount
new file mode 120000
index 0000000..d61facf
--- /dev/null
+++ b/defaultenv/defaultenv-2-base/rc.d/010-automount
@@ -0,0 +1 @@
+../init/automount
\ No newline at end of file
diff --git a/defaultenv/defaultenv-2-base/rc.d/020-ps1 b/defaultenv/defaultenv-2-base/rc.d/020-ps1
new file mode 120000
index 0000000..774d5e2
--- /dev/null
+++ b/defaultenv/defaultenv-2-base/rc.d/020-ps1
@@ -0,0 +1 @@
+../init/ps1
\ No newline at end of file
--
2.1.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/3] defaultenv-2: create a specific defaultenv for splash
2015-01-13 6:21 ` [PATCH 1/3] defaultenv-2: fix misplace NV dir in env Jean-Christophe PLAGNIOL-VILLARD
2015-01-13 6:21 ` [PATCH 2/3] defaultenv-2: introduce /env/rc.d Jean-Christophe PLAGNIOL-VILLARD
@ 2015-01-13 6:21 ` Jean-Christophe PLAGNIOL-VILLARD
2015-01-13 8:11 ` [PATCH 1/3] defaultenv-2: fix misplace NV dir in env Sascha Hauer
2 siblings, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2015-01-13 6:21 UTC (permalink / raw)
To: barebox
This will allow to factorize splash init
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
arch/arm/boards/at91sam9m10ihd/env/init/splash | 8 --------
common/Kconfig | 5 +++++
defaultenv/Makefile | 1 +
defaultenv/defaultenv-2-splash/init/splash | 15 +++++++++++++++
defaultenv/defaultenv-2-splash/rc.d/010-splash | 1 +
defaultenv/defaultenv.c | 2 ++
6 files changed, 24 insertions(+), 8 deletions(-)
delete mode 100644 arch/arm/boards/at91sam9m10ihd/env/init/splash
create mode 100644 defaultenv/defaultenv-2-splash/init/splash
create mode 120000 defaultenv/defaultenv-2-splash/rc.d/010-splash
diff --git a/arch/arm/boards/at91sam9m10ihd/env/init/splash b/arch/arm/boards/at91sam9m10ihd/env/init/splash
deleted file mode 100644
index 18e74df..0000000
--- a/arch/arm/boards/at91sam9m10ihd/env/init/splash
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-splash=/env/splash.png
-
-if [ -f ${splash} -a -e /dev/fb0 ]; then
- splash -o ${splash}
- fb0.enable=1
-fi
diff --git a/common/Kconfig b/common/Kconfig
index 00e4f36..6e19e9f 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -650,6 +650,11 @@ config DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU
depends on USB_GADGET_DFU
default y
+config DEFAULT_ENVIRONMENT_GENERIC_NEW_SPLASH
+ bool
+ depends on CMD_SPLASH
+ default y
+
config DEFAULT_ENVIRONMENT_GENERIC
bool
depends on !HAVE_DEFAULT_ENVIRONMENT_NEW
diff --git a/defaultenv/Makefile b/defaultenv/Makefile
index fc679eb..03d241c 100644
--- a/defaultenv/Makefile
+++ b/defaultenv/Makefile
@@ -1,6 +1,7 @@
bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW) += defaultenv-2-base
bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU) += defaultenv-2-menu
bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU) += defaultenv-2-dfu
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_SPLASH) += defaultenv-2-splash
bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-1
obj-$(CONFIG_DEFAULT_ENVIRONMENT) += defaultenv.o
extra-y += barebox_default_env barebox_default_env.h barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX)
diff --git a/defaultenv/defaultenv-2-splash/init/splash b/defaultenv/defaultenv-2-splash/init/splash
new file mode 100644
index 0000000..f70804d
--- /dev/null
+++ b/defaultenv/defaultenv-2-splash/init/splash
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+img="/env/splash.png"
+
+if [ ! -e ${img} ]; then
+ return
+fi
+
+splash ${img}
+
+if [ $? = 0 ]; then
+ fb0.enable=1
+else
+ echo "Cannot show splash image"
+fi
diff --git a/defaultenv/defaultenv-2-splash/rc.d/010-splash b/defaultenv/defaultenv-2-splash/rc.d/010-splash
new file mode 120000
index 0000000..f00f86e
--- /dev/null
+++ b/defaultenv/defaultenv-2-splash/rc.d/010-splash
@@ -0,0 +1 @@
+../init/splash
\ No newline at end of file
diff --git a/defaultenv/defaultenv.c b/defaultenv/defaultenv.c
index 3b4efcf..712502d 100644
--- a/defaultenv/defaultenv.c
+++ b/defaultenv/defaultenv.c
@@ -48,6 +48,8 @@ static void defaultenv_add_base(void)
defaultenv_append_directory(defaultenv_2_menu);
if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU))
defaultenv_append_directory(defaultenv_2_dfu);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_SPLASH))
+ defaultenv_append_directory(defaultenv_2_splash);
if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
defaultenv_append_directory(defaultenv_1);
}
--
2.1.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread