]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Documentation/ArmVExpressInstructions.txt
Update the comments in function headers to follow Doxygen special documentation block...
[mirror_edk2.git] / ArmPlatformPkg / Documentation / ArmVExpressInstructions.txt
index db901c49369c43668459055643f9e29700f6736c..4fce4a5548d5f7cc7cb96e6872af2e936b66aab5 100644 (file)
@@ -4,7 +4,7 @@
 \r
 Status\r
 ------\r
-Build and Run on EDK2 Subversion revision 11251\r
+Build and Run on EDK2 Subversion revision 11837\r
 Requirements \r
 -      RVCTv3 (untested) or RVCTv4 or ARMGCC (Code Sourcery q201009)\r
 -      Using Ubuntu: gcc, make, uuid-dev \r
@@ -26,8 +26,8 @@ Open "RealView ICE Update" and "Install Firmware Update ...". Install "[ARM_INST
 \r
 Howto build UEFI Versatile Express\r
 ----------------------------------\r
-For Cygwin\r
-----------\r
+For Linux\r
+---------\r
 \r
 For the first time \r
 ******************\r
@@ -38,15 +38,21 @@ svn co https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2 edk2 --username
 cd edk2\r
 svn co https://edk2-fatdriver2.svn.sourceforge.net/svnroot/edk2-fatdriver2/trunk/FatPkg FatPkg --username guest\r
 \r
-3. Set up the environment. And build the EDK2\92s tools\r
+3. Apply BaseTools patches (BaseTools-Pending-Patches.patch combines all the currently pending BaseTools patches)\r
+patch -p1 < ArmPlatformPkg/Documentation/patches/BaseTools-Pending-Patches.patch\r
+\r
+4. Set up the environment. And build the EDK2\92s tools\r
 export EDK_TOOLS_PATH=`pwd`/BaseTools\r
 . edksetup.sh `pwd`/BaseTools/\r
 make -C $EDK_TOOLS_PATH\r
 \r
-4. Build the ARM Versatile Express UEFI Firmware\r
-build -a ARM -p ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc -t RVCTCYGWIN\r
+5. Ensure the ARMGCC toolchain is in your PATH environment variable or defined by the ARMGCC_TOOLS_PATH environment variable. Example:\r
+export ARMGCC_TOOLS_PATH=/opt/toolchains/arm-2010.09-arm-none-eabi-i686-pc-linux-gnu/bin/\r
+\r
+6. Build the ARM Versatile Express UEFI Firmware\r
+build -a ARM -p ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc -t ARMGCC\r
 \r
-5. Edit the ARM Versatile Express configuration file config.txt to declare the location of the UEFI firmware in NOR Flash\r
+7. Edit the ARM Versatile Express configuration file config.txt to declare the location of the UEFI firmware in NOR Flash\r
 TOTALIMAGES: 5                   ;Number of Images (Max : 32)\r
 NOR0UPDATE: AUTO                 ;Image Update:NONE/AUTO/FORCE\r
 NOR0ADDRESS: BOOT                ;Image Flash Address\r
@@ -71,30 +77,30 @@ NOR4ADDRESS: 40000000            ;Image Flash Address
 NOR4NAME: BOOTSCRIPT             ;Image Name\r
 NOR4FILE: \SOFTWARE\bootscr.txt  ;Image File Name\r
 \r
-6. To select second NOR Flash as a booting device, replace in the ARM Versatile Express file \SITE1\HBI0191B\board.txt:\r
+8. To select second NOR Flash as a booting device, replace in the ARM Versatile Express file \SITE1\HBI0191B\board.txt:\r
 SCC: 0x004 0x00001F09\r
 By:\r
 SCC: 0x004 0x10001F09\r
 \r
-7. Copy Build/ArmVExpress-CTA9x4/DEBUG_RVCTCYGWIN/FV/SEC_ARMVEXPRESS_EFI.fd to the ARM Versatile Express mass storage (available when the board is connected through USB to your host machine) under the folder SOTWARE and name sec_uefi.bin. Example for cygwin:\r
-cp Build/ArmVExpress-CTA9x4/DEBUG_RVCTCYGWIN/FV/SEC_ARMVEXPRESS_EFI.fd /cygdrive/e/SOFTWARE/sec_uefi.bin\r
+9. Copy Build/ArmVExpress-CTA9x4/DEBUG_ARMGCC/FV/SEC_ARMVEXPRESS_EFI.fd to the ARM Versatile Express mass storage (available when the board is connected through USB to your host machine) under the folder SOTWARE and name sec_uefi.bin. Example for cygwin:\r
+cp Build/ArmVExpress-CTA9x4/DEBUG_ARMGCC/FV/SEC_ARMVEXPRESS_EFI.fd /cygdrive/e/SOFTWARE/sec_uefi.bin\r
 \r
-8. Start the ARM Versatile Express board. You should read \93Waiting for firmware at 0x80000000 ...\94 on the serial port. \r
+10. Start the ARM Versatile Express board. You should read \93Waiting for firmware at 0x80000000 ...\94 on the serial port. \r
 \r
-9. Copy ARMVEXPRESS_EFI.fd at 0x80000000 with RealView Debugger\r
-readfile,raw,nowarn "[EDK2_PATH]\Build\ArmVExpress-CTA9x4\DEBUG_RVCTCYGWIN\FV\ARMVEXPRESS_EFI.fd"=0x80000000\r
+11. Copy ARMVEXPRESS_EFI.fd at 0x80000000 with RealView Debugger\r
+readfile,raw,nowarn "[EDK2_PATH]\Build\ArmVExpress-CTA9x4\DEBUG_ARMGCC\FV\ARMVEXPRESS_EFI.fd"=0x80000000\r
 \r
-10. Resume the execution from RealView Debugger\r
+12. Resume the execution from RealView Debugger\r
 \r
 For all subsequent times\r
 ************************\r
 1. Build ARM Versatile Express UEFI Firmware\r
-build -a ARM -p ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc -t RVCTCYGWIN\r
+build -a ARM -p ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc -t ARMGCC\r
 \r
 2. Start the ARM Versatile Express board. You should read \93Waiting for firmware at 0x80000000 ...\94 on the serial port. \r
 \r
 3. Copy ARMVEXPRESS_EFI.fd at 0x80000000 with RealView Debugger\r
-readfile,raw,nowarn "[EDK2_PATH]\Build\ArmVExpress-CTA9x4\DEBUG_RVCTCYGWIN\FV\ARMVEXPRESS_EFI.fd"=0x80000000\r
+readfile,raw,nowarn "[EDK2_PATH]\Build\ArmVExpress-CTA9x4\DEBUG_ARMGCC\FV\ARMVEXPRESS_EFI.fd"=0x80000000\r
 \r
 4. Resume the execution \r
 \r
@@ -112,24 +118,20 @@ The EDK2 toolchain name for ARM RealView under a Linux environment is `RVCTLINUX
 export RVCT_TOOLS_PATH=[YOUR_TOOLCHAIN_PATH]\r
 \r
 \r
-For ARM GNU GCC on Linux\r
-------------------------\r
-The EDK2 toolchain name for ARM RealView under a Linux environment is `ARMGCC`. EDK2 requires Bash Shell to be built on Linux.\r
-The ARMGCC toolchain is expected to be found in your PATH. ARM Edk2 has been tested with 'CodeSourcery G++ Lite 2010.09-51 - EABI Version'.\r
-If you decide to use a specific version, set the environment variable 'ARMGCC_TOOLS_PATH': \r
-export ARMGCC_TOOLS_PATH=[YOUR_CODESOURCERY_TOOLCHAIN_PATH]\r
-Example:\r
-export ARMGCC_TOOLS_PATH=/Work/arm-2010.09/bin/\r
-Compiling UEFI ArmVE as a standalone firmware \r
-The full ArmVe UEFI firmware can be written into NOR Flash to allow the entire boot sequence to be done after a cold boot.\r
+For RVCT on Cygwin\r
+------------------\r
+The EDK2 toolchain name for ARM RealView under a Cygwin environment is `RVCTCYGWIN`. The EDK2 build system will automatically pick up the RVCT toolchain defined in your PATH. If you want to use a specific version, set the environment variable 'RVCT_TOOLS_PATH': \r
+export RVCT_TOOLS_PATH=[YOUR_TOOLCHAIN_PATH]\r
 \r
 \r
 To support the standalone mode:\r
 -------------------------------\r
-build -a ARM -p ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc -t RVCTCYGWIN -D EDK2_ARMVE_STANDALONE=1\r
+The full ArmVe UEFI firmware can be written into NOR Flash to allow the entire boot sequence to be done after a cold boot.\r
+\r
+build -a ARM -p ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc -t ARMGCC -D EDK2_ARMVE_STANDALONE=1\r
 ARMVEXPRESS_EFI.fd is required to be copied into the ARM Versatile Express board:\r
-cp Build/ArmVExpress-CTA9x4-Standalone/DEBUG_RVCTCYGWIN/FV/SEC_ARMVEXPRESS_EFI.fd /cygdrive/e/SOFTWARE/sec_uefi.bin\r
-cp Build/ArmVExpress-CTA9x4-Standalone/DEBUG_RVCTCYGWIN/FV/ARMVEXPRESS_EFI.fd /cygdrive/e/SOFTWARE/uefi.bin\r
+cp Build/ArmVExpress-CTA9x4-Standalone/DEBUG_ARMGCC/FV/SEC_ARMVEXPRESS_EFI.fd /cygdrive/e/SOFTWARE/sec_uefi.bin\r
+cp Build/ArmVExpress-CTA9x4-Standalone/DEBUG_ARMGCC/FV/ARMVEXPRESS_EFI.fd /cygdrive/e/SOFTWARE/uefi.bin\r
 \r
 \r
 Trustzone Support\r
@@ -142,12 +144,18 @@ SCC: 0x004 0x10003F09
 \r
 Booting Linux\r
 -------------\r
-ArmVe's BDS expects a Linux kernel at 0x46000000 (2nd NOR Flash). This location is also defined in the config.txt file of the motherboard (same file as the one that defines UEFI firmwares location). The Linux kernel at this location is a copy of \SOFTWARE\kernel.bin as refered in config.txt.\r
-To boot on a different kernel, you will need to edit [EDK2_ROOT]\ArmVePkg\Bds\BdsEntry.c \r
-#define LINUX_KERNEL            L"VenHw(02118005-9DA7-443a-92D5-781F022AEDBB)/MemoryMapped(0,0x46000000,0x462F0000)"\r
-#define FDT                     0\r
-#define LINUX_ATAG              "rdinit=/bin/ash debug earlyprintk console=ttyAMA0,38400 mem=1G"\r
-The macros LINUX_KERNEL and FDT expect a UEFI Device Path. \r
+The default entry in the ARM Boot Manager is defined by the PCDs:\r
+\r
+- gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"NorFlash"\r
+- gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)/MemoryMapped(0,0x46000000,0x462F0000)"\r
+- gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"root=/dev/sda2 rootwait debug earlyprintk console=ttyAMA0,38400 mem=1G"\r
+- gArmPlatformTokenSpaceGuid.PcdDefaultBootType|1\r
+\r
+The PCD PcdDefaultBootDevicePath expects a Device Path conforms to the UEFI specification.\r
+PcdDefaultBootType defines the type of the image pointed by PcdDefaultBootDevicePath.\r
+-      PcdDefaultBootDevicePath = 0 for an EFI Application\r
+-      PcdDefaultBootDevicePath = 1 for a legacy kernel with ATAG support\r
+-      PcdDefaultBootDevicePath = 2 for a kernel with Flat Device Tree (FDT) support\r
 \r
 Example of UEFI Device Path: \r
 \r
@@ -162,15 +170,3 @@ Example of UEFI Device Path:
 \r
 // Kernel from NOR Flash\r
 #define LINUX_KERNEL            L"VenHw(02118005-9DA7-443a-92D5-781F022AEDBB)/MemoryMapped(0,0x46000000,0x462F0000)"\r
-\r
-\r
-UEFI Memory Maps for ARM Versatile Express \r
-------------------------------------------\r
-Figure 1: EFI Memory Map in the Temporary Memory\r
-See ArmVExpressMemoryMaps_TemporaryMemoryMap.png\r
-\r
-Figure 2: CPU Core stack in the Temporary Memory \r
-See ArmVExpressMemoryMaps_TemporaryStack.png\r
-\r
-Figure 3: EFI Memory Map in the Permanent Memory\r
-See ArmVExpressMemoryMaps_PermanentMemoryMap.png\r