introduce application support
Subsystems (6)
cover introduce application support
HI,
this patch serie introduce the application support to barebox
This will allow to run application at run time by calling barebox syscalls and as this will be a stable ABI the application will able the run against any barebox that support it
As the application are not linked to barebox the GPLv2 licence does not apply.
This patch serie provide a small libc (partialy implemented) which is under GPLv2 + exception
As a special exception, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other works to produce a work based on this file, this file does not by itself cause the resulting work to be covered by the GNU General Public License. However the source code for this file must still be made available in accordance with section (3) of the GNU General Public License.
This exception does not invalidate any other reasons why a work based on this file might be covered by the GNU General Public License.
This also provide the curses support proted against the libary with some examples
One of the idea will be to create a curses interface bios like for barebox
The following changes since commit 94e71b843f6456abacc2fe76a5c375a461fabdf7:
libubi: Use global mtd_all_ff function (2013-03-04 10:54:46 +0100)
are available in the git repository at:
git://git.jcrosoft.org/barebox.git delivery/application
for you to fetch changes up to aa6566a71ec01c48ce12325e19d1027d7d11316f:
highbank: enable application support (2013-03-04 20:02:32 +0800)
----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (20):
Makefile: x_flags prepare for apps support
tlsf_malloc: drop duplicate include
kbuild: add application (app) target Introduce application (app) support
app: Introduce libc support
app: add some utils
app: Introduce example application
filetype: add barebox arm application
arm: add application support
app: printf: use HelenOS verison with wide char support
app: printf: add version from contiki
app: add tinycurses support
app: curses: add pdcurses
app: add test curses
app: pdcurses: add libmenu
app: pdcurses: add libform
app: curses: add menu example
app: curses: add panel example
app: curses: add form example
highbank: enable application support
Makefile | 53 ++- apps/Kconfig | 60 +++ apps/Makefile | 32 ++ apps/example/Makefile | 14 + apps/example/example.h | 7 + apps/example/list.c | 98 +++++ apps/example/ls.c | 127 ++++++ apps/example/main.c | 231 +++++++++++ apps/example/setjmp.c | 24 ++ apps/form_curses/Makefile | 11 + apps/form_curses/main.c | 113 ++++++ apps/include/appinfo.h | 60 +++ apps/include/assert.h | 32 ++ apps/include/common.h | 28 ++ apps/include/ctype.h | 100 +++++ apps/include/dirent.h | 24 ++ apps/include/errno.h | 24 ++ apps/include/fcntl.h | 25 ++ apps/include/getopt.h | 76 ++++ apps/include/libc_config.h | 139 +++++++ apps/include/limits.h | 38 ++ apps/include/malloc.h | 30 ++ apps/include/module.h | 3 + apps/include/sections.h | 29 ++ apps/include/setjmp.h | 25 ++ apps/include/stddef.h | 1 + apps/include/stdint.h | 23 ++ apps/include/stdio.h | 69 ++++ apps/include/stdlib.h | 32 ++ apps/include/string.h | 53 +++ apps/include/sys/ioctl.h | 12 + apps/include/sys/stat.h | 14 + apps/include/sys/syscall.h | 14 + apps/include/sys/types.h | 15 + apps/include/time.h | 27 ++ apps/include/unistd.h | 46 +++ apps/include/utils/ansi.h | 37 ++ apps/include/utils/getchar.h | 22 ++ apps/include/utils/list.h | 114 ++++++ apps/include/utils/termcap.h | 23 ++ apps/include/wchar.h | 33 ++ apps/lib/Kconfig | 1 + apps/lib/Makefile | 1 + apps/lib/Makefile.include | 1 + apps/lib/curses/Kconfig | 29 ++ apps/lib/curses/Makefile | 2 + apps/lib/curses/Makefile.include | 4 + apps/lib/curses/pdcurses/Makefile | 25 ++ apps/lib/curses/pdcurses/Makefile.include | 3 + apps/lib/curses/pdcurses/backend/Makefile | 6 + apps/lib/curses/pdcurses/backend/barebox.h | 21 + apps/lib/curses/pdcurses/backend/config.h | 136 +++++++ apps/lib/curses/pdcurses/backend/pdcdisp.c | 107 ++++++ apps/lib/curses/pdcurses/backend/pdcgetsc.c | 47 +++ apps/lib/curses/pdcurses/backend/pdckbd.c | 161 ++++++++ apps/lib/curses/pdcurses/backend/pdcscrn.c | 162 ++++++++ apps/lib/curses/pdcurses/backend/pdcsetsc.c | 35 ++ apps/lib/curses/pdcurses/backend/pdcutil.c | 26 ++ apps/lib/curses/pdcurses/form/Makefile | 42 ++ apps/lib/curses/pdcurses/form/READ.ME | 42 ++ apps/lib/curses/pdcurses/form/f_trace.c | 70 ++++ apps/lib/curses/pdcurses/form/fld_arg.c | 98 +++++ apps/lib/curses/pdcurses/form/fld_attr.c | 119 ++++++ apps/lib/curses/pdcurses/form/fld_current.c | 137 +++++++ apps/lib/curses/pdcurses/form/fld_def.c | 399 +++++++++++++++++++ apps/lib/curses/pdcurses/form/fld_dup.c | 101 +++++ apps/lib/curses/pdcurses/form/fld_ftchoice.c | 70 ++++ apps/lib/curses/pdcurses/form/fld_ftlink.c | 87 +++++ apps/lib/curses/pdcurses/form/fld_info.c | 113 ++++++ apps/lib/curses/pdcurses/form/fld_just.c | 86 +++++ apps/lib/curses/pdcurses/form/fld_link.c | 96 +++++ apps/lib/curses/pdcurses/form/fld_max.c | 77 ++++ apps/lib/curses/pdcurses/form/fld_move.c | 64 ++++ apps/lib/curses/pdcurses/form/fld_newftyp.c | 143 +++++++ apps/lib/curses/pdcurses/form/fld_opts.c | 138 +++++++ apps/lib/curses/pdcurses/form/fld_pad.c | 85 ++++ apps/lib/curses/pdcurses/form/fld_page.c | 82 ++++ apps/lib/curses/pdcurses/form/fld_stat.c | 79 ++++ apps/lib/curses/pdcurses/form/fld_type.c | 97 +++++ apps/lib/curses/pdcurses/form/fld_user.c | 72 ++++ apps/lib/curses/pdcurses/form/form.h | 423 ++++++++++++++++++++ apps/lib/curses/pdcurses/form/form.priv.h | 299 +++++++++++++++ apps/lib/curses/pdcurses/form/frm_cursor.c | 70 ++++ apps/lib/curses/pdcurses/form/frm_data.c | 193 ++++++++++ apps/lib/curses/pdcurses/form/frm_def.c | 448 ++++++++++++++++++++++ apps/lib/curses/pdcurses/form/frm_driver.c | 4646 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ apps/lib/curses/pdcurses/form/frm_hook.c | 142 +++++++ apps/lib/curses/pdcurses/form/frm_opts.c | 127 ++++++ apps/lib/curses/pdcurses/form/frm_page.c | 106 +++++ apps/lib/curses/pdcurses/form/frm_post.c | 124 ++++++ apps/lib/curses/pdcurses/form/frm_req_name.c | 170 ++++++++ apps/lib/curses/pdcurses/form/frm_scale.c | 69 ++++ apps/lib/curses/pdcurses/form/frm_sub.c | 86 +++++ apps/lib/curses/pdcurses/form/frm_user.c | 72 ++++ apps/lib/curses/pdcurses/form/frm_win.c | 92 +++++ apps/lib/curses/pdcurses/form/fty_alnum.c | 202 ++++++++++ apps/lib/curses/pdcurses/form/fty_alpha.c | 202 ++++++++++ apps/lib/curses/pdcurses/form/fty_enum.c | 442 +++++++++++++++++++++ apps/lib/curses/pdcurses/form/fty_generic.c | 297 ++++++++++++++ apps/lib/curses/pdcurses/form/fty_int.c | 293 ++++++++++++++ apps/lib/curses/pdcurses/form/fty_ipv4.c | 120 ++++++ apps/lib/curses/pdcurses/form/fty_num.c | 339 ++++++++++++++++ apps/lib/curses/pdcurses/form/fty_regex.c | 350 +++++++++++++++++ apps/lib/curses/pdcurses/include/curses.h | 1378 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ apps/lib/curses/pdcurses/include/nc_alloc.h | 4 + apps/lib/curses/pdcurses/include/ncurses_cfg.h | 40 ++ apps/lib/curses/pdcurses/include/panel.h | 58 +++ apps/lib/curses/pdcurses/menu/Makefile | 26 ++ apps/lib/curses/pdcurses/menu/READ.ME | 42 ++ apps/lib/curses/pdcurses/menu/eti.h | 54 +++ apps/lib/curses/pdcurses/menu/m_attribs.c | 144 +++++++ apps/lib/curses/pdcurses/menu/m_cursor.c | 112 ++++++ apps/lib/curses/pdcurses/menu/m_driver.c | 556 +++++++++++++++++++++++++++ apps/lib/curses/pdcurses/menu/m_format.c | 131 +++++++ apps/lib/curses/pdcurses/menu/m_global.c | 598 +++++++++++++++++++++++++++++ apps/lib/curses/pdcurses/menu/m_hook.c | 151 ++++++++ apps/lib/curses/pdcurses/menu/m_item_cur.c | 113 ++++++ apps/lib/curses/pdcurses/menu/m_item_nam.c | 72 ++++ apps/lib/curses/pdcurses/menu/m_item_new.c | 275 +++++++++++++ apps/lib/curses/pdcurses/menu/m_item_opt.c | 159 ++++++++ apps/lib/curses/pdcurses/menu/m_item_top.c | 107 ++++++ apps/lib/curses/pdcurses/menu/m_item_use.c | 76 ++++ apps/lib/curses/pdcurses/menu/m_item_val.c | 104 +++++ apps/lib/curses/pdcurses/menu/m_item_vis.c | 68 ++++ apps/lib/curses/pdcurses/menu/m_items.c | 110 ++++++ apps/lib/curses/pdcurses/menu/m_new.c | 142 +++++++ apps/lib/curses/pdcurses/menu/m_opts.c | 183 +++++++++ apps/lib/curses/pdcurses/menu/m_pad.c | 95 +++++ apps/lib/curses/pdcurses/menu/m_pattern.c | 124 ++++++ apps/lib/curses/pdcurses/menu/m_post.c | 377 ++++++++++++++++++ apps/lib/curses/pdcurses/menu/m_req_name.c | 125 ++++++ apps/lib/curses/pdcurses/menu/m_scale.c | 76 ++++ apps/lib/curses/pdcurses/menu/m_spacing.c | 113 ++++++ apps/lib/curses/pdcurses/menu/m_sub.c | 100 +++++ apps/lib/curses/pdcurses/menu/m_trace.c | 77 ++++ apps/lib/curses/pdcurses/menu/m_userptr.c | 76 ++++ apps/lib/curses/pdcurses/menu/m_win.c | 100 +++++ apps/lib/curses/pdcurses/menu/menu.h | 261 +++++++++++++ apps/lib/curses/pdcurses/menu/menu.priv.h | 157 ++++++++ apps/lib/curses/pdcurses/menu/mf_common.h | 95 +++++ apps/lib/curses/pdcurses/pdcurses/Makefile | 39 ++ apps/lib/curses/pdcurses/pdcurses/README | 25 ++ apps/lib/curses/pdcurses/pdcurses/addch.c | 408 ++++++++++++++++++++ apps/lib/curses/pdcurses/pdcurses/addchstr.c | 242 ++++++++++++ apps/lib/curses/pdcurses/pdcurses/addstr.c | 237 ++++++++++++ apps/lib/curses/pdcurses/pdcurses/attr.c | 349 +++++++++++++++++ apps/lib/curses/pdcurses/pdcurses/beep.c | 65 ++++ apps/lib/curses/pdcurses/pdcurses/bkgd.c | 220 +++++++++++ apps/lib/curses/pdcurses/pdcurses/border.c | 408 ++++++++++++++++++++ apps/lib/curses/pdcurses/pdcurses/clear.c | 154 ++++++++ apps/lib/curses/pdcurses/pdcurses/color.c | 295 ++++++++++++++ apps/lib/curses/pdcurses/pdcurses/curspriv.h | 146 +++++++ apps/lib/curses/pdcurses/pdcurses/debug.c | 81 ++++ apps/lib/curses/pdcurses/pdcurses/delch.c | 93 +++++ apps/lib/curses/pdcurses/pdcurses/deleteln.c | 208 ++++++++++ apps/lib/curses/pdcurses/pdcurses/deprec.c | 29 ++ apps/lib/curses/pdcurses/pdcurses/getch.c | 410 ++++++++++++++++++++ apps/lib/curses/pdcurses/pdcurses/getstr.c | 471 +++++++++++++++++++++++ apps/lib/curses/pdcurses/pdcurses/getyx.c | 143 +++++++ apps/lib/curses/pdcurses/pdcurses/inch.c | 125 ++++++ apps/lib/curses/pdcurses/pdcurses/inchstr.c | 211 ++++++++++ apps/lib/curses/pdcurses/pdcurses/initscr.c | 339 ++++++++++++++++ apps/lib/curses/pdcurses/pdcurses/inopts.c | 321 ++++++++++++++++ apps/lib/curses/pdcurses/pdcurses/insch.c | 268 +++++++++++++ apps/lib/curses/pdcurses/pdcurses/insstr.c | 261 +++++++++++++ apps/lib/curses/pdcurses/pdcurses/instr.c | 243 ++++++++++++ apps/lib/curses/pdcurses/pdcurses/kernel.c | 256 +++++++++++++ apps/lib/curses/pdcurses/pdcurses/keyname.c | 125 ++++++ apps/lib/curses/pdcurses/pdcurses/mouse.c | 429 +++++++++++++++++++++ apps/lib/curses/pdcurses/pdcurses/move.c | 54 +++ apps/lib/curses/pdcurses/pdcurses/outopts.c | 156 ++++++++ apps/lib/curses/pdcurses/pdcurses/overlay.c | 256 +++++++++++++ apps/lib/curses/pdcurses/pdcurses/pad.c | 259 +++++++++++++ apps/lib/curses/pdcurses/pdcurses/panel.c | 630 ++++++++++++++++++++++++++++++ apps/lib/curses/pdcurses/pdcurses/printw.c | 123 ++++++ apps/lib/curses/pdcurses/pdcurses/refresh.c | 276 +++++++++++++ apps/lib/curses/pdcurses/pdcurses/scanw.c | 575 +++++++++++++++++++++++++++ apps/lib/curses/pdcurses/pdcurses/scr_dump.c | 210 ++++++++++ apps/lib/curses/pdcurses/pdcurses/scroll.c | 98 +++++ apps/lib/curses/pdcurses/pdcurses/slk.c | 643 +++++++++++++++++++++++++++++++ apps/lib/curses/pdcurses/pdcurses/term.h | 57 +++ apps/lib/curses/pdcurses/pdcurses/termattr.c | 176 +++++++++ apps/lib/curses/pdcurses/pdcurses/terminfo.c | 215 +++++++++++ apps/lib/curses/pdcurses/pdcurses/touch.c | 160 ++++++++ apps/lib/curses/pdcurses/pdcurses/util.c | 309 +++++++++++++++ apps/lib/curses/pdcurses/pdcurses/window.c | 562 +++++++++++++++++++++++++++ apps/lib/curses/tinycurses/Makefile | 3 + apps/lib/curses/tinycurses/Makefile.include | 1 + apps/lib/curses/tinycurses/colors.c | 62 +++ apps/lib/curses/tinycurses/curses.h | 1680 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ apps/lib/curses/tinycurses/curses.priv.h | 1317 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ apps/lib/curses/tinycurses/keyboard.c | 247 ++++++++++++ apps/lib/curses/tinycurses/local.h | 89 +++++ apps/lib/curses/tinycurses/tinycurses.c | 1016 ++++++++++++++++++++++++++++++++++++++++++++++++ apps/libc/Kconfig | 44 +++ apps/libc/Makefile | 38 ++ apps/libc/appinfo.c | 35 ++ apps/libc/contiki/Makefile | 1 + apps/libc/contiki/strformat.c | 621 ++++++++++++++++++++++++++++++ apps/libc/contiki/strformat.h | 25 ++ apps/libc/contiki/vsprintf.c | 116 ++++++ apps/libc/dirent.c | 59 +++ apps/libc/errno.c | 19 + apps/libc/fcntl.c | 25 ++ apps/libc/flags.c | 76 ++++ apps/libc/getopt.c | 127 ++++++ apps/libc/getopt_long.c | 625 ++++++++++++++++++++++++++++++ apps/libc/helenos/Makefile | 4 + apps/libc/helenos/align.h | 63 +++ apps/libc/helenos/assert.h | 2 + apps/libc/helenos/ctype.c | 52 +++ apps/libc/helenos/printf_core.c | 905 +++++++++++++++++++++++++++++++++++++++++++ apps/libc/helenos/printf_core.h | 59 +++ apps/libc/helenos/stdio.c | 153 ++++++++ apps/libc/helenos/str.c | 1755 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ apps/libc/helenos/str.h | 135 +++++++ apps/libc/helenos/vsnprintf.c | 187 +++++++++ apps/libc/malloc.c | 50 +++ apps/libc/malloc.h | 2 + apps/libc/private.h | 18 + apps/libc/stdio.c | 275 +++++++++++++ apps/libc/stdlib.c | 77 ++++ apps/libc/string.c | 159 ++++++++ apps/libc/sys/Makefile | 2 + apps/libc/sys/stat.c | 25 ++ apps/libc/syscalls.c | 103 +++++ apps/libc/time.c | 41 ++ apps/libc/unistd.c | 108 ++++++ apps/menu_curses/Makefile | 11 + apps/menu_curses/main.c | 127 ++++++ apps/panel_curses/Makefile | 11 + apps/panel_curses/main.c | 118 ++++++ apps/test_curses/Makefile | 11 + apps/test_curses/main.c | 172 +++++++++ apps/utils/Makefile | 2 + apps/utils/getchar.c | 43 +++ apps/utils/termcap.c | 97 +++++ arch/arm/Kconfig | 2 + arch/arm/Makefile | 13 +- arch/arm/apps/Kconfig | 11 + arch/arm/apps/Makefile | 6 + arch/arm/apps/apps.lds.S | 64 ++++ arch/arm/apps/binfmt.c | 111 ++++++ arch/arm/apps/head.S | 59 +++ arch/arm/apps/include/arch/asm/macro.h | 46 +++ arch/arm/apps/include/arch/setjmp.h | 26 ++ arch/arm/apps/raise.c | 27 ++ arch/arm/apps/setjmp.S | 60 +++ arch/arm/apps/start.c | 35 ++ arch/arm/configs/highbank_defconfig | 21 +- arch/mips/Makefile | 8 +- arch/ppc/Makefile | 4 +- arch/sandbox/Makefile | 4 +- arch/x86/Makefile | 4 +- commands/Kconfig | 7 + commands/Makefile | 1 + commands/appinfo.c | 119 ++++++ common/Kconfig | 3 + common/filetype.c | 35 ++ common/tlsf_malloc.c | 2 - include/apps/syscall_init.h | 23 ++ include/apps/syscalls.h | 76 ++++ include/apps/types.h | 24 ++ include/filetype.h | 2 + include/linux/license.h | 14 + lib/Makefile | 1 + lib/apps/Makefile | 1 + lib/apps/syscalls.c | 413 ++++++++++++++++++++ scripts/Makefile.build | 78 +++- scripts/Makefile.lib | 36 +- 270 files changed, 44450 insertions(+), 32 deletions(-) create mode 100644 apps/Kconfig create mode 100644 apps/Makefile create mode 100644 apps/example/Makefile create mode 100644 apps/example/example.h create mode 100644 apps/example/list.c create mode 100644 apps/example/ls.c create mode 100644 apps/example/main.c create mode 100644 apps/example/setjmp.c create mode 100644 apps/form_curses/Makefile create mode 100644 apps/form_curses/main.c create mode 100644 apps/include/appinfo.h create mode 100644 apps/include/assert.h create mode 100644 apps/include/common.h create mode 100644 apps/include/ctype.h create mode 100644 apps/include/dirent.h create mode 100644 apps/include/errno.h create mode 100644 apps/include/fcntl.h create mode 100644 apps/include/getopt.h create mode 100644 apps/include/libc_config.h create mode 100644 apps/include/limits.h create mode 100644 apps/include/malloc.h create mode 100644 apps/include/module.h create mode 100644 apps/include/sections.h create mode 100644 apps/include/setjmp.h create mode 100644 apps/include/stddef.h create mode 100644 apps/include/stdint.h create mode 100644 apps/include/stdio.h create mode 100644 apps/include/stdlib.h create mode 100644 apps/include/string.h create mode 100644 apps/include/sys/ioctl.h create mode 100644 apps/include/sys/stat.h create mode 100644 apps/include/sys/syscall.h create mode 100644 apps/include/sys/types.h create mode 100644 apps/include/time.h create mode 100644 apps/include/unistd.h create mode 100644 apps/include/utils/ansi.h create mode 100644 apps/include/utils/getchar.h create mode 100644 apps/include/utils/list.h create mode 100644 apps/include/utils/termcap.h create mode 100644 apps/include/wchar.h create mode 100644 apps/lib/Kconfig create mode 100644 apps/lib/Makefile create mode 100644 apps/lib/Makefile.include create mode 100644 apps/lib/curses/Kconfig create mode 100644 apps/lib/curses/Makefile create mode 100644 apps/lib/curses/Makefile.include create mode 100644 apps/lib/curses/pdcurses/Makefile create mode 100644 apps/lib/curses/pdcurses/Makefile.include create mode 100644 apps/lib/curses/pdcurses/backend/Makefile create mode 100644 apps/lib/curses/pdcurses/backend/barebox.h create mode 100644 apps/lib/curses/pdcurses/backend/config.h create mode 100644 apps/lib/curses/pdcurses/backend/pdcdisp.c create mode 100644 apps/lib/curses/pdcurses/backend/pdcgetsc.c create mode 100644 apps/lib/curses/pdcurses/backend/pdckbd.c create mode 100644 apps/lib/curses/pdcurses/backend/pdcscrn.c create mode 100644 apps/lib/curses/pdcurses/backend/pdcsetsc.c create mode 100644 apps/lib/curses/pdcurses/backend/pdcutil.c create mode 100644 apps/lib/curses/pdcurses/form/Makefile create mode 100644 apps/lib/curses/pdcurses/form/READ.ME create mode 100644 apps/lib/curses/pdcurses/form/f_trace.c create mode 100644 apps/lib/curses/pdcurses/form/fld_arg.c create mode 100644 apps/lib/curses/pdcurses/form/fld_attr.c create mode 100644 apps/lib/curses/pdcurses/form/fld_current.c create mode 100644 apps/lib/curses/pdcurses/form/fld_def.c create mode 100644 apps/lib/curses/pdcurses/form/fld_dup.c create mode 100644 apps/lib/curses/pdcurses/form/fld_ftchoice.c create mode 100644 apps/lib/curses/pdcurses/form/fld_ftlink.c create mode 100644 apps/lib/curses/pdcurses/form/fld_info.c create mode 100644 apps/lib/curses/pdcurses/form/fld_just.c create mode 100644 apps/lib/curses/pdcurses/form/fld_link.c create mode 100644 apps/lib/curses/pdcurses/form/fld_max.c create mode 100644 apps/lib/curses/pdcurses/form/fld_move.c create mode 100644 apps/lib/curses/pdcurses/form/fld_newftyp.c create mode 100644 apps/lib/curses/pdcurses/form/fld_opts.c create mode 100644 apps/lib/curses/pdcurses/form/fld_pad.c create mode 100644 apps/lib/curses/pdcurses/form/fld_page.c create mode 100644 apps/lib/curses/pdcurses/form/fld_stat.c create mode 100644 apps/lib/curses/pdcurses/form/fld_type.c create mode 100644 apps/lib/curses/pdcurses/form/fld_user.c create mode 100644 apps/lib/curses/pdcurses/form/form.h create mode 100644 apps/lib/curses/pdcurses/form/form.priv.h create mode 100644 apps/lib/curses/pdcurses/form/frm_cursor.c create mode 100644 apps/lib/curses/pdcurses/form/frm_data.c create mode 100644 apps/lib/curses/pdcurses/form/frm_def.c create mode 100644 apps/lib/curses/pdcurses/form/frm_driver.c create mode 100644 apps/lib/curses/pdcurses/form/frm_hook.c create mode 100644 apps/lib/curses/pdcurses/form/frm_opts.c create mode 100644 apps/lib/curses/pdcurses/form/frm_page.c create mode 100644 apps/lib/curses/pdcurses/form/frm_post.c create mode 100644 apps/lib/curses/pdcurses/form/frm_req_name.c create mode 100644 apps/lib/curses/pdcurses/form/frm_scale.c create mode 100644 apps/lib/curses/pdcurses/form/frm_sub.c create mode 100644 apps/lib/curses/pdcurses/form/frm_user.c create mode 100644 apps/lib/curses/pdcurses/form/frm_win.c create mode 100644 apps/lib/curses/pdcurses/form/fty_alnum.c create mode 100644 apps/lib/curses/pdcurses/form/fty_alpha.c create mode 100644 apps/lib/curses/pdcurses/form/fty_enum.c create mode 100644 apps/lib/curses/pdcurses/form/fty_generic.c create mode 100644 apps/lib/curses/pdcurses/form/fty_int.c create mode 100644 apps/lib/curses/pdcurses/form/fty_ipv4.c create mode 100644 apps/lib/curses/pdcurses/form/fty_num.c create mode 100644 apps/lib/curses/pdcurses/form/fty_regex.c create mode 100644 apps/lib/curses/pdcurses/include/curses.h create mode 100644 apps/lib/curses/pdcurses/include/nc_alloc.h create mode 100644 apps/lib/curses/pdcurses/include/ncurses_cfg.h create mode 100644 apps/lib/curses/pdcurses/include/panel.h create mode 100644 apps/lib/curses/pdcurses/menu/Makefile create mode 100644 apps/lib/curses/pdcurses/menu/READ.ME create mode 100644 apps/lib/curses/pdcurses/menu/eti.h create mode 100644 apps/lib/curses/pdcurses/menu/m_attribs.c create mode 100644 apps/lib/curses/pdcurses/menu/m_cursor.c create mode 100644 apps/lib/curses/pdcurses/menu/m_driver.c create mode 100644 apps/lib/curses/pdcurses/menu/m_format.c create mode 100644 apps/lib/curses/pdcurses/menu/m_global.c create mode 100644 apps/lib/curses/pdcurses/menu/m_hook.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_cur.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_nam.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_new.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_opt.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_top.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_use.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_val.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_vis.c create mode 100644 apps/lib/curses/pdcurses/menu/m_items.c create mode 100644 apps/lib/curses/pdcurses/menu/m_new.c create mode 100644 apps/lib/curses/pdcurses/menu/m_opts.c create mode 100644 apps/lib/curses/pdcurses/menu/m_pad.c create mode 100644 apps/lib/curses/pdcurses/menu/m_pattern.c create mode 100644 apps/lib/curses/pdcurses/menu/m_post.c create mode 100644 apps/lib/curses/pdcurses/menu/m_req_name.c create mode 100644 apps/lib/curses/pdcurses/menu/m_scale.c create mode 100644 apps/lib/curses/pdcurses/menu/m_spacing.c create mode 100644 apps/lib/curses/pdcurses/menu/m_sub.c create mode 100644 apps/lib/curses/pdcurses/menu/m_trace.c create mode 100644 apps/lib/curses/pdcurses/menu/m_userptr.c create mode 100644 apps/lib/curses/pdcurses/menu/m_win.c create mode 100644 apps/lib/curses/pdcurses/menu/menu.h create mode 100644 apps/lib/curses/pdcurses/menu/menu.priv.h create mode 100644 apps/lib/curses/pdcurses/menu/mf_common.h create mode 100644 apps/lib/curses/pdcurses/pdcurses/Makefile create mode 100644 apps/lib/curses/pdcurses/pdcurses/README create mode 100644 apps/lib/curses/pdcurses/pdcurses/addch.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/addchstr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/addstr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/attr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/beep.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/bkgd.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/border.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/clear.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/color.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/curspriv.h create mode 100644 apps/lib/curses/pdcurses/pdcurses/debug.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/delch.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/deleteln.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/deprec.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/getch.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/getstr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/getyx.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/inch.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/inchstr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/initscr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/inopts.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/insch.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/insstr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/instr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/kernel.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/keyname.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/mouse.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/move.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/outopts.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/overlay.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/pad.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/panel.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/printw.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/refresh.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/scanw.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/scr_dump.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/scroll.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/slk.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/term.h create mode 100644 apps/lib/curses/pdcurses/pdcurses/termattr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/terminfo.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/touch.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/util.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/window.c create mode 100644 apps/lib/curses/tinycurses/Makefile create mode 100644 apps/lib/curses/tinycurses/Makefile.include create mode 100644 apps/lib/curses/tinycurses/colors.c create mode 100644 apps/lib/curses/tinycurses/curses.h create mode 100644 apps/lib/curses/tinycurses/curses.priv.h create mode 100644 apps/lib/curses/tinycurses/keyboard.c create mode 100644 apps/lib/curses/tinycurses/local.h create mode 100644 apps/lib/curses/tinycurses/tinycurses.c create mode 100644 apps/libc/Kconfig create mode 100644 apps/libc/Makefile create mode 100644 apps/libc/appinfo.c create mode 100644 apps/libc/contiki/Makefile create mode 100644 apps/libc/contiki/strformat.c create mode 100644 apps/libc/contiki/strformat.h create mode 100644 apps/libc/contiki/vsprintf.c create mode 100644 apps/libc/dirent.c create mode 100644 apps/libc/errno.c create mode 100644 apps/libc/fcntl.c create mode 100644 apps/libc/flags.c create mode 100644 apps/libc/getopt.c create mode 100644 apps/libc/getopt_long.c create mode 100644 apps/libc/helenos/Makefile create mode 100644 apps/libc/helenos/align.h create mode 100644 apps/libc/helenos/assert.h create mode 100644 apps/libc/helenos/ctype.c create mode 100644 apps/libc/helenos/printf_core.c create mode 100644 apps/libc/helenos/printf_core.h create mode 100644 apps/libc/helenos/stdio.c create mode 100644 apps/libc/helenos/str.c create mode 100644 apps/libc/helenos/str.h create mode 100644 apps/libc/helenos/vsnprintf.c create mode 100644 apps/libc/malloc.c create mode 100644 apps/libc/malloc.h create mode 100644 apps/libc/private.h create mode 100644 apps/libc/stdio.c create mode 100644 apps/libc/stdlib.c create mode 100644 apps/libc/string.c create mode 100644 apps/libc/sys/Makefile create mode 100644 apps/libc/sys/stat.c create mode 100644 apps/libc/syscalls.c create mode 100644 apps/libc/time.c create mode 100644 apps/libc/unistd.c create mode 100644 apps/menu_curses/Makefile create mode 100644 apps/menu_curses/main.c create mode 100644 apps/panel_curses/Makefile create mode 100644 apps/panel_curses/main.c create mode 100644 apps/test_curses/Makefile create mode 100644 apps/test_curses/main.c create mode 100644 apps/utils/Makefile create mode 100644 apps/utils/getchar.c create mode 100644 apps/utils/termcap.c create mode 100644 arch/arm/apps/Kconfig create mode 100644 arch/arm/apps/Makefile create mode 100644 arch/arm/apps/apps.lds.S create mode 100644 arch/arm/apps/binfmt.c create mode 100644 arch/arm/apps/head.S create mode 100644 arch/arm/apps/include/arch/asm/macro.h create mode 100644 arch/arm/apps/include/arch/setjmp.h create mode 100644 arch/arm/apps/raise.c create mode 100644 arch/arm/apps/setjmp.S create mode 100644 arch/arm/apps/start.c create mode 100644 commands/appinfo.c create mode 100644 include/apps/syscall_init.h create mode 100644 include/apps/syscalls.h create mode 100644 include/apps/types.h create mode 100644 include/linux/license.h create mode 100644 lib/apps/Makefile create mode 100644 lib/apps/syscalls.c
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/20 Makefile: x_flags prepare for apps support
only include barebox header for barebox flags
--- Makefile | 5 +++-- arch/arm/Makefile | 7 ++++--- arch/mips/Makefile | 8 ++++---- arch/ppc/Makefile | 4 ++-- arch/sandbox/Makefile | 4 ++-- arch/x86/Makefile | 4 ++-- scripts/Makefile.lib | 13 +++++++++---- 7 files changed, 26 insertions(+), 19 deletions(-)
Makefile +3 -2
@@ -297,7 +297,7 @@ LINUXINCLUDE := -Iinclude \ -include include/generated/autoconf.h \ -include $(srctree)/include/linux/kconfig.h -CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffreestanding +CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ -fno-builtin -ffreestanding CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common -Os -pipe
@@ -315,6 +315,7 @@ export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS +export AFLAGS_LINUXINCLUDE export CFLAGS CFLAGS_KERNEL export AFLAGS AFLAGS_KERNEL
@@ -1212,7 +1213,7 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)) a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(AFLAGS_KERNEL) \ - $(NOSTDINC_FLAGS) $(CPPFLAGS) \ + $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(AFLAGS_LINUXINCLUDE) $(CPPFLAGS) \ $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) quiet_cmd_as_o_S = AS $@
arch/arm/Makefile +4 -3
@@ -47,7 +47,8 @@ AFLAGS_THUMB2 :=$(CFLAGS_THUMB2) -Wa$(comma)-mthumb endif CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float $(CFLAGS_THUMB2) -AFLAGS += -include asm/unified.h -msoft-float $(AFLAGS_THUMB2) +AFLAGS_LINUXINCLUDE += -include asm/unified.h +AFLAGS += -msoft-float $(AFLAGS_THUMB2) # Machine directory name. This list is sorted alphanumerically # by CONFIG_* macro name.
@@ -166,9 +167,9 @@ board-$(CONFIG_MACH_SABRESD) := freescale-mx6-sabresd machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) ifeq ($(KBUILD_SRC),) -CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) +LINUXINCLUDE += $(patsubst %,-I%include,$(machdirs)) else -CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) +LINUXINCLUDE += $(patsubst %,-I$(srctree)/%include,$(machdirs)) endif TEXT_BASE = $(CONFIG_TEXT_BASE)
arch/mips/Makefile +4 -4
@@ -81,9 +81,9 @@ board-$(CONFIG_BOARD_RZX50) := rzx50 machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y)) ifeq ($(KBUILD_SRC),) -CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) +LINUXINCLUDE += $(patsubst %,-I%include,$(machdirs)) else -CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) +LINUXINCLUDE += $(patsubst %,-I$(srctree)/%include,$(machdirs)) endif ifeq ($(incdir-y),)
@@ -98,9 +98,9 @@ BOARD := endif ifeq ($(KBUILD_SRC),) -CPPFLAGS += -I$(BOARD)/include +LINUXINCLUDE += -I$(BOARD)/include else -CPPFLAGS += -I$(srctree)/$(BOARD)/include +LINUXINCLUDE += -I$(srctree)/$(BOARD)/include endif ifneq ($(machine-y),)
arch/ppc/Makefile +2 -2
@@ -31,9 +31,9 @@ endif machdirs := $(patsubst %,arch/ppc/mach-%/,$(machine-y)) ifeq ($(KBUILD_SRC),) -CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) +LINUXINCLUDE += $(patsubst %,-I%include,$(machdirs)) else -CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) +LINUXINCLUDE += $(patsubst %,-I$(srctree)/%include,$(machdirs)) endif archprepare: maketools
arch/sandbox/Makefile +2 -2
@@ -25,9 +25,9 @@ CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \ machdirs := $(patsubst %,arch/sandbox/mach-%/,$(machine-y)) ifeq ($(KBUILD_SRC),) -CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) +LINUXINCLUDE += $(patsubst %,-I%include,$(machdirs)) else -CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) +LINUXINCLUDE += $(patsubst %,-I$(srctree)/%include,$(machdirs)) endif SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
arch/x86/Makefile +2 -2
@@ -17,9 +17,9 @@ endif machdirs := $(patsubst %,arch/x86/mach-%/,$(machine-y)) ifeq ($(KBUILD_SRC),) -CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) +LINUXINCLUDE += $(patsubst %,-I%include,$(machdirs)) else -CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) +LINUXINCLUDE += $(patsubst %,-I$(srctree)/%include,$(machdirs)) endif ifneq ($(board-y),)
scripts/Makefile.lib +9 -4
@@ -130,16 +130,21 @@ __a_flags = $(call flags,_a_flags) __cpp_flags = $(call flags,_cpp_flags) endif -c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ +___c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ $(__c_flags) $(modkern_cflags) \ -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) -a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ +___a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ $(__a_flags) $(modkern_aflags) -cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags) +___cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags) -ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS) +___ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS) + +c_flags = $(LINUXINCLUDE) $(___c_flags) +a_flags = $(LINUXINCLUDE) $(AFLAGS_LINUXINCLUDE) $(___a_flags) +cpp_flags = $(LINUXINCLUDE) $(___cpp_flags) +ld_flags = $(___ld_flags) # Finds the multi-part object the current object will be linked into modname-multi = $(sort $(foreach m,$(multi-used),\
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/20 tlsf_malloc: drop duplicate include
config.h is not need and already inclued by Makefile
--- common/tlsf_malloc.c | 2 -- 1 file changed, 2 deletions(-)
common/tlsf_malloc.c +0 -2
@@ -17,10 +17,8 @@* */ -#include <config.h> #include <malloc.h> #include <string.h> -#include <malloc.h> #include <stdio.h> #include <module.h>
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedRe: [PATCH 02/20] tlsf_malloc: drop duplicate include
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
config.his not need and already inclued byMakefileSigned-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Applied, thanks
Sascha
Quoted 28 lines
--- common/tlsf_malloc.c | 2 -- 1 file changed, 2 deletions(-)common/tlsf_malloc.c +0
-2@@ -17,10 +17,8 @@* */ -#include <config.h> #include <malloc.h> #include <string.h> -#include <malloc.h> #include <stdio.h> #include <module.h> Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
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
PATCH 3/20 kbuild: add application (app) target
In reply to Jean-Christophe PLAGNIOL-VILLARDThis will allow to link compiled object (app-y) to the built-in-app.o across the source tree that will be finally link to the applications (app-final-y).
Now we compile the source %.c in app-%.o and provide -D__APP__ so we can known in the source when it's compile for barebox or pbl or app.
--- Makefile | 5 +++- scripts/Makefile.build | 78 +++++++++++++++++++++++++++++++++++++++++++++--- scripts/Makefile.lib | 23 ++++++++++++-- 3 files changed, 99 insertions(+), 7 deletions(-)
Makefile +4 -1
@@ -493,6 +493,7 @@ barebox-alldirs := $(sort $(barebox-dirs) $(patsubst %/,%,$(filter %/, \ $(core-n) $(core-) $(drivers-n) $(drivers-) \ $(net-n) $(net-) $(libs-n) $(libs-)))) +app-common-y := $(patsubst %/, %/built-in-app.o, $(common-y)) pbl-common-y := $(patsubst %/, %/built-in-pbl.o, $(common-y)) common-y := $(patsubst %/, %/built-in.o, $(common-y))
@@ -523,6 +524,8 @@ common-y := $(patsubst %/, %/built-in.o, $(common-y)) # System.map is generated to document addresses of all kernel symbols barebox-common := $(common-y) +barebox-app-common := $(app-common-y) +export barebox-app-common barebox-pbl-common := $(pbl-common-y) export barebox-pbl-common barebox-all := $(barebox-common)
@@ -733,7 +736,7 @@ barebox.srec: barebox # The actual objects are generated when descending, # make sure no implicit rule kicks in -$(sort $(barebox-head) $(barebox-common) ) $(barebox-lds) $(barebox-pbl-common): $(barebox-dirs) ; +$(sort $(barebox-head) $(barebox-common) ) $(barebox-lds) $(barebox-pbl-common) $(barebox-app-common): $(barebox-dirs) ; # Handle descending into subdirectories listed in $(barebox-dirs) # Preset locale variables to speed up the build process. Limit locale
scripts/Makefile.build +74 -4
135 lines not on this page · raw message
scripts/Makefile.lib +21 -2
@@ -40,6 +40,17 @@ pbl-y += $(__pbl-y) pbl-y := $(sort $(patsubst %/, %/built-in-pbl.o, $(pbl-y))) +# for non dirs add app- prefix to the target +# so we recompile the source with custom flags and custom quiet +__app-y := $(notdir $(app-y)) +app-y := $(patsubst %.o,app-%.o,$(__app-y)) +# add subdir from $(obj-y) and $(pbl-y)too so we do not need to have the dir define in +# both $(obj-y) and $(pbl-y) and $(app-y) +__app-y := $(filter-out $(app-y), $(filter %/, $(sort $(obj-y) $(pbl-y)))) +app-y += $(__app-y) + +app-y := $(sort $(patsubst %/, %/built-in-app.o, $(app-y))) + __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y))) subdir-y += $(__subdir-y) __subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m)))
@@ -65,9 +76,11 @@ multi-objs := $(multi-objs-y) $(multi-objs-m) # $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to # tell kbuild to descend -__subdir-obj-y := $(filter %/built-in-pbl.o, $(pbl-y)) +__subdir-pbl-y := $(filter %/built-in-pbl.o, $(pbl-y)) +__subdir-app-y := $(filter %/built-in-app.o, $(app-y)) subdir-obj-y := $(filter %/built-in.o, $(obj-y)) -subdir-obj-y += $(__subdir-obj-y) +subdir-obj-y += $(__subdir-pbl-y) +subdir-obj-y += $(__subdir-app-y) # $(obj-dirs) is a list of directories that contain object files obj-dirs := $(dir $(multi-objs) $(subdir-obj-y))
@@ -85,6 +98,7 @@ obj-y := $(addprefix $(obj)/,$(obj-y)) obj-m := $(addprefix $(obj)/,$(obj-m)) lib-y := $(addprefix $(obj)/,$(lib-y)) pbl-y := $(addprefix $(obj)/,$(pbl-y)) +app-y := $(addprefix $(obj)/,$(app-y)) subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y)) real-objs-y := $(addprefix $(obj)/,$(real-objs-y)) real-objs-m := $(addprefix $(obj)/,$(real-objs-m))
@@ -141,6 +155,11 @@ ___cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags) ___ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS) +app_c_flags = $(APPINCLUDE) $(___c_flags) +app_a_flags = $(APPINCLUDE) -D__ASSEMBLY__ $(___a_flags) +app_cpp_flags = $(APPINCLUDE) $(___cpp_flags) +app_ld_flags = $(___ld_flags) + c_flags = $(LINUXINCLUDE) $(___c_flags) a_flags = $(LINUXINCLUDE) $(AFLAGS_LINUXINCLUDE) $(___a_flags) cpp_flags = $(LINUXINCLUDE) $(___cpp_flags)
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/20 Introduce application (app) support
In reply to Jean-Christophe PLAGNIOL-VILLARD--- Makefile | 47 ++++- apps/Kconfig | 21 +++ apps/Makefile | 19 ++ apps/include/appinfo.h | 58 ++++++ arch/arm/Kconfig | 1 + commands/Kconfig | 7 + commands/Makefile | 1 + commands/appinfo.c | 119 +++++++++++++ common/Kconfig | 3 + include/apps/syscall_init.h | 23 +++ include/apps/syscalls.h | 76 ++++++++ include/apps/types.h | 24 +++ include/linux/license.h | 14 ++ lib/Makefile | 1 + lib/apps/Makefile | 1 + lib/apps/syscalls.c | 413 +++++++++++++++++++++++++++++++++++++++++++ 16 files changed, 825 insertions(+), 3 deletions(-) create mode 100644 apps/Kconfig create mode 100644 apps/Makefile create mode 100644 apps/include/appinfo.h create mode 100644 commands/appinfo.c create mode 100644 include/apps/syscall_init.h create mode 100644 include/apps/syscalls.h create mode 100644 include/apps/types.h create mode 100644 include/linux/license.h create mode 100644 lib/apps/Makefile create mode 100644 lib/apps/syscalls.c
Makefile +44 -3
@@ -297,6 +297,18 @@ LINUXINCLUDE := -Iinclude \ -include include/generated/autoconf.h \ -include $(srctree)/include/linux/kconfig.h +# Use APPINCLUDE when you must reference the include/ directory. +# Needed to be compatible with the O= option +APPINCLUDE := -Iapps/include \ + $(if $(KBUILD_SRC), -I$(srctree)/apps/include) \ + $(if $(KBUILD_SRC), -I$(objtree)/include) \ + -I$(srctree)/arch/$(ARCH)/include \ + -I$(objtree)/arch/$(ARCH)/include \ + -I$(srctree)/arch/$(ARCH)/apps/include \ + -I$(objtree)/apps/include \ + -include include/generated/autoconf.h \ + -include $(srctree)/include/linux/kconfig.h + CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ -fno-builtin -ffreestanding CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
@@ -315,9 +327,10 @@ export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS -export AFLAGS_LINUXINCLUDE +export APPINCLUDE AFLAGS_LINUXINCLUDE export CFLAGS CFLAGS_KERNEL export AFLAGS AFLAGS_KERNEL +export APP_LDFLAGS # Files to ignore in find ... statements
@@ -482,7 +495,18 @@ export KBUILD_BINARY ?= barebox.bin barebox-flash-image: $(KBUILD_IMAGE) FORCE $(call if_changed,ln) -all: barebox-flash-image +ifdef CONFIG_APPLICATIONS +apps-lds := $(apps-lds-y) +export apps-lds + +apps := apps +application: barebox-flash-image + $(Q)$(MAKE) $(build)=$(apps) $(apps)/$@ + +APPS-y += application +endif + +all: barebox-flash-image $(APPS-y) common-$(CONFIG_PBL_IMAGE) += pbl/
@@ -493,7 +517,7 @@ barebox-alldirs := $(sort $(barebox-dirs) $(patsubst %/,%,$(filter %/, \ $(core-n) $(core-) $(drivers-n) $(drivers-) \ $(net-n) $(net-) $(libs-n) $(libs-)))) -app-common-y := $(patsubst %/, %/built-in-app.o, $(common-y)) +app-common-y := $(patsubst %/, %/built-in-app.o, $(common-y) apps/) pbl-common-y := $(patsubst %/, %/built-in-pbl.o, $(common-y)) common-y := $(patsubst %/, %/built-in.o, $(common-y))
@@ -840,6 +864,23 @@ ifneq ($(KBUILD_SRC),) /bin/false; \ fi; $(Q)if [ ! -d include2 ]; then mkdir -p include2; fi; + $(Q)if [ ! -d apps/include ]; then mkdir -p apps/include; fi; + $(Q)if [ ! -d apps/include/barebox ]; then mkdir -p apps/include/barebox; fi; + $(Q)if [ ! -h apps/include/linux ]; then \ + ln -fsn $(srctree)/include/linux apps/include/linux; \ + fi; + $(Q)if [ ! -h apps/include/asm-generic ]; then \ + ln -fsn $(srctree)/include/asm-generic apps/include/asm-generic; \ + fi; + $(Q)if [ ! -h apps/include/generated ]; then \ + ln -fsn $(objtree)/include/generated apps/include/generated; \ + fi; + $(Q)if [ ! -e apps/include/barebox/fcntl.h ]; then \ + ln -fsn $(srctree)/include/fcntl.h apps/include/barebox/fcntl.h; \ + fi; + $(Q)if [ ! -e apps/include/barebox/types.h ]; then \ + ln -fsn $(srctree)/include/apps/types.h apps/include/barebox/types.h; \ + fi; $(Q)if [ -e $(srctree)/include/asm-$(SRCARCH)/barebox.h ]; then \ ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \ fi
apps/Kconfig new file +21 -0
@@ -0,0 +1,21 @@ +menuconfig APPLICATIONS + bool "Applications" + depends on HAS_APPLICATIONS + depends on EXPERIMENTAL + help + This option enables support for running applications. + +if APPLICATIONS + +menu "memory layout" + +source "arch/$SRCARCH/apps/Kconfig" + +config APP_MALLOC_SIZE + hex + default 0x400000 + prompt "malloc area size" + +endmenu + +endif
apps/Makefile new file +19 -0
@@ -0,0 +1,19 @@ + +CPPFLAGS += -I$(srctree)/apps/include + +$(obj)/application: $(apps-lds) $(apps-y) + +APP_CPPFLAGS += -fdata-sections -ffunction-sections + +$(obj)/include/types.h: $(srctree)/include/types.h + $(call cmd,shipped) + +$(obj)/include/barebox/syscalls.h: $(srctree)/include/apps/syscalls.h + $(call cmd,shipped) + +$(obj)/include/errno.h: $(srctree)/include/asm-generic/errno.h + $(call cmd,shipped) + +barebox-app-header += $(obj)/include/types.h +barebox-app-header += $(obj)/include/errno.h +barebox-app-header += $(obj)/include/barebox/syscalls.h
apps/include/appinfo.h new file +58 -0
58 lines not on this page · raw message
arch/arm/Kconfig +1 -0
@@ -236,3 +236,4 @@ source drivers/Kconfig source fs/Kconfig source lib/Kconfig source crypto/Kconfig +source apps/Kconfig
commands/Kconfig +7 -0
@@ -242,6 +242,13 @@ config CMD_FILETYPE select FILETYPE prompt "filetype" +config CMD_APPINFO + tristate + depends on APPLICATIONS + prompt "appinfo" + help + dump barebox applicaion info + endmenu menu "console"
commands/Makefile +1 -0
@@ -1,3 +1,4 @@ +obj-$(CONFIG_CMD_APPINFO) += appinfo.o obj-$(CONFIG_STDDEV) += stddev.o obj-$(CONFIG_CMD_BOOTM) += bootm.o obj-$(CONFIG_CMD_UIMAGE) += uimage.o
commands/appinfo.c new file +119 -0
119 lines not on this page · raw message
common/Kconfig +3 -0
@@ -21,6 +21,9 @@ config HAS_KALLSYMS config HAS_MODULES bool +config HAS_APPLICATIONS + bool + config CMD_MEMORY bool
include/apps/syscall_init.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +*/ + +#ifndef __APPS_SYSCALL_INIT_H__ +#define __APPS_SYSCALL_INIT_H__ + +#include <types.h> + +struct syscall_trace { +struct list_head dirs; +struct list_head fds; +void *dest; +uint64_t malloc_base; +uint32_t malloc_size; +}; + +void syscalls_init (struct syscall_trace *t); +void syscalls_exit (struct syscall_trace *t); + +#endif /* __APPS_SYSCALL_INIT_H__ */
include/apps/syscalls.h new file +76 -0
76 lines not on this page · raw message
include/apps/types.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +*/ + +#ifndef __APPS_TYPES_H__ +#define __APPS_TYPES_H__ + +#ifndef __APP__ +#define APP_TYPE_ (x) APP_##x +#else +#define APP_TYPE_ (x) x +#endif + +struct APP_TYPE_ (dirent) { +char d_name[256 ]; +}; + +typedef struct APP_TYPE_(dir) { + struct APP_TYPE_(dirent) d; +}APP_TYPE_ (DIR ); + +#endif /* __APPS_TYPES_H__ */
include/linux/license.h new file +14 -0
@@ -0,0 +1,14 @@ +#ifndef __LICENSE_H +#define __LICENSE_H + +static inline int license_is_gpl_compatible (const char *license) +{ +return (strcmp (license,"GPL" ) ==0 + ||strcmp (license,"GPL v2" ) ==0 + ||strcmp (license,"GPL and additional rights" ) ==0 + ||strcmp (license,"Dual BSD/GPL" ) ==0 + ||strcmp (license,"Dual MIT/GPL" ) ==0 + ||strcmp (license,"Dual MPL/GPL" ) ==0 ); +} + +#endif
lib/Makefile +1 -0
@@ -42,3 +42,4 @@ obj-$(CONFIG_LIBMTD) += libmtd.o obj-y += gui/ obj-$(CONFIG_XYMODEM) += xymodem.o obj-y += unlink-recursive.o +obj-$(CONFIG_APPLICATIONS) += apps/
lib/apps/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-y += syscalls.o
lib/apps/syscalls.c new file +413 -0
413 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 5/20 app: Introduce libc support
In reply to Jean-Christophe PLAGNIOL-VILLARDwith dummy malloc or tslf malloc
and provide a pseudo libc to simplify application porting
--- apps/Kconfig | 19 ++ apps/Makefile | 10 +- apps/include/appinfo.h | 2 + apps/include/assert.h | 32 +++ apps/include/common.h | 28 ++ apps/include/ctype.h | 100 +++++++ apps/include/dirent.h | 24 ++ apps/include/errno.h | 24 ++ apps/include/fcntl.h | 25 ++ apps/include/getopt.h | 76 ++++++ apps/include/libc_config.h | 139 ++++++++++ apps/include/limits.h | 38 +++ apps/include/malloc.h | 30 +++ apps/include/module.h | 3 + apps/include/sections.h | 29 ++ apps/include/setjmp.h | 25 ++ apps/include/stddef.h | 1 + apps/include/stdint.h | 23 ++ apps/include/stdio.h | 70 +++++ apps/include/stdlib.h | 29 ++ apps/include/string.h | 53 ++++ apps/include/sys/ioctl.h | 12 + apps/include/sys/stat.h | 14 + apps/include/sys/syscall.h | 14 + apps/include/sys/types.h | 15 ++ apps/include/time.h | 27 ++ apps/include/unistd.h | 46 ++++ apps/libc/Kconfig | 25 ++ apps/libc/Makefile | 36 +++ apps/libc/appinfo.c | 35 +++ apps/libc/dirent.c | 59 +++++ apps/libc/errno.c | 19 ++ apps/libc/fcntl.c | 25 ++ apps/libc/flags.c | 76 ++++++ apps/libc/getopt.c | 127 +++++++++ apps/libc/getopt_long.c | 625 ++++++++++++++++++++++++++++++++++++++++++++ apps/libc/malloc.c | 50 ++++ apps/libc/malloc.h | 2 + apps/libc/private.h | 18 ++ apps/libc/stdio.c | 275 +++++++++++++++++++ apps/libc/stdlib.c | 77 ++++++ apps/libc/string.c | 159 +++++++++++ apps/libc/sys/Makefile | 2 + apps/libc/sys/stat.c | 25 ++ apps/libc/syscalls.c | 103 ++++++++ apps/libc/time.c | 41 +++ apps/libc/unistd.c | 108 ++++++++ 47 files changed, 2791 insertions(+), 4 deletions(-) create mode 100644 apps/include/assert.h create mode 100644 apps/include/common.h create mode 100644 apps/include/ctype.h create mode 100644 apps/include/dirent.h create mode 100644 apps/include/errno.h create mode 100644 apps/include/fcntl.h create mode 100644 apps/include/getopt.h create mode 100644 apps/include/libc_config.h create mode 100644 apps/include/limits.h create mode 100644 apps/include/malloc.h create mode 100644 apps/include/module.h create mode 100644 apps/include/sections.h create mode 100644 apps/include/setjmp.h create mode 100644 apps/include/stddef.h create mode 100644 apps/include/stdint.h create mode 100644 apps/include/stdio.h create mode 100644 apps/include/stdlib.h create mode 100644 apps/include/string.h create mode 100644 apps/include/sys/ioctl.h create mode 100644 apps/include/sys/stat.h create mode 100644 apps/include/sys/syscall.h create mode 100644 apps/include/sys/types.h create mode 100644 apps/include/time.h create mode 100644 apps/include/unistd.h create mode 100644 apps/libc/Kconfig create mode 100644 apps/libc/Makefile create mode 100644 apps/libc/appinfo.c create mode 100644 apps/libc/dirent.c create mode 100644 apps/libc/errno.c create mode 100644 apps/libc/fcntl.c create mode 100644 apps/libc/flags.c create mode 100644 apps/libc/getopt.c create mode 100644 apps/libc/getopt_long.c create mode 100644 apps/libc/malloc.c create mode 100644 apps/libc/malloc.h create mode 100644 apps/libc/private.h create mode 100644 apps/libc/stdio.c create mode 100644 apps/libc/stdlib.c create mode 100644 apps/libc/string.c create mode 100644 apps/libc/sys/Makefile create mode 100644 apps/libc/sys/stat.c create mode 100644 apps/libc/syscalls.c create mode 100644 apps/libc/time.c create mode 100644 apps/libc/unistd.c
apps/Kconfig +19 -0
@@ -7,6 +7,8 @@ menuconfig APPLICATIONS if APPLICATIONS +source "apps/libc/Kconfig" + menu "memory layout" source "arch/$SRCARCH/apps/Kconfig"
@@ -16,6 +18,23 @@ config APP_MALLOC_SIZE default 0x400000 prompt "malloc area size" +config APP_PATH_MAX + hex + default 4096 + prompt "path max" + +config APP_ENV_MAX + hex + default 4096 + prompt "env var max size" + +config APP_FILE_MAX + int + default 128 + prompt "maximun number of FILE" + help + this does not include stdin, stderr, stdout + endmenu endif
apps/Makefile +6 -4
@@ -1,5 +1,9 @@ -CPPFLAGS += -I$(srctree)/apps/include +APP_CPPFLAGS += -include $(srctree)/apps/include/libc_config.h +APP_CPPFLAGS += -I$(srctree)/apps/include +export APP_CPPFLAGS + +apps-$(CONFIG_APP_EXAMPLE) += example $(obj)/application: $(apps-lds) $(apps-y)
@@ -11,9 +15,7 @@ $(obj)/include/types.h: $(srctree)/include/types.h $(obj)/include/barebox/syscalls.h: $(srctree)/include/apps/syscalls.h $(call cmd,shipped) -$(obj)/include/errno.h: $(srctree)/include/asm-generic/errno.h - $(call cmd,shipped) +obj-y += libc/ barebox-app-header += $(obj)/include/types.h -barebox-app-header += $(obj)/include/errno.h barebox-app-header += $(obj)/include/barebox/syscalls.h
apps/include/appinfo.h +2 -0
@@ -55,4 +55,6 @@/* What your application does. */ #define APP_DESCRIPTION (_description) APP_INFO(description, _description) +void print_appinfo (void ); +#endif /* __APPINFO_H__ */
apps/include/assert.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __ASSERT_H__ +#define __ASSERT_H__ + +#define NDEBUG +#if defined(NDEBUG ) || defined(CONFIG_APP_NDEBUG ) +#define assert (expression) +#else +#define assert (expression) do { \ + if (expression) { \ + fprintf(stderr, "%s:%d: ", str(expression), __FUNCTION__, __LINE__); \ + exit(EXIT_FAILURE); \ + } \ +} while(0) +#endif + +#endif /* __ASSERT_H__ */
apps/include/common.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __COMMON_H__ +#define __COMMON_H__ + +#include <linux/types.h> +#include <linux/string.h> +#include <linux/stddef.h> +#include <stdio.h> + +#define BUG () do { \ +} while (0) + +#endif /* __COMMON_H__ */
apps/include/ctype.h new file +100 -0
100 lines not on this page · raw message
apps/include/dirent.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __DIRENT_H__ +#define __DIRENT_H__ + +DIR *opendir (const char *name); +struct dirent *readdir (DIR *dir); +int closedir (DIR *dir); + +#endif /* __DIRENT_H__ */
apps/include/errno.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __ERRNO_H__ +#define __ERRNO_H__ + +#include <asm-generic/errno.h> + +extern int errno; + +#endif /* __ERRNO_H__ */
apps/include/fcntl.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __FCNTL_H__ +#define __FCNTL_H__ + +#include <barebox/fcntl.h> + +/* barebox does not handle the last optionnal arg */ +int open (const char *name,int flags, ...); + +#endif /* __FCNTL_H__ */
apps/include/getopt.h new file +76 -0
76 lines not on this page · raw message
apps/include/libc_config.h new file +139 -0
139 lines not on this page · raw message
apps/include/limits.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __LIMITS_H__ +#define __LIMITS_H__ + +#include <sys/types.h> + +#define USHORT_MAX ((u16)(~0U)) +#define SHORT_MAX ((s16)(USHORT_MAX>>1)) +#define SHORT_MIN (-SHORT_MAX - 1) +#define INT_MAX ((int)(~0U>>1)) +#define INT_MIN (-INT_MAX - 1) +#define UINT_MAX (~0U) +#define LONG_MAX ((long)(~0UL>>1)) +#define LONG_MIN (-LONG_MAX - 1) +#define ULONG_MAX (~0UL) +#define LLONG_MAX ((long long)(~0ULL>>1)) +#define LLONG_MIN (-LLONG_MAX - 1) +#define ULLONG_MAX (~0ULL) + +#define PATH_MAX CONFIG_APP_PATH_MAX +#define ENV_MAX CONFIG_APP_ENV_MAX + +#endif /* __LIMITS_H__ */
apps/include/malloc.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __MALLOC_H +#define __MALLOC_H + +#include <types.h> + +void *malloc (size_t ); +void free (void *); +void *realloc (void *,size_t ); +void *memalign (size_t ,size_t ); +void *calloc (size_t ,size_t ); +void cfree (void *); + +#endif +
apps/include/module.h new file +3 -0
@@ -0,0 +1,3 @@ +#define EXPORT_SYMBOL (sym) +#define EXPORT_SYMBOL_GPL (sym) +
apps/include/sections.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef _APPS_GENERIC_SECTIONS_H_ +#define _APPS_GENERIC_SECTIONS_H_ + +extern char _text[], _stext[], _etext[]; +extern char __bss_start[], __bss_stop[]; +extern char _sdata[], _edata[]; +extern char _end[]; +extern void *_barebox_app_image_size; +extern char __appinfo_start[], __appinfo_end[]; + +#define _barebox_app_image_size (unsigned int)&_barebox_app_image_size + +#endif /* _APPS_GENERIC_SECTIONS_H_ */
apps/include/setjmp.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __SETJMP_H__ +#define __SETJMP_H__ + +#include <arch/setjmp.h> + +int setjmp (jmp_buf ); +void __attribute__((noreturn))longjmp (jmp_buf ,int ); + +#endif /* __SETJMP_H__ */
apps/include/stddef.h new file +1 -0
@@ -0,0 +1 @@ +
apps/include/stdint.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __STDINT_H__ +#define __STDINT_H__ + +#define INT64_C (c) (c ## LL) +#define UINT64_C (c) (c ## ULL) + +#endif /* __STDINT_H__ */
apps/include/stdio.h new file +70 -0
70 lines not on this page · raw message
apps/include/stdlib.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __STDLIB_H__ +#define __STDLIB_H__ + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 + +char *getenv (const char *name); +void exit (int num); +int atoi (const char *s); +long atol (const char *s); +long long atoll (const char *s); + +#endif /* __STDLIB_H__ */
apps/include/string.h new file +53 -0
53 lines not on this page · raw message
apps/include/sys/ioctl.h new file +12 -0
@@ -0,0 +1,12 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +*/ + +#ifndef __SYS_IOCTL_H__ +#define __SYS_IOCTL_H__ + +int ioctl (int fd,int request,void *buf); + +#endif /* __SYS_IOCTL_H__ */
apps/include/sys/stat.h new file +14 -0
@@ -0,0 +1,14 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +*/ + +#ifndef __SYS_STAT_H__ +#define __SYS_STAT_H__ + +#include <linux/stat.h> + +int mkdir (const char *path,mode_t mode); + +#endif /* __SYS_STAT_H__ */
apps/include/sys/syscall.h new file +14 -0
@@ -0,0 +1,14 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +*/ + +#ifndef __SYS_SYSCALL_H__ +#define __SYS_SYSCALL_H__ + +#include <errno.h> + +int syscall (int num, ...); + +#endif /* __SYS_SYSCALL_H__ */
apps/include/sys/types.h new file +15 -0
@@ -0,0 +1,15 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +*/ + +#ifndef __SYS_TYPES_H__ +#define __SYS_TYPES_H__ + +#include <linux/types.h> +#include <barebox/types.h> + +typedef unsigned int useconds_t ; + +#endif /* __SYS_TYPES_H__ */
apps/include/time.h new file +27 -0
@@ -0,0 +1,27 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __TIME_H__ +#define __TIME_H__ + +struct timespec { +time_t tv_sec;/* seconds */ +long tv_nsec;/* nanoseconds */ +}; + +int nanosleep (const struct timespec *req,struct timespec *rem); + +#endif /* __TIME_H__ */
apps/include/unistd.h new file +46 -0
46 lines not on this page · raw message
apps/libc/Kconfig new file +25 -0
@@ -0,0 +1,25 @@ +menu "libc" + +choice + prompt "malloc implementation" + +config APPS_MALLOC_TLSF + bool "tlsf" + +config APPS_MALLOC_DUMMY + bool "dummy malloc" + help + select this option to use a dummy malloc implementation. With this + memory is never freed. This is suitable for well tested noninteractive + environments only. + +endchoice + +config APP_GETOPT_LONG_AS_GETOPT + bool "use getopt_long as getopt" + +config APP_PRINTF_STACK_SIZE + hex "printf stack size" + default 0x1000 + +endmenu
apps/libc/Makefile new file +36 -0
@@ -0,0 +1,36 @@ +app-y += appinfo.o +app-y += dirent.o +app-y += errno.o +app-y += fcntl.o +app-y += flags.o +ifneq ($(CONFIG_APP_GETOPT_LONG_AS_GETOPT),y) +app-y += getopt.o +endif +app-y += getopt_long.o +app-y += malloc.o +app-y += stdio.o +app-y += stdlib.o +app-y += syscalls.o +app-y += unistd.o +app-$(CONFIG_APPS_MALLOC_DUMMY) += dummy_malloc.o +app-$(CONFIG_APPS_MALLOC_TLSF) += tlsf_malloc.o tlsf.o +app-y += string.o +obj-y += sys/ +app-y += time.o + +$(obj)/dummy_malloc.c: $(srctree)/common/dummy_malloc.c FORCE + $(call cmd,shipped) + +$(obj)/tlsf.c: $(srctree)/common/tlsf.c $(obj)/tlsfbits.h FORCE + $(call cmd,shipped) + +$(obj)/tlsf_malloc.c: $(srctree)/common/tlsf_malloc.c $(obj)/tlsf.h FORCE + $(call cmd,shipped) + +$(obj)/tlsfbits.h: $(srctree)/common/tlsfbits.h FORCE + $(call cmd,shipped) + +$(obj)/tlsf.h: $(srctree)/include/tlsf.h FORCE + $(call cmd,shipped) + +$(obj)/app-malloc.o: $(obj)/tlsfbits.h
apps/libc/appinfo.c new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#include <sections.h> +#include <stdio.h> +#include <string.h> + +#include <appinfo.h> +#include <libc_config.h> + +void print_appinfo (void ) +{ +char *info = (char *)&__appinfo_start; + +for (; info < (char *)&__appinfo_end; info +=strlen (info) +1 ) +printf ("%s\n" , info); +} + +APP_INFO(libc, "barebox libc") +APP_INFO(libc_author, "Jean-Christophe PLANGIOL-VILLARD <[email protected]>") +APP_INFO(libc_license, "GPLv2 + exception") +APP_INFO (libc_version,LIBC_VERSION_STRING )
apps/libc/dirent.c new file +59 -0
59 lines not on this page · raw message
apps/libc/errno.c new file +19 -0
@@ -0,0 +1,19 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#include <errno.h> + +int errno;
apps/libc/fcntl.c new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#include <barebox/syscalls.h> +#include <sys/syscall.h> +#include <fcntl.h> + +/* barebox does not handle the last optionnal arg */ +int open (const char *name,int flags, ...) +{ +return syscall (SYS_open, name, flags); +}
apps/libc/flags.c new file +76 -0
76 lines not on this page · raw message
apps/libc/getopt.c new file +127 -0
127 lines not on this page · raw message
apps/libc/getopt_long.c new file +625 -0
625 lines not on this page · raw message
apps/libc/malloc.c new file +50 -0
50 lines not on this page · raw message
apps/libc/malloc.h new file +2 -0
@@ -0,0 +1,2 @@ + +void mem_malloc_init (void *start,void *end);
apps/libc/private.h new file +18 -0
@@ -0,0 +1,18 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +*/ + +#ifndef __LIBC_PRIVATE_H__ +#define __LIBC_PRIVATE_H__ + +extern char *__progname; +int __str_to_flags (const char *mode,int *flag); + +struct __file { +int fd; +struct __file *cookie;/* to check the file is open */ +}; + +#endif /* __LIBC_PRIVATE_H__ */
apps/libc/stdio.c new file +275 -0
275 lines not on this page · raw message
apps/libc/stdlib.c new file +77 -0
77 lines not on this page · raw message
apps/libc/string.c new file +159 -0
159 lines not on this page · raw message
apps/libc/sys/Makefile new file +2 -0
@@ -0,0 +1,2 @@ + +app-y += stat.o
apps/libc/sys/stat.c new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#include <barebox/syscalls.h> +#include <sys/syscall.h> +#include <sys/stat.h> +#include <sys/types.h> + +int mkdir (const char *path,mode_t mode) +{ +return syscall (SYS_mkdir, path, mode); +}
apps/libc/syscalls.c new file +103 -0
103 lines not on this page · raw message
apps/libc/time.c new file +41 -0
41 lines not on this page · raw message
apps/libc/unistd.c new file +108 -0
108 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 6/20 app: add some utils
In reply to Jean-Christophe PLAGNIOL-VILLARD - getchar_timeout
- term (try to detect terminal size, position, ansi helper)
- list
--- apps/Makefile | 1 + apps/include/utils/ansi.h | 37 ++++++++++++++ apps/include/utils/getchar.h | 22 ++++++++ apps/include/utils/list.h | 114 ++++++++++++++++++++++++++++++++++++++++++ apps/include/utils/termcap.h | 23 +++++++++ apps/utils/Makefile | 2 + apps/utils/getchar.c | 43 ++++++++++++++++ apps/utils/termcap.c | 97 +++++++++++++++++++++++++++++++++++ 8 files changed, 339 insertions(+) create mode 100644 apps/include/utils/ansi.h create mode 100644 apps/include/utils/getchar.h create mode 100644 apps/include/utils/list.h create mode 100644 apps/include/utils/termcap.h create mode 100644 apps/utils/Makefile create mode 100644 apps/utils/getchar.c create mode 100644 apps/utils/termcap.c
apps/Makefile +1 -0
@@ -16,6 +16,7 @@ $(obj)/include/barebox/syscalls.h: $(srctree)/include/apps/syscalls.h $(call cmd,shipped) obj-y += libc/ +obj-y += utils/ barebox-app-header += $(obj)/include/types.h barebox-app-header += $(obj)/include/barebox/syscalls.h
apps/include/utils/ansi.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __UTILS_ANSI_H__ +#define __UTILS_ANSI_H__ + +#define ansi_escape_m (d) printf("\e[%dm", d); +#define ansi_save_cusror () printf("\e[s") +#define ansi_restore_cusror () printf("\e[u") +#define ansi_set_cursor (row, col) printf("\e[%d;%dH", row, col) +#define ansi_reverse (on) ansi_escape_m((on) ? 7 : 27) +#define ansi_start_reverse () ansi_escape_m(7) +#define ansi_end_reverse () ansi_escape_m(27) +#define ansi_cursor_enable (on) printf( "\e[?25%c", ( on ) ? 'h' : 'l' ); +#define ansi_clear () printf("\e[2J\e[;H"); +#define ansi_bold (on) ansi_escape_m((on) ? 1 : 22) +#define ansi_blink (on) ansi_escape_m((on) ? 5 : 25) +#define ansi_start_bold () ansi_escape_m(1) +#define ansi_end_bold () ansi_escape_m(22) +#define ansi_start_altcharset () ansi_escape_m(14) +#define ansi_end_altcharset () ansi_escape_m(10) +#define ansi_set_color (fg,bg) printf("\e[%d;%dm", fg, bg) + +#endif /* __UTILS_ANSI_H__ */
apps/include/utils/getchar.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __UTILS_GETCHAR_H__ +#define __UTILS_GETCHAR_H__ + +int getchar_timeout (int ms); + +#endif /* __UTILS_GETCHAR_H__ */
apps/include/utils/list.h new file +114 -0
114 lines not on this page · raw message
apps/include/utils/termcap.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __TERMCAP_H__ +#define __TERMCAP_H__ + +int term_get_size (int *row,int *col); +int term_get_cursor_pos (int *row,int *col); + +#endif /* __TERMCAP_H__ */
apps/utils/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +app-y += termcap.o +app-y += getchar.o
apps/utils/getchar.c new file +43 -0
43 lines not on this page · raw message
apps/utils/termcap.c new file +97 -0
97 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 06/20] app: add some utils
Quoted 17 lines · Jean-Christophe PLAGNIOL-VILLARD
-
getchar_timeout
- term (try to detect terminal size, position, ansi helper)
- listSigned-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>---
apps/include/utils/list.h new file +5
-0@@ -0,0 +1,114 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +*
apps/include/utils/list.h line 15
Quoted 10 lines
apps/include/utils/list.h new file +10
-0+* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/
This looks suspiciously like the Linux list implementation which I think you haven't written. Also who gives you the right to add this licence exception to code you do not own?
Sascha
Quoted 99 lines
apps/include/utils/list.h new file +99
-0+ +#ifndef __UTILS_LIST_H__ +#define __UTILS_LIST_H__ + +struct list_entry { +struct list_entry *prev; +struct list_entry *next; +}; + +struct list { +struct list_entry head; +}; + +#define LIST_HEAD_INIT (name) \ + { \ + .head = { \ + .prev = &(name).head, \ + .next = &(name).head \ + } \ + } + +#define LIST_HEAD (name) \ + struct list name = LIST_HEAD_INIT(name) + +#define container_of (ptr, type, member) \ + ((type *) (((void *)(ptr)) - ((void *) &(((type *)0)->member)))) + +#define list_entry (ptr, type, member) \ + container_of(ptr, type, member) + +#define list_first_entry (ptr, type, member) \ + list_entry((ptr)->head.next, type, member) + +#define list_last_entry (head, type, member) \ + list_entry((head)->head.prev, type, member) + +#define list_for_each (pos, list) \ + for (pos = (list).head.next; pos != &(list).head; pos = pos->next) + +#define list_foreach_safe (pos, n, list) \ + for (pos = (list).head.next, *n = pos->next; \ + pos != &(list).head; pos = n, n = pos->next) + +#define list_for_each_entry (pos, list, member) \ + for (pos = list_entry((list)->head.next, typeof(*pos), member); \ + &pos->member != (&(list)->head); \ + pos = list_entry(pos->member.next, typeof(*pos), member)) + + +#define list_for_each_entry_safe (pos, n, list, member) \ + for (pos = list_entry((list)->head.next, typeof(*pos), member), \ + n = list_entry(pos->member.next, typeof(*pos), member); \ + &pos->member != (&(list)->head); \ + pos = n, n = list_entry(n->member.next, typeof(*n), member)) + + +static inline bool list_empty (struct list *list) +{ +struct list_entry *head = &list->head; + +return head->next == head; +} + +static inline void __list_add (struct list_entry *new, +struct list_entry *prev, +struct list_entry *next) +{ + next->prev = new; + new->next = next; + new->prev = prev; + prev->next = new; +} + +static inline void list_add (struct list_entry *new,struct list *list) +{ +struct list_entry *head = &list->head; + +__list_add (new, head, head->next); +} + +static inline void list_add_tail (struct list_entry *new,struct list *list) +{ +struct list_entry *head = &list->head; + +__list_add (new, head->prev, head); +} + +static inline void list_del (struct list_entry *entry) +{ +struct list_entry *prev = entry->prev; +struct list_entry *next = entry->next; + + next->prev = prev; + prev->next = next; + entry->next =NULL ; + entry->prev =NULL ; +} + +#endif /* __UTILS_LIST_H__ */
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 06/20] app: add some utils
Quoted 24 lines · Sascha Hauer
Quoted 23 lines · Jean-Christophe PLAGNIOL-VILLARD
-
getchar_timeout
- term (try to detect terminal size, position, ansi helper)
- listSigned-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>---
apps/include/utils/list.h new file +11
-0@@ -0,0 +1,114 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License.
Quoted 8 lines
apps/include/utils/list.h line 15
Quoted 4 lines
apps/include/utils/list.h new file +4
-0+ +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ This looks suspiciously like the Linux list implementation which I think you haven't written. Also who gives you the right to add this licence exception to code you do not own?
I did wrote this for years about 10 I just update the code to looks like the linux one so I do own the code
Best Regards,
J.
Quoted 94 lines
Sascha
Quoted 91 lines
apps/include/utils/list.h new file +91
-0+ +#ifndef __UTILS_LIST_H__ +#define __UTILS_LIST_H__ + +struct list_entry { +struct list_entry *prev; +struct list_entry *next; +}; + +struct list { +struct list_entry head; +}; + +#define LIST_HEAD_INIT (name) \ + { \ + .head = { \ + .prev = &(name).head, \ + .next = &(name).head \ + } \ + } + +#define LIST_HEAD (name) \ + struct list name = LIST_HEAD_INIT(name) + +#define container_of (ptr, type, member) \ + ((type *) (((void *)(ptr)) - ((void *) &(((type *)0)->member)))) + +#define list_entry (ptr, type, member) \ + container_of(ptr, type, member) + +#define list_first_entry (ptr, type, member) \ + list_entry((ptr)->head.next, type, member) + +#define list_last_entry (head, type, member) \ + list_entry((head)->head.prev, type, member) + +#define list_for_each (pos, list) \ + for (pos = (list).head.next; pos != &(list).head; pos = pos->next) + +#define list_foreach_safe (pos, n, list) \ + for (pos = (list).head.next, *n = pos->next; \ + pos != &(list).head; pos = n, n = pos->next) + +#define list_for_each_entry (pos, list, member) \ + for (pos = list_entry((list)->head.next, typeof(*pos), member); \ + &pos->member != (&(list)->head); \ + pos = list_entry(pos->member.next, typeof(*pos), member)) + + +#define list_for_each_entry_safe (pos, n, list, member) \ + for (pos = list_entry((list)->head.next, typeof(*pos), member), \ + n = list_entry(pos->member.next, typeof(*pos), member); \ + &pos->member != (&(list)->head); \ + pos = n, n = list_entry(n->member.next, typeof(*n), member)) + + +static inline bool list_empty (struct list *list) +{ +struct list_entry *head = &list->head; + +return head->next == head; +} + +static inline void __list_add (struct list_entry *new, +struct list_entry *prev, +struct list_entry *next) +{ + next->prev = new; + new->next = next; + new->prev = prev; + prev->next = new; +} + +static inline void list_add (struct list_entry *new,struct list *list) +{ +struct list_entry *head = &list->head; + +__list_add (new, head, head->next); +} + +static inline void list_add_tail (struct list_entry *new,struct list *list) +{ +struct list_entry *head = &list->head; + +__list_add (new, head->prev, head); +} + +static inline void list_del (struct list_entry *entry) +{ +struct list_entry *prev = entry->prev; +struct list_entry *next = entry->next;
Quoted 13 lines
Quoted 8 lines
apps/include/utils/list.h new file +8
-0+ + next->prev = prev; + prev->next = next; + entry->next =NULL ; + entry->prev = NULL; +} + +#endif /* __UTILS_LIST_H__ */ 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 06/20] app: add some utils
Quoted 33 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 24 lines · Sascha Hauer
Quoted 23 lines · Jean-Christophe PLAGNIOL-VILLARD
-
getchar_timeout
- term (try to detect terminal size, position, ansi helper)
- listSigned-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>---
apps/include/utils/list.h new file +11
-0@@ -0,0 +1,114 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. Quoted 8 lines
apps/include/utils/list.h line 15
Quoted 4 lines
apps/include/utils/list.h new file +4
-0+ +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ This looks suspiciously like the Linux list implementation which I think you haven't written. Also who gives you the right to add this licence exception to code you do not own?
Quoted 2 lines
I did wrote this for years about 10 I just update the code to looks like the linux one so I do own the code
LOL. I've written my own OS 25 years ago, I just updated the code to look like Linux.
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 06/20] app: add some utils
Quoted 34 lines · Sascha Hauer
Quoted 33 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 32 lines · Sascha Hauer
Quoted 17 lines · Jean-Christophe PLAGNIOL-VILLARD
-
getchar_timeout
- term (try to detect terminal size, position, ansi helper)
- listSigned-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>---
apps/include/utils/list.h new file +5
-0@@ -0,0 +1,114 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* apps/include/utils/list.h line 15
Quoted 10 lines
apps/include/utils/list.h new file +10
-0+* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ This looks suspiciously like the Linux list implementation which I think you haven't written. Also who gives you the right to add this licence exception to code you do not own?
Quoted 6 lines
Quoted 2 lines
I did wrote this for years about 10 I just update the code to looks like the linux one so I do own the code
LOL. I've written my own OS 25 years ago, I just updated the code to look like Linux.
lol... other question: why we need a second list implementation? In order to not be dependent on linux headers?
Alex
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH 7/20 app: Introduce example application
In reply to Jean-Christophe PLAGNIOL-VILLARD--- apps/Kconfig | 3 + apps/Makefile | 5 ++ apps/example/Makefile | 14 +++ apps/example/example.h | 7 ++ apps/example/list.c | 98 ++++++++++++++++++++ apps/example/ls.c | 127 ++++++++++++++++++++++++++ apps/example/main.c | 231 ++++++++++++++++++++++++++++++++++++++++++++++++ apps/example/setjmp.c | 24 +++++ 8 files changed, 509 insertions(+) create mode 100644 apps/example/Makefile create mode 100644 apps/example/example.h create mode 100644 apps/example/list.c create mode 100644 apps/example/ls.c create mode 100644 apps/example/main.c create mode 100644 apps/example/setjmp.c
apps/Kconfig +3 -0
@@ -37,4 +37,7 @@ config APP_FILE_MAX endmenu +config APP_EXAMPLE + bool "example" + endif
apps/Makefile +5 -0
@@ -5,6 +5,8 @@ export APP_CPPFLAGS apps-$(CONFIG_APP_EXAMPLE) += example +apps-$(CONFIG_APP_EXAMPLE) += example + $(obj)/application: $(apps-lds) $(apps-y) APP_CPPFLAGS += -fdata-sections -ffunction-sections
@@ -20,3 +22,6 @@ obj-y += utils/ barebox-app-header += $(obj)/include/types.h barebox-app-header += $(obj)/include/barebox/syscalls.h + +$(apps-y): $(barebox-app-header) $(barebox-app-common) + $(Q)$(MAKE) $(build)=apps/$@ apps/$@/[email protected]
apps/example/Makefile new file +14 -0
@@ -0,0 +1,14 @@ +targets := example.map + +# Make sure files are removed during clean +extra-y += example.map + +app-y += main.o +app-y += ls.o +app-y += list.o +app-y += setjmp.o +app-final-y = example + +OBJCOPYFLAGS_example.app = -O binary +LDFLAGS_apps := -Map $(obj)/example.map +LDFLAGS_apps += -static --gc-sections
apps/example/example.h new file +7 -0
@@ -0,0 +1,7 @@ + +#define LS_RECURSIVE 1 +#define LS_SHOWARG 2 +#define LS_COLUMN 4 +int ls (const char *path,ulong flags); +void test_list (void ); +void test_setjmp (void );
apps/example/list.c new file +98 -0
98 lines not on this page · raw message
apps/example/ls.c new file +127 -0
127 lines not on this page · raw message
apps/example/main.c new file +231 -0
231 lines not on this page · raw message
apps/example/setjmp.c new file +24 -0
@@ -0,0 +1,24 @@ +#include <stdio.h> +#include <setjmp.h> + +static jmp_buf buf; + +void second (void ) { +printf ("second\n" ); +longjmp (buf,1 ); +} + +void first (void ) { +second (); +printf ("first not reach\n" ); +} + +void test_setjmp (void ) +{ +puts ("------ setjmp/longjmp test ------\n" ); +if (!setjmp (buf)) +first (); +else +printf ("main\n" ); +puts ("------ end ------\n\n" ); +}
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 8/20 filetype: add barebox arm application
In reply to Jean-Christophe PLAGNIOL-VILLARD--- common/filetype.c | 35 +++++++++++++++++++++++++++++++++++ include/filetype.h | 2 ++ 2 files changed, 37 insertions(+)
common/filetype.c +35 -0
@@ -23,6 +23,7 @@#include <fs.h> #include <malloc.h> #include <errno.h> +#include <linux/license.h> struct filetype_str {const char *name;/* human readable filetype */
@@ -49,6 +50,8 @@ static const struct filetype_str filetype_str[] = { [filetype_png] = { "PNG image", "png" }, [filetype_ext] = { "ext filesystem", "ext" }, [filetype_gpt] = { "GUID Partition Table", "gpt" }, + [filetype_arm_application] = { "arm barebox application", "arm-barebox-app"}, + [filetype_arm_gpl_application] = { "arm barebox GPL compatible application", "arm-barebox-gpl-app"}, };const char *file_type_to_string (enum filetype f)
@@ -151,6 +154,35 @@ enum filetype is_fat_or_mbr(const unsigned char *sector, unsigned long *bootsec)return filetype_mbr; } +bool is_barebox_app_gpl_compatible (const uint8_t *buf8,size_t bufsize) +{ +int i; + +if (bufsize <12 ) +return false; + + bufsize -=12 ; + +for (i =0 ; i < bufsize; i++, buf8++) { +if (!strncmp ("license=" , buf8,8 ) && +license_is_gpl_compatible (buf8 +8 )) +return true; + } + +return false; +} + +enum filetype is_barebox_arm_app (const uint8_t *buf8,size_t bufsize) +{ +if (strcmp (buf8 +0x20 ,"barebox_arm_app" )) +return filetype_unknown; +/* license=GPL */ +if (is_barebox_app_gpl_compatible (buf8 +0x80 , bufsize)) +return filetype_arm_gpl_application; + +return filetype_arm_application; +} +enum filetype file_detect_type (const void *_buf,size_t bufsize) {const u32 *buf = _buf;
@@ -201,6 +233,9 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize)if (buf[9 ] ==0x016f2818 || buf[9 ] ==0x18286f01 )return filetype_arm_zimage; + type =is_barebox_arm_app (buf8, bufsize); +if (type != filetype_unknown) +return type;if (bufsize <512 )return filetype_unknown;
include/filetype.h +2 -0
@@ -24,6 +24,8 @@ enum filetype { filetype_png, filetype_ext, filetype_gpt, + filetype_arm_application, + filetype_arm_gpl_application, filetype_max, };
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 9/20 arm: add application support
In reply to Jean-Christophe PLAGNIOL-VILLARD--- arch/arm/Kconfig | 1 + arch/arm/Makefile | 6 +- arch/arm/apps/Kconfig | 11 ++++ arch/arm/apps/Makefile | 6 ++ arch/arm/apps/apps.lds.S | 64 ++++++++++++++++++ arch/arm/apps/binfmt.c | 111 ++++++++++++++++++++++++++++++++ arch/arm/apps/head.S | 59 +++++++++++++++++ arch/arm/apps/include/arch/asm/macro.h | 46 +++++++++++++ arch/arm/apps/include/arch/setjmp.h | 26 ++++++++ arch/arm/apps/raise.c | 27 ++++++++ arch/arm/apps/setjmp.S | 60 +++++++++++++++++ arch/arm/apps/start.c | 35 ++++++++++ 12 files changed, 451 insertions(+), 1 deletion(-) create mode 100644 arch/arm/apps/Kconfig create mode 100644 arch/arm/apps/Makefile create mode 100644 arch/arm/apps/apps.lds.S create mode 100644 arch/arm/apps/binfmt.c create mode 100644 arch/arm/apps/head.S create mode 100644 arch/arm/apps/include/arch/asm/macro.h create mode 100644 arch/arm/apps/include/arch/setjmp.h create mode 100644 arch/arm/apps/raise.c create mode 100644 arch/arm/apps/setjmp.S create mode 100644 arch/arm/apps/start.c
arch/arm/Kconfig +1 -0
@@ -2,6 +2,7 @@ config ARM bool select HAS_KALLSYMS select HAS_MODULES + select HAS_APPLICATIONS select HAVE_CONFIGURABLE_TEXT_BASE select HAVE_PBL_IMAGE select HAVE_IMAGE_COMPRESSION
arch/arm/Makefile +5 -1
@@ -275,9 +275,13 @@ else MACH := endif +APP_LDFLAGS += -L $(shell dirname `$(CC) $(CPPFLAGS) -print-libgcc-file-name`) -lgcc + common-y += $(BOARD) $(MACH) common-y += arch/arm/lib/ arch/arm/cpu/ +common-$(CONFIG_APPLICATIONS) += arch/arm/apps/ lds-y := arch/arm/lib/barebox.lds +apps-lds-y := arch/arm/apps/apps.lds -CLEAN_FILES += include/generated/mach-types.h arch/arm/lib/barebox.lds barebox-flash-image +CLEAN_FILES += include/generated/mach-types.h arch/arm/lib/barebox.lds arch/arm/apps/apps.lds barebox-flash-image
arch/arm/apps/Kconfig new file +11 -0
@@ -0,0 +1,11 @@ + +config APP_TEXT_BASE_OFFSET + hex + default 0x800000 + prompt "application text base offset" + help + APP_TEXT_BASE = TEXT_BASE - APP_TEXT_BASE_OFFSET + all the application will be link at this address + the syscall table region of 0x2000 will be add + APP_TEXT_BASE - 0x2000 and then the malloc region at + APP_TEXT_BASE - 0x2000 - APP_MALLOC_SIZE
arch/arm/apps/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +obj-y += binfmt.o +app-y += head.o +app-y += start.o +app-y += raise.o +app-y += setjmp.o +extry-y += apps.lds
arch/arm/apps/apps.lds.S new file +64 -0
64 lines not on this page · raw message
arch/arm/apps/binfmt.c new file +111 -0
111 lines not on this page · raw message
arch/arm/apps/head.S new file +59 -0
59 lines not on this page · raw message
arch/arm/apps/include/arch/asm/macro.h new file +46 -0
46 lines not on this page · raw message
arch/arm/apps/include/arch/setjmp.h new file +26 -0
@@ -0,0 +1,26 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#ifndef __ARCH_SETJMP_H__ +#define __ARCH_SETJMP_H__ + +struct __jmp_buf { +unsigned int regs[10 ]; +}; + +typedef struct __jmp_buf jmp_buf [1 ]; + +#endif /* __ARCH_SETJMP_H__ */
arch/arm/apps/raise.c new file +27 -0
@@ -0,0 +1,27 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#include <stdio.h> + +int raise (int signum) +{ +/* use puts as printf may not be availlable */ +puts ("raise: " ); +puts (itoa (signum)); +puts (" caught\n" ); + +return 0 ; +}
arch/arm/apps/setjmp.S new file +60 -0
60 lines not on this page · raw message
arch/arm/apps/start.c new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under GPLv2 only +* +* As a special exception, if other files instantiate templates or use macros +* or inline functions from this file, or you compile this file and link it +* with other works to produce a work based on this file, this file does not +* by itself cause the resulting work to be covered by the GNU General Public +* License. However the source code for this file must still be made available +* in accordance with section (3) of the GNU General Public License. + +* This exception does not invalidate any other reasons why a work based on +* this file might be covered by the GNU General Public License. +*/ + +#include <sys/types.h> + +static void *barebox_sp; +void barebox_return (int ,void *); +int app_start (int argc,char **argv); + +void exit (int c) +{ +barebox_return (c, barebox_sp); +} + +void arm_app_start (int argc,char ** argv,void *sp) +{ +int ret; + barebox_sp = sp; + + ret =app_start (argc, argv); +exit (ret); +}
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 09/20] arm: add application support
Quoted 17 lines
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- arch/arm/Kconfig | 1 + arch/arm/Makefile | 6 +- arch/arm/apps/Kconfig | 11 ++++ arch/arm/apps/Makefile | 6 ++ arch/arm/apps/apps.lds.S | 64 ++++++++++++++++++ arch/arm/apps/binfmt.c | 111 ++++++++++++++++++++++++++++++++ arch/arm/apps/head.S | 59 +++++++++++++++++ arch/arm/apps/include/arch/asm/macro.h | 46 +++++++++++++ arch/arm/apps/include/arch/setjmp.h | 26 ++++++++ arch/arm/apps/raise.c | 27 ++++++++ arch/arm/apps/setjmp.S | 60 +++++++++++++++++ arch/arm/apps/start.c | 35 ++++++++++ 12 files changed, 451 insertions(+), 1 deletion(-) create mode 100644 arch/arm/apps/Kconfig create mode 100644 arch/arm/apps/Makefile
Quoted 8 lines
create mode 100644 arch/arm/apps/apps.lds.S create mode 100644 arch/arm/apps/binfmt.c create mode 100644 arch/arm/apps/head.S create mode 100644 arch/arm/apps/include/arch/asm/macro.h create mode 100644 arch/arm/apps/include/arch/setjmp.h create mode 100644 arch/arm/apps/raise.c create mode 100644 arch/arm/apps/setjmp.S create mode 100644 arch/arm/apps/start.c
...
Is this feature really needed? If we Include it, is dramatically increases size of BB. We have a scripting, maybe just inclusion a small "C" interpreter is enough? Such as "picoc" (http://code.google.com/p/picoc/), for example.
---
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 09/20] arm: add application support
Quoted 25 lines · Alexander Shiyan
Quoted 17 lines
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- arch/arm/Kconfig | 1 + arch/arm/Makefile | 6 +- arch/arm/apps/Kconfig | 11 ++++ arch/arm/apps/Makefile | 6 ++ arch/arm/apps/apps.lds.S | 64 ++++++++++++++++++ arch/arm/apps/binfmt.c | 111 ++++++++++++++++++++++++++++++++ arch/arm/apps/head.S | 59 +++++++++++++++++ arch/arm/apps/include/arch/asm/macro.h | 46 +++++++++++++ arch/arm/apps/include/arch/setjmp.h | 26 ++++++++ arch/arm/apps/raise.c | 27 ++++++++ arch/arm/apps/setjmp.S | 60 +++++++++++++++++ arch/arm/apps/start.c | 35 ++++++++++ 12 files changed, 451 insertions(+), 1 deletion(-) create mode 100644 arch/arm/apps/Kconfig create mode 100644 arch/arm/apps/MakefileQuoted 8 lines
create mode 100644 arch/arm/apps/apps.lds.S create mode 100644 arch/arm/apps/binfmt.c create mode 100644 arch/arm/apps/head.S create mode 100644 arch/arm/apps/include/arch/asm/macro.h create mode 100644 arch/arm/apps/include/arch/setjmp.h create mode 100644 arch/arm/apps/raise.c create mode 100644 arch/arm/apps/setjmp.S create mode 100644 arch/arm/apps/start.c
Quoted 5 lines
...
Is this feature really needed? If we Include it, is dramatically increases size of BB. We have a scripting, maybe just inclusion a small "C" interpreter is enough? Such as "picoc" (http://code.google.com/p/picoc/), for example.
increase?? no
1 to 2 KiB
on barebox side you just have the syscall
it's nothing and this is optionnal
Best Regards,
J.
Quoted 2 lines
---
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH 10/20 app: printf: use HelenOS verison with wide char support
In reply to Jean-Christophe PLAGNIOL-VILLARD---
apps/include/stdio.h | 21 +-
apps/include/stdlib.h | 3 +
apps/include/{stdlib.h => wchar.h} | 24 +-
apps/libc/Kconfig | 10 +
apps/libc/Makefile | 1 +
apps/libc/helenos/Makefile | 4 +
apps/libc/helenos/align.h | 63 ++
apps/libc/helenos/assert.h | 2 +
apps/libc/helenos/ctype.c | 52 ++
apps/libc/helenos/printf_core.c | 905 +++++++++++++++++++
apps/libc/helenos/printf_core.h | 59 ++
apps/libc/helenos/stdio.c | 153 ++++
apps/libc/helenos/str.c | 1755 ++++++++++++++++++++++++++++++++++++
apps/libc/helenos/str.h | 135 +++
apps/libc/helenos/vsnprintf.c | 187 ++++
15 files changed, 3353 insertions(+), 21 deletions(-)
copy apps/include/{stdlib.h => wchar.h} (70%)
create mode 100644 apps/libc/helenos/Makefile
create mode 100644 apps/libc/helenos/align.h
create mode 100644 apps/libc/helenos/assert.h
create mode 100644 apps/libc/helenos/ctype.c
create mode 100644 apps/libc/helenos/printf_core.c
create mode 100644 apps/libc/helenos/printf_core.h
create mode 100644 apps/libc/helenos/stdio.c
create mode 100644 apps/libc/helenos/str.c
create mode 100644 apps/libc/helenos/str.h
create mode 100644 apps/libc/helenos/vsnprintf.capps/include/stdio.h +10 -11
@@ -49,6 +49,16 @@ size_t fread(void *buf, size_t size, size_t nb, FILE *f);size_t fwrite (const void *buf,size_t size,size_t nb,FILE *f);int fseek (FILE *stream,long offset,int whence); +int printf (const char *fmt, ...) __attribute__ ((format (__printf__,1 ,2 ))); +int vprintf (const char *fmt,va_list args); +int sprintf (char *buf,const char *fmt, ...) __attribute__ ((format (__printf__,2 ,3 ))); +int snprintf (char *buf,size_t size,const char *fmt, ...) __attribute__ ((format (__printf__,3 ,4 ))); +int vsprintf (char *buf,const char *fmt,va_list args); +char *asprintf (const char *fmt, ...) __attribute__ ((format (__printf__,1 ,2 ))); +char *vasprintf (const char *fmt,va_list ap); +int vsnprintf (char *buf,size_t size,const char *fmt,va_list args); +int vscnprintf (char *buf,size_t size,const char *fmt,va_list args); +/* barebox API */ void eputc (char c);int eputs (const char *str);
@@ -56,15 +66,4 @@ int tstc(void);int flush (int fd);char *itoa (int i); -static int printf (const char *fmt, ...) __attribute__ ((format (__printf__,1 ,2 ))); -static inline int printf (const char *fmt, ...) -{ -return 0 ; -} - -static inline int vprintf (const char *fmt,va_list args) -{ -return 0 ; -} -#endif /* __STDIO_H__ */
apps/include/stdlib.h +3 -0
@@ -26,4 +26,7 @@ int atoi(const char *s);long atol (const char *s);long long atoll (const char *s); +#define min (x, y) ((x) < (y) ? (x) : (y)) +#define max (x, y) ((x) > (y) ? (x) : (y)) +#endif /* __STDLIB_H__ */
apps/include/wchar.h renamed from apps/include/stdlib.h +14 -10
@@ -14,16 +14,20 @@* this file might be covered by the GNU General Public License. */ -#ifndef __STDLIB_H__ -#define __STDLIB_H__ +#ifndef __WCHAR_H__ +#define __WCHAR_H__ -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 +#include <stdio.h> -char *getenv (const char *name); -void exit (int num); -int atoi (const char *s); -long atol (const char *s); -long long atoll (const char *s); +typedef unsigned long wchar_t ; +typedef long wint_t ; -#endif /* __STDLIB_H__ */ + +#define wprintf printf +#define fwprintf fprintf +#define swprintf sprintf +#define vwprintf vprintf +#define vfwprintf vfwprintf +#define vswprintf vswprintf + +#endif /* __WCHAR_H__ */
apps/libc/Kconfig +10 -0
@@ -22,4 +22,14 @@ config APP_PRINTF_STACK_SIZE hex "printf stack size" default 0x1000 +choice + prompt "printf implementation" + +config APPS_PRINTF_HELENOS + bool "helen os" + help + support wide char + +endchoice + endmenu
apps/libc/Makefile +1 -0
@@ -15,6 +15,7 @@ app-y += unistd.o app-$(CONFIG_APPS_MALLOC_DUMMY) += dummy_malloc.o app-$(CONFIG_APPS_MALLOC_TLSF) += tlsf_malloc.o tlsf.o app-y += string.o +obj-$(CONFIG_APPS_PRINTF_HELENOS) += helenos/ obj-y += sys/ app-y += time.o
apps/libc/helenos/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +app-y += printf_core.o +app-y += vsnprintf.o +app-y += str.o +app-y += stdio.o
apps/libc/helenos/align.h new file +63 -0
63 lines not on this page · raw message
apps/libc/helenos/assert.h new file +2 -0
@@ -0,0 +1,2 @@ + +#define assert (x)
apps/libc/helenos/ctype.c new file +52 -0
52 lines not on this page · raw message
apps/libc/helenos/printf_core.c new file +905 -0
905 lines not on this page · raw message
apps/libc/helenos/printf_core.h new file +59 -0
59 lines not on this page · raw message
apps/libc/helenos/stdio.c new file +153 -0
153 lines not on this page · raw message
apps/libc/helenos/str.c new file +1755 -0
1,673 lines not on this page · raw message
apps/libc/helenos/str.h new file +135 -0
135 lines not on this page · raw message
apps/libc/helenos/vsnprintf.c new file +187 -0
187 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Part of the diff is not shown here. View the raw message.
PATCH 11/20 app: printf: add version from contiki
In reply to Jean-Christophe PLAGNIOL-VILLARDthe strformat is taken from contiki OS which is under 3-clause BSD license no wide char support
--- apps/libc/Kconfig | 9 + apps/libc/Makefile | 1 + apps/libc/contiki/Makefile | 1 + apps/libc/contiki/strformat.c | 621 +++++++++++++++++++++++++++++++++++++++++ apps/libc/contiki/strformat.h | 25 ++ apps/libc/contiki/vsprintf.c | 116 ++++++++ 6 files changed, 773 insertions(+) create mode 100644 apps/libc/contiki/Makefile create mode 100644 apps/libc/contiki/strformat.c create mode 100644 apps/libc/contiki/strformat.h create mode 100644 apps/libc/contiki/vsprintf.c
apps/libc/Kconfig +9 -0
@@ -24,6 +24,10 @@ config APP_PRINTF_STACK_SIZE choice prompt "printf implementation" + default APPS_PRINTF_HELENOS + +config APPS_PRINTF_CONTIKI + bool "contiki" config APPS_PRINTF_HELENOS bool "helen os"
@@ -32,4 +36,9 @@ config APPS_PRINTF_HELENOS endchoice +config APP_PRINTF_STACK_SIZE + hex "printf stack size" + default 0x1000 + depends on APPS_PRINTF_CONTIKI + endmenu
apps/libc/Makefile +1 -0
@@ -15,6 +15,7 @@ app-y += unistd.o app-$(CONFIG_APPS_MALLOC_DUMMY) += dummy_malloc.o app-$(CONFIG_APPS_MALLOC_TLSF) += tlsf_malloc.o tlsf.o app-y += string.o +obj-$(CONFIG_APPS_PRINTF_CONTIKI) += contiki/ obj-$(CONFIG_APPS_PRINTF_HELENOS) += helenos/ obj-y += sys/ app-y += time.o
apps/libc/contiki/Makefile new file +1 -0
@@ -0,0 +1 @@ +app-y += vsprintf.o strformat.o
apps/libc/contiki/strformat.c new file +621 -0
621 lines not on this page · raw message
apps/libc/contiki/strformat.h new file +25 -0
@@ -0,0 +1,25 @@ +#ifndef __STRFORMAT_H__ +#define __STRFORMAT_H__ + +#include <stdarg.h> + +#define STRFORMAT_OK 0 +#define STRFORMAT_FAILED 1 +typedef unsigned int StrFormatResult ; + +/* The data argument may only be considered valid during the function call */ +typedef StrFormatResult (*StrFormatWrite )(void *user_data,const char *data,unsigned int len); + +typedef struct _StrFormatContext +{ +StrFormatWrite write_str; +void *user_data; +}StrFormatContext ; + +int format_str (const StrFormatContext *ctxt,const char *format, ...) + __attribute__ ((__format__ (__printf__,2 ,3 ))); + +int +format_str_v (const StrFormatContext *ctxt,const char *format,va_list ap); + +#endif /* __STRFORMAT_H__ */
apps/libc/contiki/vsprintf.c new file +116 -0
116 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 12/20 app: add tinycurses support
In reply to Jean-Christophe PLAGNIOL-VILLARDtake from corboot and upated to use ansi
--- apps/Kconfig | 1 + apps/Makefile | 3 + apps/lib/Kconfig | 1 + apps/lib/Makefile | 1 + apps/lib/Makefile.include | 1 + apps/lib/curses/Kconfig | 14 + apps/lib/curses/Makefile | 1 + apps/lib/curses/Makefile.include | 3 + apps/lib/curses/tinycurses/Makefile | 3 + apps/lib/curses/tinycurses/Makefile.include | 1 + apps/lib/curses/tinycurses/colors.c | 62 + apps/lib/curses/tinycurses/curses.h | 1680 +++++++++++++++++++++++++++ apps/lib/curses/tinycurses/curses.priv.h | 1317 +++++++++++++++++++++ apps/lib/curses/tinycurses/keyboard.c | 247 ++++ apps/lib/curses/tinycurses/local.h | 89 ++ apps/lib/curses/tinycurses/tinycurses.c | 1016 ++++++++++++++++ 16 files changed, 4440 insertions(+) create mode 100644 apps/lib/Kconfig create mode 100644 apps/lib/Makefile create mode 100644 apps/lib/Makefile.include create mode 100644 apps/lib/curses/Kconfig create mode 100644 apps/lib/curses/Makefile create mode 100644 apps/lib/curses/Makefile.include create mode 100644 apps/lib/curses/tinycurses/Makefile create mode 100644 apps/lib/curses/tinycurses/Makefile.include create mode 100644 apps/lib/curses/tinycurses/colors.c create mode 100644 apps/lib/curses/tinycurses/curses.h create mode 100644 apps/lib/curses/tinycurses/curses.priv.h create mode 100644 apps/lib/curses/tinycurses/keyboard.c create mode 100644 apps/lib/curses/tinycurses/local.h create mode 100644 apps/lib/curses/tinycurses/tinycurses.c
apps/Kconfig +1 -0
@@ -8,6 +8,7 @@ menuconfig APPLICATIONS if APPLICATIONS source "apps/libc/Kconfig" +source "apps/lib/Kconfig" menu "memory layout"
apps/Makefile +3 -0
@@ -1,6 +1,8 @@ APP_CPPFLAGS += -include $(srctree)/apps/include/libc_config.h APP_CPPFLAGS += -I$(srctree)/apps/include +include $(srctree)/apps/lib/Makefile.include +APP_CPPFLAGS += $(APP_CPPFLAGS-y) export APP_CPPFLAGS apps-$(CONFIG_APP_EXAMPLE) += example
@@ -19,6 +21,7 @@ $(obj)/include/barebox/syscalls.h: $(srctree)/include/apps/syscalls.h obj-y += libc/ obj-y += utils/ +obj-y += lib/ barebox-app-header += $(obj)/include/types.h barebox-app-header += $(obj)/include/barebox/syscalls.h
apps/lib/Kconfig new file +1 -0
@@ -0,0 +1 @@ +source apps/lib/curses/Kconfig
apps/lib/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-y += curses/
apps/lib/Makefile.include new file +1 -0
@@ -0,0 +1 @@ +include $(srctree)/apps/lib/curses/Makefile.include
apps/lib/curses/Kconfig new file +14 -0
@@ -0,0 +1,14 @@ +menuconfig APP_LIB_CURSES + bool "curses" + +if APP_LIB_CURSES + +choice + prompt "curses implementation" + +config APP_LIB_TINYCURSES + bool "tiny" + +endchoice + +endif
apps/lib/curses/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_APP_LIB_TINYCURSES) += tinycurses/
apps/lib/curses/Makefile.include new file +3 -0
@@ -0,0 +1,3 @@ +inc-$(CONFIG_APP_LIB_TINYCURSES) += $(srctree)/apps/lib/curses/tinycurses/Makefile.include + +include $(inc-y)
apps/lib/curses/tinycurses/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +app-y += keyboard.o +app-y += tinycurses.o +app-y += colors.o
apps/lib/curses/tinycurses/Makefile.include new file +1 -0
@@ -0,0 +1 @@ +APP_CPPFLAGS-y += -I$(srctree)/apps/lib/curses/tinycurses/
apps/lib/curses/tinycurses/colors.c new file +62 -0
62 lines not on this page · raw message
apps/lib/curses/tinycurses/curses.h new file +1680 -0
1,680 lines not on this page · raw message
apps/lib/curses/tinycurses/curses.priv.h new file +1317 -0
1,211 lines not on this page · raw message
apps/lib/curses/tinycurses/keyboard.c new file +247 -0
247 lines not on this page · raw message
apps/lib/curses/tinycurses/local.h new file +89 -0
89 lines not on this page · raw message
apps/lib/curses/tinycurses/tinycurses.c new file +1016 -0
1,016 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Part of the diff is not shown here. View the raw message.
Re: [PATCH 12/20] app: add tinycurses support
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
take from corboot and upated to use ansi
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Drop the curses stuff from the series. It will take time to get the application stuff reviewed and merged, so concentrate on the basic stuff and do not dump this unrelated stuff on the list.
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 12/20] app: add tinycurses support
Quoted 8 lines · Sascha Hauer
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
take from corboot and upated to use ansi
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>Drop the curses stuff from the series. It will take time to get the application stuff reviewed and merged, so concentrate on the basic stuff and do not dump this unrelated stuff on the list.
this will be presented this friday at CEWG so I choose to send it together and it's a good example how to use the application implemetation
for the other version of this patch serie I'll not include it
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
PATCH 13/20 app: curses: add pdcurses
In reply to Jean-Christophe PLAGNIOL-VILLARDbackend inspided by coreboot core but with ansi support
--- apps/lib/curses/Kconfig | 7 + apps/lib/curses/Makefile | 1 + apps/lib/curses/Makefile.include | 1 + apps/lib/curses/pdcurses/Makefile | 89 ++ apps/lib/curses/pdcurses/Makefile.include | 1 + apps/lib/curses/pdcurses/backend/Makefile | 6 + apps/lib/curses/pdcurses/backend/barebox.h | 21 + apps/lib/curses/pdcurses/backend/config.h | 136 +++ apps/lib/curses/pdcurses/backend/pdcdisp.c | 107 ++ apps/lib/curses/pdcurses/backend/pdcgetsc.c | 47 + apps/lib/curses/pdcurses/backend/pdckbd.c | 161 +++ apps/lib/curses/pdcurses/backend/pdcscrn.c | 162 +++ apps/lib/curses/pdcurses/backend/pdcsetsc.c | 35 + apps/lib/curses/pdcurses/backend/pdcutil.c | 26 + apps/lib/curses/pdcurses/include/curses.h | 1378 ++++++++++++++++++++++++++ apps/lib/curses/pdcurses/include/panel.h | 58 ++ apps/lib/curses/pdcurses/pdcurses/Makefile | 39 + apps/lib/curses/pdcurses/pdcurses/README | 25 + apps/lib/curses/pdcurses/pdcurses/addch.c | 408 ++++++++ apps/lib/curses/pdcurses/pdcurses/addchstr.c | 242 +++++ apps/lib/curses/pdcurses/pdcurses/addstr.c | 237 +++++ apps/lib/curses/pdcurses/pdcurses/attr.c | 349 +++++++ apps/lib/curses/pdcurses/pdcurses/beep.c | 65 ++ apps/lib/curses/pdcurses/pdcurses/bkgd.c | 220 ++++ apps/lib/curses/pdcurses/pdcurses/border.c | 408 ++++++++ apps/lib/curses/pdcurses/pdcurses/clear.c | 154 +++ apps/lib/curses/pdcurses/pdcurses/color.c | 295 ++++++ apps/lib/curses/pdcurses/pdcurses/curspriv.h | 146 +++ apps/lib/curses/pdcurses/pdcurses/debug.c | 81 ++ apps/lib/curses/pdcurses/pdcurses/delch.c | 93 ++ apps/lib/curses/pdcurses/pdcurses/deleteln.c | 208 ++++ apps/lib/curses/pdcurses/pdcurses/deprec.c | 29 + apps/lib/curses/pdcurses/pdcurses/getch.c | 410 ++++++++ apps/lib/curses/pdcurses/pdcurses/getstr.c | 471 +++++++++ apps/lib/curses/pdcurses/pdcurses/getyx.c | 143 +++ apps/lib/curses/pdcurses/pdcurses/inch.c | 125 +++ apps/lib/curses/pdcurses/pdcurses/inchstr.c | 211 ++++ apps/lib/curses/pdcurses/pdcurses/initscr.c | 339 +++++++ apps/lib/curses/pdcurses/pdcurses/inopts.c | 321 ++++++ apps/lib/curses/pdcurses/pdcurses/insch.c | 268 +++++ apps/lib/curses/pdcurses/pdcurses/insstr.c | 261 +++++ apps/lib/curses/pdcurses/pdcurses/instr.c | 243 +++++ apps/lib/curses/pdcurses/pdcurses/kernel.c | 256 +++++ apps/lib/curses/pdcurses/pdcurses/keyname.c | 125 +++ apps/lib/curses/pdcurses/pdcurses/mouse.c | 429 ++++++++ apps/lib/curses/pdcurses/pdcurses/move.c | 54 + apps/lib/curses/pdcurses/pdcurses/outopts.c | 156 +++ apps/lib/curses/pdcurses/pdcurses/overlay.c | 256 +++++ apps/lib/curses/pdcurses/pdcurses/pad.c | 259 +++++ apps/lib/curses/pdcurses/pdcurses/panel.c | 630 ++++++++++++ apps/lib/curses/pdcurses/pdcurses/printw.c | 123 +++ apps/lib/curses/pdcurses/pdcurses/refresh.c | 276 ++++++ apps/lib/curses/pdcurses/pdcurses/scanw.c | 575 +++++++++++ apps/lib/curses/pdcurses/pdcurses/scr_dump.c | 210 ++++ apps/lib/curses/pdcurses/pdcurses/scroll.c | 98 ++ apps/lib/curses/pdcurses/pdcurses/slk.c | 643 ++++++++++++ apps/lib/curses/pdcurses/pdcurses/term.h | 57 ++ apps/lib/curses/pdcurses/pdcurses/termattr.c | 176 ++++ apps/lib/curses/pdcurses/pdcurses/terminfo.c | 215 ++++ apps/lib/curses/pdcurses/pdcurses/touch.c | 160 +++ apps/lib/curses/pdcurses/pdcurses/util.c | 309 ++++++ apps/lib/curses/pdcurses/pdcurses/window.c | 562 +++++++++++ 62 files changed, 13596 insertions(+) create mode 100644 apps/lib/curses/pdcurses/Makefile create mode 100644 apps/lib/curses/pdcurses/Makefile.include create mode 100644 apps/lib/curses/pdcurses/backend/Makefile create mode 100644 apps/lib/curses/pdcurses/backend/barebox.h create mode 100644 apps/lib/curses/pdcurses/backend/config.h create mode 100644 apps/lib/curses/pdcurses/backend/pdcdisp.c create mode 100644 apps/lib/curses/pdcurses/backend/pdcgetsc.c create mode 100644 apps/lib/curses/pdcurses/backend/pdckbd.c create mode 100644 apps/lib/curses/pdcurses/backend/pdcscrn.c create mode 100644 apps/lib/curses/pdcurses/backend/pdcsetsc.c create mode 100644 apps/lib/curses/pdcurses/backend/pdcutil.c create mode 100644 apps/lib/curses/pdcurses/include/curses.h create mode 100644 apps/lib/curses/pdcurses/include/panel.h create mode 100644 apps/lib/curses/pdcurses/pdcurses/Makefile create mode 100644 apps/lib/curses/pdcurses/pdcurses/README create mode 100644 apps/lib/curses/pdcurses/pdcurses/addch.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/addchstr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/addstr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/attr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/beep.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/bkgd.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/border.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/clear.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/color.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/curspriv.h create mode 100644 apps/lib/curses/pdcurses/pdcurses/debug.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/delch.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/deleteln.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/deprec.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/getch.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/getstr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/getyx.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/inch.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/inchstr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/initscr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/inopts.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/insch.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/insstr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/instr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/kernel.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/keyname.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/mouse.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/move.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/outopts.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/overlay.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/pad.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/panel.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/printw.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/refresh.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/scanw.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/scr_dump.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/scroll.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/slk.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/term.h create mode 100644 apps/lib/curses/pdcurses/pdcurses/termattr.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/terminfo.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/touch.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/util.c create mode 100644 apps/lib/curses/pdcurses/pdcurses/window.c
apps/lib/curses/Kconfig +7 -0
@@ -6,9 +6,16 @@ if APP_LIB_CURSES choice prompt "curses implementation" +config APP_LIB_PDCURSES + bool "pdcurses" + config APP_LIB_TINYCURSES bool "tiny" endchoice +config APP_LIB_PANEL + bool "panel" + depends on APP_LIB_PDCURSES + endif
apps/lib/curses/Makefile +1 -0
@@ -1 +1,2 @@ obj-$(CONFIG_APP_LIB_TINYCURSES) += tinycurses/ +obj-$(CONFIG_APP_LIB_PDCURSES) += pdcurses/
apps/lib/curses/Makefile.include +1 -0
@@ -1,3 +1,4 @@ +inc-$(CONFIG_APP_LIB_PDCURSES) += $(srctree)/apps/lib/curses/pdcurses/Makefile.include inc-$(CONFIG_APP_LIB_TINYCURSES) += $(srctree)/apps/lib/curses/tinycurses/Makefile.include include $(inc-y)
apps/lib/curses/pdcurses/Makefile new file +89 -0
89 lines not on this page · raw message
apps/lib/curses/pdcurses/Makefile.include new file +1 -0
@@ -0,0 +1 @@ +APP_CPPFLAGS-y += -I$(srctree)/apps/lib/curses/pdcurses/include/ -D_LP64=0
apps/lib/curses/pdcurses/backend/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +app-y += pdcdisp.o +app-y += pdcgetsc.o +app-y += pdckbd.o +app-y += pdcscrn.o +app-y += pdcsetsc.o +app-y += pdcutil.o
apps/lib/curses/pdcurses/backend/barebox.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under BSD +*/ + +#include <curses.h> +#include <stdlib.h> +#include <ctype.h> +#include <unistd.h> +#include <string.h> +#include "../pdcurses/curspriv.h" + +extern unsigned char *pdc_atrtab; +extern short curstoreal[16 ], realtocurs[16 ]; + +#ifdef DEBUG +#define debug(fmt, arg...) printf(fmt, ## arg) +#else +#define debug(fmt, arg...) +#endif
apps/lib/curses/pdcurses/backend/config.h new file +136 -0
136 lines not on this page · raw message
apps/lib/curses/pdcurses/backend/pdcdisp.c new file +107 -0
107 lines not on this page · raw message
apps/lib/curses/pdcurses/backend/pdcgetsc.c new file +47 -0
47 lines not on this page · raw message
apps/lib/curses/pdcurses/backend/pdckbd.c new file +161 -0
161 lines not on this page · raw message
apps/lib/curses/pdcurses/backend/pdcscrn.c new file +162 -0
162 lines not on this page · raw message
apps/lib/curses/pdcurses/backend/pdcsetsc.c new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under BSD +*/ + +#include <utils/ansi.h> +#include "barebox.h" + +int PDC_curs_set (int visibility) +{ +int ret_vis; + +PDC_LOG (("PDC_curs_set() - called: visibility=%d\n" , visibility)); + + ret_vis =SP ->visibility; +SP ->visibility = visibility; + +ansi_cursor_enable (visibility); + +return ret_vis; +} + +int PDC_set_blink (bool blinkon) +{ +if (pdc_color_started) +COLORS =16 ; + +return ERR ; +} + +void PDC_set_title (const char *title) +{ +printf ("\033]0;%s" , title); +}
apps/lib/curses/pdcurses/backend/pdcutil.c new file +26 -0
@@ -0,0 +1,26 @@ +/* +* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> +* +* Under BSD +*/ + +#include "barebox.h" + +void PDC_beep (void ) +{ +PDC_LOG (("PDC_beep() - called\n" )); + +printf ("\a" ); +} + +void PDC_napms (int ms) +{ +PDC_LOG (("PDC_napms() - called: ms=%d\n" , ms)); + +usleep (ms *1000 ); +} + +const char *PDC_sysname (void ) +{ +return "barebox" ; +}
apps/lib/curses/pdcurses/include/curses.h new file +1378 -0
1,378 lines not on this page · raw message
apps/lib/curses/pdcurses/include/panel.h new file +58 -0
58 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/Makefile new file +39 -0
@@ -0,0 +1,39 @@ +app-$(CONFIG_APP_LIB_PANEL) += panel.o +app-y += addch.o +app-y += move.o +app-y += overlay.o +app-y += refresh.o +app-y += terminfo.o +app-y += window.o +app-y += util.o +app-y += inopts.o +app-y += addstr.o +app-y += keyname.o +app-y += instr.o +app-y += clear.o +app-y += addchstr.o +app-y += kernel.o +app-y += pad.o +app-y += insstr.o +app-y += border.o +app-y += getyx.o +app-y += getstr.o +app-y += getch.o +app-y += termattr.o +app-y += outopts.o +app-y += color.o +app-y += deleteln.o +app-y += initscr.o +app-y += slk.o +app-y += delch.o +app-y += touch.o +app-y += mouse.o +app-y += scanw.o +app-y += scroll.o +app-y += printw.o +app-y += bkgd.o +app-y += inch.o +app-y += attr.o +app-y += insch.o +app-y += inchstr.o +app-y += beep.o
apps/lib/curses/pdcurses/pdcurses/README new file +25 -0
@@ -0,0 +1,25 @@ +PDCurses Portable Core +====================== + +This directory contains core PDCurses source code files common to all +platforms. + + +Building +-------- + +These modules are built by the platform-specific makefiles, in the +platform directories. + + +Distribution Status +------------------- + +The files in this directory are released to the Public Domain. + + +Acknowledgements +---------------- + +The panel library was originally provided by +Warren Tucker <[email protected]>
apps/lib/curses/pdcurses/pdcurses/addch.c new file +408 -0
408 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/addchstr.c new file +242 -0
242 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/addstr.c new file +237 -0
37 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/attr.c new file +349 -0
349 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/beep.c new file +65 -0
65 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/bkgd.c new file +220 -0
220 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/border.c new file +408 -0
408 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/clear.c new file +154 -0
154 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/color.c new file +295 -0
295 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/curspriv.h new file +146 -0
146 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/debug.c new file +81 -0
81 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/delch.c new file +93 -0
93 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/deleteln.c new file +208 -0
208 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/deprec.c new file +29 -0
Lines of this file are not shown. View the raw message.
apps/lib/curses/pdcurses/pdcurses/getch.c new file +410 -0
410 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/getstr.c new file +471 -0
471 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/getyx.c new file +143 -0
143 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/inch.c new file +125 -0
125 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/inchstr.c new file +211 -0
211 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/initscr.c new file +339 -0
339 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/inopts.c new file +321 -0
321 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/insch.c new file +268 -0
268 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/insstr.c new file +261 -0
261 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/instr.c new file +243 -0
243 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/kernel.c new file +256 -0
256 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/keyname.c new file +125 -0
125 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/mouse.c new file +429 -0
429 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/move.c new file +54 -0
54 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/outopts.c new file +156 -0
156 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/overlay.c new file +256 -0
256 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/pad.c new file +259 -0
259 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/panel.c new file +630 -0
630 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/printw.c new file +123 -0
123 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/refresh.c new file +276 -0
276 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/scanw.c new file +575 -0
575 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/scr_dump.c new file +210 -0
210 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/scroll.c new file +98 -0
98 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/slk.c new file +643 -0
643 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/term.h new file +57 -0
57 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/termattr.c new file +176 -0
176 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/terminfo.c new file +215 -0
215 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/touch.c new file +160 -0
160 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/util.c new file +309 -0
309 lines not on this page · raw message
apps/lib/curses/pdcurses/pdcurses/window.c new file +562 -0
562 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Part of the diff is not shown here. View the raw message.
PATCH 14/20 app: add test curses
In reply to Jean-Christophe PLAGNIOL-VILLARD--- apps/Kconfig | 4 ++ apps/Makefile | 3 +- apps/test_curses/Makefile | 11 +++ apps/test_curses/main.c | 172 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 188 insertions(+), 2 deletions(-) create mode 100644 apps/test_curses/Makefile create mode 100644 apps/test_curses/main.c
apps/Kconfig +4 -0
@@ -41,4 +41,8 @@ endmenu config APP_EXAMPLE bool "example" +config APP_TEST_CURSES + bool "test curses" + select APP_LIB_CURSES + endif
apps/Makefile +1 -2
@@ -6,8 +6,7 @@ APP_CPPFLAGS += $(APP_CPPFLAGS-y) export APP_CPPFLAGS apps-$(CONFIG_APP_EXAMPLE) += example - -apps-$(CONFIG_APP_EXAMPLE) += example +apps-$(CONFIG_APP_TEST_CURSES) += test_curses $(obj)/application: $(apps-lds) $(apps-y)
apps/test_curses/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +targets := test_curses.map + +# Make sure files are removed during clean +extra-y += test_curses.map + +app-y += main.o +app-final-y = test_curses + +OBJCOPYFLAGS_test_curses.app = -O binary +LDFLAGS_apps := -Map $(obj)/test_curses.map +LDFLAGS_apps += -static --gc-sections
apps/test_curses/main.c new file +172 -0
172 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 15/20 app: pdcurses: add libmenu
In reply to Jean-Christophe PLAGNIOL-VILLARD--- apps/lib/curses/Kconfig | 4 + apps/lib/curses/pdcurses/Makefile.include | 1 + apps/lib/curses/pdcurses/include/nc_alloc.h | 4 + apps/lib/curses/pdcurses/include/ncurses_cfg.h | 40 ++ apps/lib/curses/pdcurses/menu/Makefile | 26 ++ apps/lib/curses/pdcurses/menu/READ.ME | 42 ++ apps/lib/curses/pdcurses/menu/eti.h | 54 +++ apps/lib/curses/pdcurses/menu/m_attribs.c | 144 ++++++ apps/lib/curses/pdcurses/menu/m_cursor.c | 112 +++++ apps/lib/curses/pdcurses/menu/m_driver.c | 556 ++++++++++++++++++++++ apps/lib/curses/pdcurses/menu/m_format.c | 131 ++++++ apps/lib/curses/pdcurses/menu/m_global.c | 598 ++++++++++++++++++++++++ apps/lib/curses/pdcurses/menu/m_hook.c | 151 ++++++ apps/lib/curses/pdcurses/menu/m_item_cur.c | 113 +++++ apps/lib/curses/pdcurses/menu/m_item_nam.c | 72 +++ apps/lib/curses/pdcurses/menu/m_item_new.c | 275 +++++++++++ apps/lib/curses/pdcurses/menu/m_item_opt.c | 159 +++++++ apps/lib/curses/pdcurses/menu/m_item_top.c | 107 +++++ apps/lib/curses/pdcurses/menu/m_item_use.c | 76 +++ apps/lib/curses/pdcurses/menu/m_item_val.c | 104 +++++ apps/lib/curses/pdcurses/menu/m_item_vis.c | 68 +++ apps/lib/curses/pdcurses/menu/m_items.c | 110 +++++ apps/lib/curses/pdcurses/menu/m_new.c | 142 ++++++ apps/lib/curses/pdcurses/menu/m_opts.c | 183 ++++++++ apps/lib/curses/pdcurses/menu/m_pad.c | 95 ++++ apps/lib/curses/pdcurses/menu/m_pattern.c | 124 +++++ apps/lib/curses/pdcurses/menu/m_post.c | 377 +++++++++++++++ apps/lib/curses/pdcurses/menu/m_req_name.c | 125 +++++ apps/lib/curses/pdcurses/menu/m_scale.c | 76 +++ apps/lib/curses/pdcurses/menu/m_spacing.c | 113 +++++ apps/lib/curses/pdcurses/menu/m_sub.c | 100 ++++ apps/lib/curses/pdcurses/menu/m_trace.c | 77 +++ apps/lib/curses/pdcurses/menu/m_userptr.c | 76 +++ apps/lib/curses/pdcurses/menu/m_win.c | 100 ++++ apps/lib/curses/pdcurses/menu/menu.h | 261 +++++++++++ apps/lib/curses/pdcurses/menu/menu.priv.h | 157 +++++++ apps/lib/curses/pdcurses/menu/mf_common.h | 95 ++++ 37 files changed, 5048 insertions(+) create mode 100644 apps/lib/curses/pdcurses/include/nc_alloc.h create mode 100644 apps/lib/curses/pdcurses/include/ncurses_cfg.h create mode 100644 apps/lib/curses/pdcurses/menu/Makefile create mode 100644 apps/lib/curses/pdcurses/menu/READ.ME create mode 100644 apps/lib/curses/pdcurses/menu/eti.h create mode 100644 apps/lib/curses/pdcurses/menu/m_attribs.c create mode 100644 apps/lib/curses/pdcurses/menu/m_cursor.c create mode 100644 apps/lib/curses/pdcurses/menu/m_driver.c create mode 100644 apps/lib/curses/pdcurses/menu/m_format.c create mode 100644 apps/lib/curses/pdcurses/menu/m_global.c create mode 100644 apps/lib/curses/pdcurses/menu/m_hook.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_cur.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_nam.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_new.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_opt.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_top.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_use.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_val.c create mode 100644 apps/lib/curses/pdcurses/menu/m_item_vis.c create mode 100644 apps/lib/curses/pdcurses/menu/m_items.c create mode 100644 apps/lib/curses/pdcurses/menu/m_new.c create mode 100644 apps/lib/curses/pdcurses/menu/m_opts.c create mode 100644 apps/lib/curses/pdcurses/menu/m_pad.c create mode 100644 apps/lib/curses/pdcurses/menu/m_pattern.c create mode 100644 apps/lib/curses/pdcurses/menu/m_post.c create mode 100644 apps/lib/curses/pdcurses/menu/m_req_name.c create mode 100644 apps/lib/curses/pdcurses/menu/m_scale.c create mode 100644 apps/lib/curses/pdcurses/menu/m_spacing.c create mode 100644 apps/lib/curses/pdcurses/menu/m_sub.c create mode 100644 apps/lib/curses/pdcurses/menu/m_trace.c create mode 100644 apps/lib/curses/pdcurses/menu/m_userptr.c create mode 100644 apps/lib/curses/pdcurses/menu/m_win.c create mode 100644 apps/lib/curses/pdcurses/menu/menu.h create mode 100644 apps/lib/curses/pdcurses/menu/menu.priv.h create mode 100644 apps/lib/curses/pdcurses/menu/mf_common.h
apps/lib/curses/Kconfig +4 -0
@@ -18,4 +18,8 @@ config APP_LIB_PANEL bool "panel" depends on APP_LIB_PDCURSES +config APP_LIB_MENU + bool "menu" + depends on APP_LIB_PDCURSES + endif
apps/lib/curses/pdcurses/Makefile.include +1 -0
@@ -1 +1,2 @@ APP_CPPFLAGS-y += -I$(srctree)/apps/lib/curses/pdcurses/include/ -D_LP64=0 +APP_CPPFLAGS-$(CONFIG_APP_LIB_MENU) += -I$(srctree)/apps/lib/curses/pdcurses/menu
apps/lib/curses/pdcurses/include/nc_alloc.h new file +4 -0
@@ -0,0 +1,4 @@ +#define typeMalloc (type,elts) (type *)malloc((elts)*sizeof(type)) +#define typeCalloc (type,elts) (type *)calloc((elts),sizeof(type)) +#define typeRealloc (type,elts,ptr) (type *)_nc_doalloc(ptr, (elts)*sizeof(type)) +
apps/lib/curses/pdcurses/include/ncurses_cfg.h new file +40 -0
@@ -0,0 +1,40 @@ +#define USE_RCS_IDS 0 +#define USE_WIDEC_SUPPORT 0 +#define NCURSES_SP_FUNCS 0 +#define DECL_ERRNO 0 +#define NCURSES_INTEROP_FUNCS 0 + +#define NCURSES_API +#define NCURSES_IMPEXP +#define NCURSES_INLINE +#define NCURSES_SP_DCLx +#define NCURSES_SP_NAME (x) x +#define NCURSES_EXPORT_VAR (x) x +#define NCURSES_EXPORT (x) x + +#define SP_PARM SP +#define CURRENT_SCREEN SP +#define StdScreen (x) stdscr + +#define T (x) +#define T_CALLED(x...) + +#define GCC_UNUSED __attribute__((unused)) + +#define BLANK (' '|A_NORMAL) +#define ZEROS ('\0'|A_NORMAL) +#define ISBLANK isblank + +#define ChCharOf (c) ((c) & (chtype)A_CHARTEXT) +#define CharOf (c) ChCharOf(c) + +#define WINDOW_ATTRS (x) ((x)->_attrs) +#define IsValidScreen (x) 1 + +#define returnCode return +#define returnWin return +#define returnCPtr return +#define returnVoidPtr return +#define returnPtr return +#define returnAttr return +#define returnBool return
apps/lib/curses/pdcurses/menu/Makefile new file +26 -0
@@ -0,0 +1,26 @@ +app-y += m_req_name.o +app-y += m_item_nam.o +app-y += m_pad.o +app-y += m_cursor.o +app-y += m_item_new.o +app-y += m_attribs.o +app-y += m_item_opt.o +app-y += m_format.o +app-y += m_post.o +app-y += m_userptr.o +app-y += m_item_cur.o +app-y += m_driver.o +app-y += m_sub.o +app-y += m_win.o +app-y += m_global.o +app-y += m_item_vis.o +app-y += m_new.o +app-y += m_scale.o +app-y += m_spacing.o +app-y += m_opts.o +app-y += m_pattern.o +app-y += m_item_val.o +app-y += m_hook.o +app-y += m_item_use.o +app-y += m_items.o +app-y += m_item_top.o
apps/lib/curses/pdcurses/menu/READ.ME new file +42 -0
42 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/eti.h new file +54 -0
54 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_attribs.c new file +144 -0
144 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_cursor.c new file +112 -0
112 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_driver.c new file +556 -0
556 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_format.c new file +131 -0
131 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_global.c new file +598 -0
598 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_hook.c new file +151 -0
151 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_item_cur.c new file +113 -0
113 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_item_nam.c new file +72 -0
72 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_item_new.c new file +275 -0
275 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_item_opt.c new file +159 -0
159 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_item_top.c new file +107 -0
107 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_item_use.c new file +76 -0
76 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_item_val.c new file +104 -0
104 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_item_vis.c new file +68 -0
68 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_items.c new file +110 -0
110 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_new.c new file +142 -0
48 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_opts.c new file +183 -0
183 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_pad.c new file +95 -0
95 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_pattern.c new file +124 -0
124 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_post.c new file +377 -0
377 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_req_name.c new file +125 -0
125 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_scale.c new file +76 -0
76 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_spacing.c new file +113 -0
113 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_sub.c new file +100 -0
100 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_trace.c new file +77 -0
77 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_userptr.c new file +76 -0
76 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/m_win.c new file +100 -0
100 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/menu.h new file +261 -0
261 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/menu.priv.h new file +157 -0
157 lines not on this page · raw message
apps/lib/curses/pdcurses/menu/mf_common.h new file +95 -0
95 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Part of the diff is not shown here. View the raw message.
PATCH 16/20 app: pdcurses: add libform
In reply to Jean-Christophe PLAGNIOL-VILLARD--- apps/lib/curses/Kconfig | 4 + apps/lib/curses/pdcurses/Makefile | 114 +- apps/lib/curses/pdcurses/Makefile.include | 1 + apps/lib/curses/pdcurses/form/Makefile | 42 + apps/lib/curses/pdcurses/form/READ.ME | 42 + apps/lib/curses/pdcurses/form/f_trace.c | 70 + apps/lib/curses/pdcurses/form/fld_arg.c | 98 + apps/lib/curses/pdcurses/form/fld_attr.c | 119 + apps/lib/curses/pdcurses/form/fld_current.c | 137 + apps/lib/curses/pdcurses/form/fld_def.c | 399 +++ apps/lib/curses/pdcurses/form/fld_dup.c | 101 + apps/lib/curses/pdcurses/form/fld_ftchoice.c | 70 + apps/lib/curses/pdcurses/form/fld_ftlink.c | 87 + apps/lib/curses/pdcurses/form/fld_info.c | 113 + apps/lib/curses/pdcurses/form/fld_just.c | 86 + apps/lib/curses/pdcurses/form/fld_link.c | 96 + apps/lib/curses/pdcurses/form/fld_max.c | 77 + apps/lib/curses/pdcurses/form/fld_move.c | 64 + apps/lib/curses/pdcurses/form/fld_newftyp.c | 143 + apps/lib/curses/pdcurses/form/fld_opts.c | 138 + apps/lib/curses/pdcurses/form/fld_pad.c | 85 + apps/lib/curses/pdcurses/form/fld_page.c | 82 + apps/lib/curses/pdcurses/form/fld_stat.c | 79 + apps/lib/curses/pdcurses/form/fld_type.c | 97 + apps/lib/curses/pdcurses/form/fld_user.c | 72 + apps/lib/curses/pdcurses/form/form.h | 423 +++ apps/lib/curses/pdcurses/form/form.priv.h | 299 ++ apps/lib/curses/pdcurses/form/frm_cursor.c | 70 + apps/lib/curses/pdcurses/form/frm_data.c | 193 ++ apps/lib/curses/pdcurses/form/frm_def.c | 448 +++ apps/lib/curses/pdcurses/form/frm_driver.c | 4646 ++++++++++++++++++++++++++ apps/lib/curses/pdcurses/form/frm_hook.c | 142 + apps/lib/curses/pdcurses/form/frm_opts.c | 127 + apps/lib/curses/pdcurses/form/frm_page.c | 106 + apps/lib/curses/pdcurses/form/frm_post.c | 124 + apps/lib/curses/pdcurses/form/frm_req_name.c | 170 + apps/lib/curses/pdcurses/form/frm_scale.c | 69 + apps/lib/curses/pdcurses/form/frm_sub.c | 86 + apps/lib/curses/pdcurses/form/frm_user.c | 72 + apps/lib/curses/pdcurses/form/frm_win.c | 92 + apps/lib/curses/pdcurses/form/fty_alnum.c | 202 ++ apps/lib/curses/pdcurses/form/fty_alpha.c | 202 ++ apps/lib/curses/pdcurses/form/fty_enum.c | 442 +++ apps/lib/curses/pdcurses/form/fty_generic.c | 297 ++ apps/lib/curses/pdcurses/form/fty_int.c | 293 ++ apps/lib/curses/pdcurses/form/fty_ipv4.c | 120 + apps/lib/curses/pdcurses/form/fty_num.c | 339 ++ apps/lib/curses/pdcurses/form/fty_regex.c | 350 ++ 48 files changed, 11639 insertions(+), 89 deletions(-) rewrite apps/lib/curses/pdcurses/Makefile (78%) create mode 100644 apps/lib/curses/pdcurses/form/Makefile create mode 100644 apps/lib/curses/pdcurses/form/READ.ME create mode 100644 apps/lib/curses/pdcurses/form/f_trace.c create mode 100644 apps/lib/curses/pdcurses/form/fld_arg.c create mode 100644 apps/lib/curses/pdcurses/form/fld_attr.c create mode 100644 apps/lib/curses/pdcurses/form/fld_current.c create mode 100644 apps/lib/curses/pdcurses/form/fld_def.c create mode 100644 apps/lib/curses/pdcurses/form/fld_dup.c create mode 100644 apps/lib/curses/pdcurses/form/fld_ftchoice.c create mode 100644 apps/lib/curses/pdcurses/form/fld_ftlink.c create mode 100644 apps/lib/curses/pdcurses/form/fld_info.c create mode 100644 apps/lib/curses/pdcurses/form/fld_just.c create mode 100644 apps/lib/curses/pdcurses/form/fld_link.c create mode 100644 apps/lib/curses/pdcurses/form/fld_max.c create mode 100644 apps/lib/curses/pdcurses/form/fld_move.c create mode 100644 apps/lib/curses/pdcurses/form/fld_newftyp.c create mode 100644 apps/lib/curses/pdcurses/form/fld_opts.c create mode 100644 apps/lib/curses/pdcurses/form/fld_pad.c create mode 100644 apps/lib/curses/pdcurses/form/fld_page.c create mode 100644 apps/lib/curses/pdcurses/form/fld_stat.c create mode 100644 apps/lib/curses/pdcurses/form/fld_type.c create mode 100644 apps/lib/curses/pdcurses/form/fld_user.c create mode 100644 apps/lib/curses/pdcurses/form/form.h create mode 100644 apps/lib/curses/pdcurses/form/form.priv.h create mode 100644 apps/lib/curses/pdcurses/form/frm_cursor.c create mode 100644 apps/lib/curses/pdcurses/form/frm_data.c create mode 100644 apps/lib/curses/pdcurses/form/frm_def.c create mode 100644 apps/lib/curses/pdcurses/form/frm_driver.c create mode 100644 apps/lib/curses/pdcurses/form/frm_hook.c create mode 100644 apps/lib/curses/pdcurses/form/frm_opts.c create mode 100644 apps/lib/curses/pdcurses/form/frm_page.c create mode 100644 apps/lib/curses/pdcurses/form/frm_post.c create mode 100644 apps/lib/curses/pdcurses/form/frm_req_name.c create mode 100644 apps/lib/curses/pdcurses/form/frm_scale.c create mode 100644 apps/lib/curses/pdcurses/form/frm_sub.c create mode 100644 apps/lib/curses/pdcurses/form/frm_user.c create mode 100644 apps/lib/curses/pdcurses/form/frm_win.c create mode 100644 apps/lib/curses/pdcurses/form/fty_alnum.c create mode 100644 apps/lib/curses/pdcurses/form/fty_alpha.c create mode 100644 apps/lib/curses/pdcurses/form/fty_enum.c create mode 100644 apps/lib/curses/pdcurses/form/fty_generic.c create mode 100644 apps/lib/curses/pdcurses/form/fty_int.c create mode 100644 apps/lib/curses/pdcurses/form/fty_ipv4.c create mode 100644 apps/lib/curses/pdcurses/form/fty_num.c create mode 100644 apps/lib/curses/pdcurses/form/fty_regex.c
apps/lib/curses/Kconfig +4 -0
@@ -22,4 +22,8 @@ config APP_LIB_MENU bool "menu" depends on APP_LIB_PDCURSES +config APP_LIB_FORM + bool "form" + depends on APP_LIB_MENU + endif
apps/lib/curses/pdcurses/Makefile +25 -89
114 lines not on this page · raw message
apps/lib/curses/pdcurses/Makefile.include +1 -0
@@ -1,2 +1,3 @@ APP_CPPFLAGS-y += -I$(srctree)/apps/lib/curses/pdcurses/include/ -D_LP64=0 APP_CPPFLAGS-$(CONFIG_APP_LIB_MENU) += -I$(srctree)/apps/lib/curses/pdcurses/menu +APP_CPPFLAGS-$(CONFIG_APP_LIB_FORM) += -I$(srctree)/apps/lib/curses/pdcurses/form
apps/lib/curses/pdcurses/form/Makefile new file +42 -0
42 lines not on this page · raw message
apps/lib/curses/pdcurses/form/READ.ME new file +42 -0
42 lines not on this page · raw message
apps/lib/curses/pdcurses/form/f_trace.c new file +70 -0
70 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_arg.c new file +98 -0
98 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_attr.c new file +119 -0
119 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_current.c new file +137 -0
137 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_def.c new file +399 -0
399 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_dup.c new file +101 -0
101 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_ftchoice.c new file +70 -0
70 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_ftlink.c new file +87 -0
87 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_info.c new file +113 -0
113 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_just.c new file +86 -0
86 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_link.c new file +96 -0
96 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_max.c new file +77 -0
77 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_move.c new file +64 -0
64 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_newftyp.c new file +143 -0
143 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_opts.c new file +138 -0
138 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_pad.c new file +85 -0
85 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_page.c new file +82 -0
82 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_stat.c new file +79 -0
79 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_type.c new file +97 -0
97 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fld_user.c new file +72 -0
72 lines not on this page · raw message
apps/lib/curses/pdcurses/form/form.h new file +423 -0
423 lines not on this page · raw message
apps/lib/curses/pdcurses/form/form.priv.h new file +299 -0
155 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_cursor.c new file +70 -0
70 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_data.c new file +193 -0
193 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_def.c new file +448 -0
448 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_driver.c new file +4646 -0
4,646 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_hook.c new file +142 -0
142 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_opts.c new file +127 -0
127 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_page.c new file +106 -0
106 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_post.c new file +124 -0
124 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_req_name.c new file +170 -0
170 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_scale.c new file +69 -0
69 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_sub.c new file +86 -0
86 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_user.c new file +72 -0
72 lines not on this page · raw message
apps/lib/curses/pdcurses/form/frm_win.c new file +92 -0
92 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fty_alnum.c new file +202 -0
202 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fty_alpha.c new file +202 -0
202 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fty_enum.c new file +442 -0
442 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fty_generic.c new file +297 -0
297 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fty_int.c new file +293 -0
293 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fty_ipv4.c new file +120 -0
120 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fty_num.c new file +339 -0
339 lines not on this page · raw message
apps/lib/curses/pdcurses/form/fty_regex.c new file +350 -0
350 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Part of the diff is not shown here. View the raw message.
PATCH 17/20 app: curses: add menu example
In reply to Jean-Christophe PLAGNIOL-VILLARD--- apps/Kconfig | 4 ++ apps/Makefile | 1 + apps/menu_curses/Makefile | 11 ++++ apps/menu_curses/main.c | 127 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 143 insertions(+) create mode 100644 apps/menu_curses/Makefile create mode 100644 apps/menu_curses/main.c
apps/Kconfig +4 -0
@@ -45,4 +45,8 @@ config APP_TEST_CURSES bool "test curses" select APP_LIB_CURSES +config APP_TEST_CURSES_MENU + bool "test curses menu" + depends on APP_LIB_MENU + endif
apps/Makefile +1 -0
@@ -7,6 +7,7 @@ export APP_CPPFLAGS apps-$(CONFIG_APP_EXAMPLE) += example apps-$(CONFIG_APP_TEST_CURSES) += test_curses +apps-$(CONFIG_APP_TEST_CURSES_MENU) += menu_curses $(obj)/application: $(apps-lds) $(apps-y)
apps/menu_curses/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +targets := menu_curses.map + +# Make sure files are removed during clean +extra-y += menu_curses.map + +app-y += main.o +app-final-y = menu_curses + +OBJCOPYFLAGS_menu_curses.app = -O binary +LDFLAGS_apps := -Map $(obj)/menu_curses.map +LDFLAGS_apps += -static --gc-sections
apps/menu_curses/main.c new file +127 -0
127 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 18/20 app: curses: add panel example
In reply to Jean-Christophe PLAGNIOL-VILLARD--- apps/Kconfig | 4 ++ apps/Makefile | 1 + apps/panel_curses/Makefile | 11 +++++ apps/panel_curses/main.c | 118 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 134 insertions(+) create mode 100644 apps/panel_curses/Makefile create mode 100644 apps/panel_curses/main.c
apps/Kconfig +4 -0
@@ -45,6 +45,10 @@ config APP_TEST_CURSES bool "test curses" select APP_LIB_CURSES +config APP_TEST_CURSES_PANEL + bool "test curses panel" + depends on APP_LIB_PANEL + config APP_TEST_CURSES_MENU bool "test curses menu" depends on APP_LIB_MENU
apps/Makefile +1 -0
@@ -8,6 +8,7 @@ export APP_CPPFLAGS apps-$(CONFIG_APP_EXAMPLE) += example apps-$(CONFIG_APP_TEST_CURSES) += test_curses apps-$(CONFIG_APP_TEST_CURSES_MENU) += menu_curses +apps-$(CONFIG_APP_TEST_CURSES_PANEL) += panel_curses $(obj)/application: $(apps-lds) $(apps-y)
apps/panel_curses/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +targets := panel_curses.map + +# Make sure files are removed during clean +extra-y += panel_curses.map + +app-y += main.o +app-final-y = panel_curses + +OBJCOPYFLAGS_panel_curses.app = -O binary +LDFLAGS_apps := -Map $(obj)/panel_curses.map +LDFLAGS_apps += -static --gc-sections
apps/panel_curses/main.c new file +118 -0
118 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 19/20 app: curses: add form example
In reply to Jean-Christophe PLAGNIOL-VILLARD--- apps/Kconfig | 4 ++ apps/Makefile | 1 + apps/form_curses/Makefile | 11 +++++ apps/form_curses/main.c | 113 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 129 insertions(+) create mode 100644 apps/form_curses/Makefile create mode 100644 apps/form_curses/main.c
apps/Kconfig +4 -0
@@ -53,4 +53,8 @@ config APP_TEST_CURSES_MENU bool "test curses menu" depends on APP_LIB_MENU +config APP_TEST_CURSES_FORM + bool "test curses form" + depends on APP_LIB_FORM + endif
apps/Makefile +1 -0
@@ -9,6 +9,7 @@ apps-$(CONFIG_APP_EXAMPLE) += example apps-$(CONFIG_APP_TEST_CURSES) += test_curses apps-$(CONFIG_APP_TEST_CURSES_MENU) += menu_curses apps-$(CONFIG_APP_TEST_CURSES_PANEL) += panel_curses +apps-$(CONFIG_APP_TEST_CURSES_FORM) += form_curses $(obj)/application: $(apps-lds) $(apps-y)
apps/form_curses/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +targets := form_curses.map + +# Make sure files are removed during clean +extra-y += form_curses.map + +app-y += main.o +app-final-y = form_curses + +OBJCOPYFLAGS_form_curses.app = -O binary +LDFLAGS_apps := -Map $(obj)/form_curses.map +LDFLAGS_apps += -static --gc-sections
apps/form_curses/main.c new file +113 -0
113 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 20/20 highbank: enable application support
In reply to Jean-Christophe PLAGNIOL-VILLARD--- arch/arm/configs/highbank_defconfig | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-)
arch/arm/configs/highbank_defconfig +19 -2
@@ -4,15 +4,16 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_PBL_IMAGE=y CONFIG_MMU=y CONFIG_MALLOC_SIZE=0xa00000 +CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="vexpress: " CONFIG_LONGHELP=y -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y +CONFIG_PARTITION_DISK_EFI=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/highbank/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y
@@ -23,10 +24,16 @@ CONFIG_CMD_READLINE=y CONFIG_CMD_MENU=y CONFIG_CMD_MENU_MANAGEMENT=y CONFIG_CMD_PASSWD=y +CONFIG_CMD_LN=y +CONFIG_CMD_READLINK=y CONFIG_CMD_TFTP=y +CONFIG_CMD_FILETYPE=y +CONFIG_CMD_APPINFO=y CONFIG_CMD_ECHO_E=y CONFIG_CMD_LOADB=y CONFIG_CMD_MEMINFO=y +CONFIG_CMD_CRC=y +CONFIG_CMD_CRC_CMP=y CONFIG_CMD_BOOTM_SHOW_TYPE=y CONFIG_CMD_BOOTM_VERBOSE=y CONFIG_CMD_BOOTM_INITRD=y
@@ -60,3 +67,13 @@ CONFIG_GPIO_PL061=y CONFIG_FS_TFTP=y CONFIG_SHA1=y CONFIG_SHA256=y +CONFIG_APPLICATIONS=y +CONFIG_APP_LIB_PANEL=y +CONFIG_APP_LIB_MENU=y +CONFIG_APP_LIB_FORM=y +CONFIG_APP_TEXT_BASE_OFFSET=0x1000000 +CONFIG_APP_EXAMPLE=y +CONFIG_APP_TEST_CURSES=y +CONFIG_APP_TEST_CURSES_PANEL=y +CONFIG_APP_TEST_CURSES_MENU=y +CONFIG_APP_TEST_CURSES_FORM=y
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 21 lines · Jean-Christophe PLAGNIOL-VILLARD
HI,
this patch serie introduce the application support to barebox
This will allow to run application at run time by calling barebox syscalls and as this will be a stable ABI the application will able the run against any barebox that support it
As the application are not linked to barebox the GPLv2 licence does not apply.
This patch serie provide a small libc (partialy implemented) which is under GPLv2 + exception
As a special exception, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other works to produce a work based on this file, this file does not by itself cause the resulting work to be covered by the GNU General Public License. However the source code for this file must still be made available in accordance with section (3) of the GNU General Public License.
Quoted 4 lines
This exception does not invalidate any other reasons why a work based on this file might be covered by the GNU General Public License.
This also provide the curses support proted against the libary with some examples
I'm fine with the app support in general, but I don't want to become the maintainer of a proprietary software helper framework. So, if you want curses and whatever stuff, create a separate repository for it. The barebox repository ends at the syscall interface and an example application for showing how to use 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