飞腾FT2000/4 u-boot/UEFI开发环境搭建
参考
UEFI开发与调试—edk2中子目录介绍
ACP基础——Resource Descriptors for ACPI
ubuntu16.04操作系统下的edk2安装
【UEFI实战】如何在OS下获取UEFI变量
Linux系统中ACPI Table读取与解析
安装
环境:
- ubuntu16.04.6
- gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu
安装编译u-boot所需依赖,
qe@ubuntu:~/program/ft2000-4$ sudo apt-get install make-guile
qe@ubuntu:~/program/ft2000-4$ sudo apt-get install make gcc bison flex
安装编译UEFI所需依赖,
qe@ubuntu:~/program/ft2000-4$ sudo apt-get install libncurses5-dev libncursesw5-dev uuid-dev acpica-tools python g++
u-boot
解压u-boot文件,打补丁,
u-boot-ft2004-v0.1$ patch -p1 < ../patch/diff_v0.7_for_uboot.patch
...
u-boot-ft2004-v0.1$ patch -p1 < ../patch/diff_v1.1_for_u-boot.patch
$ source ~/program/fdk/settings.sh -t ft2000
$ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu-
用u-boot.bin替换bl33.bin,打包。
UEFI
编译
初始化环境变量,
$ export PATH=/home/qe/program/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin:$PATH
$ export CROSS_COMPILE=aarch64-linux-gnu-
qe@ubuntu:~/program/ft2000-4/edk2-for-support$ ./build2004.sh init # OSError: [Errno 13] Permission denied
qe@ubuntu:~/program/ft2000-4/edk2-for-support$ ./build2004.sh r #
错误
OSError: [Errno 13] Permission denied
qe@ubuntu:~/program/ft2000-4/edk2-for-support$ ls -ld /usr/local/lib/python2.7
drwxrwsr-x 4 root staff 4096 Mar 28 07:08 /usr/local/lib/python2.7
qe@ubuntu:~/program/ft2000-4/edk2-for-support$ ls -l ~
total 56
drwxr-xr-x 2 qe qe 4096 Jun 21 2019 Desktop
qe@ubuntu:~/program/ft2000-4/edk2-for-support$ sudo chown -R qe /usr/local/lib/python2.7
qe@ubuntu:~/program/ft2000-4/edk2-for-support$ ls -ld /usr/local/lib/python2.7
drwxrwsr-x 4 qe staff 4096 Mar 28 07:08 /usr/local/lib/python2.7
Error 6126 - syntax error, unexpected PARSEOP_NAMESEG, expecting ‘(’ ^
/home/qe/program/ft2000-4/edk2-for-support/Build/PhytiumPkg/Phytium2004Pkg/Phytium/RELEASE_GCC49/AARCH64/PhytiumPkg/Phytium2004Pkg/Drivers/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii 419: I2CSerialBusV2 (0x68, ControllerInitiated, 100000,AddressingMode7Bit, "\\_SB.I2C1", 0, ResourceConsumer, ,)
Error 6126 - syntax error, unexpected PARSEOP_NAMESEG, expecting '(' ^/home/qe/program/ft2000-4/edk2-for-support/Build/PhytiumPkg/Phytium2004Pkg/Phytium/RELEASE_GCC49/AARCH64/PhytiumPkg/Phytium2004Pkg/Drivers/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii 736:
Error 6126 - syntax error, unexpected '}', expecting $end and premature End-Of-File
怀疑是acpica-tools
的版本导致,
qe@ubuntu:~/program/ft2000-4/edk2-for-support$ dpkg -l | grep acpica
ii acpica-tools 20160108-2 amd64 ACPICA tools for the development and debug of ACPI tables
暂将I2CSerialBusV2
改为I2CSerialBus
。
./build2004.sh: line 59: ./PhytiumPkg/Phytium2004Pkg/pbf/fiptool: cannot execute binary file: Exec format error
飞腾官方发布的edk包内有一个不开放源代码的工具fiptool
,据我估计,这个工具的作用就是把多个文件合并成一个文件。这个工具是针对ubuntu18.04.1的,和我们的编译服务器版本不一样,现在国内的开源镜像网站上只有ubuntu18.04.4的,不知道这个工具能否和ubuntu18.04.4兼容,需寻求技术支持提供我们编译服务器ubuntu16.04.6版本的fiptool,或者提供一下fiptool的源代码。
打开了ubuntu18.04.1的虚拟机,确实acpica-tools的版本新一点,
ly@ly:~$ dpkg -l | grep acpica
ii acpica-tools 20180105-1 amd64 ACPICA tools for the development and debug of ACPI tables
ly@ly:~$ uname -a
Linux ly 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
ly@ly:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
fiptool替换后编译成功,
ly@ly:~/edk2-for-support/PhytiumPkg/Phytium2004Pkg/pbf$ mv fiptool fiptool_arm
ly@ly:~/edk2-for-support/PhytiumPkg/Phytium2004Pkg/pbf$ cp ~/pack_for_custom/my_scripts/fiptool_x86 .
ly@ly:~/edk2-for-support/PhytiumPkg/Phytium2004Pkg/pbf$ ln -s fiptool_x86 fiptool
ly@ly:~/edk2-for-support$ ./build2004.sh r
...
- Done -
Build end time: 20:35:06, Apr.16 2020
Build total time: 00:00:070+1 records in
0+1 records out
656617 bytes (657 kB, 641 KiB) copied, 0.000867209 s, 757 MB/s
0+1 records in
0+1 records out
932912 bytes (933 kB, 911 KiB) copied, 0.000989232 s, 943 MB/s
3+1 records in
3+1 records out
4128768 bytes (4.1 MB, 3.9 MiB) copied, 0.00305691 s, 1.4 GB/sgenerate ft2004.fd OK.10420224 ft2004.fdbuild end.
pack,提供的虚拟机是中文的ubuntu,导致脚本工作不正确,手动更新pack.sh
和update_bl.sh
,ARCH=x86_64
,
ly@ly:~/pack_for_custom$ ls -l
总用量 9516
lrwxrwxrwx 1 ly ly 31 1月 8 18:45 bl33_new.bin -> ../../edk2-for-support/bios2004
drwxr-xr-x 2 ly ly 4096 3月 4 19:53 build
-rwxr-xr-x 1 ly ly 8323072 3月 5 01:06 ft2000_4_root_62510623_200305_010600.bin
drwxr-xr-x 2 ly ly 4096 3月 2 00:06 my_scripts
-rw-r--r-- 1 ly ly 1058 3月 5 01:06 parameter.log
-rwxr-xr-x 1 ly ly 932912 11月 18 02:48 phyinit201707.bin
-rwxr-xr-x 1 ly ly 468328 12月 16 23:23 phyinit201707-ddr3.bin
-rwxr-xr-x 1 ly ly 638 12月 16 23:23 readme.txt
ly@ly:~/pack_for_custom$ rm bl33_new.bin
ly@ly:~/pack_for_custom$ ln -s ~/edk2-for-support/bios2004 bl33_new.bin
ly@ly:~/pack_for_custom$ ./my_scripts/pack.sh
current path is /home/ly/pack_for_custom
cpu arch is x86_64enabled update bl33.bin
>>>>fip-all.bin pk <<<<
6.0M fip-all.bin
fatal: 不是一个 git 仓库(或者任何父目录):.git/**************************************************/
/******************USE MAKE CONFIG*****************/
/**************************************************/
Version : -- RELEASE -- v0.5/****** Common info ----- Magic : 0x54460010 ******/cpu info : cluster_0-core_0 /cluster_0-core_1 /cluster_1-core_0 /cluster_1-core_1 /cpu frq : 2600 MHZ
lmu frq : 0 MHZ/**************************************************//****** Peu info ----- Magic : 0x54460011 ******/independent_tree mode : 0x0
PEU 0 : init--X16X1--RC--Gen3-Gen3
PEU 0 : equalization <0x48484848-0x48484848-0x48484848>
PEU 1 : init--X8X8X1--RC--Gen3-Gen3-Gen3
PEU 1 : equalization <0x48484848-0x48484848-0x48484848>/**************************************************//****** Mcu info ----- Magic : 0x54460014 ******/CH 0 :ecc type is from spddm is enablenot select spd force, will read from SPD!
CH 1 :ecc type is from spddm is enablenot select spd force, will read from SPD!/**************************************************/ly@ly:~/pack_for_custom$ ls -l
总用量 7452
lrwxrwxrwx 1 ly ly 34 4月 16 20:45 bl33_new.bin -> /home/ly/edk2-for-support/bios2004
drwxr-xr-x 2 ly ly 4096 3月 4 19:53 build
-rwxr-xr-x 1 ly ly 8323072 4月 16 20:52 ft2000_4_ly__200416_205238.bin
drwxr-xr-x 2 ly ly 4096 4月 16 20:52 my_scripts
-rw-r--r-- 1 ly ly 1058 4月 16 20:52 parameter.log
-rwxr-xr-x 1 ly ly 932912 11月 18 02:48 phyinit201707.bin
-rwxr-xr-x 1 ly ly 468328 12月 16 23:23 phyinit201707-ddr3.bin
-rwxr-xr-x 1 ly ly 638 12月 16 23:23 readme.txt
飞腾FT2000/4 u-boot/UEFI开发环境搭建相关推荐
- Spring Boot从零入门2_核心模块详述和开发环境搭建
本文属于原创,转载注明出处,欢迎关注微信小程序小白AI博客 微信公众号小白AI或者网站 https://xiaobaiai.net 文章目录 1 前言 2 名词术语 3 Spring Boot核心模块 ...
- uefi 嵌入式Linux,面向嵌入式平台的高级UEFI开发环境.PDF
面向嵌入式平台的高级UEFI开发环境 面向嵌入式平台的高级 UEFI 开发环境 晋磊, 技术市场工程师, 英特尔 周鹏程, 开发经理, 百敖软件* 姜波, 首席技术官, 盛博科技* PTAS003 议 ...
- 从零搭建一个 Spring Boot 开发环境!Spring Boot+Mybatis+Swagger2 环境搭建
从零搭建一个 Spring Boot 开发环境!Spring Boot+Mybatis+Swagger2 环境搭建 本文简介 为什么使用Spring Boot 搭建怎样一个环境 开发环境 导入快速启动 ...
- UEFI入门之EDK II开发环境搭建
EDK II是开源的对UEFI标准的实现,目前主流的IBV(BIOS代码供应商,像AMI.Insyde和Byosoft等)的代码都是基于EDK II做二次开发.本文将介绍在Windows10系统中使用 ...
- Windows 10 IoT Serials 1 - 针对Minnow Board MAX的Windows 10 IoT开发环境搭建
目前,微软针对Windows IoT计划支持的硬件包括树莓派2,Minnow Board MAX 和Galileo (Gen 1和Gen 2).其中,Galileo (Gen 1和Gen 2)运行的是 ...
- eclipse android开发环境搭建_聊聊Spring boot2.X开发环境搭建和基本开发
对Spring Boot的开发环境进行搭建,并对它的特点做进一步的了解,才能更好地对Spring Boot有更深入的介绍.但是无论如何都需要先来搭建Spring Boot的工程. 搭建Spring B ...
- 【Tiny4412】 Tiny4412开发环境搭建
创建一个ARM目录 mkdir /disk/A9 -p 接下来你需要准备以下的东西 1.arm-linux-gcc-4.5.1 交叉编译器 2.linux-3.5-tiny4412 ...
- TI Davinci DM6446开发攻略——开发环境搭建
TI DAVINCI DM6446的开发环境搭建不像三星S3C2410,S3C2440,ATMEL的AT91SAM9260之类的单核ARM那么简单,因为DM6446还有DSP端的开发环境,以及双核之间 ...
- Hi3519V101开发环境搭建(二)
目录 目录 前言 编译U-boot 编译Linux-318y的内核 链接地址 前言 前面已经搭建好了Ubuntu下的海思开发环境,现在对编译Uboot和Kernel的过程做一个简单的记录.参考文档&l ...
最新文章
- Linux网络那点事(CentOS、Ubuntu、Kali)
- .NET开发人员必知的八个网站
- elementui可编辑单元格_ElementUI 表格可编辑单元格
- iOS 开发线程 gcd
- 优秀程序员是怎样提高敲代码的效率?有这些工具就够了!
- 对计算机专业的认识500字_【热门】我的朋友作文500字4篇
- R语言系列:分布一致性和离散一致性检验
- 深度剖析Pyechars Graph关系图谱
- 从零开始学习股票知识
- UniApp 获取屏幕分辨率
- 浅析运输管理系统(TMS)
- 苹果和android充电线一根,苹果iPhone8充电接口大变:以后和安卓机用同一根数据线!...
- Metasploit6.0系列教程 -- 渗透Joomla网站
- 机器学习(四)——Adaboost算法
- HTTP 常用的方法是什么,各自含义是什么?
- excel向程序发送命令时出现错误
- Pygame:初次见面,请大家多多关照
- 总结一下Qt内存泄漏检测与处理策略
- 业精于勤,荒于嬉;行成于思,毁于随。─韩愈 给我的启示
- 数据加密标准概览系列之密码设备应用接口规范-GMT 0018-2012