mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Add support for creating menus from a directory structure
@ 2014-03-28  9:14 Sascha Hauer
  2014-03-28  9:14 ` [PATCH 1/3] Add shell_expand function Sascha Hauer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sascha Hauer @ 2014-03-28  9:14 UTC (permalink / raw)
  To: barebox

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-28  9:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28  9:14 Add support for creating menus from a directory structure Sascha Hauer
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox