Re: [Edk2 Dev] UnixPkg is available now

Subject: Re: [Edk2 Dev] UnixPkg is available now

From: "Joey Liu" <read.liu@gmail.com>

To: dev@edk2.tianocore.org

Date: 2008-07-02 00:46:57

Hi, Tian
 
Glad to tell you that I can build the UnixPkg successfully. ^_^
Thank you so much.
but there is also a problem.
The console can'd display BDS, but BDS can display in terminal.
anyway, it can work now.

sincerely
Joey
 
 
2008/7/1 Tian, Feng <feng.tian@intel.com>:

Hi, Joey

Forget to tell you the BaseTools project must be updated too. Because the GenFw tool is enhanced to handle shared ELF object file.

 

By the way, the SecMain's generation is specific. You could use a temporarily script "build.script" in UnixPkg directory to generate it.

 

Thanks

Tian Feng


From: Joey Liu [mailto:read.liu@gmail.com]
Sent: 2008
71 9:35
To: dev@edk2.tianocore.org
Subject: Re: [Edk2 Dev] UnixPkg is available now

 

Hi, Tian

I've got the latest version of UnixPkg yesterday. but I met a build fail problem as follow:
With ELFGCC(gcc) compiler:
many errors like this.
GenFw -e DXE_DRIVER -o /media/g/google/edk2/edk2/Build/Unix/DEBUG_ELFGCC/IA32/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe/DEBUG/DriverSample.efi /media/g/google/edk2/edk2/Build/Unix/DEBUG_ELFGCC/IA32/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe/DEBUG/DriverSample.dll
GenFw: ERROR 0BB8: Invalid
  DOS header signature was not found in /media/g/google/edk2/edk2/Build/Unix/DEBUG_ELFGCC/IA32/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe/DEBUG/DriverSample.dll image.
cp -f /media/g/google/edk2/edk2/Build/Unix/DEBUG_ELFGCC/IA32/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe/DEBUG/DriverSample.efi /media/g/google/edk2/edk2/Build/Unix/DEBUG_ELFGCC/IA32/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe/OUTPUT
cp -f /media/g/google/edk2/edk2/Build/Unix/DEBUG_ELFGCC/IA32/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe/DEBUG/DriverSample.efi /media/g/google/edk2/edk2/Build/Unix/DEBUG_ELFGCC/IA32
cp -f /media/g/google/edk2/edk2/Build/Unix/DEBUG_ELFGCC/IA32/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe/DEBUG/*.map /media/g/google/edk2/edk2/Build/Unix/DEBUG_ELFGCC/IA32/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe/OUTPUT
make: [/media/g/google/edk2/edk2/Build/Unix/DEBUG_ELFGCC/IA32/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe/DEBUG/DriverSample.efi]
2 ()
cp:
stat "/media/g/google/edk2/edk2/Build/Unix/DEBUG_ELFGCC/IA32/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe/DEBUG/*.map":
make: [/media/g/google/edk2/edk2/Build/Unix/DEBUG_ELFGCC/IA32/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe/DEBUG/DriverSample.efi]
1 ()
Building ... Tcp4Dxe [IA32]


With UnixGcc(tianocrossgcc) compiler:
[xxx@xxx edk2]$ build
17:22:58, Jul.01 2008 [00:00]

WORKSPACE                = /media/g/google/edk2/edk2
EDK_SOURCE               = /media/g/google/edk2/edk2/EdkCompatibilityPkg
EFI_SOURCE               = /media/g/google/edk2/edk2/EdkCompatibilityPkg
EDK_TOOLS_PATH           = /media/g/google/edk2/BaseTools/BaseTools/

TARGET_ARCH              = IA32
TARGET                   = DEBUG
TOOL_CHAIN_TAG           = UNIXGCC

Active Platform          = UnixPkg/UnixPkg.dsc
Flash Image Definition   = UnixPkg/UnixPkg.fdf

Processing meta-data . . done!
Generating code . . . . . . . done!
Generating makefile . . . . . done!
Building ... Unix [IA32]
make[1]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32'
Building ... Unix [IA32]
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate'
Building ... BaseTimerLibNullTemplate [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BaseLib/BaseLib'
Building ... BaseLib [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BaseLib/BaseLib'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BaseMemoryLib/BaseMemoryLib'
Building ... BaseMemoryLib [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BaseMemoryLib/BaseMemoryLib'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull'
Building ... BasePcdLibNull [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull'
Building ... BaseDebugLibNull [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/IntelFrameworkModulePkg/Library/BaseReportStatusCodeLib/BaseReportStatusCodeLib'
Building ... BaseReportStatusCodeLib [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/IntelFrameworkModulePkg/Library/BaseReportStatusCodeLib/BaseReportStatusCodeLib'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BasePeCoffLib/BasePeCoffLib'
Building ... BasePeCoffLib [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BasePeCoffLib/BasePeCoffLib'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BasePrintLib/BasePrintLib'
Building ... BasePrintLib [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/BasePrintLib/BasePrintLib'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull'
Building ... OemHookStatusCodeLibNull [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode'
Building ... PeiDxeDebugLibReportStatusCode [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib'
Building ... PeiReportStatusCodeLib [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib'
Building ... PeiServicesTablePointerLib [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/PeiServicesLib/PeiServicesLib'
Building ... PeiServicesLib [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/PeiServicesLib/PeiServicesLib'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib'
Building ... PeiMemoryAllocationLib [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/PeiHobLib/PeiHobLib'
Building ... PeiHobLib [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/PeiHobLib/PeiHobLib'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/PeiPiLib/PeiPiLib'
Building ... PeiPiLib [IA32]
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/MdePkg/Library/PeiPiLib/PeiPiLib'
make[2]: Entering directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/UnixPkg/Library/PeiCoreUnixPeCoffLib/PeiCoreUnixPeCoffLib'
Building ... PeiCoreUnixPeCoffLib [IA32]
"/opt/tiano/i386-tiano-pe/i386-tiano-pe/bin/gcc" -o /media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/UnixPkg/Library/PeiCoreUnixPeCoffLib/PeiCoreUnixPeCoffLib/OUTPUT/./PeiCoreUnixPeCoffLib.obj -O2 -falign-functions -falign-jumps -falign-loops -freorder-blocks -freorder-blocks-and-partition -falign-labels -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -c -include AutoGen.h -idirafter/usr/include -I/media/g/google/edk2/edk2/UnixPkg/Library/PeiCoreUnixPeCoffLib -I/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/UnixPkg/Library/PeiCoreUnixPeCoffLib/PeiCoreUnixPeCoffLib/DEBUG -I/media/g/google/edk2/edk2/MdePkg -I/media/g/google/edk2/edk2/MdePkg/Include -I/media/g/google/edk2/edk2/MdePkg/Include/Ia32 -I/media/g/google/edk2/edk2/MdeModulePkg -I/media/g/google/edk2/edk2/MdeModulePkg/Include -I/media/g/google/edk2/edk2/UnixPkg -I/media/g/google/edk2/edk2/UnixPkg/Include  /media/g/google/edk2/edk2/UnixPkg/Library/PeiCoreUnixPeCoffLib/PeiCoreUnixPeCoffLib.c
cc1: warnings being treated as errors
/media/g/google/edk2/edk2/UnixPkg/Library/PeiCoreUnixPeCoffLib/PeiCoreUnixPeCoffLib.c: In function 'GetPeCoffLoaderStucture':
/media/g/google/edk2/edk2/UnixPkg/Library/PeiCoreUnixPeCoffLib/PeiCoreUnixPeCoffLib.c:67: warning: passing argument 4 of 'PeiServicesLocatePpi' from incompatible pointer type
make[2]: *** [/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/UnixPkg/Library/PeiCoreUnixPeCoffLib/PeiCoreUnixPeCoffLib/OUTPUT/./PeiCoreUnixPeCoffLib.obj] Error 1
make[2]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32/UnixPkg/Library/PeiCoreUnixPeCoffLib/PeiCoreUnixPeCoffLib'
make[1]: *** [build_libraries] Error 2
make[1]: Leaving directory `/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC/IA32'
make: *** [modules] Error 2


build...
 : error 7000: Failed to execute command
    make all [/media/g/google/edk2/edk2/Build/Unix/DEBUG_UNIXGCC]

- Failed -
17:23:13, Jul.01 2008 [00:15]
[xxx@xxx edk2]$

what is the problem? could you help me fix this problem? thank you very much. ^_^

2008/6/30 Tian, Feng <feng.tian@intel.com>:

Hi, All

         UnixPkg is available now. I list the current status as follows:

1.       Can be built in 32-bits Linux OS.

To transfer into Python build process, convert the legacy .msa into .inf for every module and create .dec&.dsc&.fdf configuration files for UnixPkg platform.

 

2.       Provide source level debug ability in *unix environment.

To support source level debug, all modules but SecMain are built as ELF shared objects and dynamically be loaded by using dlopen() in SecMain's peload function. Referring to the implementation in Nt32Pkg, provide the wrapper libraries to supply PeCoffLoader interface for Peicore, Peim and Dxecore modules. GenFw also be enhanced to support handling the ELF shared object file.

 

3.       Can boot to shell, but still remains an issue - Graphic display is abnormal. I am working on it.

 

4.       Using PCD mechanism to replace macro in FlashLayout.h.

 

5.       Change Sec code to co-work with PI1.0 Pei Core and produce temporary memory ppi.

 

Thanks

Tian Feng