defaultenv2: introduce init order
cover defaultenv2: introduce init order
Hi,
The folowing patch serie add init order for init script and defaultenv2 splash default env
same idea as in Linux
we will store the init script in /env/init and the specific order of init via symlink in /env/rc.d
The following changes since commit 9cd14d260aa22ae089f81a07be2c0e5dea2ffc94:
Merge branch 'for-next/pbl-console' (2015-01-09 17:38:27 +0100)
are available in the git repository at:
git://git.jcrosoft.org/barebox.git delivery/defaultenv2
for you to fetch changes up to e474a71d0ff7a4fa347ffdfc65285b9e64dcb963:
defaultenv-2: create a specific defaultenv for splash (2015-01-11 18:47:14 +0800)
----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (3):
defaultenv-2: fix misplace NV dir in env
defaultenv-2: introduce /env/rc.d
defaultenv-2: create a specific defaultenv for splash
arch/arm/boards/archosg9/env/rc.d/020-bootsource | 1 +
arch/arm/boards/at91sam9m10ihd/env/init/{mtdparts-002-m25p80 => mtdparts-m25p80} | 0
arch/arm/boards/at91sam9m10ihd/env/init/{mtdparts-001-nand => mtdparts-nand} | 0
arch/arm/boards/at91sam9m10ihd/env/init/splash | 8 --------
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/avnet-zedboard/env/{init => }/nv/linux.bootargs.base | 0
arch/arm/boards/beagle/env/rc.d/100-mtdparts-nand | 1 +
arch/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 +
arch/arm/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/{init => }/nv/hostname | 0
arch/arm/boards/guf-vincell/env/{init => }/nv/linux.bootargs.base | 0
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 +
arch/arm/boards/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 +
arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/rc.d/020-bootsource | 1 +
arch/arm/boards/phytec-phycore-am335x/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 +
arch/arm/boards/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 +
common/Kconfig | 5 +++++
defaultenv/Makefile | 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 +
defaultenv/defaultenv-2-splash/init/splash | 15 +++++++++++++++
defaultenv/defaultenv-2-splash/rc.d/010-splash | 1 +
defaultenv/defaultenv.c | 2 ++
42 files changed, 54 insertions(+), 9 deletions(-)
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%)
delete mode 100644 arch/arm/boards/at91sam9m10ihd/env/init/splash
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
rename arch/arm/boards/avnet-zedboard/env/{init => }/nv/linux.bootargs.base (100%)
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
rename arch/arm/boards/guf-vincell/env/{init => }/nv/hostname (100%)
rename arch/arm/boards/guf-vincell/env/{init => }/nv/linux.bootargs.base (100%)
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
create mode 100644 defaultenv/defaultenv-2-splash/init/splash
create mode 120000 defaultenv/defaultenv-2-splash/rc.d/010-splashBest Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/3 defaultenv-2: fix misplace NV dir in env
---
arch/arm/boards/avnet-zedboard/env/{init => }/nv/linux.bootargs.base | 0
arch/arm/boards/guf-vincell/env/{init => }/nv/hostname | 0
arch/arm/boards/guf-vincell/env/{init => }/nv/linux.bootargs.base | 0
3 files changed, 0 insertions(+), 0 deletions(-)
rename arch/arm/boards/avnet-zedboard/env/{init => }/nv/linux.bootargs.base (100%)
rename arch/arm/boards/guf-vincell/env/{init => }/nv/hostname (100%)
rename arch/arm/boards/guf-vincell/env/{init => }/nv/linux.bootargs.base (100%)arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.base renamed from arch/arm/boards/avnet-zedboard/env/init/nv/linux.bootargs.base +0 -0
arch/arm/boards/guf-vincell/env/nv/hostname renamed from arch/arm/boards/guf-vincell/env/init/nv/hostname +0 -0
arch/arm/boards/guf-vincell/env/nv/linux.bootargs.base renamed from arch/arm/boards/guf-vincell/env/init/nv/linux.bootargs.base +0 -0
Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/3 defaultenv-2: introduce /env/rc.d
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
---
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-ps1arch/arm/boards/archosg9/env/rc.d/020-bootsource new file +1 -0
@@ -0,0 +1 @@ +../init/bootsource
arch/arm/boards/at91sam9m10ihd/env/init/mtdparts-m25p80 renamed from arch/arm/boards/at91sam9m10ihd/env/init/mtdparts-002-m25p80 +0 -0
arch/arm/boards/at91sam9m10ihd/env/init/mtdparts-nand renamed from arch/arm/boards/at91sam9m10ihd/env/init/mtdparts-001-nand +0 -0
arch/arm/boards/at91sam9m10ihd/env/rc.d/010-splash new file +1 -0
@@ -0,0 +1 @@ +../init/splash
arch/arm/boards/at91sam9m10ihd/env/rc.d/101-mtdparts-nand new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nand
arch/arm/boards/at91sam9m10ihd/env/rc.d/102-mtdparts-m25p80 new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-m25p80
arch/arm/boards/beagle/env/rc.d/100-mtdparts-nand new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nand
arch/arm/boards/beaglebone/defaultenv-beaglebone/rc.d/050-usb-limit-1300 new file +1 -0
@@ -0,0 +1 @@ +../init/usb-limit-1300
arch/arm/boards/ccxmx51/env/rc.d/101-mtdparts-nand new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nand
arch/arm/boards/clep7212/env/rc.d/020-bootsource new file +1 -0
@@ -0,0 +1 @@ +../init/bootsource
arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/rc.d/020-bootsource new file +1 -0
@@ -0,0 +1 @@ +../init/bootsource
arch/arm/boards/embedsky-e9/defaultenv-e9/rc.d/020-bootsource new file +1 -0
@@ -0,0 +1 @@ +../init/bootsource
arch/arm/boards/friendlyarm-mini2440/env/rc.d/101-mtdparts-nand new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nand
arch/arm/boards/guf-vincell/env/rc.d/101-mtdparts-nand new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nand
arch/arm/boards/highbank/env/init/dtb-probe renamed from arch/arm/boards/highbank/env/init/001-dtb-probe +0 -0
arch/arm/boards/highbank/env/rc.d/001-dtb-probe new file +1 -0
@@ -0,0 +1 @@ +../init/dtb-probe
arch/arm/boards/imx233-olinuxino/defaultenv-imx233-olinuxino/rc.d/011-automount-sd new file +1 -0
@@ -0,0 +1 @@ +../init/automount-sd
arch/arm/boards/karo-tx25/env/rc.d/101-mtdparts-nand new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nand
arch/arm/boards/mx31moboard/env/rc.d/101-mtdparts-nor new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nor
arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/rc.d/020-bootsource new file +1 -0
@@ -0,0 +1 @@ +../init/bootsource
arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/rc.d/080-init-usbserial new file +1 -0
@@ -0,0 +1 @@ +../init/init-usbserial
arch/arm/boards/phytec-phycore-imx31/env/rc.d/101-mtdparts-nand new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nand
arch/arm/boards/phytec-phycore-imx31/env/rc.d/102-mtdparts-nor new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nor
arch/arm/boards/phytec-phycore-imx35/env/rc.d/101-mtdparts-nand new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nand
arch/arm/boards/phytec-phycore-imx35/env/rc.d/102-mtdparts-nor new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nor
arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/rc.d/020-bootsource new file +1 -0
@@ -0,0 +1 @@ +../init/bootsource
arch/arm/boards/raspberry-pi/env/rc.d/070-bootargs-base new file +1 -0
@@ -0,0 +1 @@ +../init/bootargs-base
arch/arm/boards/telit-evk-pro3/env/rc.d/101-mtdparts-nand new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nand
arch/arm/boards/telit-evk-pro3/env/rc.d/200-usb new file +1 -0
@@ -0,0 +1 @@ +../init/usb
arch/arm/boards/versatile/env/rc.d/102-mtdparts-nor new file +1 -0
@@ -0,0 +1 @@ +../init/mtdparts-nor
defaultenv/defaultenv-2-base/bin/init +1 -1
@@ -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
defaultenv/defaultenv-2-base/rc.d/010-automount new file +1 -0
@@ -0,0 +1 @@ +../init/automount
defaultenv/defaultenv-2-base/rc.d/020-ps1 new file +1 -0
@@ -0,0 +1 @@ +../init/ps1
Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/3 defaultenv-2: create a specific defaultenv for splash
In reply to Jean-Christophe PLAGNIOL-VILLARDThis will allow to factorize splash init
--- 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
arch/arm/boards/at91sam9m10ihd/env/init/splash deleted +0 -8
@@ -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
common/Kconfig +5 -0
@@ -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
defaultenv/Makefile +1 -0
@@ -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)
defaultenv/defaultenv-2-splash/init/splash new file +15 -0
@@ -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
defaultenv/defaultenv-2-splash/rc.d/010-splash new file +1 -0
@@ -0,0 +1 @@ +../init/splash
defaultenv/defaultenv.c +2 -0
@@ -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); }
Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 1/3] defaultenv-2: fix misplace NV dir in env
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 1 line · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Applied this one to master
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 2/3] defaultenv-2: introduce /env/rc.d
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
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
Boards can overwrite scripts without links. Numbering the files seems good because it makes the execution order more predictable and easier to put a script between two other scripts.
But why links? On Linux PCs this allows to separate distribution provided scripts from their actual (site specific) execution. Also the same scripts can be executed from different runlevels. On barebox I see no good reason for links. There is only one runlevel in barebox and if I don't want to execute a script I can just remove it.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/3] defaultenv-2: introduce /env/rc.d
Quoted 15 lines · Sascha Hauer
Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
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
Boards can overwrite scripts without links. Numbering the files seems good because it makes the execution order more predictable and easier to put a script between two other scripts.
Quoted 6 lines
But why links? On Linux PCs this allows to separate distribution provided scripts from their actual (site specific) execution. Also the same scripts can be executed from different runlevels. On barebox I see no good reason for links. There is only one runlevel in barebox and if I don't want to execute a script I can just remove it.
Runtime change
I’ve a board where I need to change the init order based on the board revision
so the symlink allow this
and this will allow also to have the same script at different order based on the board requirement.
Best Regards,
J.
Quoted 8 lines
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/3] defaultenv-2: introduce /env/rc.d
Hi Jean-Christophe,
Quoted 2 lines · Jean-Christophe PLAGNIOL-VILLARD
and this will allow also to have the same script at different order based on the board requirement.
So without links you should be able to use 'mv' instead of 'ln'.
If this doesn't work for your case, could you describe it in a bit more detail?
Regards,
Jan
Signature · 11 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/3] defaultenv-2: introduce /env/rc.d
Quoted 13 lines · Jan Lübbe
Hi Jean-Christophe,
Quoted 2 lines · Jean-Christophe PLAGNIOL-VILLARD
and this will allow also to have the same script at different order based on the board requirement.
So without links you should be able to use 'mv' instead of 'ln'.
If this doesn't work for your case, could you describe it in a bit more detail?
yes you could do this but this make updates difficult
the links you can drop/remove them all and recreate them at runtime
it’s predictable
secondly I’m preparing a second patch series to add shutdown sequence
but in this case the shutdown is not necessary the same as init
so symlink give us flexibility
Best Regards,
J.
Quoted 10 lines
Regards,
JanSignature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox