Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ipxe.lkrn does not detect Atheros L2 network interface
2016-11-28, 03:31
Post: #1
ipxe.lkrn does not detect Atheros L2 network interface
Hello,

I would like to express my appreciation to iPXE developers for this project.

I have followed online instructions to download latest iPXE from git and run "make" which finished successfuly.

My attempt with iPXE for floppy was successful and acomplished what I expected.

Next logical step would be to add ipxe.lkrn to my pxelinux.cfg/default configuration file which I did and ipxe.lkrn loads but it does not detect network interface.

If I attempt to issue "dhcp" command then "show errno" returns 0x2c1de03b which indicates that network interface is not found.

http://ipxe.org/err/2c1de0

Well it is a strange situation that iPXE on the floppy finds and configures network interface successfully but ipxe.lkrn does not detect network interface.

I went through Makefile in hope to find what could cause this discrepancy. Looking through Makefile I did not find anything what would indicate the source of my problem.

I use Debian 7 as pxelinux.0 server and looking through "apt-cache search ipxe" I found that the distribution has iPXE package. I've installed the package and temporary substituded ipxe.lkrn -- with Debian's file ipxe.lkrn, this time network interface is detected and it can obtain IP address from DHCP server.

But as you know there is always something else be found -- ipxe.lkrn was compiled withoug "cpuid" command what makes impossible to auto select x32 or amd64 Windows 7/8/8.1/10 installation.

Hmm, what did I miss?

I went through online documentation and could not find a ponter to possible solution.

I believe that network interface is handled by atl1e driver (Fedora 25 provides driver atl2 to be used with this buildin nework interface).

Test System description:

Mainboard: P5GC-MX/1333
CPU: E8500
Buildin NIC: Qualcomm Atheros Attansic L2 Fast Ethernet
Specification: P5GC-MX/1333
Manual: P5GC-MX/1333 Manual

Code:
root# lspci -s 02:00.0
02:00.0 Ethernet controller: Qualcomm Atheros Attansic L2 Fast Ethernet (rev a0)
root# lspci -s 02:00.0 -n
02:00.0 0200: 1969:2048 (rev a0)
root# lspci -s 02:00.0 -nn
02:00.0 Ethernet controller [0200]: Qualcomm Atheros Attansic L2 Fast Ethernet [1969:2048] (rev a0)
root# lspci -s 02:00.0 -vv
02:00.0 Ethernet controller: Qualcomm Atheros Attansic L2 Fast Ethernet (rev a0)
        Subsystem: ASUSTeK Computer Inc. Device 8233
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 16 bytes
        Interrupt: pin A routed to IRQ 27
        Region 0: Memory at dbfc0000 (64-bit, non-prefetchable) [size=256K]
        Expansion ROM at dbfa0000 [disabled] [size=128K]
        Capabilities: [40] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [48] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee0300c  Data: 4182
        Capabilities: [58] Express (v1) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
                        ExtTag- AttnBtn+ AttnInd+ PwrInd+ RBE- FLReset- SlotPowerLimit 10.000W
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Exit Latency L0s unlimited, L1 unlimited
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Kernel driver in use: atl2
        Kernel modules: atl2

Andromeda X
Find all posts by this user
Quote this message in a reply
2016-11-28, 20:39
Post: #2
RE: ipxe.lkrn does not detect Atheros L2 network interface
It would be interesting to see the output of your ipxe together with ifstat, both when it works with floppy, as well as when it does not.

Looking at the sources 1969:2048 does not seem to be supported by native ipxe drivers.
you could try to edit src/drivers/net/atl1e.c
And add the line
Code:
PCI_ROM(0x1969, 0x2048, "atl2e_48", "Attansic L2E 0x2048", 0),

also you might want to replace you pxelinux.0 with ipxes undionly.kpxe IMHO the ipxe scripting is much supperior to the pxelinux interface.
Anothing thing to try is to load undionly.kpxe, or ipxe.pxe from pxelinux instead of the ipxe.lkrn

Please let us know if anything of the above works for you and in that case what Wink

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2016-11-30, 19:30 (This post was last modified: 2016-11-30 19:42 by Andromeda_x.)
Post: #3
RE: ipxe.lkrn does not detect Atheros L2 network interface
Hello,

I've attempted to modify the src/drivers/net/atl1e.c file according your suggestion and recompile the module.

Well it did not work! And I still do wonder "How does it work from floppy IPXE"?

Ok, here what I get when I boot from the floppy

Code:
IPXE 1.0.0 (fd95c) .. Open Source Network Boot Firmware: -- http://ipxe.org
Features: DNS HTTP iSCSI TFTP SRP AOE ELF MBOOT PXE bzImage Menu PXEXT

iPXE> ifstat
net0: 00:24:8c:7c:54:dc using <NULL> on UNDI-0000:02:0.0 (closed)
   [Link:up, TX:0 TXE:0 RX:0 RXE:0]
iPXE> dhcp
Configuring (net0 00:24:8c:7c:54:dc)...... ok
iPXE> ifstat
net0: 00:24:8c:7c:54:dc using <NULL> on UNDI-0000:02:00.0 (open)
    [Link:up, TX:6 TXE:0 RX:7 RXE:0]
iPXE>

Well, in place of "<NULL>" I would expect to see a driver name or a chip id...

Now I run command "config" then I see

Code:
busid ............... 01:19:69:20:48
busloc ............. 0x200
bustype ........... PCI
chip ................ <not spcified)
ifname ............. net0
mac ................ 00:24:8c:7c:54:dc
.......
.......
gateway .......... 192.168.0.1
ip ................... 192.168.0.30
netmask .......... 255.255.255.0
dns ................. 192.168.0.1
domain ............ coguar.com
filename ........... pxelinux.0
next-server ...... 192.168.0.60

and if I boot through pxelinux.0 and chainload ipxe.lkrn I get following

Code:
IPXE 1.0.0 (fd95c) .. Open Source Network Boot Firmware: -- http://ipxe.org
Features: DNS HTTP iSCSI TFTP SRP AOE ELF MBOOT PXE bzImage Menu PXEXT

iPXE> ifstat
iPXE> dhcp
iPXE> ifstat
iPXE>

if I run command config then... all fields are listed as "not specified".

Does it look intersting, isn't it?

When I boot from floppy, somehow the network interface gets detected and configured although the chip is "not specified" as indicated by software.

What does it takes to include "alt2" driver into ipxe latest package?

Andromeda X
Now about switching to iPXE completely.... well not so fast as I need to get it working before.

Currently in pxelinux I have an extencive number of Linux distributions installation and working on M$ Windows to make unattended install (currently through Debian's version of iPXE which is missing "cpuid" --probably I will download source and attempt to recompile it with "cpuid" enabled).

I looked through iPXE documentation and a little bit confused how to make "Menus" of same extension as I did in pxelinux.

The documentation for pxelinux is very well layed out in regard of format menues, commands which can be used in the menu, colors, position, VGA modes, images for background and some other useful information.

Looking through iPXE documentaion I found it also quite informative but lacking details regarding "Menu" -- is it possible to preselect VGA mode, position menu let say at resolution of 1680x1050 in right low corner, how an image can be included and changed with selected item from menu, and possibly other useful information on "configuring menu"?

I do not believe that I missed this information in the documentation -- the information on iPXE menu configuration is quite "brief". If you can give some pointers to an examples it would be great assistance.

Andromeda X
Find all posts by this user
Quote this message in a reply
2016-11-30, 19:48
Post: #4
RE: ipxe.lkrn does not detect Atheros L2 network interface
The reason for it to work in in you floppy test is simple and the magic word here is UNDI, from your example:
Code:
net0: 00:24:8c:7c:54:dc using <NULL> on UNDI-0000:02:0.0 (closed)
Here we see it uses UNDI mode (it should have been in the <NULL> part as well so that part is a bit interesting)

The UNDI driver ipxe uses in this case is the stack that gets loaded by the already existing NIC ROM which ipxe can hook into if it is loaded over the network, the above floppy scenario is not really supported, and is a bit weird that it works at all.

And you would see the same thing if you _replace_ your pxelinux.0 on your tftp server with ipxes undionly.kpxe instead.

Note that when you load ipxe.lkrn from pxelinux it will not be able to load the nics UNDI stack.


Could you do a git diff in your ipxe source directory and post the result, and also post the exact build command you used to generate the ipxe binary with the atl1.c changes, and also how you then booted that?

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2016-11-30, 21:52 (This post was last modified: 2016-11-30 23:18 by Andromeda_x.)
Post: #5
RE: ipxe.lkrn does not detect Atheros L2 network interface
Hello,

thank you for pointing out that floppy used UNDI interface (I didn't pay attention to it as I am not familiar with enternals of iPXE).

Ok, I did recompiled undionly.kpxe with embedded script and it does work as expected. I have created a group in DHCP configuration file dedicated to undionly.kpxe boot file.

And here it is a "git diff" on my source directory

Code:
andromeda@moon:~/tmp/ipxe$ git diff
diff --git a/src/drivers/net/atl1e.c b/src/drivers/net/atl1e.c
index d010d8c..7054a0d 100644
--- a/src/drivers/net/atl1e.c
+++ b/src/drivers/net/atl1e.c
@@ -59,6 +59,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
static struct pci_device_id atl1e_pci_tbl[] = {
        PCI_ROM(0x1969, 0x1026, "atl1e_26", "Attansic L1E 0x1026", 0),
        PCI_ROM(0x1969, 0x1066, "atl1e_66", "Attansic L1E 0x1066", 0),
+       PCI_ROM(0x1969, 0x2048, "atl2e_48", "Attansic L2E 0x2048", 0),
};

static void atl1e_setup_mac_ctrl(struct atl1e_adapter *adapter);

Nothing special as you would expect....

I've attempted to recompile Debian's source package for iPXE (taken from here - iPXE source package) and no miracle happened -- same behavour.

Note: stock ipxe Debian 7 package able to proceede properly with pxelinux.0 + ipxe.lkrn. I've taken a quick look at source they use and what patches they apply in most recent package which I referred in the link above and I did not find any magic. They made some changes in configuration header file general.h

Code:
#define ROM_BANNER_TIMEOUT 0

#define NET_PROTO_IPV6
#define DOWNLOAD_PROTO_NFS

and applied following patch

Code:
diff --git a/src/arch/x86/prefix/romprefix.S b/src/arch/x86/prefix/romprefix.S
index f4ca206..14ff752 100644
--- a/src/arch/x86/prefix/romprefix.S
+++ b/src/arch/x86/prefix/romprefix.S
@@ -28,7 +28,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
#define PCI_FUNC_MASK 0x07

/* ROM banner timeout, converted to a number of (18Hz) timer ticks. */
+#ifndef ROM_BANNER_TIMEOUT_TICKS
#define ROM_BANNER_TIMEOUT_TICKS ( ( 18 * ROM_BANNER_TIMEOUT ) / 10 )
+#endif

/* Allow payload to be excluded from ROM size
  */

and following patch related to efi

Code:
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c
index 152bf53..91baa75 100644
--- a/src/util/elf2efi.c
+++ b/src/util/elf2efi.c
@@ -18,6 +18,7 @@
  */

#define FILE_LICENCE(...) extern void __file_licence ( void )
+#define _GNU_SOURCE
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
@@ -34,7 +35,6 @@
#include <elf.h>
#include <ipxe/efi/Uefi.h>
#include <ipxe/efi/IndustryStandard/PeImage.h>
-#include <libgen.h>

#define eprintf(...) fprintf ( stderr, __VA_ARGS__ )

rest of changes is Debian related: installation, grub and iso generation related...

Andromeda X
Well,

all I did to recompile ipxe.lkrn was

cd tmp/ipxe/src
make

and then copy file of interest in proper location on TFTP server.

Andromeda X
Ok, I decided to follow your advice to look at 'ipxe.pxe' module.

I've reconfigured DHCP server to "serve this file" on PXE request from test computer, restarted DHCP server and rebooted test computer.

Well, it loaded the file; gave information about UNDI and would not continue as despite my expectation.

This moment I thought it might be related that my "ipxe" script is not embedded into ipxe.pxe file.

Code:
cd tmp/ipxe/src
make bin/ipxe.pxe EMBED=my.ipxe

then ipxe.pxe was copied to proper location on TFTP server and test computer rebooted.

And I got a screen in following picture iPXE screen

Andromeda X
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)