* This patch renames remainders the arch i386 to x86.

* fix arch/io.h to use consistent types
* add compression code and start integration into Kconfig
* update to newer version of Kconfig, and rename some occurences
  of "Linux" to "LinuxBIOS"
* set up Make framework to create linuxbios.rom

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G Minnich <rminnich@lanl.gov>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@55 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Stefan Reinauer 2007-01-04 20:12:02 +00:00
commit f2000cd4ad
43 changed files with 1747 additions and 401 deletions

View file

@ -1,17 +0,0 @@
#
# Generated files
#
config*
lex.*.c
*.tab.c
*.tab.h
zconf.hash.c
#
# configuration programs
#
conf
mconf
qconf
gconf
kxgettext

View file

@ -2,7 +2,7 @@
# Kernel configuration targets
# These targets are used from top-level makefile
PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config
.PHONY: oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config
xconfig: $(obj)/qconf
$< Kconfig
@ -28,10 +28,9 @@ update-po-config: $(obj)/kxgettext
--add-comments --keyword=_ --keyword=N_ \
--files-from=scripts/kconfig/POTFILES.in \
--output scripts/kconfig/config.pot
$(Q)ln -fs Kconfig_i386 arch/um/Kconfig_arch
$(Q)for i in `ls arch/`; \
do \
scripts/kconfig/kxgettext arch/$$i/Kconfig \
scripts/kconfig/kxgettext Kconfig \
| msguniq -o scripts/kconfig/linux_$${i}.pot; \
done
$(Q)msgcat scripts/kconfig/config.pot \
@ -39,10 +38,9 @@ update-po-config: $(obj)/kxgettext
--output scripts/kconfig/linux_raw.pot
$(Q)msguniq --sort-by-file scripts/kconfig/linux_raw.pot \
--output scripts/kconfig/linux.pot
$(Q)rm -f arch/um/Kconfig_arch
$(Q)rm -f scripts/kconfig/linux_*.pot scripts/kconfig/config.pot
PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig
.PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig
randconfig: $(obj)/conf
$< -r Kconfig
@ -56,16 +54,32 @@ allnoconfig: $(obj)/conf
allmodconfig: $(obj)/conf
$< -m Kconfig
UNAME_RELEASE := $(shell uname -r)
CLONECONFIG := $(firstword $(wildcard /proc/config.gz \
/lib/modules/$(UNAME_RELEASE)/.config \
/etc/kernel-config \
/boot/config-$(UNAME_RELEASE)))
cloneconfig: $(obj)/conf
$(Q)case "$(CLONECONFIG)" in \
'') echo -e "The configuration of the running" \
"kernel could not be determined\n"; \
false ;; \
*.gz) gzip -cd $(CLONECONFIG) > .config.running ;; \
*) cat $(CLONECONFIG) > .config.running ;; \
esac && \
echo -e "Cloning configuration file $(CLONECONFIG)\n"
$(Q)$< -D .config.running Kconfig
defconfig: $(obj)/conf
ifeq ($(KBUILD_DEFCONFIG),)
$< -d Kconfig
else
@echo *** Default configuration is based on '$(KBUILD_DEFCONFIG)'
$(Q)$< -D arch/$(ARCH)/configs/$(KBUILD_DEFCONFIG) Kconfig
$(Q)$< -D configs/$(KBUILD_DEFCONFIG) Kconfig
endif
%_defconfig: $(obj)/conf
$(Q)$< -D arch/$(ARCH)/configs/$@ Kconfig
$(Q)$< -D configs/$@ Kconfig
# Help text used by make help
help:
@ -78,7 +92,7 @@ help:
@echo ' defconfig - New config with default answer to all options'
@echo ' allmodconfig - New config selecting modules when possible'
@echo ' allyesconfig - New config where all options are accepted with yes'
@echo ' allnoconfig - New config where all options are answered with no'
@echo ' allnoconfig - New minimal config'
# ===========================================================================
# Shared Makefile for the various kconfig executables:

View file

