树莓派3上编译运行UEFI

安装依赖软件:
sudo apt-get install iasl uuid-dev acpica-tools
首先下载相关代码仓:

git clone https://git.linaro.org/uefi/uefi-tools.git
git clone https://github.com/tianocore/edk2.git
git submodule update --init
git clone https://github.com/tianocore/edk2-non-osi.git
git clone https://github.com/tianocore/edk2-platforms.git
git clone https://github.com/ARM-software/arm-trusted-firmware.git

开始编译:

./uefi-tools/edk2-build.sh --arm-tf-dir arm-trusted-firmware --edk2-dir edk2 -b DEBUG rpi3

最后生成镜像:

Fd File Name:RPI_EFI (/home/jun/uefi/Build/RPi3/DEBUG_GCC5/FV/RPI_EFI.fd)

Generate Region at Offset 0x0
   Region Size = 0x10000
   Region File Name = /home/jun/uefi/edk2-non-osi/Platform/RaspberryPi/RPi3/TrustedFirmware/bl1.bin

Generate Region at Offset 0x10000
   Region Size = 0x10000
   Region Name = DATA

Generate Region at Offset 0x20000
   Region Size = 0x10000
   Region File Name = /home/jun/uefi/edk2-non-osi/Platform/RaspberryPi/RPi3/TrustedFirmware/fip.bin

Generate Region at Offset 0x30000
   Region Size = 0x1B0000
   Region Name = FV

Generating FVMAIN_COMPACT FV

Generating FVMAIN FV

Generate Region at Offset 0x1E0000
   Region Size = 0xE000
   Region Name = DATA

Generate Region at Offset 0x1EE000
   Region Size = 0x1000
   Region Name = None

Generate Region at Offset 0x1EF000
   Region Size = 0x1000
   Region Name = DATA

Generate Region at Offset 0x1F0000
   Region Size = 0x10000
   Region Name = None

GUID cross reference file can be found at /home/jun/uefi/Build/RPi3/DEBUG_GCC5/FV/Guid.xref

FV Space Information
FVMAIN [99%Full] 6846080 total, 6846040 used, 40 free
FVMAIN_COMPACT [56%Full] 1769472 total, 1002848 used, 766624 free

- Done -
Build end time: 06:40:43, Sep.01 2019
Build total time: 00:00:12

Platform 'rpi3' is not configured to build ARM Trusted Firmware.
------------------------------------------------------------
                         Raspberry Pi 3 (AARCH64) DEBUG pass
------------------------------------------------------------
pass    1
fail    0

将https://github.com/raspberrypi/firmware/tree/master/boot目录里面的下面三个拷贝到FAT32格式sd卡里面

  • bootcode.bin
  • fixup.dat
  • start.elf
    最后将后上面编译生成的RPI_EFI.fd拷贝到sd卡里面,在sd卡里面创建config.txt,内容如下:
arm_64bit

bootcode_delay=3
boot_delay=3
boot_delay_ms=0

start_file=start.elf
fixup_file=fixup.dat

dtdebug=1
enable_uart=1

arm_control=0x200
armstub=RPI_EFI.fd
disable_commandline_tags=1

在这里插入图片描述

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值