Lumia 950 XL刷Windows 10教程 翻译版
本帖最后由 CooperYJ 于 2018-5-15 15:03 编辑
感谢@wherewhere提供原文地址。
个人翻译,欢迎指正。转载请注明出处。
EDK2 Implementation for Lumia 950 XL
What's this?
这是什么?
This package demonstrates an AArch64 UEFI implementation for hacked Lumia 950 XL. Currently it is able to boot Windows 10 ARM64 (with a minor patch). Booting Linux is also possible if seven cores are disabled in ACPI tables (due to the TZ implementation).
这个包是用来执行破解Lumia 950 XL的AArch64 UEFI的。当前,它可以启动ARM64的Windows 10(需要小调整)。启动Linux也是有可能的,前提是7个核心在ACPI控制器中被禁用(取决于TZ实施表)。
Build
If you are familar with EDK2, you don't need to use my build script.
Checkout a copy of EDK2, then checkout this repository under EDK2's worktree.
如果你对EDK2熟悉的话,你不需要用我的脚本。检查一下EDK2副本,再注意一下EDK2工作目录在哪里。
Install Linaro AArch64 GCC toolchains, my build script uses gcc-linaro-7.2.1-2017.11. Then untar them. I place everything under /opt directory, so I have directories like /opt/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf/bin. If you placed it somewhere else, modify build scripts.
安装Linaro AArch64 GCC工具包,我的脚本用的是gcc-linaro-7.2.1-2017.11版。然后解压它们。我把所有东西都放在/opt目录下,所以我有/opt/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf/bin这个目录。如果你放在其他地方的话,用部署脚本。
Copy rundbbuild.sh in Tools directory to your EDK2 worktree root directory.
把rundbbuild.sh从工具目录复制到你的EDK2工作目录的根目录下。
Export variable GCC5_AARCH64_PREFIX to your GCC directory with prefix (e.g. /opt/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf/bin/aarch64-elf-)
启用变量GCC5_AARCH64_PREFIX到你的GCC目录,和补丁文件一起。(比如,/opt/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf/bin/aarch64-elf-)
Enable -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 flags in GCC will make you day better.
在GCC中启用-mfix-cortex-a53-835769和-mfix-cortex-a53-843419标志,会可以让你稍微舒服一点。
Start build: . rundbbuild.sh --950xl --development
运行命令:(如上)
Run
运行
Per UEFI specification, ARM32 UEFI cannot boot ARM64 binaries directly. To run this UEFI build on Lumia 950 XL, the following procedure is required:
每个UEFI的规格都不同,ARM32位UEFI是没法用64位的二进制引导启动的。要在950 XL上运行这个版本的UEFI,这些操作是需要的:
Check out Boot Shim. This Boot Manager Application implements a simple ELF loader for the kickstarter (LK).
检查启动补偿。这个启动助手程序为启动器执行一个简单的ELF加载。
Check out LK. You need msm8994-test-2 branch. Build MSM8994,target, then you will get a emmc_appsboot.mbn file.
检查LK。你需要msm8994-test-2分支(PS:似乎是个依赖关系)。部署MSM8994作为目标后,你会得到一个emmc_appsboot.mbn文件。
Re-partition your Lumia 950XL, shrink Data partition, create a new partition with GPT name boot, and another uefi_vars (reserved for further use). 4MB for both partition is okay. Tools like cgdisk is recommended.
重启分区你的950 XL存储(PS:前方高能),缩减Data分区,创建一个GPT分区表的启动名,另外一个uefi_vars(给深度使用的)。每个分区4MB都行。像是cgdisk之类的工具,也是要的。
Place emmc_appsboot.mbn in the WP EFIESP root directory, copy Boot Shim EFI appliction to the EFIESP partition, create a new BCD entry for it.
把emmc_appsboot.mbn放在手机的EFIESP分区的根目录里,把补偿程序复制到ESPEFI分区,为其创建一个新的BCD引导。
Boot to this BCD entry, you should enter Android Fastboot mode.
Connect to your computer, flash the build: fastboot flash boot UEFI.elf
启动这个引导,进入安卓Fastboot mode。连接电脑,刷机:fastboot flash boot UEFI.elf。
Continue to UEFI: fastboot continue
继续到UEFI:继续Fastboot
To re-flash UEFI, press volume down until Fastboot device shows up (like flashing Android phones).
通过长按音量下键来刷新UEFI,直到显示Fastboot设备显示(就和安卓设备一样)。
Patch for booting Windows ARM64
为启动ARM64的Windows配置
Go to your EDK2 worktree, find MdePkg/Include/AArch64/ProcessorBind.h:
- #define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x10000)
+ #define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000)
This issue will be addressed with improved memory allocation in the future.
到你的EDK2工作目录,找到:MdePkg/Include/AArch64/ProcessorBind.h
以文本方式打开,去除:
#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x10000)
增加:
#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000)
这个故障以后会在提升内存分配时定位到。
TZ Implementation Notes
TZ执行注意事项:
Qualcomm Snapdragon MSM8992/MSM8994 implements a subset of PSCI interface for multi-processor startup. However, required commands like PSCI_SYSTEM_OFF and PSCI_SYSTEM_RESET are not implemented. Hence we use PMIC to shutdown platform (there's a bug in RT that will be fixed) instead of PSCI. Additionally, 8992/8994 uses HVC call for PSCI commands instead of SMC call. It seems that Linux encounters some troubles during MP startup.
高通骁龙MSM8992/MSM8994实现了多处理器启动 PSCI 接口的子集。但是, 不执行诸如 PSCI_SYSTEM_OFF 和 PSCI_SYSTEM_RESET 之类的必需命令。因此, 我们使用 PMIC 关闭平台 (有一个 bug, 将在RT修复), 而不是 PSCI。另外, 8992/8994 使用 HVC 调用 PSCI 命令而不是 SMC 调用。似乎 Linux 在 MP 启动过程中遇到了一些麻烦。
Linux Notes
Linux注意事项
The ACPI tables are copied from stock Windows Phone FFU, hence these device IDs are likely not be recognized by Linux. A proper device tree is still required to boot Linux. If you are interested, you are welcome to contribute.
ACPI的相关设置是从FFU里弄来的,所以Linux可能无法识别这些设备的ID。启动Linux还需要一个设备树。如果感兴趣的话,欢迎贡献。
以上为全部翻译。其中某些没看懂的未做改动。
为防止不可控的内容风险,本站已关闭新用户注册,新贴的发表及评论;
你现在看到的内容只是互联网用户曾经发表的言论快照,仅用于老用户留存纪念,且仅与科技行业相关,全部内容不代表本站观点及立场;
本站重新开放前已针对包括用户隐私、版权保护、信息安全、国家政策在内的各种互联网法律法规要求,执行了隐患内容的自查、屏蔽和删除;
本站目前所属个人主体,未有任何盈利安排与计划,且与原WFUN.COM所属公司不存在任何关联关系;
如果本帖内容或者相关资源侵犯到您的合法权益,或者您认为存在问题,那么请您务必点此举报或投诉!
Quotewp2016n 发表于 2018-5-15 15:34
懒得折腾,但对楼主的贡献点赞。
谢谢。有时间的话,我会试着拿虚拟机开刀,不过虚拟机能不能玩的成就是另一个问题了。
Quote忘水草 发表于 2018-5-15 17:20
难度太大,溜了溜了
最难的是,这个不是傻瓜教程,有一些包名没说清楚。哈哈哈,如果没和外国人交流过的话很难翻(虽然几个缩写还是没搞清)
Quote善解人意的俊哥 发表于 2018-5-15 16:47
智机藏龙卧虎呀,最难得的是无私分享
不谢。也就用了40分钟而已 哈哈
QuoteTEL1597788948 发表于 2018-5-15 15:35
为楼主点赞是必须的,辛苦啦!
谢啦。可惜几个步骤没法看懂确切意思,哈哈
本帖最后由 wherewhere 于 2018-5-15 23:16 编辑
你需要手动操作一遍,然后去ben的推文下面用中文讨论讨论,然后就能翻得更好了/滑稽
Quotewherewhere 发表于 2018-5-15 20:45
你需要手动操作一边,然后去ben的推文下面用中文讨论讨论,然后就能翻得更好了/滑稽 ...
对,然而我Ubuntu坏了,一直没修。哈哈哈
QuoteCooperYJ 发表于 2018-5-15 19:46
谢谢。有时间的话,我会试着拿虚拟机开刀,不过虚拟机能不能玩的成就是另一个问题了。 ...
不用客气,你是付出了时间和心血的,应该受到别人的赞扬。
QuoteCooperYJ 发表于 2018-5-15 21:14
对,然而我Ubuntu坏了,一直没修。哈哈哈
。。。。。。。
Quotewherewhere 发表于 2018-5-15 23:15
。。。。。。。
突然卡了,自动强制关机。猝不及防,后来用Rescue模式也没弄好。