From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: Add support for creating menus from a directory structure
Date: Fri, 28 Mar 2014 10:14:40 +0100 [thread overview]
Message-ID: <1395998083-18979-1-git-send-email-s.hauer@pengutronix.de> (raw)
The current menu command makes it quite difficult to create a menu
from the shell. This series adds a menutree command which allows it
to create a menu from a directory structure. Each directory in this
structure represents a menu entry. Subdirectories are submenus. The
defenv-2 menu is then converted to use the menutree command.
Sascha
----------------------------------------------------------------
Sascha Hauer (3):
Add shell_expand function
add menutree command
defenv-2: replace menu with menutree
commands/Kconfig | 8 +
commands/Makefile | 1 +
commands/menutree.c | 60 +++++++
common/Kconfig | 5 +-
common/Makefile | 1 +
common/hush.c | 33 ++++
common/menutree.c | 181 +++++++++++++++++++++
.../defaultenv-2-menu/menu/00-boot-default/action | 5 +
.../defaultenv-2-menu/menu/00-boot-default/title | 1 +
.../defaultenv-2-menu/menu/10-boot-all/action | 3 +
.../defaultenv-2-menu/menu/10-boot-all/net/action | 5 +
.../defaultenv-2-menu/menu/10-boot-all/net/title | 1 +
.../defaultenv-2-menu/menu/10-boot-all/title | 1 +
.../menu/20-settings/config/action | 5 +
.../menu/20-settings/config/title | 1 +
.../menu/20-settings/network/action | 3 +
.../menu/20-settings/network/title | 1 +
.../defaultenv-2-menu/menu/20-settings/title | 1 +
.../defaultenv-2-menu/menu/30-saveenv/action | 8 +
defaultenv/defaultenv-2-menu/menu/30-saveenv/title | 1 +
defaultenv/defaultenv-2-menu/menu/40-shell/action | 5 +
defaultenv/defaultenv-2-menu/menu/40-shell/title | 1 +
defaultenv/defaultenv-2-menu/menu/50-reset/action | 3 +
defaultenv/defaultenv-2-menu/menu/50-reset/title | 1 +
.../defaultenv-2-menu/menu/boot-entries-collect | 13 --
.../defaultenv-2-menu/menu/boot-entries-edit | 20 ---
.../defaultenv-2-menu/menu/boot-entries-remove | 18 --
.../defaultenv-2-menu/menu/boot-menu-add-entry | 5 -
.../menu/boot-menu-new-boot-entry | 21 ---
.../defaultenv-2-menu/menu/init-entries-collect | 9 -
.../defaultenv-2-menu/menu/init-entries-edit | 20 ---
.../defaultenv-2-menu/menu/init-menu-add-entry | 3 -
defaultenv/defaultenv-2-menu/menu/mainmenu | 20 +--
defaultenv/defaultenv-2-menu/menu/settings | 21 ---
defaultenv/defaultenv-2-menu/menu/title | 1 +
include/common.h | 9 +
include/menu.h | 2 +
37 files changed, 347 insertions(+), 150 deletions(-)
create mode 100644 commands/menutree.c
create mode 100644 common/menutree.c
create mode 100644 defaultenv/defaultenv-2-menu/menu/00-boot-default/action
create mode 100644 defaultenv/defaultenv-2-menu/menu/00-boot-default/title
create mode 100644 defaultenv/defaultenv-2-menu/menu/10-boot-all/action
create mode 100644 defaultenv/defaultenv-2-menu/menu/10-boot-all/net/action
create mode 100644 defaultenv/defaultenv-2-menu/menu/10-boot-all/net/title
create mode 100644 defaultenv/defaultenv-2-menu/menu/10-boot-all/title
create mode 100644 defaultenv/defaultenv-2-menu/menu/20-settings/config/action
create mode 100644 defaultenv/defaultenv-2-menu/menu/20-settings/config/title
create mode 100644 defaultenv/defaultenv-2-menu/menu/20-settings/network/action
create mode 100644 defaultenv/defaultenv-2-menu/menu/20-settings/network/title
create mode 100644 defaultenv/defaultenv-2-menu/menu/20-settings/title
create mode 100644 defaultenv/defaultenv-2-menu/menu/30-saveenv/action
create mode 100644 defaultenv/defaultenv-2-menu/menu/30-saveenv/title
create mode 100644 defaultenv/defaultenv-2-menu/menu/40-shell/action
create mode 100644 defaultenv/defaultenv-2-menu/menu/40-shell/title
create mode 100644 defaultenv/defaultenv-2-menu/menu/50-reset/action
create mode 100644 defaultenv/defaultenv-2-menu/menu/50-reset/title
delete mode 100644 defaultenv/defaultenv-2-menu/menu/boot-entries-collect
delete mode 100644 defaultenv/defaultenv-2-menu/menu/boot-entries-edit
delete mode 100644 defaultenv/defaultenv-2-menu/menu/boot-entries-remove
delete mode 100644 defaultenv/defaultenv-2-menu/menu/boot-menu-add-entry
delete mode 100644 defaultenv/defaultenv-2-menu/menu/boot-menu-new-boot-entry
delete mode 100644 defaultenv/defaultenv-2-menu/menu/init-entries-collect
delete mode 100644 defaultenv/defaultenv-2-menu/menu/init-entries-edit
delete mode 100644 defaultenv/defaultenv-2-menu/menu/init-menu-add-entry
delete mode 100644 defaultenv/defaultenv-2-menu/menu/settings
create mode 100644 defaultenv/defaultenv-2-menu/menu/title
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2014-03-28 9:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-28 9:14 Sascha Hauer [this message]
2014-03-28 9:14 ` [PATCH 1/3] Add shell_expand function Sascha Hauer
2014-03-28 9:14 ` [PATCH 2/3] add menutree command Sascha Hauer
2014-03-28 9:14 ` [PATCH 3/3] defenv-2: replace menu with menutree Sascha Hauer
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=1395998083-18979-1-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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