another script bug
As far as I see, the scripting code is really broken. When executing a menu entry, nothing is executed (setting a variable seems to be executed for an unknown reason, but there is no echo). Okuji ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: script bug
Yoshinori K. Okuji [EMAIL PROTECTED] writes: Try something like this: @ extremely long long line. { } grub-emu segfaults. This is partially because of the menu code, partilaly because of the scripting engine code. The menu code currently limits the max number of characters per line to 100 (very bad). So get_line chops the line, then the scripting engine cannot deal with the malformed line. Both must be fixed. Yeah, the get_line was broken from the beginning... I think it should be even possible to remove this function because we do not really need it. As for scripting, I will test it in about two weeks. At the moment I have very little time. :-/ -- Marco ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: another script bug
Yoshinori K. Okuji [EMAIL PROTECTED] writes: As far as I see, the scripting code is really broken. When executing a menu entry, nothing is executed (setting a variable seems to be executed for an unknown reason, but there is no echo). Right, and I am able to reproduce this. I know how it is caused but it's not an easy issue to fix properly. This too has a wait a bit, sorry. Can you test it with just a single command in the menu entry? For this specific case things have to work... -- Marco ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Compile error on powerpc
Hello, I try to build latest grub2 cvs on iMac G3 (New World). I got this error : [EMAIL PROTECTED]:~/Sources/grub2/build$ make gcc -Iutil -I../util -I. -Iinclude -I../include -Wall -W -DGRUB_DATADIR= \/usr/local/share/grub/powerpc-ieee1275\ -g -O2 -DGRUB_UTIL=1 -c -o grub_emu-util_console.o ../util/console.c ../util/console.c: Dans la fonction «grub_ncurses_putchar» : ../util/console.c:89: attention : implicit declaration of function «addch» ../util/console.c: Dans la fonction «grub_ncurses_setcolor» : ../util/console.c:121: attention : implicit declaration of function «color_set» ../util/console.c: Hors de toute fonction : ../util/console.c:124: erreur: «ERR» undeclared here (not in a function) ../util/console.c: Dans la fonction «grub_ncurses_checkkey» : ../util/console.c:136: attention : implicit declaration of function «wtimeout» ../util/console.c:136: erreur: «stdscr» undeclared (first use in this function) ../util/console.c:136: erreur: (Chaque identificateur non déclaré est rapporté une seule fois ../util/console.c:136: erreur: pour chaque fonction dans laquelle il apparaît.) ../util/console.c:137: attention : implicit declaration of function «getch» ../util/console.c: Dans la fonction «grub_ncurses_getkey» : ../util/console.c:161: erreur: «stdscr» undeclared (first use in this function) ../util/console.c:167: erreur: «KEY_LEFT» undeclared (first use in this function) ../util/console.c:171: erreur: «KEY_RIGHT» undeclared (first use in this function) ../util/console.c:175: erreur: «KEY_UP» undeclared (first use in this function) ../util/console.c:179: erreur: «KEY_DOWN» undeclared (first use in this function) ../util/console.c:183: erreur: «KEY_IC» undeclared (first use in this function) ../util/console.c:187: erreur: «KEY_DC» undeclared (first use in this function) ../util/console.c:191: erreur: «KEY_BACKSPACE» undeclared (first use in this function) ../util/console.c:198: erreur: «KEY_HOME» undeclared (first use in this function) ../util/console.c:202: erreur: «KEY_END» undeclared (first use in this function)../util/console.c:206: erreur: «KEY_NPAGE» undeclared (first use in this function) ../util/console.c:210: erreur: «KEY_PPAGE» undeclared (first use in this function) ../util/console.c: Dans la fonction «grub_ncurses_getxy» : ../util/console.c:224: attention : implicit declaration of function «getyx» ../util/console.c:224: erreur: «stdscr» undeclared (first use in this function) ../util/console.c: Dans la fonction «grub_ncurses_getwh» : ../util/console.c:235: attention : implicit declaration of function «getmaxyx» ../util/console.c:235: erreur: «stdscr» undeclared (first use in this function) ../util/console.c: Dans la fonction «grub_ncurses_gotoxy» : ../util/console.c:243: attention : implicit declaration of function «move» ../util/console.c: Dans la fonction «grub_ncurses_cls» : ../util/console.c:249: attention : implicit declaration of function «clear» ../util/console.c:250: attention : implicit declaration of function «refresh» ../util/console.c: Dans la fonction «grub_ncurses_setcursor» : ../util/console.c:256: attention : implicit declaration of function «curs_set» ../util/console.c: Dans la fonction «grub_ncurses_init» : ../util/console.c:268: attention : implicit declaration of function «initscr» ../util/console.c:269: attention : implicit declaration of function «raw» ../util/console.c:270: attention : implicit declaration of function «noecho» ../util/console.c:271: attention : implicit declaration of function «scrollok» ../util/console.c:271: erreur: «stdscr» undeclared (first use in this function) ../util/console.c:271: erreur: «TRUE» undeclared (first use in this function) ../util/console.c:273: attention : implicit declaration of function «nonl» ../util/console.c:274: attention : implicit declaration of function «intrflush» ../util/console.c:274: erreur: «FALSE» undeclared (first use in this function) ../util/console.c:275: attention : implicit declaration of function «keypad» ../util/console.c:276: attention : implicit declaration of function «start_color» ../util/console.c: Dans la fonction «grub_ncurses_fini» : ../util/console.c:284: attention : implicit declaration of function «endwin» make: *** [grub_emu-util_console.o] Erreur 1 [EMAIL PROTECTED]:~/Sources/grub2/build$ As said in the TestingOnPowerPC wiki page, i report this error. Thanks. ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: Compile error on powerpc
Étienne Bersac [EMAIL PROTECTED] writes: Hi, I try to build latest grub2 cvs on iMac G3 (New World). I got this error : It seems you do not have the ncurses header files installed. In Ubuntu this is libncurses5-dev. -- Marco ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: Compile error on powerpc
Le 7 mai 06 à 15:53, Marco Gerards a écrit : Étienne Bersac [EMAIL PROTECTED] writes: Hi, I try to build latest grub2 cvs on iMac G3 (New World). I got this error : It seems you do not have the ncurses header files installed. In Ubuntu this is libncurses5-dev. I did that. but it still occurs. ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: Compile error on powerpc
Okey, It seems that i needed to re run ../configure an recompile the project after installing libncurses5-dev . That would be great if ./ configure check for ncurses headers. Étienne. ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: GRUB2 netboot development
Title: Hey Well I followed you advice but I came across some issues, probably on customization of the driver, I'm trying to add the tg3 to it. I made some adjustments on the code add some here and remove some there to resolve dependencies but one dependency I can't resolve. This function is not in the tg3.c or tg3.h code :( I probably don't know enough C++ do understand that. If you have any ideas I would appreciate it very much. genmoddep: error: pcibios_read_config_dword in tg3 is not defined make: *** [moddep.lst] Error 1 Rudy Attias Hey, I'm interested to know, how to add drivers to the new pluggable architecture (grub2_netboot_7.tgz) from etherboot sources? Also wanted to say that you guys do great job with this boot loader! Now it needs to learn to boot from RAID and make coffee and its perfect! Rudy Attias Hi! Adding a driver from etherboot (I used 5.4.1) to this version of grub2 should be easy. Note that I have only tried the ns8390 driver so far so it is likely that the process of addind news drivers requires more manual interventions for the moment. The idea is that it could be made completely automatic but it is not yet done. Also note that according to a previous post, this mechanism which allows importing etherboot drivers will not make it to the official grub2. The netboot support wil be based on pxe and undi instead. Anyway, here are the steps: 1) Copy the drivers files from the driver you want from Etherboot to grub (Look where ns8390.c and ns8390.h are). 2) Edit the c file and add the following code at the begining of the file: /* Added for GRUB support */ #include ether_glue.h /* Added for GRUB support */ 3) locate in the c code the structure (probably at the bottom) marked with __pci_driver. It must be called something like NAME_driver. 4) At the end of the c file, add the following code where NAME should be replaced appropriately: /* Added for GRUB support */ grub_ether_declare_probe(NAME); grub_ether_declare_driver_struct(NAME); GRUB_MOD_INIT(NAME) { (void)mod; /* To stop warning. */ grub_ether_fill_driver(NAME); grub_register_pci_driver(NAME_grub_driver); } GRUB_MOD_FINI(NAME) { grub_unregister_pci_driver(NAME_grub_driver); } /* Added for GRUB support */ 5) You now have to instruct the building process to compile a module for your new driver. This is done by modifying the file conf/i386-pc.rmk. Do a search for ns8390.mod and notice that it is assigned to a variable called pkgdata_MODULES. Add your module, i.e add NAME.mod to the list of modules assigned to this variable. 6) Do a search for ns8390.mod again and add these lines, changing what needs to be changed # For ns8390.mod ns8390_mod_SOURCES = drivers/net/ns8390.c ns8390_mod_CFLAGS = $(DRIVERS_NET_CFLAGS) $(COMMON_CFLAGS) $(DRIVERS_CFLAGS) ns8390_mod_LDFLAGS = $(COMMON_LDFLAGS) 7) This is it, autoconf ./configure make and see how it goes In order to test your news driver, you have to use the modules pci, pci_etherboot, as well as your new module. You can use the command lspci to check if pci support list your card and lspci_driver to see if your driver was added properly. To probe fo your card, use scan_pci_device. If everything goes well, you can then use tx_test to check for the successfull transmission of a test frame. Good luck, let me know how it goes! ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Grub2 test on iMac G3
Hello, I test the Grub2 on iMac G3, following the howto available at http:// grub.enbug.org/TestingOnPowerPC . Here are some comment i wish useful : * even if i set boot-device to hd,2:grubof.modules, i have to manually type boot at the OF prompt to have grub loaded. else, the screen keep gray. * as grub version is 1.93, i fill grub.cfg with timeout 5 menuentry Linux { linux (hd,2)/boot/vmlinux root=/dev/hda3 initrd (hd,2)/boot/initrd.img } But then, i have a kernel panic because it do not find root. I can boot linux with the (great) grub console by typing : grub linux (hd,2)/boot/vmlinux root=/dev/hda3 grub initrd (hd,2)/boot/initrd.img grub boot * The menu does not use the whole screen, only the top left corner. That's strange. Wish that helps. Étienne. ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: script bug
On Sunday 07 May 2006 13:40, Marco Gerards wrote: Yeah, the get_line was broken from the beginning... I think it should be even possible to remove this function because we do not really need it. I believe that get_line should be kept. Suppose that you have this kind of config file: 1: do something 2: do another thing 3: do yet another thing To execute these lines, it is not necessary to keep all the three lines in memory, since they can be executed line by line. You can say that the consumed memory is not that much, but I don't think this is a good way of programming. Whenever possible, I think it is better to save memory. BTW, could you describe how the scripting engine is supposed to work? For example, suppose that you have this (the syntax is not very important here): if test -f /boot/kernel; then kernel /boot/kernel fi Is it possible to tell a line at a time to the scripting engine, and let it execute this code block once fi is inputted? BASH deals with command lines in this way. Okuji ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
firmware specification
So far, we've been using the triples (such as i386-pc-gnu) to specify both a CPU and a firmware. I feel that this is not appropriate. The vendor part of the triple can imply what firmware is used, but not always. So, for example, I invented i386-efi for EFI. Since the specification of the triple affects the choice of a compiler, I suspect that our usage is wrong. So I'd like to add a configuration option to specify a firmware type instead of using a vendor name. When the user does not specify her firmware explicitly, configure can guess the firmware from the CPU and the vendor. Is there any objection? Okuji ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
RE: GRUB2 netboot development
Well I followed you advice but I came across some issues, probably on customization of the driver, I'm trying to add the tg3 to it. I made some adjustments on the code add some here and remove some there to resolve dependencies but one dependency I can't resolve. This function is not in the tg3.c or tg3.h code ... :( I probably don't know enough C++ do understand that. If you have any ideas I would appreciate it very much. genmoddep: error: pcibios_read_config_dword in tg3 is not defined make: *** [moddep.lst] Error 1 yes, this is right, this function is not implemented anywhere. I have published grub2_netboot_8.tgz on my website so that you can have a look. The module tg3.mod compiles successfully but I did not test it. By the way, this is not c++ but c (although with a nice object oriented design)! I hope it will work, but if it does not, I think we should not worry too much about that for the moment as the netboot development is taking quite a different direction now. Cheers! winmail.dat___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel