Hi philip & ipxe owner??
Thanks for your helpful reply and hard work.
I have changed the code like your tip,and built snponly.efi,run snponly.efi 
under uefi shell,it  can detecte the network device  and chain the web 
http://boot.ipxe.org/demo/boot.php succeed,but loadimage failture because the 
file is not uefi image,how do you solve this problem.


I have some questions,could you help to answer?I really want to research ipxe 
and import to our project.
1.Do you know how to buid a uefi boot os image,i can't find the solution to 
buid a os image,i hope the os image can  boot via ipxe under uefi enviroment.
2.run snponly.efi and then run sanboot comand,"can't open san device " error 
was showed because ipxe have not implement under uefi,what is your solution.
3.ipxe.efi/$dirver.efi still can't detect network devcie under,what is your 
solution.
4.If you can provide your tips or solution will be best.
5.Do you know why ipxe.efi or $driver.efi can't open  pci protocol and then 
can't enum pci device.
the key code is efi_supported()->efi_create() in efi_pci.c.
        if ( ( efirc = bs->OpenProtocol ( device,
                                          &efi_pci_io_protocol_guid,
                                          &pci_io.interface,
                                          efidrv->driver.DriverBindingHandle,
                                          device,
                                          EFI_OPEN_PROTOCOL_BY_DRIVER )) !=0 ){
                DBGCP ( efipci, "EFIPCI device %p is not a PCI device\n",
                        device );
                goto err_open_protocol;
        }



------------------
Best Regards,Daniel Li 


 




------------------ ???????? ------------------
??????: "philip.lantz"<[email protected]>;
????????: 2012??9??11??(??????) ????7:45
??????: "'??'"<[email protected]>; 

????: RE: IPXE question: iPXE.efi can't detect network device




Here??s the change I made. I hope this helps.

 

Philip

 

diff a/src/drivers/net/efi/snponly.c b/src/drivers/net/efi/snponly.c

@@ -61,12 +61,28 @@ static int snpbus_probe ( struct root_device *rootdev ) {

        int rc;

        void *snp;

 

-       efirc = bs->OpenProtocol ( efi_loaded_image->DeviceHandle,

+       EFI_HANDLE DeviceHandles[8];

+       UINTN size = sizeof DeviceHandles;

+

+       efirc = bs->LocateHandle ( ByProtocol,

+                                  &efi_simple_network_protocol_guid,

+                                  NULL,

+                                  &size,

+                                  DeviceHandles );

+       if ( efirc  || size == 0 ) {

+               DBG ("Could not find Simple Network Protocol (%x)\n", efirc);

+               return -ENODEV;

+       }

+

+       int n = size / sizeof (EFI_HANDLE);

+       DBG ( "SNP probe: located %d handles\n", n );

+

+       efirc = bs->OpenProtocol ( DeviceHandles[0],

                                   &efi_simple_network_protocol_guid,

                                   &snp, efi_image_handle, NULL,

                                   EFI_OPEN_PROTOCOL_GET_PROTOCOL );

        if ( efirc ) {

-               DBG ( "Could not find Simple Network Protocol!\n" );

+               DBG ( "Could not open Simple Network Protocol!\n" );

                return -ENODEV;

        }

        snponly_dev.snp = snp;

 

 

 

From: ?? [mailto:[email protected]] 
Sent: Friday, September 07, 2012 8:01 PM
To: philip.lantz
Subject: IPXE question: iPXE.efi can't detect network device


 

Hi Philip,


After read your topic about "Using iPXE with UNDI driver"  in UEFI enviroment,i 
think that you have built a *.efi file and the file can connect network 
device,so could you tell me your step,


 


In your topic,you said that "Thanks! This is what I did. I changed snpbus_probe 
to call LocateHandle to find a handle that supports SNP and it now connects to 
my driver",how you are call LocateHandle?


I will eagerly waitting for your reply,best your regeards.


http://lists.ipxe.org/pipermail/ipxe-devel/2011-July/000786.html 


 


 


------------------ ???????? ------------------


??????: "????????????"<[email protected]>;


????????: 2012??9??7??(??????) ????9:37


??????: "ipxe-devel"<[email protected]>; 


????: IPXE question: iPXE.efi can't detect network device



 


Dear IPXE owner,


Thanks for ipxe develop team hard work,after read ipxe code ,i found that ipxe 
code is very classic and helpful to me.


Our product will import ipxe,but efi file can't found network device,I built 
efi file according to the below steps.


1.I have undef PXE_STACK and  PXE_MENU in src\config\general.h.


2.Built EFI version as vendor/product specific:


$ make bin-x86-64/10222000.efi bin-x86-64/10222001.efi 
bin-x86-64/10222625.efi.(computer vendor is 1022 ,device id is 2001).


$make bin-x86-64-efi/80861502(computer vendor is 8086,device id is 1502).


3.insert usb drive and enter uefi shell.


4.fs0:


5.run above efi file.


6.All commands are Show the tip "No more network devices".


 


My built enviroment like following:


OS:ubuntu 12


GCC:4.6


 


 


 


------------------ ???????? ------------------


??????: "Anton D. Kachalov"<[email protected]>;


????????: 2012??9??6??(??????) ????10:18


??????: "????"<[email protected]>; "ipxe-devel"<[email protected]>;


????: Re: PXE question: iPXE.efi can't detect network device



 


Hello.


 


It's better to address this question directly to the [email protected] 
mailing list. Michael Brown should be right person.


 


BTW, ipxe.iso is legacy bootable ISO image and it contains all supported 
network drivers including pcnet32.


 


Try to build EFI version as vendor/product specific:


 


$ make bin-x86-64/10222000.efi bin-x86-64/10222001.efi bin-x86-64/10222625.efi


 


One of them should work.


 


Please pay attention that EFI environment doesn't support PXE stack. You have 
to disable PXE_STACK and PXE_MENU in the config file.


06.09.2012, 17:32, "????" <[email protected]>:


Dear Anton,


I have built ipxe.efi 64 bit,my network device card is pcnet32,but ipxe.efi 
can't attach network card,i only get the log "No more network devices".but if 
boot to ipxe via ipxe.iso,ipxe can detected the network device card.


We will add ipxe to our project,so I hurry to solve this problem.

BTW,
After debug ipxe.efi,i found that only call efi_pci.c\efipci_driver_startup but 
not call efi_pci.c\efipci_start,so i think pci device not been attach,do you 
know that what time to call function efipci_start().

Although I have read a topic about "Using iPXE with UNDI driver",but i can't 
find the root cause,Do you know the root cause??



Thank you very much.


I have built via run command "make bin-x86-64/ipxe.efi DEBUG:efi_pci 
device,pci" and then run ipxe.efi,


unfortunately,the result like following figure,it means can't attach any pci 
device,do you know why?
_______________________________________________
ipxe-devel mailing list
[email protected]
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

Reply via email to