@ -5,7 +5,6 @@
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
@ -64,6 +63,20 @@ static void check_stdin(void)
}
}
static char *fgets_check_stream(char *s, int size, FILE *stream)
{
char *ret = fgets(s, size, stream);
if (ret == NULL && feof(stream)) {
printf(_("aborted!\n\n"));
printf(_("Console input is closed. "));
printf(_("Run 'make oldconfig' to update configuration.\n\n"));
exit(1);
}
return ret;
}
static void conf_askvalue(struct symbol *sym, const char *def)
{
enum symbol_type type = sym_get_type(sym);
@ -101,7 +114,7 @@ static void conf_askvalue(struct symbol *sym, const char *def)
check_stdin();
case ask_all:
fflush(stdout);
fgets(line, 128, stdin);
fgets_check_stream(line, 128, stdin);
return;
case set_default:
printf("%s\n", def);
@ -315,7 +328,8 @@ static int conf_choice(struct menu *menu)
printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));
def_sym = sym_get_choice_value(sym);
cnt = def = 0;
line[0] = 0;
line[0] = '0';
line[1] = 0;
for (child = menu->list; child; child = child->next) {
if (!menu_is_visible(child))
continue;
@ -356,7 +370,7 @@ static int conf_choice(struct menu *menu)
check_stdin();
case ask_all:
fflush(stdout);
fgets(line, 128, stdin);
fgets_check_stream(line, 128, stdin);
strip(line);
if (line[0] == '?') {
printf("\n%s\n", menu->sym->help ?
@ -532,7 +546,7 @@ int main(int ac, char **av)
break;
case 'h':
case '?':
fprintf(stderr, "See README for usage info\n");
printf("%s [-o|-s] config\n", av[0]);
exit(0);
}
}

View file

@ -26,6 +26,7 @@ const char conf_defname[] = "arch/$ARCH/defconfig";
const char *conf_confnames[] = {
".config",
conf_defname,
NULL,
};
@ -321,7 +322,7 @@ int conf_read(const char *name)
sym->flags |= e->right.sym->flags & SYMBOL_NEW;
}
sym_change_count = conf_warnings || conf_unsaved;
sym_change_count = conf_warnings && conf_unsaved;
return 0;
}
@ -370,7 +371,6 @@ int conf_write(const char *name)
out_h = fopen(".tmpconfig.h", "w");
if (!out_h)
return 1;
file_write_dep(NULL);
}
sym = sym_lookup("KERNELVERSION", 0);
sym_calc_value(sym);
@ -509,6 +509,7 @@ int conf_write(const char *name)
if (out_h) {
fclose(out_h);
rename(".tmpconfig.h", "include/linuxbios/autoconf.h");
file_write_dep(NULL);
}
if (!name || basename != conf_def_filename) {
if (!name)

View file

@ -275,7 +275,7 @@ void init_main_window(const gchar * glade_file)
/*"style", PANGO_STYLE_OBLIQUE, */
NULL);
sprintf(title, _("Linux Kernel v%s Configuration"),
sprintf(title, _("LinuxBIOS v%s Configuration"),
getenv("KERNELVERSION"));
gtk_window_set_title(GTK_WINDOW(main_wnd), title);
@ -742,7 +742,7 @@ void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data)
GtkWidget *dialog;
const gchar *intro_text = _(
"Welcome to gkc, the GTK+ graphical kernel configuration tool\n"
"for Linux.\n"
"for LinuxBIOS.\n"
"For each option, a blank box indicates the feature is disabled, a\n"
"check indicates it is enabled, and a dot indicates that it is to\n"
"be compiled as a module. Clicking on the box will cycle through the three states.\n"

View file

@ -1,4 +0,0 @@
#
# Generated files
#
lxdialog

View file

@ -7,10 +7,10 @@ check-lxdialog := $(srctree)/$(src)/check-lxdialog.sh
# we really need to do so. (Do not call gcc as part of make mrproper)
HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
HOST_EXTRACFLAGS += -DLOCALE
HOST_EXTRACFLAGS += -DLOCALE
PHONY += dochecklxdialog
.PHONY: dochecklxdialog
$(obj)/dochecklxdialog:
$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_LOADLIBES)

View file

@ -196,8 +196,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
print_buttons(dialog, height, width, 0);
wnoutrefresh(dialog);
wnoutrefresh(list);
wnoutrefresh(dialog);
doupdate();
while (key != ESC) {
@ -225,11 +225,12 @@ int dialog_checklist(const char *title, const char *prompt, int height,
}
scroll--;
print_item(list, items[scroll * 3 + 1], status[scroll], 0, TRUE);
wnoutrefresh(list);
print_arrows(dialog, choice, item_no,
scroll, box_y, box_x + check_x + 5, list_height);
wnoutrefresh(dialog);
wrefresh(list);
wrefresh(dialog);
continue; /* wait for another key press */
} else
@ -251,12 +252,12 @@ int dialog_checklist(const char *title, const char *prompt, int height,
scroll++;
print_item(list, items[(scroll + max_choice - 1) * 3 + 1],
status[scroll + max_choice - 1], max_choice - 1, TRUE);
wnoutrefresh(list);
print_arrows(dialog, choice, item_no,
scroll, box_y, box_x + check_x + 5, list_height);
wnoutrefresh(dialog);
wrefresh(list);
wrefresh(dialog);
continue; /* wait for another key press */
} else
@ -270,8 +271,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
choice = i;
print_item(list, items[(scroll + choice) * 3 + 1],
status[scroll + choice], choice, TRUE);
wnoutrefresh(dialog);
wrefresh(list);
wnoutrefresh(list);
wrefresh(dialog);
}
continue; /* wait for another key press */
}
@ -305,8 +306,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
print_item(list, items[(scroll + i) * 3 + 1],
status[scroll + i], i, i == choice);
}
wnoutrefresh(dialog);
wrefresh(list);
wnoutrefresh(list);
wrefresh(dialog);
for (i = 0; i < item_no; i++)
if (status[i])

View file

@ -58,7 +58,8 @@
#include "dialog.h"
static int menu_width, item_x;
#define ITEM_IDENT 1 /* Indent of menu entries. Fixed for all menus */
static int menu_width;
/*
* Print menu item
@ -69,7 +70,7 @@ static void do_print_item(WINDOW * win, const char *item, int choice,
int j;
char *menu_item = malloc(menu_width + 1);
strncpy(menu_item, item, menu_width - item_x);
strncpy(menu_item, item, menu_width - ITEM_IDENT);
menu_item[menu_width] = 0;
j = first_alpha(menu_item, "YyNnMmHh");
@ -86,13 +87,13 @@ static void do_print_item(WINDOW * win, const char *item, int choice,
wclrtoeol(win);
#endif
wattrset(win, selected ? item_selected_attr : item_attr);
mvwaddstr(win, choice, item_x, menu_item);
mvwaddstr(win, choice, ITEM_IDENT, menu_item);
if (hotkey) {
wattrset(win, selected ? tag_key_selected_attr : tag_key_attr);
mvwaddch(win, choice, item_x + j, menu_item[j]);
mvwaddch(win, choice, ITEM_IDENT + j, menu_item[j]);
}
if (selected) {
wmove(win, choice, item_x + 1);
wmove(win, choice, ITEM_IDENT + 1);
}
free(menu_item);
wrefresh(win);
@ -226,8 +227,6 @@ int dialog_menu(const char *title, const char *prompt, int height, int width,
draw_box(dialog, box_y, box_x, menu_height + 2, menu_width + 2,
menubox_border_attr, menubox_attr);
item_x = (menu_width - 70) / 2;
/* Set choice to default item */
for (i = 0; i < item_no; i++)
if (strcmp(current, items[i * 2]) == 0)
@ -264,10 +263,10 @@ int dialog_menu(const char *title, const char *prompt, int height, int width,
wnoutrefresh(menu);
print_arrows(dialog, item_no, scroll,
box_y, box_x + item_x + 1, menu_height);
box_y, box_x + ITEM_IDENT + 1, menu_height);
print_buttons(dialog, height, width, 0);
wmove(menu, choice, item_x + 1);
wmove(menu, choice, ITEM_IDENT + 1);
wrefresh(menu);
while (key != ESC) {
@ -350,7 +349,7 @@ int dialog_menu(const char *title, const char *prompt, int height, int width,
print_item(scroll + choice, choice, TRUE);
print_arrows(dialog, item_no, scroll,
box_y, box_x + item_x + 1, menu_height);
box_y, box_x + ITEM_IDENT + 1, menu_height);
wnoutrefresh(dialog);
wrefresh(menu);

View file

@ -29,10 +29,10 @@ static char menu_backtitle[128];
static const char mconf_readme[] = N_(
"Overview\n"
"--------\n"
"Some kernel features may be built directly into the kernel.\n"
"Some firmware features may be built directly into the firmware.\n"
"Some may be made into loadable runtime modules. Some features\n"
"may be completely removed altogether. There are also certain\n"
"kernel parameters which are not really features, but must be\n"
"firmware parameters which are not really features, but must be\n"
"entered in as decimal or hexadecimal numbers or possibly text.\n"
"\n"
"Menu items beginning with [*], <M> or [ ] represent features\n"
@ -115,7 +115,7 @@ static const char mconf_readme[] = N_(
"-----------------------------\n"
"Menuconfig supports the use of alternate configuration files for\n"
"those who, for various reasons, find it necessary to switch\n"
"between different kernel configurations.\n"
"between different firmware configurations.\n"
"\n"
"At the end of the main menu you will find two options. One is\n"
"for saving the current configuration to a file of your choosing.\n"
@ -148,7 +148,7 @@ static const char mconf_readme[] = N_(
"\n"
"Optional personality available\n"
"------------------------------\n"
"If you prefer to have all of the kernel options listed in a single\n"
"If you prefer to have all of the firmware options listed in a single\n"
"menu, rather than the default multimenu hierarchy, run the menuconfig\n"
"with MENUCONFIG_MODE environment variable set to single_menu. Example:\n"
"\n"
@ -186,18 +186,18 @@ setmod_text[] = N_(
"This feature depends on another which has been configured as a module.\n"
"As a result, this feature will be built as a module."),
nohelp_text[] = N_(
"There is no help available for this kernel option.\n"),
"There is no help available for this firmware option.\n"),
load_config_text[] = N_(
"Enter the name of the configuration file you wish to load. "
"Accept the name shown to restore the configuration you "
"last retrieved. Leave blank to abort."),
load_config_help[] = N_(
"\n"
"For various reasons, one may wish to keep several different kernel\n"
"For various reasons, one may wish to keep several different firmware\n"
"configurations available on a single machine.\n"
"\n"
"If you have saved a previous configuration in a file other than the\n"
"kernel's default, entering the name of the file here will allow you\n"
"firmware's default, entering the name of the file here will allow you\n"
"to modify that configuration.\n"
"\n"
"If you are uncertain, then you have probably never used alternate\n"
@ -207,7 +207,7 @@ save_config_text[] = N_(
"as an alternate. Leave blank to abort."),
save_config_help[] = N_(
"\n"
"For various reasons, one may wish to keep different kernel\n"
"For various reasons, one may wish to keep different firmware\n"
"configurations available on a single machine.\n"
"\n"
"Entering a file name here will allow you to later retrieve, modify\n"
@ -1053,7 +1053,7 @@ int main(int ac, char **av)
sym = sym_lookup("KERNELVERSION", 0);
sym_calc_value(sym);
sprintf(menu_backtitle, _("Linux Kernel v%s Configuration"),
sprintf(menu_backtitle, _("LinuxBIOS v%s Configuration"),
sym_get_string_value(sym));
mode = getenv("MENUCONFIG_MODE");
@ -1070,7 +1070,7 @@ int main(int ac, char **av)
do {
cprint_init();
cprint("--yesno");
cprint(_("Do you wish to save your new kernel configuration?"));
cprint(_("Do you wish to save your new firmware configuration?"));
cprint("5");
cprint("60");
stat = exec_conf();
@ -1079,18 +1079,18 @@ int main(int ac, char **av)
if (stat == 0) {
if (conf_write(NULL)) {
fprintf(stderr, _("\n\n"
"Error during writing of the kernel configuration.\n"
"Your kernel configuration changes were NOT saved."
"Error during writing of the firmware configuration.\n"
"Your firmware configuration changes were NOT saved."
"\n\n"));
return 1;
}
printf(_("\n\n"
"*** End of Linux kernel configuration.\n"
"*** Execute 'make' to build the kernel or try 'make help'."
"*** End of LinuxBIOS configuration.\n"
"*** Execute 'make' to build the firmware or try 'make help'."
"\n\n"));
} else {
fprintf(stderr, _("\n\n"
"Your kernel configuration changes were NOT saved."
"Your firmware configuration changes were NOT saved."
"\n\n"));
}

View file

@ -44,7 +44,7 @@ int file_write_dep(const char *name)
else
fprintf(out, "\t%s\n", file->name);
}
fprintf(out, "\n.config include/linuxbios/autoconf.h: $(deps_config)\n\n$(deps_config):\n");
fprintf(out, "\n.config $(objtree)/include/linuxbios/autoconf.h: $(deps_config)\n\n$(deps_config):\n");
fclose(out);
rename("..config.tmp", name);
return 0;

View file

@ -1949,7 +1949,7 @@ void conf_parse(const char *name)
sym_init();
menu_init();
modules_sym = sym_lookup("MODULES", 0);
rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
rootmenu.prompt = menu_add_prompt(P_MENU, "LinuxBIOS Configuration", NULL);
#if YYDEBUG
if (getenv("ZCONF_DEBUG"))

View file

@ -459,7 +459,7 @@ void conf_parse(const char *name)
sym_init();
menu_init();
modules_sym = sym_lookup("MODULES", 0);
rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
rootmenu.prompt = menu_add_prompt(P_MENU, "LinuxBIOS Configuration", NULL);
#if YYDEBUG
if (getenv("ZCONF_DEBUG"))