On 11/10/15 10:49, Conen, Johannes wrote: > Hi there, > > I made my tests with the binary shell from ShellBinPkg from UDK2014, > from UDK2015, the current master and a few commits in between and > rebuilt the shell from ShellPkg for UDK2014, UDK2015, the current > master and a few commits in between UDK2014 and UDK2015. > > It worked fine with r17868 and didn't work anymore with r17869, so it > has to be that commit (I of course rebuilt the shell from ShellPkg). > If I put both shells on a USB-stick and switch between them on the > fly, it works in the one built from r17868 and doesn't work in the > one built from r17869. Regarding ShellBinPkg: the last version that > worked is r17619 (which is quite logical since the version after > that, r18187, is built from ShellPkg r18186, which didn't work for me > anymore). > > I'm not working on OVMF, but on real hardware (X64) - don't know > exactly with which version the UEFI firmware was written, but I > assume it's UDK2014. I found nothing in the release notes that would > break backwards compatibility to firmware versions built with older > EDKII versions in this regard.
Okay, that seems to explain it. The platform firmware on your physical machine provides Ip4Config (version 1) only, but the shell built from recent edk2 (and probably the binary shipped in UDK2015) requires Ip4Config2. Hm... I have not been a UDK user, but now I downloaded "UDK2015.Notes.zip", and in "ShellPkg Notes.txt", it says under "NEW FEATURES AND CHANGES", point 15: Change "ping" and "ifconfig" code to consume Ip4Config2 protocol. So I think this has been (technically) documented in the UDK2015 release. Perhaps the lack of compatibility with UDK2014 should have been emphasized. (But, I'm just a curious bystander in this discussion anwyay...) Thanks Laszlo > > With best regards, > Johannes Conen > > Siemens AG > Process Industries and Drives Division > Process Automation > Manufacturing Karlsruhe > PD PA MF-K IPC 2 > Oestliche Rheinbrueckenstr. 50 > 76187 Karlsruhe, Germany > mailto:johannes.co...@siemens.com > > > -----Ursprüngliche Nachricht----- > Von: Wu, Jiaxin [mailto:jiaxin...@intel.com] > Gesendet: Dienstag, 10. November 2015 02:42 > An: Laszlo Ersek; Conen, Johannes; edk2-devel@lists.01.org > Cc: Leif Lindholm (Linaro address) > Betreff: RE: [edk2] ShellPkg: Network commands (ifconfig/ping) broken > > Hi Laszlo and Conen, > Thanks for your reply, I have double checked the ShellBinPkg and ShellPkg in > UDK2015 release version, Both of them have included my patch for Ip4Config > Protocol deprecated work. > I'm also confused by the test result below, seems only time appeared abnormal. > > Conen: Are you using the shell binary released in UDK2015? > > Thanks. > Jiaxin > > -----Original Message----- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Tuesday, November 10, 2015 4:30 AM > To: Conen, Johannes; edk2-devel@lists.01.org > Cc: Leif Lindholm (Linaro address); Wu, Jiaxin > Subject: Re: [edk2] ShellPkg: Network commands (ifconfig/ping) broken > > On 11/09/15 16:52, Conen, Johannes wrote: >> Hello everyone, >> >> after switching from UDK2014 to UDK2015, I noticed that the network >> commands (ifconfig / ping) don't work anymore. ifconfig just exits >> with no feedback and ping says "Config no mapping" (logical, as it is >> not possible to get an IP address via ifconfig). In UDK2014 everything >> worked fine. >> >> With the help of unixsmurf (thanks a lot) > > Argh. Can we stop using these "funny" nicks on IRC? > > "unixsmurf" is Leif. > > What do you think, Leif? :) > >> I went on bughunting and >> found out that commit r17869 / git sha >> 7c25b7ea5b2c029a9e7a0be57f7c20f31d720c7d broke it. Wild guess: it has >> something to do with the new protocol. > > That's close, but my take is not that exact commit. Instead, what about > this: > > https://github.com/tianocore/edk2/commit/2aa0eb5df61e > > == SVN rev 17917. > > (I reviewed that commit.) > > But, it works for me: > >> Shell> ifconfig -s eth0 dhcp >> Shell> ifconfig -l eth0 >> >> ----------------------------------------------------------------- >> >> name : eth0 >> Media State : Media present >> policy : dhcp >> mac addr : 52:54:00:29:80:AE >> >> ipv4 address : 192.168.122.182 >> >> subnet mask : 255.255.255.0 >> >> default gateway: 192.168.122.1 >> >> Routes (2 entries): >> Entry[0] >> Subnet : 192.168.122.0 >> Netmask: 255.255.255.0 >> Gateway: 0.0.0.0 >> Entry[1] >> Subnet : 0.0.0.0 >> Netmask: 0.0.0.0 >> Gateway: 192.168.122.1 >> >> DNS server : >> 192.168.122.1 >> >> >> ----------------------------------------------------------------- >> Shell> ping 8.8.8.8 >> Ping 8.8.8.8 16 data bytes. >> 16 bytes from 8.8.8.8 : icmp_seq=1 ttl=0 time=30640ms >> 16 bytes from 8.8.8.8 : icmp_seq=2 ttl=0 time=31249ms >> 16 bytes from 8.8.8.8 : icmp_seq=3 ttl=0 time=33280ms >> 16 bytes from 8.8.8.8 : icmp_seq=4 ttl=0 time=38577ms >> 16 bytes from 8.8.8.8 : icmp_seq=5 ttl=0 time=28432ms >> 16 bytes from 8.8.8.8 : icmp_seq=6 ttl=0 time=31275ms >> 16 bytes from 8.8.8.8 : icmp_seq=7 ttl=0 time=26576ms >> 16 bytes from 8.8.8.8 : icmp_seq=8 ttl=0 time=33192ms >> 16 bytes from 8.8.8.8 : icmp_seq=9 ttl=0 time=31112ms >> 16 bytes from 8.8.8.8 : icmp_seq=10 ttl=0 time=28237ms >> >> 10 packets transmitted, 10 received, 0% packet loss, time 312570ms >> >> Rtt(round trip time) min=26576ms max=38577ms avg=31257ms > > This on OVMF just built from edk2 at SVN rev18759. (Note that in OVMF the > shell is built from source as well.) > >> Personally I think this is a critical issue - it practically makes it >> impossible to use any network related stuff in the UEFI shell. > > I suspect that you are using an old (UDK2014) shell binary on top of a new > (UDK2015) network stack, or vice-versa. > > If you check the commit message of SVN rev 17917 / git 2aa0eb5df61e, it said > that it was safe to remove the Ip4Config protocol *because* SVN rev > 17869 / git 7c25b7e [that you have found] had already moved ping / ifconfig > to the new protocol. > > And at the time of SVN rev 17869 / git 7c25b7e, the new protocol existed (see > SVN rev 17853 / git 1f6729ffe980). > > In chronological order: > - SVN rev 17853 / git 1f6729ff: implements the Ip4Config2 protocol, > - SVN rev 17869 / git 7c25b7ea: migrates ping & ifconfig to Ip4Config2, > - SVN rev 17917 / git 2aa0eb5d: removes Ip4Config (no more users) > > So, assuming you build *all* of your firmware from edk2, from source, > including the shell, you should end up with working ping & ifconfig at any > stage. > > I don't know at what stage UDK2015 was packaged. If it happened after SVN rev > 17917 / git 2aa0eb5d, then I guess the message of that commit > applies: "Ip4ConfigDxe driver is deprecated in UEFI 2.5, so we will not > support original Ip4Config Protocol" -- please use a conformant shell I guess. > > I'm still a bit confused, because ShellBinPkg was also updated in SVN rev > 18187 / git 1fe76acc, which was about a month after SVN rev 17917 / git > 2aa0eb5d above. So unless Intel released UDK2015 exactly within that one > month, I cannot see how you can encounter this problem. > > Are you using a shell binary whose source is still based on UDK2014 (or > older)? > > Thanks, > Laszlo > > >> With best regards, >> Johannes Conen >> >> Siemens AG >> Process Industries and Drives Division Process Automation >> Manufacturing Karlsruhe PD PA MF-K IPC 2 Oestliche Rheinbrueckenstr. >> 50 >> 76187 Karlsruhe, Germany >> mailto:johannes.co...@siemens.com >> >> >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel >> > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel