public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* edk2-libc fopen() fails
       [not found] <369835914.808190.1667765918175.ref@mail.yahoo.com>
@ 2022-11-06 20:18 ` Joaqu� Cono Bolillo
       [not found] ` <172552160C64E29E.4995@groups.io>
  1 sibling, 0 replies; 2+ messages in thread
From: Joaqu� Cono Bolillo @ 2022-11-06 20:18 UTC (permalink / raw)
  To: Edk2-devel-groups-io, Michael D. Kinney, rebecca, rebecca

Hi Rebecca,

to my knowledge, you are the maintainer of the AppPkg, that my team is currently
using to analyse a very sporadic reboot failure
(stuck, about 5 failures out of 100 reboots) on a x86-64 platform that
our company is going to ship soon.

Since the failure appears while Windows boots, it is safe to boot
to UEFI Shell first, analyse the register settings of the platform
using an UEFI Shell application, we are currently  implementing,
before  booting to Windows.

We are familiar with GIT and EDK2, but regrettably facing problems
using edk2-libc to refine the test program for our needs: fopen() always fails:

Our configuration:
* commit ba0e0e4c6a174b71b18ccd6e47319cc45878893c (HEAD, tag: edk2-stable202208)
* latest
  - AppPkg
  - StdLib
  - StdLibPrivateInternalFiles
* target.txt:
  - ACTIVE_PLATFORM      = AppPkg\AppPkg.dsc
  - TARGET                = RELEASE
  - TARGET_ARCH          = X64
  - TOOL_CHAIN_CONF      = Conf/tools_def.txt
  - TOOL_CHAIN_TAG        = VS2015x86

We are able to adjust, build and run AppPkg/Applications/Hello/Hello.c
on the target platform.

Regrettably fopen() always returns NULL.
ERRNO is always 0.

E.g.
    FILE fp = fopen("test.txt", "w");
or open an existing file for reading:
    FILE fp = fopen("test.txt", "r");

How can we do file access as specified by the Standard C Specification,
with edk2-libc?

Thanks in advance for your time and advice,
JC

PS: To doublecheck the problem on a Linux system, we ran the above
procedure on a WSL (Windows Subsystem for Linux) build environment with
the same result (TOOL_CHAIN_TAG set to GCC5).

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [edk2-devel] edk2-libc fopen() fails
       [not found] ` <172552160C64E29E.4995@groups.io>
@ 2022-11-08 19:52   ` Joaqu� Cono Bolillo
  0 siblings, 0 replies; 2+ messages in thread
From: Joaqu� Cono Bolillo @ 2022-11-08 19:52 UTC (permalink / raw)
  To: Edk2-devel-groups-io, Michael D. Kinney, rebecca,
	Joaquin_ConoBolillo

[-- Attachment #1: Type: text/plain, Size: 2139 bytes --]

 Hi Rebecca Cran,

in addition to my former email:
We have the same issue with on a LINUX Buildmachine (latest UBUNTU, GNU5 toolchain)

fopen() always fail.


Any suggestions on opening files in C.
Is there a special trick on UEFI???

Thanks in advance for your time and advice,
JC     En lunes, 7 de noviembre de 2022, 14:58:13 CET, Joaqu� Cono Bolillo via groups.io <joaquin_conobolillo=yahoo.es@groups.io> escribió:  
 
 Hi Rebecca,

to my knowledge, you are the maintainer of the AppPkg, that my team is currently
using to analyse a very sporadic reboot failure
(stuck, about 5 failures out of 100 reboots) on a x86-64 platform that
our company is going to ship soon.

Since the failure appears while Windows boots, it is safe to boot
to UEFI Shell first, analyse the register settings of the platform
using an UEFI Shell application, we are currently  implementing,
before  booting to Windows.

We are familiar with GIT and EDK2, but regrettably facing problems
using edk2-libc to refine the test program for our needs: fopen() always fails:

Our configuration:
* commit ba0e0e4c6a174b71b18ccd6e47319cc45878893c (HEAD, tag: edk2-stable202208)
* latest
  - AppPkg
  - StdLib
  - StdLibPrivateInternalFiles
* target.txt:
  - ACTIVE_PLATFORM      = AppPkg\AppPkg.dsc
  - TARGET                = RELEASE
  - TARGET_ARCH          = X64
  - TOOL_CHAIN_CONF      = Conf/tools_def.txt
  - TOOL_CHAIN_TAG        = VS2015x86

We are able to adjust, build and run AppPkg/Applications/Hello/Hello.c
on the target platform.

Regrettably fopen() always returns NULL.
ERRNO is always 0.

E.g.
    FILE fp = fopen("test.txt", "w");
or open an existing file for reading:
    FILE fp = fopen("test.txt", "r");

How can we do file access as specified by the Standard C Specification,
with edk2-libc?

Thanks in advance for your time and advice,
JC

PS: To doublecheck the problem on a Linux system, we ran the above
procedure on a WSL (Windows Subsystem for Linux) build environment with
the same result (TOOL_CHAIN_TAG set to GCC5).





  

[-- Attachment #2: Type: text/html, Size: 4010 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-08 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <369835914.808190.1667765918175.ref@mail.yahoo.com>
2022-11-06 20:18 ` edk2-libc fopen() fails Joaqu� Cono Bolillo
     [not found] ` <172552160C64E29E.4995@groups.io>
2022-11-08 19:52   ` [edk2-devel] " Joaqu� Cono Bolillo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox