Home | History | Annotate | Download | only in BeagleBoard
      1 On Ubuntu 10.04, in your $(WORKROOT) directory (eg: ~/dev/)
      2 
      3 Build UEFI for the BeagleBoard :
      4 ================================
      5 # Requirements
      6 sudo apt-get install uuid-dev
      7 
      8 # Get the arm-none-eabi Toolchain:
      9 cd $(WORKROOT)
     10 wget http://www.codesourcery.com/sgpp/lite/arm/portal/package7813/public/arm-none-eabi/arm-2010.09-51-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
     11 tar xjf arm-2010.09-51-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
     12 Add the arm-none-eabi toolchain to your path
     13 
     14 # Build UEFI
     15 svn co https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2 edk2 --username guest
     16 cd $(WORKROOT)/edk2
     17 svn co https://edk2-fatdriver2.svn.sourceforge.net/svnroot/edk2-fatdriver2/trunk/FatPkg FatPkg --username guest
     18 patch -p1 < ArmPlatformPkg/Documentation/patches/BaseTools-Pending-Patches.patch
     19 cd OpenPlatformPkg/Platforms/TexasInstruments/BeagleBoard/
     20 ./build.sh
     21 
     22 # To Build a Release verion of UEFI
     23 ./build.sh RELEASE
     24 
     25 
     26 Test UEFI on qEmu :
     27 ===================
     28 
     29 Installing Linaro qEmu:
     30 -----------------------
     31 cd $(WORKROOT)
     32 git clone git://git.linaro.org/qemu/qemu-linaro.git
     33 cd $(WORKROOT)/qemu-linaro
     34 ./configure --target-list=arm-softmmu,arm-linux-user,armeb-linux-user
     35 make
     36 
     37 Installing Linaro image Creator:
     38 --------------------------------
     39 wget http://launchpad.net/linaro-image-tools/trunk/0.4.8/+download/linaro-image-tools-0.4.8.tar.gz
     40 tar xzf linaro-image-tools-0.4.8.tar.gz
     41 cd $(WORKROOT)/linaro-image-tools-0.4.8/
     42 sudo apt-get install parted dosfstools uboot-mkimage python-argparse python-dbus python-debian python-parted qemu-arm-static btrfs-tools command-not-found
     43 
     44 Creating u-boot + Linux Linaro image:
     45 -------------------------------------
     46 mkdir $(WORKROOT)/beagle_image && cd $(WORKROOT)/beagle_image
     47 wget http://releases.linaro.org/platform/linaro-m/hwpacks/final/hwpack_linaro-omap3_20101109-1_armel_supported.tar.gz
     48 wget http://releases.linaro.org/platform/linaro-m/headless/release-candidate/linaro-m-headless-tar-20101101-0.tar.gz
     49 sudo $(WORKROOT)/linaro-image-tools-0.4.8/linaro-media-create --image_file beagle_sd.img --dev beagle --binary linaro-m-headless-tar-20101101-0.tar.gz --hwpack hwpack_linaro-omap3_20101109-1_armel_supported.tar.gz
     50 sudo chmod a+rw beagle_sd.img
     51 
     52 Test u-boot + Linux Linaro image on qEmu:
     53 -----------------------------------------
     54 $(WORKROOT)/qemu-linaro/arm-softmmu/qemu-system-arm -M beagle -sd $(WORKROOT)/beagle_image/beagle_sd.img -serial stdio -clock unix
     55 # in u-boot:
     56 boot
     57 
     58 Start UEFI from NOR Flash :
     59 ---------------------------
     60 # Adding zImage to beagle_sd.img
     61 mkdir /tmp/beagle_img1
     62 sudo mount -o loop,offset=$[63*512] $(WORKROOT)/beagle_image/beagle_sd.img /tmp/beagle_img1
     63 cp zImage /tmp/beagle_img1
     64 sudo umount /tmp/beagle_img1
     65 
     66 ./qemu-system-arm -M beagle -mtdblock /work/tianocore/Build/BeagleBoard/DEBUG_ARMGCC/FV/BeagleBoard_EFI_flashboot.fd -serial stdio -sd /work/linaro-image-tools-0.4.8/beagle_sd.img
     67 
     68 Start UEFI from SD card :
     69 -------------------------
     70 # To replace u-boot by uefi in the SD card
     71 1) Build the BeagleBoard UEFI firmware without the OMAP353x header
     72 cd $(WORKROOT)/edk2/OpenPlatformPkg/Platforms/TexasInstruments/BeagleBoard/
     73 ./build.sh -D EDK2_SECOND_STAGE_BOOTOLADER=1
     74 
     75 2) Replace u-boot by UEFI
     76 sudo mount -o loop,offset=$[63*512] $(WORKROOT)/beagle_image/beagle_sd.img /tmp/beagle_img1
     77 sudo cp ../Build/BeagleBoard/DEBUG_ARMGCC/FV/BEAGLEBOARD_EFI.fd /tmp/beagle_img1/u-boot.bin
     78 sudo umount /tmp/beagle_img1
     79