Building and using UEFI for Origen board with Upstream edk2

1)Create symbolic link if required with the name arm-linux-gnueabi-* in bin directory of your toolchain. Use the command

ln -s arm-none-linux-gnueabi-* arm-linux-gnueabi-*

2)Clone Upstream edk2 code using the following commands

svn co https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2 edk2 --username guest
cd edk2/
svn co https://edk2-fatdriver2.svn.sourceforge.net/svnroot/edk2-fatdriver2/trunk/FatPkg FatPkg --username guest

3)Set the following environment variables so that ARCH is set for native.As a precaution use the command

unset ARCH

4)Build the edk2 code.

   cd edk2/
   make -C BaseTools/

If any error comes check the env variable for WORKSPACE and unset that.

5)Clone the Origen specific UEFI code from git://git.linaro.org/landing-teams/working/samsung/edk2-origen.git .The master is the upstream for Origen UEFI and works with the edk2 upstream .

6)Create a symbolic link to the Origen specific code inside the edk2 package.

cd edk2/
ln -s ../edk2-origen/SamsungPlatformPkg SamsungPlatformPkg

7)Apply auto boot patch using the command

patch -i ../edk2-origen/SamsungPlatformPkg/patches/0001-Auto-boot-feature-for-the-Origen.patch ArmPlatformPkg/Bds/BootOption.c

8)Build the SamsungPlatformPkg by using following commands:

svn up -r r13962
export EDK_TOOLS_PATH=`pwd`/BaseTools
export ARMLINUXGCC_TOOLS_PATH=/usr/local/arm/bin/
. edksetup.sh `pwd`/BaseTools/
build -a ARM -p SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc -t ARMLINUXGCC -b DEBUG

9)Copy the bl1in the sd card.The prebuilt binary is available here. Use the command:

sudo dd if=Origen-BL1.img of=/dev/sdb bs=512

10)Copy the ORIGENBOARD_EFI.fd using the command:

sudo dd if=Build/OrigenBoard-Exynos/DEBUG_ARMLINUXGCC/FV/ORIGENBOARD_EFI.fd of=/dev/sdb bs=512 seek=65 count=4096

Or use the prebuilt binary from here

A daily build image can be found here here

11)Create a fat partition and copy the uImage there.

12)Create another partition and put the file system there.Then switch on the board ,UEFI will automatically detect the partitions and boot the kernel.

Building and using UEFI for Origen board with Linaro edk2 version

In step (2) above clone the linaro edk2 version using the command

git clone git://git.linaro.org/people/ryanharkin/uefi.git uefi.git

In step (5) above checkout the branch linaro

All other steps remain the same.

Boards/Origen/Setup/UEFI (last modified 2012-11-26 06:40:24)