hi, Ersek:

Thank you very much!

this patch is good for  me!

i have finished compiling OvmfPkg.

 

best wishes,

 

-----邮件原件-----
发件人: Laszlo Ersek [mailto:ler...@redhat.com]
发送时间: 2012年9月5日 16:12
收件人: nicolas
抄送: edk2-devel@lists.sourceforge.net
主题: Re: [edk2] OvmfPkg compiled error

 

On 09/05/12 08:12, nicolas wrote:

> hi, experts:

> OvmfPkg compiled error:

> ... ...

> Architecture(s)  = IA32 X64

> Build target     = DEBUG

> Toolchain        = VS2008

> Active Platform          = e:\edkii\OvmfPkg\OvmfPkgIa32X64.dsc

> Flash Image Definition   = e:\edkii\OvmfPkg\OvmfPkgIa32X64.fdf

> Processing meta-data .

> Build...

> e:\edkii\OvmfPkg\OvmfPkgIa32X64.dsc(306): error F001: Pcd

> (gPcAtChipsetPkgTokenS

> paceGuid.Pcd8259LegacyModeEdgeLevel) defined in DSC is not declared in

> DEC files

> 

> but, i found Pcd8259LegacyModeEdgeLevel had been declared in

> PcAtChipsetPkg.dec .

> 

> best wishes

 

I can reproduce this with gcc44 and

 

ACTIVE_PLATFORM       = OvmfPkg/OvmfPkgIa32X64.dsc

TARGET_ARCH           = IA32

 

in "Conf/target.txt".

 

This use of Pcd8259LegacyModeEdgeLevel was introduced in svn rev 13628

("OvmfPkg: generate full MADT dynamically, synchronize contents with

qemu"). The DSC should know about the PCD via

"OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf" -->

"PcAtChipsetPkg/PcAtChipsetPkg.dec".

 

I notice the block

 

  #

  # ACPI Support

  #

  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf

  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf

  OvmfPkg/AcpiTables/AcpiTables.inf

 

is present in all three of

- OvmfPkg/OvmfPkgIa32X64.dsc,

- OvmfPkg/OvmfPkgIa32.dsc,

- OvmfPkg/OvmfPkgX64.dsc,

 

but the containing Component section is different:

- OvmfPkg/OvmfPkgIa32X64.dsc: [Components.X64]

- OvmfPkg/OvmfPkgIa32.dsc:    [Components]

- OvmfPkg/OvmfPkgX64.dsc:     [Components]

 

In "OvmfPkg/OvmfPkgIa32X64.dsc" the sections [Components.IA32] and

[Components.X64] have many more differences between each other than just

"ACPI Support", so I think this (ie. svn rev 13384) is not an oversight.

 

"OvmfPkg/build.sh" doesn't seem to support OvmfPkgIa32X64.dsc at all.

The "-a" option is accepted on the command line (--> PROCESSOR

variable), sanitized,

 

case $PROCESSOR in

  IA32)

    Processor=Ia32

    QEMU_COMMAND=qemu

    ;;

  X64)

    Processor=X64

    QEMU_COMMAND=qemu-system-x86_64

    ;;

  *)

    echo Unsupported processor architecture: $PROCESSOR

    echo Only IA32 or X64 is supported

    exit 1

    ;;

esac

 

and then passed on to the "build" BaseTools utility (for which"-a"

overrides TARGET_ARCH). The variable named "Processor" (case is

important) can only take the values Ia32 / X64 (see above), and then it

is used in

 

if [ -z "$PLATFORMFILE" ]; then

  PLATFORMFILE=$WORKSPACE/OvmfPkg/OvmfPkg$Processor.dsc

fi

 

Hmm, I may be wrong about OvmfPkgIa32X64.dsc being supported... "-p"

sets PLATFORMFILE directly.

 

... I can see something similar in svn rev 13350:

 

    Fix build break in OvmfPkgIa32X64.dsc where

    gEfiSecurityPkgTokenSpaceGuid was no longer found.

 

    It is declared in SecurityPkg.dec, but with the latest build tools,

    since this package builds multiple architectures (IA32 & X64) and

    there are no IA32 modules used from the SecurityPkg, it is now

    necessary to place the gEfiSecurityPkgTokenSpaceGuid PCD's in a

    [PcdsFixedAtBuild.X64] section.

 

So [Components.X64] is actually OK, and I made a mistake in svn rev

13628. The attached patch turns the error you encounter into a different

(much later) one:

 

  Generating DXEFV FV

 

  GenFds.py...

   : error F003: Module MdeModulePkg/Universal/PCD/Dxe/Pcd.inf appears

   under ARCH ['X64'] in platform

   /home/lacos/src/upstream/edk2-git-svn/OvmfPkg/OvmfPkgIa32X64.dsc, but

   current deduced ARCH is set(['IA32']), so NO build output could be

   put into flash.

 

  make: *** [fds] Error 1

 

This error is similar to when I change TARGET_ARCH to X64, but keep

ACTIVE_PLATFORM = OvmfPkg/OvmfPkgIa32X64.dsc:

 

  Generating MAINFV FV

 

  GenFds.py...

   : error F003: Module MdeModulePkg/Universal/PCD/Pei/Pcd.inf appears

   under ARCH ['IA32'] in platform

   /home/lacos/src/upstream/edk2-git-svn/OvmfPkg/OvmfPkgIa32X64.dsc, but

   current deduced ARCH is set(['X64']), so NO build output could be put

   into flash.

 

  make: *** [fds] Error 1

 

Therefore I think the attached patch could be an improvement, but I'll

let Jordan decide.

 

Nicolas, does the patch fix the problem for you?

 

Thanks & sorry!

Laszlo
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to