[edk2] SPI driver reference

2015-12-31 Thread Yehuda Yitschak
Hello everyone

I am about to write a DXE driver for an SPI bus controller of an ARM based SOC

I did some search for references inside EDK2 and I only found the vlv2 flash 
driver but couldn't really figure if it was a proper SPI flash DXE driver

Can someone point me to a reference of an SPI DXE driver ?

Also, is there a command to read/write/erase an SPI flash from the EFI shell or 
should I use a dedicated application ?

Any advice is appreciated

Thanks !

---
Yehuda Yitschak
Marvell Semiconductor Ltd.

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] EDK2 post build mechanism

2015-12-30 Thread Yehuda Yitschak
Thanks Larry 

Good to see it's on the roadmap .

Regards

Yehuda 

> -Original Message-
> From: Hauch, Larry [mailto:larry.ha...@intel.com]
> Sent: Tuesday, December 29, 2015 22:30
> To: Yehuda Yitschak; edk2-devel@lists.01.org
> Subject: RE: EDK2 post build mechanism
> 
> Hi Yehuda,
> 
> The current version of the EDK II BaseTools does not support this. For the
> time being, wrapping the build command in a batch script is the only method
> for calling external tools after a build completes.
> 
> We would like to introduce two new entries to the [Defines] section of the
> DSC file.
> 
> Here are the proposed changes to the DSC Specification:
> If the PREBUILD and/or POSTBUILD entries are specified, it is the developer's
> responsibility to ensure that value is a tool that can be executed. If the 
> value
> contains space characters, the value must be a quoted string. The build.exe
> tool will suspend processing of the DSC files if the PREBUILD entry is 
> present,
> call the script and either terminate or continue processing the DSC file
> depending on the exit code from the script. If the POSTBUILD entry is
> present, prior to the successful build.exe exit, the script will be called. 
> If the
> script fails (non-zero exit code from the script) build.exe will terminate
> immediately using the exit code returned from the script, otherwise,
> build.exe will terminate normally. The author of the script is responsible for
> ensuring that the script terminates with a non-zero exit code when it fails.
> 
> New EBNF entries in 3.5
> [ "PREBUILD"  {} {} ] [
> "POSTBUILD"  {} {} ]
> 
> Here's the proposed wording (new sections) for the Build Spec:
> 8.2.4.1 Pre-build DSC
> The DSC file is always parsed following the tool meta-data files. If the DSC
> file's [Defines] section contains the PREBUILD = entry, processing of the DSC
> file is suspended and the build tools must execute the script that is 
> specified
> as the value in the PREBUILD entry. The author of the script is responsible 
> for
> ensuring that the script terminates with a non-zero exit code when it fails.
> If the script was not found, the build.exe will exit with an appropriate error
> message.
> If the script terminates with a non-zero exit value, the build should 
> terminate
> with the exit value from the prebuild script. The script is required to 
> provide
> any error messages that would cause termination.
> NOTE: This entry may be wrapped in a conditional directive that uses the
> value of the TOOL_CHAIN_TAG determined earlier. Using a MACRO value
> other than $(TOOL_CHAIN_TAG) is prohibited, as the DSC file has not been
> processed at the time the ENTRY was found.
> If the script terminates successfully (exit value of 0), parsing of the DSC 
> file
> continues.
> 
> 10.6 Post Build Processing
> If the DSC file's [Defines] section contains a POSTBUILD entry, prior to 
> exiting,
> build.exe will call the script specified in the entries value field. The 
> author of
> the script is responsible for ensuring that the script terminates with a non-
> zero exit code when it fails.
> If the script was not found, build.exe will exit with an appropriate error
> message.
> If the script terminates with a non-zero exit code, build.exe will terminate
> immediately using the exit code returned by the script. The script is required
> to provide any error messages.
> If the script exits with an exit code of zero, build.exe will terminate 
> normally.
> NOTE: This entry may be wrapped in a conditional directive. Unlike the
> PREBUILD entry, there are no restrictions on the MACRO value used in the
> conditional directive.
> 
> Cheers,
> Larry
> 
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Yehuda Yitschak
> Sent: Tuesday, December 29, 2015 11:32 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] EDK2 post build mechanism
> 
> Hello everyone
> 
> 
> I am searching for a builtin mechanism to run a post build script in EDK2
> 
> 
> i need to wrap my FD file with a specific header that is required by the boot
> firmware of my device
> 
> 
> ?Is there any generic way to run a post build script in EDK2 or must i resort 
> to
> writing my own wrapper build script ?
> 
> 
> Thanks a lot
> 
> 
> Yehuda
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] EDK2 post build mechanism

2015-12-29 Thread Yehuda Yitschak
Hello everyone


I am searching for a builtin mechanism to run a post build script in EDK2


i need to wrap my FD file with a specific header that is required by the boot 
firmware of my device


?Is there any generic way to run a post build script in EDK2 or must i resort 
to writing my own wrapper build script ?


Thanks a lot


Yehuda
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] Porting UEFI to a ARM platform

2015-10-20 Thread Yehuda Yitschak
Hello everyone


i started reading and experimenting with UEFI a month ago and i'm now 
considering to start porting it to one of Marvell's Aarch64 SOCs

as a first stage i only want to get a basic shell running and start adding 
drivers with time.


i'm wondering if there is any documentation or guide available to help with the 
process


my initial thoughts are to clone to Juno package and start changing the DSC and 
other configuration files but i guess there is a lot of details into this.


Any help or pointer is greatly appreciated


Thanks in advance


Yehuda
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] Cross compiling EDK2 for Aarch64

2015-10-08 Thread Yehuda Yitschak
Hello everyone

I am new to the EDK2 projects and for starters I am trying to cross compile the 
project for aarch64 on an x86_64 host

I looked around in Linaro website and Tiano-core website but couldn't find any 
instruction on how to _cross_ compile

I tried to follow the instruction here: 
https://wiki.linaro.org/LEG/Engineering/Kernel/UEFI/build
but when I try to compile using the "build" command the build script uses the 
x86 compiler and naturally it fails
I tried working around this by setting the environment variable GCC48_BIN 
however then the build system tries to call "make" from the path in GCC48_BIN 
which off course fails

I also found these instructions 
https://github.com/tianocore/tianocore.github.io/wiki/Unix-like_systems#Build_gcc_x64_UEFI_cross_compiler
But I'm not sure they apply to aarch64.

I appreciate any suggestions you can offer

Thanks in advance

---
Yehuda Yitschak
Marvell Semiconductor Ltd.

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel