Introduce a new EXPERIMENTAL feature: BARE_METAL.
This should ultimately llow to build bare-metal compilers, for targets that have no kernel and no C library.
Move the C library build script to their own sub-directory; introduce an empty build script for bare-metal.
Move the compiler build script to its own sub-directory.
Move the kernel build script to its own sub-directory; introduce an empty build script for bare-metal.
Update the ARM target tuples to enable bare-metal targets.
Add two ARM bare-metal samples.
Add latest Linux kernel versions.
/trunk/scripts/build/kernel/none.sh | 77 6 71 0 +----
/trunk/scripts/build/cc/gcc.sh | 58 41 17 0 ++-
/trunk/scripts/build/libc/none.sh | 513 9 504 0 +-----------------------------
/trunk/scripts/crosstool.sh | 17 9 8 0 +
/trunk/scripts/functions | 6 4 2 0 +
/trunk/scripts/showSamples.sh | 6 3 3 0
/trunk/samples/arm-unknown-elf/crosstool.config | 225 225 0 0 +++++++++++++
/trunk/samples/arm-unknown-eabi/crosstool.config | 223 223 0 0 +++++++++++++
/trunk/config/kernel/linux_headers_install.in | 64 27 37 0 ++--
/trunk/config/kernel.in | 9 8 1 0 +
/trunk/config/toolchain.in | 1 1 0 0 +
/trunk/config/cc/gcc.in | 3 3 0 0 +
/trunk/config/debug/dmalloc.in | 1 1 0 0 +
/trunk/config/debug/gdb.in | 4 3 1 0 +
/trunk/config/debug/strace.in | 1 1 0 0 +
/trunk/config/debug/duma.in | 1 1 0 0 +
/trunk/config/cc.in | 8 8 0 0 +
/trunk/config/target.in | 13 13 0 0 +
/trunk/config/binutils.in | 1 1 0 0 +
/trunk/config/gmp_mpfr.in | 1 1 0 0 +
/trunk/config/libc.in | 17 11 6 0 +
/trunk/arch/arm/functions | 3 1 2 0 -
22 files changed, 600 insertions(+), 652 deletions(-)
2 * yesno.c -- implements the yes/no box
4 * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
5 * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 * Display termination buttons
27 static void print_buttons(WINDOW * dialog, int height, int width, int selected)
29 int x = width / 2 - 10;
32 print_button(dialog, " Yes ", y, x, selected == 0);
33 print_button(dialog, " No ", y, x + 13, selected == 1);
35 wmove(dialog, y, x + 1 + 13 * selected);
40 * Display a dialog box with two buttons - Yes and No
42 int dialog_yesno(const char *title, const char *prompt, int height, int width)
44 int i, x, y, key = 0, button = 0;
48 if (getmaxy(stdscr) < (height + 4))
49 return -ERRDISPLAYTOOSMALL;
50 if (getmaxx(stdscr) < (width + 4))
51 return -ERRDISPLAYTOOSMALL;
53 /* center dialog box on screen */
54 x = (COLS - width) / 2;
55 y = (LINES - height) / 2;
57 draw_shadow(stdscr, y, x, height, width);
59 dialog = newwin(height, width, y, x);
62 draw_box(dialog, 0, 0, height, width,
63 dlg.dialog.atr, dlg.border.atr);
64 wattrset(dialog, dlg.border.atr);
65 mvwaddch(dialog, height - 3, 0, ACS_LTEE);
66 for (i = 0; i < width - 2; i++)
67 waddch(dialog, ACS_HLINE);
68 wattrset(dialog, dlg.dialog.atr);
69 waddch(dialog, ACS_RTEE);
71 print_title(dialog, title, width);
73 wattrset(dialog, dlg.dialog.atr);
74 print_autowrap(dialog, prompt, width - 2, 1, 3);
76 print_buttons(dialog, height, width, 0);
78 while (key != KEY_ESC) {
93 button = ((key == KEY_LEFT ? --button : ++button) < 0) ? 1 : (button > 1 ? 0 : button);
95 print_buttons(dialog, height, width, button);
103 key = on_key_esc(dialog);
113 return key; /* ESC pressed */