Date   

Re: Print git tag or commit info

Bob Feng
 

Hi Pankaj,

In edk2 build environment, the makefile is generated by build tool, while it also allow user to provide custom makefile for a module.

As you mentioned, git tag info is easy to do in makefile, so I think you may try to use custom makefile for a module.

In INF file, defines section, set CUSTOM_MAKEFILE attribute. For example

CUSTOM_MAKEFILE = MSFT| makefile
CUSTOM_MAKEFILE = GCC | GNUmakefile

And place your makefile and GNUmakefile to the same folder of .inf file.

You can check https://edk2-docs.gitbooks.io/edk-ii-inf-specification/content/v/release/1.27/ for more CUSTOM_MAKEFILE details.

Thanks,
Bob
From: Pankaj Bansal [mailto:pankaj.bansal@...]
Sent: Friday, October 11, 2019 11:26 AM
To: discuss@edk2.groups.io; Feng, Bob C <bob.c.feng@...>; Gao, Liming <liming.gao@...>
Cc: Varun Sethi <V.Sethi@...>
Subject: Print git tag or commit info

Hello Edk2 members,

I want to print the git tag info (if not available then top commit id) when booting UEFI image.
Can you please tell us how to do it?
In build environment that uses make files it's easy to do, but I don't know how to do it in edk2 build environment that uses inf files?

Regards,
Pankaj Bansal


Re: Establish network and run 'ping'

Buhrow, Simon <simon.buhrow@...>
 

Hi Tom,

thanks for that advice!
That´s really nice. But overall it says me the same: There is no driver for the Networkadapter...
And "connect" does not run successfully.

Regards,

Simon


FS0:\EFI\Netzwerk\> dh -d -v 161
161: D3D9D298
HIIConfigAccess(D33C9AF8)
AdapterInfo(D33C9B80)
Supported Information Types:
Guid[1] : D7C74207-A831-4A26-B1F5-D193065CE8B6 - gEfiAdapterInfoMediaStateGuid
MediaState: 0x00000000 - Success
Guid[2] : 25B6A2C7-410B-AD42-9145-11BFC750D202 - UnknownInfoType

34D59603-1428-4429-A414-E6B3B5FD7DC1(D33C9B10)
0E1AD94A-DCF4-11DB-9705-00E08161165F(D52AE570)
NetworkInterfaceIdentifier31(D33C6020)
E3161450-AD0F-11D9-9669-0800200C9A66(D33C6048)
DevicePath(D3D9D218)
PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)/MAC(0030D6156DDE,0x1)
51DD8B21-AD8D-48E9-BC3F-24F46722C748(D33C9B50)
Controller Name : Intel(R) I210 Gigabit Network Connection
Device Path : PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)/MAC(0030D6156DDE,0x1)
Controller Type : DEVICE
Configuration : NO
Diagnostics : NO
Managed by : <None>
Parent Controllers :
Parent[153] : PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
Child Controllers : <None>


-----Ursprüngliche Nachricht-----
Von: Tomas Pilar <tpilar@...>
Gesendet: Dienstag, 24. September 2019 11:44
An: discuss@edk2.groups.io; Buhrow, Simon <simon.buhrow@...>
Betreff: Re: [edk2-discuss] Establish network and run 'ping'

Hi Simon,

A handy trick that might help you is interrogating handles using 'dh -d -v <handle>' which gives you a lot of information about what's connected and installed and driving what. Works on all handles (drivers, devices,
etc.)

Cheers,
Tom

On 24/09/2019 10:29, Buhrow, Simon wrote:
Hi,

in order to pass files via network (using TFTP) from/to the UEFI-Shell, I´m trying to establish a network connection.
For that I want to check it using the ping command (Ifconfig and ping does not give me any console output when calling with corresponding parameters).

Looking for drivers and devices everything looks fine to me (see below parts of it).
Running 'connect' I don't get any entry about network adapter.
So I think I have to connect the Network Adapter with the corresponding drivers. But 'connect 161' fails.

What´s wrong? Do I misunderstand anything or is there just any step missing?

The Shell I use is the shell I get with the edk2-stable201908 when just compiling the ShellPkg.

Regards,

Simon


FS0:\> devices
...
161 D - - 1 0 0 Intel(R) I210 Gigabit Network Connection
...
FS0:\> drivers
...
93 0000000A ? - - - - TCP Network Service Driver TcpDxe
94 0000000A ? - - - - TCP Network Service Driver TcpDxe
95 0000000A ? - - - - UEFI PXE Base Code Driver UefiPxeBcDxe
96 0000000A ? - - - - UEFI PXE Base Code Driver UefiPxeBcDxe
97 0000000A ? - - - - IP6 Network Service Driver Ip6Dxe
99 0000000A ? - - - - UDP6 Network Service Driver Udp6Dxe
9A 0000000A ? - - - - DHCP6 Protocol Driver Dhcp6Dxe
9B 0000000A ? - - - - MTFTP6 Network Service Driver Mtftp6Dxe
B7 0000000A ? - - - - DHCP Protocol Driver Dhcp4Dxe
B8 0000000A ? - - - - IP4 CONFIG Network Service Driver Ip4ConfigDxe
B9 0000000A ? - - - - IP4 Network Service Driver Ip4Dxe
BA 0000000A ? - - - - MTFTP4 Network Service Mtftp4Dxe
BB 0000000A ? - - - - UDP Network Service Driver Udp4Dxe
C0 06060400 B X X 1 1 Intel(R) PRO/1000 6.6.04 PCI-E IntelGigabitLan
...
FS0:\> connect
Connect - Handle [149] Result Success.
Connect - Handle [14A] Result Success.
FS0:\> connect 161
Connect No drivers could be connected.



The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.


Re: Establish network and run 'ping'

Tomas Pilar (tpilar)
 

Is the Parent device managed by something? Because I am surprised that a
PCI device that it not managed/created by a driver has a MAC device path.

I assume that you want the driver C0 to drive your device? What does
checking that driver handle return? Is that driver managing anything?

Tom



On 24/09/2019 14:11, Buhrow, Simon wrote:
Hi Tom,

thanks for that advice!
That´s really nice. But overall it says me the same: There is no driver for the Networkadapter...
And "connect" does not run successfully.

Regards,

Simon


FS0:\EFI\Netzwerk\> dh -d -v 161
161: D3D9D298
HIIConfigAccess(D33C9AF8)
AdapterInfo(D33C9B80)
Supported Information Types:
Guid[1] : D7C74207-A831-4A26-B1F5-D193065CE8B6 - gEfiAdapterInfoMediaStateGuid
MediaState: 0x00000000 - Success
Guid[2] : 25B6A2C7-410B-AD42-9145-11BFC750D202 - UnknownInfoType

34D59603-1428-4429-A414-E6B3B5FD7DC1(D33C9B10)
0E1AD94A-DCF4-11DB-9705-00E08161165F(D52AE570)
NetworkInterfaceIdentifier31(D33C6020)
E3161450-AD0F-11D9-9669-0800200C9A66(D33C6048)
DevicePath(D3D9D218)
PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)/MAC(0030D6156DDE,0x1)
51DD8B21-AD8D-48E9-BC3F-24F46722C748(D33C9B50)
Controller Name : Intel(R) I210 Gigabit Network Connection
Device Path : PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)/MAC(0030D6156DDE,0x1)
Controller Type : DEVICE
Configuration : NO
Diagnostics : NO
Managed by : <None>
Parent Controllers :
Parent[153] : PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
Child Controllers : <None>


-----Ursprüngliche Nachricht-----
Von: Tomas Pilar <tpilar@...>
Gesendet: Dienstag, 24. September 2019 11:44
An: discuss@edk2.groups.io; Buhrow, Simon <simon.buhrow@...>
Betreff: Re: [edk2-discuss] Establish network and run 'ping'

Hi Simon,

A handy trick that might help you is interrogating handles using 'dh -d -v <handle>' which gives you a lot of information about what's connected and installed and driving what. Works on all handles (drivers, devices,
etc.)

Cheers,
Tom

On 24/09/2019 10:29, Buhrow, Simon wrote:
Hi,

in order to pass files via network (using TFTP) from/to the UEFI-Shell, I´m trying to establish a network connection.
For that I want to check it using the ping command (Ifconfig and ping does not give me any console output when calling with corresponding parameters).

Looking for drivers and devices everything looks fine to me (see below parts of it).
Running 'connect' I don't get any entry about network adapter.
So I think I have to connect the Network Adapter with the corresponding drivers. But 'connect 161' fails.

What´s wrong? Do I misunderstand anything or is there just any step missing?

The Shell I use is the shell I get with the edk2-stable201908 when just compiling the ShellPkg.

Regards,

Simon


FS0:\> devices
...
161 D - - 1 0 0 Intel(R) I210 Gigabit Network Connection
...
FS0:\> drivers
...
93 0000000A ? - - - - TCP Network Service Driver TcpDxe
94 0000000A ? - - - - TCP Network Service Driver TcpDxe
95 0000000A ? - - - - UEFI PXE Base Code Driver UefiPxeBcDxe
96 0000000A ? - - - - UEFI PXE Base Code Driver UefiPxeBcDxe
97 0000000A ? - - - - IP6 Network Service Driver Ip6Dxe
99 0000000A ? - - - - UDP6 Network Service Driver Udp6Dxe
9A 0000000A ? - - - - DHCP6 Protocol Driver Dhcp6Dxe
9B 0000000A ? - - - - MTFTP6 Network Service Driver Mtftp6Dxe
B7 0000000A ? - - - - DHCP Protocol Driver Dhcp4Dxe
B8 0000000A ? - - - - IP4 CONFIG Network Service Driver Ip4ConfigDxe
B9 0000000A ? - - - - IP4 Network Service Driver Ip4Dxe
BA 0000000A ? - - - - MTFTP4 Network Service Mtftp4Dxe
BB 0000000A ? - - - - UDP Network Service Driver Udp4Dxe
C0 06060400 B X X 1 1 Intel(R) PRO/1000 6.6.04 PCI-E IntelGigabitLan
...
FS0:\> connect
Connect - Handle [149] Result Success.
Connect - Handle [14A] Result Success.
FS0:\> connect 161
Connect No drivers could be connected.


The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.
The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.


Re: Establish network and run 'ping'

Tomas Pilar (tpilar)
 

Hi Simon,

A handy trick that might help you is interrogating handles using 'dh -d
-v <handle>' which gives you a lot of information about what's connected
and installed and driving what. Works on all handles (drivers, devices,
etc.)

Cheers,
Tom

On 24/09/2019 10:29, Buhrow, Simon wrote:
Hi,

in order to pass files via network (using TFTP) from/to the UEFI-Shell, I´m trying to establish a network connection.
For that I want to check it using the ping command (Ifconfig and ping does not give me any console output when calling with corresponding parameters).

Looking for drivers and devices everything looks fine to me (see below parts of it).
Running 'connect' I don't get any entry about network adapter.
So I think I have to connect the Network Adapter with the corresponding drivers. But 'connect 161' fails.

What´s wrong? Do I misunderstand anything or is there just any step missing?

The Shell I use is the shell I get with the edk2-stable201908 when just compiling the ShellPkg.

Regards,

Simon


FS0:\> devices
...
161 D - - 1 0 0 Intel(R) I210 Gigabit Network Connection
...
FS0:\> drivers
...
93 0000000A ? - - - - TCP Network Service Driver TcpDxe
94 0000000A ? - - - - TCP Network Service Driver TcpDxe
95 0000000A ? - - - - UEFI PXE Base Code Driver UefiPxeBcDxe
96 0000000A ? - - - - UEFI PXE Base Code Driver UefiPxeBcDxe
97 0000000A ? - - - - IP6 Network Service Driver Ip6Dxe
99 0000000A ? - - - - UDP6 Network Service Driver Udp6Dxe
9A 0000000A ? - - - - DHCP6 Protocol Driver Dhcp6Dxe
9B 0000000A ? - - - - MTFTP6 Network Service Driver Mtftp6Dxe
B7 0000000A ? - - - - DHCP Protocol Driver Dhcp4Dxe
B8 0000000A ? - - - - IP4 CONFIG Network Service Driver Ip4ConfigDxe
B9 0000000A ? - - - - IP4 Network Service Driver Ip4Dxe
BA 0000000A ? - - - - MTFTP4 Network Service Mtftp4Dxe
BB 0000000A ? - - - - UDP Network Service Driver Udp4Dxe
C0 06060400 B X X 1 1 Intel(R) PRO/1000 6.6.04 PCI-E IntelGigabitLan
...
FS0:\> connect
Connect - Handle [149] Result Success.
Connect - Handle [14A] Result Success.
FS0:\> connect 161
Connect No drivers could be connected.


The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.


Establish network and run 'ping'

Buhrow, Simon
 

Hi,

in order to pass files via network (using TFTP) from/to the UEFI-Shell, I´m trying to establish a network connection.
For that I want to check it using the ping command (Ifconfig and ping does not give me any console output when calling with corresponding parameters).

Looking for drivers and devices everything looks fine to me (see below parts of it).
Running 'connect' I don't get any entry about network adapter.
So I think I have to connect the Network Adapter with the corresponding drivers. But 'connect 161' fails.

What´s wrong? Do I misunderstand anything or is there just any step missing?

The Shell I use is the shell I get with the edk2-stable201908 when just compiling the ShellPkg.

Regards,

Simon


FS0:\> devices
...
161 D - - 1 0 0 Intel(R) I210 Gigabit Network Connection
...
FS0:\> drivers
...
93 0000000A ? - - - - TCP Network Service Driver TcpDxe
94 0000000A ? - - - - TCP Network Service Driver TcpDxe
95 0000000A ? - - - - UEFI PXE Base Code Driver UefiPxeBcDxe
96 0000000A ? - - - - UEFI PXE Base Code Driver UefiPxeBcDxe
97 0000000A ? - - - - IP6 Network Service Driver Ip6Dxe
99 0000000A ? - - - - UDP6 Network Service Driver Udp6Dxe
9A 0000000A ? - - - - DHCP6 Protocol Driver Dhcp6Dxe
9B 0000000A ? - - - - MTFTP6 Network Service Driver Mtftp6Dxe
B7 0000000A ? - - - - DHCP Protocol Driver Dhcp4Dxe
B8 0000000A ? - - - - IP4 CONFIG Network Service Driver Ip4ConfigDxe
B9 0000000A ? - - - - IP4 Network Service Driver Ip4Dxe
BA 0000000A ? - - - - MTFTP4 Network Service Mtftp4Dxe
BB 0000000A ? - - - - UDP Network Service Driver Udp4Dxe
C0 06060400 B X X 1 1 Intel(R) PRO/1000 6.6.04 PCI-E IntelGigabitLan
...
FS0:\> connect
Connect - Handle [149] Result Success.
Connect - Handle [14A] Result Success.
FS0:\> connect 161
Connect No drivers could be connected.


Re: Increase robustness of nmake BaseTools build for space also used by make

Liming Gao
 

Burt:
Thanks for your contribution. I am reviewing this patch. Generally, I think this is the workable way.
I will reply to your patch mail.

Thanks
Liming

-----Original Message-----
From: discuss@edk2.groups.io [mailto:discuss@edk2.groups.io] On Behalf Of
Burt Silverman
Sent: Tuesday, September 10, 2019 4:25 AM
To: discuss@edk2.groups.io
Subject: [edk2-discuss] Increase robustness of nmake BaseTools build for
space also used by make

Hello, I added a patch to the devel@edk2 group but I don't know how to
introduce it. I was working in a MyWorkspace years ago using cygwin most
likely on my Windows computer. Recently, I went back to the workspace,
updated the repository, but this time I was working with WIndows tools. I ran
into a problem due to the existence of a libs directory which is an artifact of
non Windows tools. There are several ways to fix this, I am sure. One could
rewrite the Unix GNUmakefiles so directory libs is not used, I assume. Or one
could change the target in the nmake Makefile from libs to something else,
like libraries. I chose a different method to solve the problem: removing the
libs directory in cleanall.

Can someone tell me if I should introduce my fix other than through
devel@edk2? Will my fix be looked at? Thanks.

Burt Silverman


Increase robustness of nmake BaseTools build for space also used by make

Burt Silverman
 

Hello, I added a patch to the devel@edk2 group but I don't know how to introduce it. I was working in a MyWorkspace years ago using cygwin most likely on my Windows computer. Recently, I went back to the workspace, updated the repository, but this time I was working with WIndows tools. I ran into a problem due to the existence of a libs directory which is an artifact of non Windows tools. There are several ways to fix this, I am sure. One could rewrite the Unix GNUmakefiles so directory libs is not used, I assume. Or one could change the target in the nmake Makefile from libs to something else, like libraries. I chose a different method to solve the problem: removing the libs directory in cleanall.

Can someone tell me if I should introduce my fix other than through devel@edk2? Will my fix be looked at? Thanks.

Burt Silverman


Re: TPM configure menu in UEFI

LI, Huang <frank.li@...>
 

Hi all,

 

Good morning. I have a board which is running Stinggray processor. On this board there is also real SPI based TPM2 chip. I want to implement measured boot on this board. I have question regarding EDK2 uefi TPM configure menu. How do I create TPM configure menu in edk2 like this:

 

 

 

Any help is much appreciated.

 

Regards,

 

Frank

 


[edk2] Question about needing install python 2.7

Tiger Liu(BJ-RD)
 

Hello,
I have a question about needing install python 2.7

If user wants to setup udk compiling environment, he needs install python 2.7.
When running build command every time, it always check python tool path.
Why?

If I compiled basetools before, and use the prebuilt basetools package, then I don't need install python 2.7 package?

Thanks



?????
?????????????????????????????????????????????????????
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.


Re: Linking an external library into UEFI APPLICATION

Michael D Kinney
 

Hi Chris,

Yes. It is supported from an INF. What error are you getting?

The .lib file is usually placed in the same dir or a subdir
below the INF file with the LIB statement.

Mike

-----Original Message-----
From: discuss@edk2.groups.io
[mailto:discuss@edk2.groups.io] On Behalf Of Johnson,
Chris (Tulsa)
Sent: Wednesday, August 14, 2019 2:39 PM
To: discuss@edk2.groups.io
Subject: [edk2-discuss] Linking an external library
into UEFI APPLICATION

Hello,

I am working with a UEFI APPLICATION and am trying to
link an externally built static library. The external
build system is using the same toolchain so the library
should be compatible.

I have attempted to use this syntax in a dedicated INF:

[Binaries]
LIB|/path/to/lib/mylib.a


I have also tried this syntax in the application's INF:

GCC:*_*_*_DLINK_FLAGS = -L/path/to/lib/dir -l
library_name


Is what I'm trying to do supported?

Thank you,

-Chris

________________________________

CONFIDENTIALITY NOTICE: This email and any attachments
are for the sole use of the intended recipient(s) and
contain information that may be Garmin confidential
and/or Garmin legally privileged. If you have received
this email in error, please notify the sender by reply
email and delete the message. Any disclosure, copying,
distribution or use of this communication (including
attachments) by someone other than the intended
recipient is prohibited. Thank you.


Linking an external library into UEFI APPLICATION

Johnson, Chris (Tulsa) <chris.a.johnson@...>
 

Hello,

I am working with a UEFI APPLICATION and am trying to link an externally built static library. The external build system is using the same toolchain so the library should be compatible.

I have attempted to use this syntax in a dedicated INF:

[Binaries]
LIB|/path/to/lib/mylib.a


I have also tried this syntax in the application's INF:

GCC:*_*_*_DLINK_FLAGS = -L/path/to/lib/dir -l library_name


Is what I'm trying to do supported?

Thank you,

-Chris

________________________________

CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be Garmin confidential and/or Garmin legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.


Can't Build AppPkg on ubuntu16.04?

robin
 

I developed UEFI app&driver with UDK2018&Win10. Recently I decided move to unbutu 16.04. Building EmulatorPkg and MdeMoudelPkg are good.
But I can't build AppPkg. The error message as below:

"gcc" -o /home/robin/src/edk2/Build/AppPkg/DEBUG_GCC5/IA32/AppPkg/Applications/Sockets/WebServer/WebServer/DEBUG/WebServer.dll -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40 -Wl,--entry,_ModuleEntryPoint -u _ModuleEntryPoint -Wl,-Map,/home/robin/src/edk2/Build/AppPkg/DEBUG_GCC5/IA32/AppPkg/Applications/Sockets/WebServer/WebServer/DEBUG/WebServer.map,--whole-archive -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386 -Wl,--start-group,@/home/robin/src/edk2/Build/AppPkg/DEBUG_GCC5/IA32/AppPkg/Applications/Sockets/WebServer/WebServer/OUTPUT/static_library_files.lst,--end-group -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=WebServerStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie -flto -Os -O0 -Wno-unused-variable -nostdinc -nostdlib -DUEFI_C_SOURCE -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 -Wl,--script=/home/robin/src/edk2/BaseTools/Scripts/GccBase.lds -Wno-error -no-pie
/usr/bin/ld: 并不支持从格式 pe-i386 (/home/robin/src/edk2/Build/AppPkg/DEBUG_GCC5/IA32/StdLib/LibC/LibC/OUTPUT/LibC.lib(ftol2.obj)) 到格式 elf32-i386 (/home/robin/src/edk2/Build/AppPkg/DEBUG_GCC5/IA32/AppPkg/Applications/Sockets/SetHostName/SetHostName/DEBUG/SetHostName.dll) 的重寻址链结
collect2: error: ld returned 1 exit status
GNUmakefile:448: recipe for target '/home/robin/src/edk2/Build/AppPkg/DEBUG_GCC5/IA32/AppPkg/Applications/Sockets/SetHostName/SetHostName/DEBUG/SetHostName.dll' failed
make: *** [/home/robin/src/edk2/Build/AppPkg/DEBUG_GCC5/IA32/AppPkg/Applications/Sockets/SetHostName/SetHostName/DEBUG/SetHostName.dll] Error 1


build.py...
: error 7000: Failed to execute command
make tbuild [/home/robin/src/edk2/Build/AppPkg/DEBUG_GCC5/IA32/AppPkg/Applications/Sockets/SetHostName/SetHostName]


build.py...
: error 7000: Failed to execute command
make tbuild [/home/robin/src/edk2/Build/AppPkg/DEBUG_GCC5/IA32/AppPkg/Applications/Sockets/RecvDgram/RecvDgram]


build.py...
: error 7000: Failed to execute command
make tbuild [/home/robin/src/edk2/Build/AppPkg/DEBUG_GCC5/IA32/AppPkg/Applications/Sockets/SetSockOpt/SetSockOpt]


build.py...
: error 7000: Failed to execute command
make tbuild [/home/robin/src/edk2/Build/AppPkg/DEBUG_GCC5/IA32/AppPkg/Applications/Sockets/WebServer/WebServer]


build.py...
: error 7000: Failed to execute command
make tbuild [/home/robin/src/edk2/Build/AppPkg/DEBUG_GCC5/IA32/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx]


build.py...
: error F002: Failed to build module
/home/robin/src/edk2/AppPkg/Applications/Sockets/SetHostName/SetHostName.inf [IA32, GCC5, DEBUG]

- Failed -
Build end time: 11:23:27, Aug.08 2019
Build total time: 00:00:29


Re: Some questions about UEFI

Pete Batard
 

Hi Elena,

Glad to hear that you got Debian 10 installed.

For the record, we should have finalized notes on how to install Debian 10 on the Pi 3 soon, in this platform's Systems.md [1] (I send a patch for that last week, that expands a bit more on the draft notes I sent you earlier, that has not been committed yet), and, if I may, I'm also going to point out that I posted a more informal but also more detailed guide on how to achieve this same installation on my blog too [2]. I have also recently started to produce binary releases of Rasbperry Pi 3 UEFI firmware packages [3] (built from the latest EDK2 sources through AppVeyor), that might be of interest to you as they include the non-free WLAN drivers that Debian asks for during install.

At any rate, to answer your question, if the actual architectures you tried are "ARM, X64 and IA32", then your issue is simple:

The Raspberry Pi 3 is using an Arm64 CPU, so the architecture you *must* use to compile any UEFI application is "AARCH64" (not ARM, which is only for 32-bit and therefore incompatible). By the looks of it, this is the one you haven't tried so far whereas this is the one that you should use.

Note that, for the sake of completeness, compiling for the EBC arch should also work, since we include the EBC interpreter in the firmware. But really, what you want to compile a UEFI application to run it on a Pi 3, you should only use AARCH64 for the architecture. If you do just that, I'm confident that you will find that it fixes your issue.

Regards,

/Pete

[1] https://github.com/tianocore/edk2-platforms/blob/master/Platform/RaspberryPi/RPi3/Systems.md
[2] https://pete.akeo.ie/2019/07/installing-debian-arm64-on-raspberry-pi.html
[3] https://github.com/pbatard/RPi3

On 2019.07.31 11:26, Elena WILLIS wrote:
Hi Leif and Pete,
I now have a working UEFI on my Raspberry PI model 3B, which can boot into Debian 10.
The standalone GRUB executable (grubstand.efi) works when I execute it in the UEFI Shell.
I have also installed EDKII (https://github.com/tianocore/edk2, the 2018 stable version) and followed build instructions to generate a simple HelloWorld.efi application.
But when I execute HelloWorld.efi in my UEFI Shell, I always get the same error :
*Command Error Status : Unsupported. *
**
• I am executing my application like this :
Øfs0:
ØHelloWorld.efi
• I have tried different TARGET_ARCH build options : ARM, X64 and IA32, but they all produce the same error when I try to execute HelloWorld.efi.
Do you have any idea how I could fix this?
Best Regards,
Elena**
-----Original Message-----
From: Leif Lindholm <leif.lindholm@...>
Sent: vendredi 19 juillet 2019 11:11
To: discuss@edk2.groups.io; Elena WILLIS <elena.willis@...>
Cc: Pete Batard <pete@...>
Subject: Re: [edk2-discuss] Some questions about UEFI
Hi Elena, (+cc Pete)
On Thu, Jul 18, 2019 at 11:54:38AM +0000, Elena WILLIS wrote:

> I am using EDK2 https://github.com/tianocore/edk2 on a Raspberry PI
3B model.

> Installation went fine and I can access the UEFI Shell interface,
where the commands work.

>

> But I'm now stuck and have a few questions :

>

> -          Do you have a simple .efi script that I could use to test

> -          my setup ?
.efi indicated an application (or driver), as opposed to a script.
My go-to test case is a standalone GRUB executable.
Generated with grub-mkstandalone -O arm64-efi -o grubstand.efi

> -          Once I am on the UEFI interface, I can't seem to boot

> -          back onto my OS (Raspbian). Could you please explain how

> -          to do this?
Does 'exit' bring you back to a "BIOS" menu system where you can select boot options?
Best Regards,
Leif


Re: Some questions about UEFI

Elena WILLIS
 

Hi Leif and Pete,



I now have a working UEFI on my Raspberry PI model 3B, which can boot into Debian 10.

The standalone GRUB executable (grubstand.efi) works when I execute it in the UEFI Shell.



I have also installed EDKII (https://github.com/tianocore/edk2, the 2018 stable version) and followed build instructions to generate a simple HelloWorld.efi application.

But when I execute HelloWorld.efi in my UEFI Shell, I always get the same error :

Command Error Status : Unsupported.



* I am executing my application like this :

Ø fs0:

Ø HelloWorld.efi



* I have tried different TARGET_ARCH build options : ARM, X64 and IA32, but they all produce the same error when I try to execute HelloWorld.efi.



Do you have any idea how I could fix this?



Best Regards,



Elena

-----Original Message-----
From: Leif Lindholm <leif.lindholm@...>
Sent: vendredi 19 juillet 2019 11:11
To: discuss@edk2.groups.io; Elena WILLIS <elena.willis@...>
Cc: Pete Batard <pete@...>
Subject: Re: [edk2-discuss] Some questions about UEFI



Hi Elena, (+cc Pete)



On Thu, Jul 18, 2019 at 11:54:38AM +0000, Elena WILLIS wrote:

I am using EDK2 https://github.com/tianocore/edk2 on a Raspberry PI 3B model.
Installation went fine and I can access the UEFI Shell interface, where the commands work.
But I'm now stuck and have a few questions :
- Do you have a simple .efi script that I could use to test
- my setup ?


.efi indicated an application (or driver), as opposed to a script.

My go-to test case is a standalone GRUB executable.

Generated with grub-mkstandalone -O arm64-efi -o grubstand.efi



- Once I am on the UEFI interface, I can't seem to boot
- back onto my OS (Raspbian). Could you please explain how
- to do this?


Does 'exit' bring you back to a "BIOS" menu system where you can select boot options?



Best Regards,



Leif


Re: WinHost.exe from EmulatorPkg and StdLib applications

Tim Lewis
 

Mike --

I moved my !include StdLib.inc to the very end of EmulatorPkg.dsc and I
found that the build issues went away. But if I included it before the
[BuildOptions] line, it would have trouble with the header files. My guess
is there is an order dependency about the way that the CC_FLAGS items are
processed.

#DEFINE EMULATE
#!include StdLib/StdLib.inc

[BuildOptions]
MSFT:DEBUG_*_*_CC_FLAGS = /Od /Oy-
MSFT:NOOPT_*_*_CC_FLAGS = /Od /Oy-

MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096 /FILEALIGN:4096
/SUBSYSTEM:CONSOLE
MSFT:DEBUG_*_*_DLINK_FLAGS = /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT)
/BASE:0x10000
MSFT:NOOPT_*_*_DLINK_FLAGS = /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT)
/BASE:0x10000

DEFINE EMULATE
!include StdLib/StdLib.inc

I did try your changes with VS2017 and VS2015 and ran WinHost with both with
no trouble. And now I have my StdLib apps working too!

Thanks,

Tim

-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@...>
Sent: Thursday, July 25, 2019 9:13 AM
To: discuss@edk2.groups.io; tim.lewis@...; Kinney, Michael D
<michael.d.kinney@...>
Subject: RE: [edk2-discuss] WinHost.exe from EmulatorPkg and StdLib
applications

Hi Tim,

I happened to be looking at this over the weekend.

I was able to resolve the build issues for XCODE5 for the IA32 version of
EmulatorPkg, but not X64.
I did not verify if it boots yet, so maybe you can help verify that.

A WIP branch with what I got working is here:

https://github.com/mdkinney/edk2/commits/BZ_none_EmulatorPkg_Fixes

It also fixes some VS2017/VS2015 issues with EmulatorPkg.

Best regards,

Mike


-----Original Message-----
From: discuss@edk2.groups.io
[mailto:discuss@edk2.groups.io] On Behalf Of Tim Lewis
Sent: Thursday, July 25, 2019 1:55 AM
To: discuss@edk2.groups.io
Subject: [edk2-discuss] WinHost.exe from EmulatorPkg and StdLib
applications

I am having trouble building StdLib applications inside of
EmulatorPkg.dsc.
When I add !incude StdLib/StdLib.inc I will always see a warning
message about stdio.h.



This comes down to the use of /X in StdLib.inc to prevent C library
apps from getting the host environments include files. But that is
what WinHost needs. And I can't figure out how to "turn off /X" for
just one module.



Any advice here?



Thanks,



Tim



Re: WinHost.exe from EmulatorPkg and StdLib applications

Tim Lewis
 

Mike --

I don't have XCODE5 so I cant rebuild here but I can try out the WinHost.exe
and I will check out the VS2017 and VS2015 changes since I have them handy.

Tim

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of Michael D
Kinney
Sent: Thursday, July 25, 2019 9:13 AM
To: discuss@edk2.groups.io; tim.lewis@...; Kinney, Michael D
<michael.d.kinney@...>
Subject: Re: [edk2-discuss] WinHost.exe from EmulatorPkg and StdLib
applications

Hi Tim,

I happened to be looking at this over the weekend.

I was able to resolve the build issues for XCODE5 for the IA32 version of
EmulatorPkg, but not X64.
I did not verify if it boots yet, so maybe you can help verify that.

A WIP branch with what I got working is here:

https://github.com/mdkinney/edk2/commits/BZ_none_EmulatorPkg_Fixes

It also fixes some VS2017/VS2015 issues with EmulatorPkg.

Best regards,

Mike


-----Original Message-----
From: discuss@edk2.groups.io
[mailto:discuss@edk2.groups.io] On Behalf Of Tim Lewis
Sent: Thursday, July 25, 2019 1:55 AM
To: discuss@edk2.groups.io
Subject: [edk2-discuss] WinHost.exe from EmulatorPkg and StdLib
applications

I am having trouble building StdLib applications inside of
EmulatorPkg.dsc.
When I add !incude StdLib/StdLib.inc I will always see a warning
message about stdio.h.



This comes down to the use of /X in StdLib.inc to prevent C library
apps from getting the host environments include files. But that is
what WinHost needs. And I can't figure out how to "turn off /X" for
just one module.



Any advice here?



Thanks,



Tim



Re: WinHost.exe from EmulatorPkg and StdLib applications

Michael D Kinney
 

Hi Tim,

I happened to be looking at this over the weekend.

I was able to resolve the build issues for XCODE5
for the IA32 version of EmulatorPkg, but not X64.
I did not verify if it boots yet, so maybe you can
help verify that.

A WIP branch with what I got working is here:

https://github.com/mdkinney/edk2/commits/BZ_none_EmulatorPkg_Fixes

It also fixes some VS2017/VS2015 issues with EmulatorPkg.

Best regards,

Mike

-----Original Message-----
From: discuss@edk2.groups.io
[mailto:discuss@edk2.groups.io] On Behalf Of Tim Lewis
Sent: Thursday, July 25, 2019 1:55 AM
To: discuss@edk2.groups.io
Subject: [edk2-discuss] WinHost.exe from EmulatorPkg
and StdLib applications

I am having trouble building StdLib applications inside
of EmulatorPkg.dsc.
When I add !incude StdLib/StdLib.inc I will always see
a warning message about stdio.h.



This comes down to the use of /X in StdLib.inc to
prevent C library apps from getting the host
environments include files. But that is what WinHost
needs. And I can't figure out how to "turn off /X" for
just one module.



Any advice here?



Thanks,



Tim



Re: WinHost.exe from EmulatorPkg and StdLib applications

Liming Gao
 

Can you try the way to append compiler option in [Components] section for the specific modules?

I see StdLib/StdLib.inc has such usage.

-----Original Message-----
From: discuss@edk2.groups.io [mailto:discuss@edk2.groups.io] On Behalf Of Tim Lewis
Sent: Thursday, July 25, 2019 4:55 PM
To: discuss@edk2.groups.io
Subject: [edk2-discuss] WinHost.exe from EmulatorPkg and StdLib applications

I am having trouble building StdLib applications inside of EmulatorPkg.dsc.
When I add !incude StdLib/StdLib.inc I will always see a warning message
about stdio.h.



This comes down to the use of /X in StdLib.inc to prevent C library apps
from getting the host environments include files. But that is what WinHost
needs. And I can't figure out how to "turn off /X" for just one module.



Any advice here?



Thanks,



Tim



WinHost.exe from EmulatorPkg and StdLib applications

Tim Lewis
 

I am having trouble building StdLib applications inside of EmulatorPkg.dsc.
When I add !incude StdLib/StdLib.inc I will always see a warning message
about stdio.h.



This comes down to the use of /X in StdLib.inc to prevent C library apps
from getting the host environments include files. But that is what WinHost
needs. And I can't figure out how to "turn off /X" for just one module.



Any advice here?



Thanks,



Tim


Re: Some questions about UEFI

Pete Batard <pete@...>
 

Hi Elena, hi Leif,

I'll add the following comments:


1. Right now, the RPi3 firmware is set not to boot SD/USB by default, but boot into the UEFI Shell always. Therefore, if you want a /efi/boot/bootaa64.efi bootloader residing on an SD card to launch by default, you first have to go to Boot Maintenance Manager → Boot Options → Change Boot Order and then alter the setting to that SD/MMC is the first entry. Alternatively, you can also manually invoke the executable from the Shell (e.g. Navigate to fs0: and then launch /efi/boot/bootaa64.efi).

Obviously, since we agree this is not a very intuitive behaviour, there is a patch lined up (that has not yet been applied) to alter the above and make sure SD/MMC becomes the default for boot, as we reckon most users are likely to be thrown off by the current behaviour.


2. If it helps, please be aware that there exists a Systems.md in the edk2-platforms RPi3 directory where, for instance, the installation of Ubuntu 18.04 LTS on a Pi 3 Model B is described. See https://github.com/tianocore/edk2-platforms/blob/master/Platform/RaspberryPi/RPi3/Systems.md.

I haven't tested Raspbian (I believe this is designed specifically to use the default Pi bootloader, so, even if it's targetted for Pi, it might not be the best distribution to install when using the UEFI firmware) but you might be interested to know that I'm currently in the process of adding detailed information on how to install of *vanilla* Debian 10.0 ARM64 on a Pi 3 Model B+, and I am hoping to submit a patch to update Systems.md with these instructions some time next week.

In case you are interested, I am copy/pasting my current rough draft below.

Regards,

/Pete

------------------------------------------------------------------------

[Debian 10](https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/) has been tested and
confirmed to work, on a Raspberry 3 Model B+, including the installation process.

Below are the steps you can follow to install Debian 10 onto SD:
* Partition the media as MBR and create a ~300 MB FAT32 partition on it with MBR type `0x0c`
* Copy the UEFI firmware files (`RPI_EFI.fd`, `bootcode.bin`, `fixup.dat` and `start.elf`)
as well as an appropriate `config.txt` onto the FAT partition. If needed you can download
the non UEFI binary files from https://github.com/raspberrypi/firmware/tree/master/boot.
If you are using a model B+, don't forget to copy the relevant `.dtb` and reference it in
your `config.txt`.
* Download [`debian-10.0.0-arm64-netinst.iso`](https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-10.0.0-arm64-netinst.iso)
* Extract the full content of the ISO onto the partition you created.
* Delete `EFI\boot\bootaa64.efi` and rename `EFI\boot\grubaa64.efi` to `EFI\boot\bootaa64.efi`
* Insert the media and power up the Raspberry Pi device.
* On the GRUB menu select `Install`
* Before selecting the language press <kbd>Alt</kbd>-<kbd>F2</kbd> and press <kbd>Enter</kbd>
to activate a console.
* Issue the commands:
```
mkdir /cdrom
mount -t vfat /dev/mmcblk0p1 /cdrom
```
This is needed as the Debian installer does not currently know how to detect SD based install
media.
* Go back to the main consolde (<kbd>Alt</kbd>-<kbd>F1</kbd>) and select your language and
keyboard as needed and proceed with the guide prompt with the rest of the installation.
The installer script should properly detect and set up your networking.
Continue until you get to `Partition disks`
* For `Partitioning method` select `Manual`

```
MMC/SD card #1 (mmcblk0) - 16.0 GB SD 2WCGO
#1 primary 314.6 MB fat16
pri/log FREE SPACE
```

- Select `#1 primary` and change `Use as:` to `EFI System Partition` then select
`Done setting the partition`.
- Select `FREE SPACE` &rarr; `Create a new partition` and create a `1 GB` swap partition.
- Select `FREE SPACE` &rarr; `Create a new partition` and allocate the rest to an `ext4`
root partition.
After doing this, your partition report should look like this:
```
MMC/SD card #1 (mmcblk0) - 16.0 GB SD 2WCGO
#1 primary 314.6 MB B K ESP
#2 primary 1.0 GB f swap swap
#3 primary 14.7 GB f ext4 /
```

* Select `Finish partitioning and write changes to disk` and let the installer continue.
* `Configure the package manager` and `Select and install software` appear to be broken
at this stage, so you should ignore them (you can configure them later).
* Select `Install the GRUB boot loader on a hard disk`
* When the system displays the message `Installation is complete, so it is time to boot into your new system (...)`
go to the other console *<kbd>Alt</kbd>-<kbd>F2</kbd>) and issue the following
(provided that Linux root is your 3rd partition, else you should change `mmcblk0p3`
to the proper value. Note that the first command might not be needed if the installer
still had `/target` properly mounted):
```
mount -t ext4 /dev/mmcblk0p3 /target
mount -o bind /dev /target/dev
chroot /target /sbin/fdisk /dev/mmcblk0
```
Then press <kbd>t</kbd>, <kbd>1</kbd>, <kbd>c</kbd> and <kbd>w</kbd> to change the
1st partition type to FAT32. This is needed because the hardcoded bootloader on the
CPU die does not handle type `0xef` (ESP) partitions for boot (but we needed to set
an ESP to keep the Debian installer happy).
* Go back to the installer and reboot the system. You should get the GRUB prompt and
the system should book into the installed Linux. If you don't see the multicoloured
screen when booting the Pi, it's probably because you didn't properly change the
type of the FAT partition back to `0xC`.
* You may want to edit `/etc/apt/sources.list` to:
```
deb http://httpredir.debian.org/debian buster main contrib non-free
deb http://httpredir.debian.org/debian buster-updates main contrib non-free
deb http://security.debian.org/ buster/updates main contrib non-free
```
* At this stage, you should be able to install additional software such as `openssh`
(which is not installed by default) or anything else you need.

------------------------------------------------------------------------

On 2019.07.19 10:15, Elena WILLIS wrote:
Hi Leif and Pete,
My answers in blue.
Best regards,
Elena
-----Original Message-----
From: Leif Lindholm <leif.lindholm@...>
Sent: vendredi 19 juillet 2019 11:11
To: discuss@edk2.groups.io; Elena WILLIS <elena.willis@...>
Cc: Pete Batard <pete@...>
Subject: Re: [edk2-discuss] Some questions about UEFI
Hi Elena, (+cc Pete)
On Thu, Jul 18, 2019 at 11:54:38AM +0000, Elena WILLIS wrote:

> I am using EDK2 https://github.com/tianocore/edk2 on a Raspberry PI
3B model.

> Installation went fine and I can access the UEFI Shell interface,
where the commands work.

>

> But I'm now stuck and have a few questions :

>

> -          Do you have a simple .efi script that I could use to test

> -          my setup ?
.efi indicated an application (or driver), as opposed to a script.
My go-to test case is a standalone GRUB executable.
Generated with grub-mkstandalone -O arm64-efi -o grubstand.efi
Ok I will try this, thank you !

> -          Once I am on the UEFI interface, I can't seem to boot

> -          back onto my OS (Raspbian). Could you please explain how

> -          to do this?
Does 'exit' bring you back to a "BIOS" menu system where you can select boot options?
Yes, it does, but from there I can't get back onto my OS either. :(
Best Regards,
Leif

961 - 980 of 998