[coreboot] unable to build coreboot with grub
Hi, I have cloned latest coreboot and trying to build with grub2 as payload. in make menuconfig I select grub2 instead of seabios. when I fire make command it checkout latest grub and that fails to build. for 2 reasons. 1. Due to some initialization errors that I managed to fix with below changes - struct grub_linux_initrd_context initrd_ctx = { 0, }; + struct grub_linux_initrd_context initrd_ctx = { 0,NULL,0 }; 2. grub size issue as below that I am unable to resolve and looking for your help. I am building for QEMU and using QEMU version 2.1.2. E: Could not add [payloads/external/GRUB2/grub2/build/default_payload.elf, 268862 bytes (262 KB)@0x0]; too big? E: Failed to add 'payloads/external/GRUB2/grub2/build/default_payload.elf' into ROM image. -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Coreboot FILO boot from USB
: 0x00011215 using LZMA [ 0x07e4d000, 07e7416c, 0x07fa1960) - fffd2ad8 Clearing Segment: addr: 0x07e7416c memsz: 0x0012d7f4 FILO 0.6.0, coreboot: 4.0-7016-g0a66991-dirty root_dev = unset [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions.] filo On Sat, Oct 11, 2014 at 4:39 PM, Vipin Gahlaut gail...@gmail.com wrote: Hi Experts, I am trying to boot Linux from USB using coreboot and FILO and not able to find any documentation what parameter should I set on FILO prompt. I have enabled USB support while building FILO and libpayload. Booting from hard disk works fine as below. Start qemu with -hda disk.img option and give following on FILO prompt filoroot (hd0) filokernel /boot/vmlinuz-2.6.20 root=/dev/hda console=ttyS0 filoboot Now I am trying to boot from USB and start qemu with -usbdevice disk:disk.img I am not finding any information what parameter should I set. I tried using root (hd0) (hd1) (sd0) FILO is not able to find my kernel image in /boot/ See errors below. filo root (hd1) filo kernel /boot/vmlinuz-2.6.20 Drive 1 does not exist Error 15: File not found filo root (sd0) filo kernel /boot/vmlinuz-2.6.20 Unknown device type: sda Error 15: File not found filo root (hd0) filo kernel /boot/vmlinuz-2.6.20 Drive 0 does not exist Error 15: File not found filo Can someone please let me know what is expected device name for the usb I enabled in qemu? -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] unable to build coreboot with grub
Thanks Vladimir, Can you please let me know how to increase the ROM size? -Original Message- From: Vladimir 'φ-coder/phcoder' Serbinenko [mailto:phco...@gmail.com] Sent: Sunday, October 12, 2014 3:02 PM To: Vipin Gahlaut; coreboot Subject: Re: [coreboot] unable to build coreboot with grub On 12.10.2014 08:03, Vipin Gahlaut wrote: Hi, I have cloned latest coreboot and trying to build with grub2 as payload. in make menuconfig I select grub2 instead of seabios. when I fire make command it checkout latest grub and that fails to build. for 2 reasons. 1. Due to some initialization errors that I managed to fix with below changes - struct grub_linux_initrd_context initrd_ctx = { 0, }; + struct grub_linux_initrd_context initrd_ctx = { 0,NULL,0 }; Sounds like you have an old gcc 2. grub size issue as below that I am unable to resolve and looking for your help. I am building for QEMU and using QEMU version 2.1.2. E: Could not add [payloads/external/GRUB2/grub2/build/default_payload.elf, 268862 bytes (262 KB)@0x0]; too big? E: Failed to add 'payloads/external/GRUB2/grub2/build/default_payload.elf' into ROM image. Increase ROM size. On Sun, Oct 12, 2014 at 11:33 AM, Vipin Gahlaut gail...@gmail.com wrote: Hi, I have cloned latest coreboot and trying to build with grub2 as payload. in make menuconfig I select grub2 instead of seabios. when I fire make command it checkout latest grub and that fails to build. for 2 reasons. 1. Due to some initialization errors that I managed to fix with below changes - struct grub_linux_initrd_context initrd_ctx = { 0, }; + struct grub_linux_initrd_context initrd_ctx = { 0,NULL,0 }; 2. grub size issue as below that I am unable to resolve and looking for your help. I am building for QEMU and using QEMU version 2.1.2. E: Could not add [payloads/external/GRUB2/grub2/build/default_payload.elf, 268862 bytes (262 KB)@0x0]; too big? E: Failed to add 'payloads/external/GRUB2/grub2/build/default_payload.elf' into ROM image. -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
[coreboot] coreboot/filo hangs when enabled all debug option
Hi, If I enable debug_all option in configuration latest coreboot with filo hangs like below FILO version 0.6.0 (vgahlaut@ubuntu) Sun Oct 12 02:47:44 PDT 2014 boot EAX = 0x0 boot EBX = 0x0 boot arg = 0x0 Current location: 0x101000-0x257fb7 Relocating to 0x7e77000-0x7fcdfb7... Never proceed from here. -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Coreboot FILO boot from USB
Looking at blockdev.c I believe that usb disks are listed as ud so I tried root (ud0) with no luck so far. filo root (ud0) filo kernel /boot/vmlinuz Error 15: File not found filo On Sat, Oct 11, 2014 at 4:39 PM, Vipin Gahlaut gail...@gmail.com wrote: Hi Experts, I am trying to boot Linux from USB using coreboot and FILO and not able to find any documentation what parameter should I set on FILO prompt. I have enabled USB support while building FILO and libpayload. Booting from hard disk works fine as below. Start qemu with -hda disk.img option and give following on FILO prompt filoroot (hd0) filokernel /boot/vmlinuz-2.6.20 root=/dev/hda console=ttyS0 filoboot Now I am trying to boot from USB and start qemu with -usbdevice disk:disk.img I am not finding any information what parameter should I set. I tried using root (hd0) (hd1) (sd0) FILO is not able to find my kernel image in /boot/ See errors below. filo root (hd1) filo kernel /boot/vmlinuz-2.6.20 Drive 1 does not exist Error 15: File not found filo root (sd0) filo kernel /boot/vmlinuz-2.6.20 Unknown device type: sda Error 15: File not found filo root (hd0) filo kernel /boot/vmlinuz-2.6.20 Drive 0 does not exist Error 15: File not found filo Can someone please let me know what is expected device name for the usb I enabled in qemu? -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] unable to build coreboot with grub
Hi Vladimir, I tried changing under main mainboard - rom chip size but does not seem to be helping. If I look at .config I suspect that the reason is CONFIG_BOARD_ROMSIZE_KB_256=y which doesn't change even if I change ROM size in main board. Relevant portion of .config after changing it to 512 KB CONFIG_BOARD_ROMSIZE_KB_256=y # CONFIG_COREBOOT_ROMSIZE_KB_64 is not set # CONFIG_COREBOOT_ROMSIZE_KB_128 is not set # CONFIG_COREBOOT_ROMSIZE_KB_256 is not set CONFIG_COREBOOT_ROMSIZE_KB_512=y # CONFIG_COREBOOT_ROMSIZE_KB_1024 is not set # CONFIG_COREBOOT_ROMSIZE_KB_2048 is not set # CONFIG_COREBOOT_ROMSIZE_KB_4096 is not set # CONFIG_COREBOOT_ROMSIZE_KB_8192 is not set # CONFIG_COREBOOT_ROMSIZE_KB_12288 is not set # CONFIG_COREBOOT_ROMSIZE_KB_16384 is not set CONFIG_COREBOOT_ROMSIZE_KB=512 CONFIG_ROM_SIZE=0x8 May be it is because of the fact that qemu is expected to have only 256KB of BIOS rom. I do not know how much BIOS rom qemu 2.1.2 have. For qemu 0.9.0 it was 256KB and there was a patch ( http://code.coreboot.org/p/buildrom/source/tree/261/buildrom-devel/packages/qemu/patches/qemu-bios-size.patch) to change it to 2MB. However this patch is not applicable on QEMU version 2.1.2 as there are different BIOS_SIZE macros in qemu2.1.2. -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] coreboot/filo hangs when enabled all debug option
Hi Peter, FILO is built with xgcc. Infect if make crossgcc is not done before running make, FILO refuses to build. === Check if FILO is built using the reference xgcc toolchain created by 'make crossgcc' and not the toolchain installed by your distribution. It is probably easiest to ensure use of xgcc if you build FILO manually. //Peter -- On Sun, Oct 12, 2014 at 3:24 PM, Vipin Gahlaut gail...@gmail.com wrote: Hi, If I enable debug_all option in configuration latest coreboot with filo hangs like below FILO version 0.6.0 (vgahlaut@ubuntu) Sun Oct 12 02:47:44 PDT 2014 boot EAX = 0x0 boot EBX = 0x0 boot arg = 0x0 Current location: 0x101000-0x257fb7 Relocating to 0x7e77000-0x7fcdfb7... Never proceed from here. -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] coreboot/filo hangs when enabled all debug option
Hi Peter, Wait a minute. I may be wrong in using xgcc as I am building manually (due to bug in my earlier thread http://www.coreboot.org/pipermail/coreboot/2014-October/078735.html) instead of using coreboot build environment which contains gcc. Let me try to build it with coreboot environment and I will confirm again. Thanks for your advice. On Sun, Oct 12, 2014 at 4:18 PM, Vipin Gahlaut gail...@gmail.com wrote: Hi Peter, FILO is built with xgcc. Infect if make crossgcc is not done before running make, FILO refuses to build. === Check if FILO is built using the reference xgcc toolchain created by 'make crossgcc' and not the toolchain installed by your distribution. It is probably easiest to ensure use of xgcc if you build FILO manually. //Peter -- On Sun, Oct 12, 2014 at 3:24 PM, Vipin Gahlaut gail...@gmail.com wrote: Hi, If I enable debug_all option in configuration latest coreboot with filo hangs like below FILO version 0.6.0 (vgahlaut@ubuntu) Sun Oct 12 02:47:44 PDT 2014 boot EAX = 0x0 boot EBX = 0x0 boot arg = 0x0 Current location: 0x101000-0x257fb7 Relocating to 0x7e77000-0x7fcdfb7... Never proceed from here. -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] unable to build coreboot with grub
Sure. Missed reply all in excitement. Will take care in future postings. On Sun, Oct 12, 2014 at 5:04 PM, Vladimir 'φ-coder/phcoder' Serbinenko phco...@gmail.com wrote: On 12.10.2014 13:30, Vipin Gahlaut wrote: Thanks a lot Valdimir, After make clean ROM Size config changes kicked in as expected and I managed to build grub payload. Please keep the list CC'ed Thanks you very much for your help and support. On Sun, Oct 12, 2014 at 4:39 PM, Vladimir 'φ-coder/phcoder' Serbinenko phco...@gmail.com mailto:phco...@gmail.com wrote: On 12.10.2014 13:03, Vipin Gahlaut wrote: Ok, I changed CONFIG_BOARD_ROMSIZE_KB_ to 512 directly in .config as this is can not be changed in menuconfig. Don't. You don't need to change it at all. My .config lokks like below and it still it says 262KB is too big? Always do make clean after config change # CONFIG_BOARD_ROMSIZE_KB_256 is not set CONFIG_BOARD_ROMSIZE_KB_512=y # CONFIG_COREBOOT_ROMSIZE_KB_64 is not set # CONFIG_COREBOOT_ROMSIZE_KB_128 is not set # CONFIG_COREBOOT_ROMSIZE_KB_256 is not set CONFIG_COREBOOT_ROMSIZE_KB_512=y # CONFIG_COREBOOT_ROMSIZE_KB_1024 is not set # CONFIG_COREBOOT_ROMSIZE_KB_2048 is not set # CONFIG_COREBOOT_ROMSIZE_KB_4096 is not set # CONFIG_COREBOOT_ROMSIZE_KB_8192 is not set # CONFIG_COREBOOT_ROMSIZE_KB_12288 is not set # CONFIG_COREBOOT_ROMSIZE_KB_16384 is not set CONFIG_COREBOOT_ROMSIZE_KB=512 CONFIG_ROM_SIZE=0x8 On Sun, Oct 12, 2014 at 4:21 PM, Vladimir 'φ-coder/phcoder' Serbinenko phco...@gmail.com mailto:phco...@gmail.com mailto:phco...@gmail.com mailto:phco...@gmail.com wrote: On 12.10.2014 12:44, Vipin Gahlaut wrote: I tried changing under main mainboard - rom chip size but does not seem to be helping. If I look at .config I suspect that the reason is CONFIG_BOARD_ROMSIZE_KB_256=y which doesn't change even if I change ROM size in main board. CONFIG_BOARD_ROMSIZE_KB_* is the default used by CONFIG_COREBOOT_ROMSIZE_KB_* -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] coreboot/filo hangs when enabled all debug option
Hi Himanshu, Commenting suggested line solved the problem. Thanks You very much for your help and support. On Sun, Oct 12, 2014 at 4:38 PM, Chauhan, Himanshu hschau...@nulltrace.org wrote: On Sunday, October 12, 2014, Vipin Gahlaut gail...@gmail.com wrote: Hi Peter, Wait a minute. I may be wrong in using xgcc as I am building manually (due to bug in my earlier thread http://www.coreboot.org/pipermail/coreboot/2014-October/078735.html) instead of using coreboot build environment which contains gcc. Let me try to build it with coreboot environment and I will confirm again. Thanks for your advice. On Sun, Oct 12, 2014 at 4:18 PM, Vipin Gahlaut gail...@gmail.com wrote: Hi Peter, FILO is built with xgcc. Infect if make crossgcc is not done before running make, FILO refuses to build. === Check if FILO is built using the reference xgcc toolchain created by 'make crossgcc' and not the toolchain installed by your distribution. It is probably easiest to ensure use of xgcc if you build FILO manually. //Peter -- On Sun, Oct 12, 2014 at 3:24 PM, Vipin Gahlaut gail...@gmail.com wrote: Hi, If I enable debug_all option in configuration latest coreboot with filo hangs like below FILO version 0.6.0 (vgahlaut@ubuntu) Sun Oct 12 02:47:44 PDT 2014 boot EAX = 0x0 boot EBX = 0x0 boot arg = 0x0 Current location: 0x101000-0x257fb7 Relocating to 0x7e77000-0x7fcdfb7... Never proceed from here. I have seen crashes at same location while running FILO as guest under Xvisor. Actaully there is a debug(ok); statement just after your last print. If you remove this things will be fine. For some reason just after relocation that debug print crashes. Once this function returns, everything becomes fine. -Himanshu -- Regards, Himanshu. Sent from my iPad Air. -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Coreboot FILO payload build fails when USB support enabled
Hi Experts, The trick for changing from CONFIG_USB to CONFIG_USB_DISK did help to compile but it doesn't seem to be correct fix and not helping at run time. I have configured libpayload with CONFIG_USB support but that define is not included in the filo/build/config.h. As a result I get debug message No USB stack in libpayload. So FILO is assuming that libpayload is not configured with USB stack. Here is a summary of problem and looking for your guidance 1. in Filo there are two configuration files (.config and lib.config) 2. When USB stack is enabled in libpayload CONFIG_USB=y is defined in lib.config but not in .config 3. build/config.h does not have CONFIG_USB defined. As a result all the code kept under CONFIG_USB macro in FILO source tree assumes that libpayload does not have USB stack. Can someone please let me know what is the correct procedure to include USB stack in libpayload and inform to FILO that yes libpayload really has usb stack support? On Sat, Oct 11, 2014 at 12:14 AM, Vipin Gahlaut gail...@gmail.com wrote: Here is the patch I used to fix build error. diff --git a/drivers/usb.c b/drivers/usb.c index 0da6efa..a959389 100644 --- a/drivers/usb.c +++ b/drivers/usb.c @@ -20,7 +20,7 @@ #include libpayload-config.h /* Only use this code if libpayload is compiled with USB stack */ -#ifdef CONFIG_USB +#ifdef CONFIG_USB_DISK #include fs.h #include usb/usb.h #include usb/usbmsc.h Please let me know if this is correct and I should submit it On Fri, Oct 10, 2014 at 11:41 PM, Vipin Gahlaut gail...@gmail.com wrote: Hi, We need USB support in Filo. Our Linux kernel and file system is expected to be on USB thumb driver. We have enabled USB in menuconfig; however build fails with following errors. blockdev.c:(.text+0x18e): undefined reference to `usb_read' /home/vgahlaut/coreboot-fsp/coreboot/payloads/filo/build/fs/blockdev.o: In function `devopen': blockdev.c:(.text+0x91e): undefined reference to `usb_probe' We are using latest FILO and Coreboot from git repository. These functions seems to be defined in drivers/usb.c and usb.c is getting compiled. Problem seems to be due to the fact that CONFIG_USB=y in .config is automatically removed during make and these function are defined in usb.c under #ifdef CONFIG_USB Can you please suggest a solution and let me know why CONFIG_USB is removed from my .config -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Coreboot FILO payload build fails when USB support enabled
Hi Nico, Thanks for the details. I somehow managed to build filo by defining CONFIG_USB in build/config.h However having problems at run time. Logs are below. Can you please suggest last known commit where USB was working good? Currently it seems to be messed up. I have to boot Linux from USB using coreboot without Seabios and I am facing problem with both FILO and GRUB2. Logs for the problem I am getting repeatedly at run time change on port 1 fullspeed device first get_descriptor(DT_DEV) failed set_address failed On Sun, Oct 12, 2014 at 6:59 PM, Nico Huber nic...@gmx.de wrote: Hello Vipin, Can you please suggest a solution and let me know why CONFIG_USB is removed from my .config The prefix for libpayload's configurations options changed to CONFIG_LP_, lately. The last commit for FILO (60d45fc) tried to fix it, but seems to have missed some options. So CONFIG_USB is CONFIG_LP_USB, now. Also, if you get current FILO to compile with USB support, depending on your platform, it might not work as expected. I hit some strange regressions with older hardware this week, that I'm still investigating. Nico -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Coreboot FILO payload build fails when USB support enabled
Hi Ron, We have to reduce the boot time to minimum possible; hence the preference is FILO/GRUB2. Not sure the status of USB stuff in GRUB2 so trying hard to get FILO to work. On Sun, Oct 12, 2014 at 10:12 PM, ron minnich rminn...@gmail.com wrote: you can try to get filo to work, or you can work at John Lewis excellent work on JELTKA and see if you would be better off using a linux kernel instead. My bias is towards JELTKA, personally. ron -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Coreboot FILO payload build fails when USB support enabled
No. I am using qemu (version 2.1.2) with -usbdevice option. I run qemu with following command qemu-system-i386 -bios ./coreboot.rom -hda hda.img -usbdevice disk:usb.img -nographic On Sun, Oct 12, 2014 at 11:31 PM, Nico Huber nic...@gmx.de wrote: On 12.10.2014 18:21, Vipin Gahlaut wrote: Logs for the problem I am getting repeatedly at run time change on port 1 fullspeed device first get_descriptor(DT_DEV) failed set_address failed That's exactly what I observed on a kontron/986lcd-m (i945) with low- speed devices connected to the UHCI. Are you using a similar platform? Nico -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
[coreboot] Coreboot FILO boot from USB
Hi Experts, I am trying to boot Linux from USB using coreboot and FILO and not able to find any documentation what parameter should I set on FILO prompt. I have enabled USB support while building FILO and libpayload. Booting from hard disk works fine as below. Start qemu with -hda disk.img option and give following on FILO prompt filoroot (hd0) filokernel /boot/vmlinuz-2.6.20 root=/dev/hda console=ttyS0 filoboot Now I am trying to boot from USB and start qemu with -usbdevice disk:disk.img I am not finding any information what parameter should I set. I tried using root (hd0) (hd1) (sd0) FILO is not able to find my kernel image in /boot/ See errors below. filo root (hd1) filo kernel /boot/vmlinuz-2.6.20 Drive 1 does not exist Error 15: File not found filo root (sd0) filo kernel /boot/vmlinuz-2.6.20 Unknown device type: sda Error 15: File not found filo root (hd0) filo kernel /boot/vmlinuz-2.6.20 Drive 0 does not exist Error 15: File not found filo Can someone please let me know what is expected device name for the usb I enabled in qemu? -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
[coreboot] Coreboot FILO payload build fails when USB support enabled
Hi, We need USB support in Filo. Our Linux kernel and file system is expected to be on USB thumb driver. We have enabled USB in menuconfig; however build fails with following errors. blockdev.c:(.text+0x18e): undefined reference to `usb_read' /home/vgahlaut/coreboot-fsp/coreboot/payloads/filo/build/fs/blockdev.o: In function `devopen': blockdev.c:(.text+0x91e): undefined reference to `usb_probe' We are using latest FILO and Coreboot from git repository. These functions seems to be defined in drivers/usb.c and usb.c is getting compiled. Problem seems to be due to the fact that CONFIG_USB=y in .config is automatically removed during make and these function are defined in usb.c under #ifdef CONFIG_USB Can you please suggest a solution and let me know why CONFIG_USB is removed from my .config -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Coreboot FILO payload build fails when USB support enabled
Here is the patch I used to fix build error. diff --git a/drivers/usb.c b/drivers/usb.c index 0da6efa..a959389 100644 --- a/drivers/usb.c +++ b/drivers/usb.c @@ -20,7 +20,7 @@ #include libpayload-config.h /* Only use this code if libpayload is compiled with USB stack */ -#ifdef CONFIG_USB +#ifdef CONFIG_USB_DISK #include fs.h #include usb/usb.h #include usb/usbmsc.h Please let me know if this is correct and I should submit it On Fri, Oct 10, 2014 at 11:41 PM, Vipin Gahlaut gail...@gmail.com wrote: Hi, We need USB support in Filo. Our Linux kernel and file system is expected to be on USB thumb driver. We have enabled USB in menuconfig; however build fails with following errors. blockdev.c:(.text+0x18e): undefined reference to `usb_read' /home/vgahlaut/coreboot-fsp/coreboot/payloads/filo/build/fs/blockdev.o: In function `devopen': blockdev.c:(.text+0x91e): undefined reference to `usb_probe' We are using latest FILO and Coreboot from git repository. These functions seems to be defined in drivers/usb.c and usb.c is getting compiled. Problem seems to be due to the fact that CONFIG_USB=y in .config is automatically removed during make and these function are defined in usb.c under #ifdef CONFIG_USB Can you please suggest a solution and let me know why CONFIG_USB is removed from my .config -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot