From: Vicente Bergas <vicencb@gmail.com>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org, Vicente Bergas <vicencb@gmail.com>
Subject: [PATCH 2/3] archosg9: Use defaultenv-2-menu
Date: Fri, 25 Sep 2015 23:41:02 +0100 [thread overview]
Message-ID: <1443220863-24355-3-git-send-email-vicencb@gmail.com> (raw)
In-Reply-To: <1443220863-24355-1-git-send-email-vicencb@gmail.com>
In-Reply-To: <20150924115829.62eef721bbcd7eeb0c9852aa@gmail.com>
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
---
arch/arm/boards/archosg9/env/bin/init | 28 ----------------------
arch/arm/boards/archosg9/env/init/automount | 28 ----------------------
arch/arm/boards/archosg9/env/init/automount2 | 7 ++++++
| 4 ++++
| 1 +
| 4 ++++
| 1 +
| 4 ++++
| 1 +
arch/arm/boards/archosg9/env/menu/mainmenu | 25 -------------------
arch/arm/configs/archosg9_defconfig | 1 +
11 files changed, 23 insertions(+), 81 deletions(-)
delete mode 100644 arch/arm/boards/archosg9/env/bin/init
delete mode 100644 arch/arm/boards/archosg9/env/init/automount
create mode 100644 arch/arm/boards/archosg9/env/init/automount2
create mode 100644 arch/arm/boards/archosg9/env/menu/11-boot-flash/action
create mode 100644 arch/arm/boards/archosg9/env/menu/11-boot-flash/title
create mode 100644 arch/arm/boards/archosg9/env/menu/12-boot-sd/action
create mode 100644 arch/arm/boards/archosg9/env/menu/12-boot-sd/title
create mode 100644 arch/arm/boards/archosg9/env/menu/13-boot-usb/action
create mode 100644 arch/arm/boards/archosg9/env/menu/13-boot-usb/title
delete mode 100644 arch/arm/boards/archosg9/env/menu/mainmenu
diff --git a/arch/arm/boards/archosg9/env/bin/init b/arch/arm/boards/archosg9/env/bin/init
deleted file mode 100644
index 0b36299..0000000
--- a/arch/arm/boards/archosg9/env/bin/init
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-export PATH=/env/bin
-
-global hostname=generic
-global user=none
-global boot.default=net
-global allow_color=true
-global linux.bootargs.base
-#linux.bootargs.dyn.* will be cleared at the beginning of boot
-global linux.bootargs.dyn.ip
-global linux.bootargs.dyn.root
-global editcmd=sedit
-
-/env/config
-
-timeout -s -a 0
-autoboot="$?"
-
-for i in /env/init/*; do
- . $i
-done
-
-if [ "$autoboot" = 0 ]; then
- boot
-fi
-
-/env/menu/mainmenu
diff --git a/arch/arm/boards/archosg9/env/init/automount b/arch/arm/boards/archosg9/env/init/automount
deleted file mode 100644
index 700b5e4..0000000
--- a/arch/arm/boards/archosg9/env/init/automount
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
- init-menu-add-entry "$0" "Automountpoints"
- exit
-fi
-
-# automount tftp server based on $eth0.serverip
-
-mkdir -p /mnt/tftp
-automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp'
-
-# automount nfs server example
-
-#nfshost=somehost
-#mkdir -p /mnt/${nfshost}
-#automount /mnt/$nfshost "ifup eth0 && mount -t nfs ${nfshost}:/tftpboot /mnt/${nfshost}"
-
-# FAT on usb disk example
-
-#mkdir -p /mnt/fat
-#automount -d /mnt/fat 'usb && [ -e /dev/disk0.0 ] && mount /dev/disk0.0 /mnt/fat'
-
-mkdir -p /mnt/sd
-automount -d /mnt/sd 'mount /dev/disk0.0 /mnt/sd'
-
-mkdir -p /mnt/usb
-automount -d /mnt/usb 'mount -t omap4_usbbootfs omap4_usbboot /mnt/usb'
diff --git a/arch/arm/boards/archosg9/env/init/automount2 b/arch/arm/boards/archosg9/env/init/automount2
new file mode 100644
index 0000000..fa10439
--- /dev/null
+++ b/arch/arm/boards/archosg9/env/init/automount2
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+mkdir -p /mnt/sd
+automount -d /mnt/sd '[ -e /dev/disk0.0 ] && mount /dev/disk0.0 /mnt/sd'
+
+mkdir -p /mnt/usb
+automount -d /mnt/usb 'mount -t omap4_usbbootfs omap4_usbboot /mnt/usb'
diff --git a/arch/arm/boards/archosg9/env/menu/11-boot-flash/action b/arch/arm/boards/archosg9/env/menu/11-boot-flash/action
new file mode 100644
index 0000000..f83028b
--- /dev/null
+++ b/arch/arm/boards/archosg9/env/menu/11-boot-flash/action
@@ -0,0 +1,4 @@
+#!/bin/sh
+boot_order mmc2_1
+echo "Rebooting into internal flash..."
+reset
diff --git a/arch/arm/boards/archosg9/env/menu/11-boot-flash/title b/arch/arm/boards/archosg9/env/menu/11-boot-flash/title
new file mode 100644
index 0000000..2628b5a
--- /dev/null
+++ b/arch/arm/boards/archosg9/env/menu/11-boot-flash/title
@@ -0,0 +1 @@
+${RED}Reboot into internal flash${NC}
diff --git a/arch/arm/boards/archosg9/env/menu/12-boot-sd/action b/arch/arm/boards/archosg9/env/menu/12-boot-sd/action
new file mode 100644
index 0000000..19bc3ff
--- /dev/null
+++ b/arch/arm/boards/archosg9/env/menu/12-boot-sd/action
@@ -0,0 +1,4 @@
+#!/bin/sh
+boot_order mmc1
+echo "Rebooting into SD card..."
+reset
--git a/arch/arm/boards/archosg9/env/menu/12-boot-sd/title b/arch/arm/boards/archosg9/env/menu/12-boot-sd/title
new file mode 100644
index 0000000..92e940f
--- /dev/null
+++ b/arch/arm/boards/archosg9/env/menu/12-boot-sd/title
@@ -0,0 +1 @@
+${RED}Reboot into SD card${NC}
diff --git a/arch/arm/boards/archosg9/env/menu/13-boot-usb/action b/arch/arm/boards/archosg9/env/menu/13-boot-usb/action
new file mode 100644
index 0000000..885acba
--- /dev/null
+++ b/arch/arm/boards/archosg9/env/menu/13-boot-usb/action
@@ -0,0 +1,4 @@
+#!/bin/sh
+boot_order usb_1
+echo "Rebooting over usb..."
+reset
diff --git a/arch/arm/boards/archosg9/env/menu/13-boot-usb/title b/arch/arm/boards/archosg9/env/menu/13-boot-usb/title
new file mode 100644
index 0000000..76edccd
--- /dev/null
+++ b/arch/arm/boards/archosg9/env/menu/13-boot-usb/title
@@ -0,0 +1 @@
+${RED}Reboot over usb${NC}
diff --git a/arch/arm/boards/archosg9/env/menu/mainmenu b/arch/arm/boards/archosg9/env/menu/mainmenu
deleted file mode 100644
index 6856261..0000000
--- a/arch/arm/boards/archosg9/env/menu/mainmenu
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-savepath=$PATH
-export menupath=$PATH:/env/menu
-
-. /env/data/ansi-colors
-
-while true; do
- export PATH=${menupath}
-
- echo $PATH
-
- menu -a -m boot -d "${CYAN}Welcome to Barebox${NC}"
-
- boot-entries-collect
-
- menu -e -a -m boot -c "settings" -d "Settings"
- menu -e -a -m boot -c 'PATH=$savepath; echo "enter exit to return to menu"; sh' -d "${DARK_YELLOW}Shell${NC}"
- menu -e -a -m boot -c 'boot_order mmc2_1 && reset' -d "${RED}Reboot into internal flash${NC}"
- menu -e -a -m boot -c 'boot_order mmc1 && reset' -d "${RED}Reboot into SD card${NC}"
- menu -e -a -m boot -c 'boot_order usb_1 && reset' -d "${RED}Reboot over usb${NC}"
-
- menu -s -m boot
- menu -r -m boot
-done
diff --git a/arch/arm/configs/archosg9_defconfig b/arch/arm/configs/archosg9_defconfig
index c870209..db80c38 100644
--- a/arch/arm/configs/archosg9_defconfig
+++ b/arch/arm/configs/archosg9_defconfig
@@ -52,6 +52,7 @@ CONFIG_CMD_ECHO_E=y
CONFIG_CMD_EDIT=y
CONFIG_CMD_MENU=y
CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_MENUTREE=y
CONFIG_CMD_READLINE=y
CONFIG_CMD_TIMEOUT=y
CONFIG_CMD_CRC=y
--
2.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-09-25 22:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-24 8:58 Archos G9: barebox board env contains boot-entries-collect Antony Pavlov
2015-09-25 22:41 ` [PATCH 0/3] ArchosG9 updates Vicente Bergas
2015-09-29 6:40 ` Sascha Hauer
2015-09-25 22:41 ` [PATCH 1/3] archosg9: re-generate defconfigs with "make savedefconfig" Vicente Bergas
2015-09-25 22:41 ` Vicente Bergas [this message]
2015-09-25 22:41 ` [PATCH 3/3] archosg9: add display Vicente Bergas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443220863-24355-3-git-send-email-vicencb@gmail.com \
--to=vicencb@gmail.com \
--cc=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox