On 2015-05-18 07:15:02, lidonglin wrote:
> Thanks. And I want DEBUG() (which calls DebugPrint function) to work
> in debug version,
DEBUG() does work in the debug version. It does not work in the
release version.
> so I chang MdePkg/Include/Library/DebugLib.h : as
> below:
> Origin:
> #if !defined(MDEPKG_NDEBUG)
> #define DEBUG(Expression) \
> do { \
> if (DebugPrintEnabled ()) { \
> _DEBUG (Expression); \
> After change:
> #if 1
> #define DEBUG(Expression) \
> do { \
> if (DebugPrintEnabled ()) { \
> _DEBUG (Expression); \
If, for some reason you really want debug enabled in the RELEASE
build, then you should modify OvmfPkg/OvmfPkgX64.dsc to not set
MDEPKG_NDEBUG. But, I don't think you really want to do this.
> Then build with command line : build.sh -a x64 -b RELEASE -n 20
Why not instead build with -b DEBUG?
Then when you run QEMU, add these parameters:
-debugcon file:debug.log -global isa-debugcon.iobase=0x402
Then after running QEMU, examine the debug.log file to see the debug
messages. The is documented in OvmfPkg/README.
> Build is ok, but error in Generating as below :
You ran out of size because you enabled debug mode in the release
build flash size.
-Jordan
> Generating FVMAIN_COMPACT FV
>
>
> GenFds.py...
> : error 7000: Failed to generate FV
>
> #######Return Value = 2
> GenFv: ERROR 3000: Invalid
> the required fv image size 0xd49d0 exceeds the set fv image size 0xcc000
>
>
> ### ['GenFv', '-a',
> '/mnt/sdg1/edk2-2.1.10/Build/OvmfX64/RELEASE_GCC44/FV/Ffs/FVMAIN_COMPACT.inf',
> '-o',
> '/mnt/sdg1/edk2-2.1.10/Build/OvmfX64/RELEASE_GCC44/FV/FVMAIN_COMPACT.Fv',
> '-i',
> '/mnt/sdg1/edk2-2.1.10/Build/OvmfX64/RELEASE_GCC44/FV/FVMAIN_COMPACT.inf']
>
>
> build.py...
> : error 7000: Failed to execute command
> GenFds -f /mnt/sdg1/edk2-2.1.10/OvmfPkg/OvmfPkgX64.fdf
> --conf=/mnt/sdg1/edk2-2.1.10/Conf -o
> /mnt/sdg1/edk2-2.1.10/Build/OvmfX64/RELEASE_GCC44 -t GCC44 -b RELEASE -p
> /mnt/sdg1/edk2-2.1.10/OvmfPkg/OvmfPkgX64.dsc -a X64 -D
> "EFI_SOURCE=/mnt/sdg1/edk2-2.1.10/EdkCompatibilityPkg" -D
> "EDK_SOURCE=/mnt/sdg1/edk2-2.1.10/EdkCompatibilityPkg" -D
> "TOOL_CHAIN_TAG=GCC44" -D "TOOLCHAIN=GCC44" -D "TARGET=RELEASE" -D
> "WORKSPACE=/mnt/sdg1/edk2-2.1.10" -D
> "EDK_TOOLS_PATH=/mnt/sdg1/edk2-2.1.10/BaseTools" -D "ARCH=X64" -D
> "ECP_SOURCE=/mnt/sdg1/edk2-2.1.10/EdkCompatibilityPkg" [/mnt/sdg1/edk2-2.1.10]
>
> - Failed -
> Build end time: 10:54:15, May.19 2015
> Build total time: 00:00:58
>
> Who knows why?
>
> > -----Original Message-----
> > From: Laszlo Ersek [mailto:[email protected]]
> > Sent: 2015年5月18日 15:35
> > To: lidonglin
> > Cc: [email protected]
> > Subject: Re: [edk2] question about size of OMVF.fd
> >
> > On 05/18/15 08:50, lidonglin wrote:
> > > First thanks. And I ask another question. Which function can I call to
> > > print information to serial port or IO port(default 0x402) when I
> > > build RELEASE OVMF ?
> >
> > - The only function that currently enables someone to print to ioport
> > 0x402 (PcdDebugIoPort), and continue, is DebugPrint() in
> > "OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c". This function is
> > normally called via the DEBUG() macro (which has no effect if you build OVMF
> > for RELEASE).
> >
> > - You can write to the serial port with SerialPortWrite(), from
> > "MdePkg/Include/Library/SerialPortLib.h".
> >
> > (But, honestly, there is no reason to build OVMF for anything but DEBUG,
> > ever.)
> >
> > Thanks
> > Laszlo
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel