Project Mu UEFI Implementation for Devices with Snapdragon™ inside.
For users
You can download the latest UEFI build by clicking here.
What's this?
This package demonstrates an AArch64 UEFI implementation for hacked devices with qcom silicons. Currently it is able to boot Windows 10 ARM64 as well as Windows 11 ARM64. Please be aware that devices with no dsdt support have limited support.
Support Status
Applicable to all supported targets unless noted.
Low-speed I/O: I2C, SPI, GPIO, SPMI and Pinmux (TLMM).
Power Management: PMIC and Resource Power Manager (RPM).
High-speed I/O for firmware and HLOS: UFS 3.1
Peripherals: side-band buttons (TLMM GPIO and PMIC GPIO), USB
At least 2 cores x86_64 processor running at 2Ghz or higher implementing the X86 ISA with 64 bit AMD extensions (AMD64) (Currently, building on any other ISA is not supported. In other words, do. not. build. this. on. a. phone. running. android. please.)
SSD
A linux environment capable of running below tool stack:
Bash
Python 3.10 or higher (python3.10, python3.10-venv, python3.10-pip)
mono-devel
git-core, git
build-essential
clangpdb (or higher), llvm, ggc-aarch64-linux-gnu
Exported CLANGPDB_BIN environment variable pointing to LLVM 10 binary folder
Exported CLANGPDB_AARCH64_PREFIX variable equalling to aarch64-linux-gnu-
Build Instructions
Clone this repository to a reasonable location on your disk (There is absolutely no need to initialize submodules, stuart will do it for you later on)
Run the following commands in order, with 0 typo, and without copy pasting all of them blindly all at once:
Hi, when building with ./build_uefi.sh -d [target device] -s [ram size], I get an error. I am not sure what error is that, but here is the log. Does anyone know how to fix the build error? Thanks.
INFO - /home/linuxuser/Documents/MU-sm8150pkg/MU_BASECORE/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c:19:13: error: field ResetSubtype within 'RESET_UTILITY_GUID_SPECIFIC_RESET_DATA' is less aligned than 'GUID' and is usually due to 'RESET_UTILITY_GUID_SPECIFIC_RESET_DATA' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access]
INFO - GUID ResetSubtype;
INFO - ^
INFO - 1 error generated.
INFO - make: *** [GNUmakefile:295: /home/linuxuser/Documents/MU-sm8150pkg/Build/samsung-d2x-AARCH64/DEBUG_CLANG38/AARCH64/MdeModulePkg/Library/ResetUtilityLib/ResetUtilityLib/OUTPUT/ResetUtility.obj] Error 1
INFO -
INFO -
INFO - build.py...
INFO - : error 7000: Failed to execute command
INFO - m a k e t b u i l d [/home/linuxuser/Documents/MU-sm8150pkg/Build/samsung-d2x-AARCH64/DEBUG_CLANG38/AARCH64/MdeModulePkg/Library/ResetUtilityLib/ResetUtilityLib]
INFO -
INFO -
INFO - build.py...
INFO - : error F002: Failed to build module
INFO - /home/linuxuser/Documents/MU-sm8150pkg/MU_BASECORE/MdeModulePkg/Library/ResetUtilityLib/ResetUtilityLib.inf [AARCH64, CLANG38, DEBUG]
INFO -
INFO - - Failed -
INFO - Build end time: 01:30:12, Nov.03 2022
INFO - Build total time: 00:00:11
INFO -
INFO - ------------------------------------------------
INFO - --------------Cmd Output Finished---------------
INFO - --------- Running Time (mm:ss): 00:11 ----------
INFO - ----------- Return Code: 0x00000001 ------------
INFO - ------------------------------------------------
ERROR - Compiler #7000 from : Failed to execute command
ERROR - EDK2 #002 from : Failed to build module
CRITICAL - Build failed
PROGRESS - End time: 2022-11-03 01:30:12.599297 Total time Elapsed: 0:00:11
SECTION - Log file is located at: /home/linuxuser/Documents/MU-sm8150pkg/Build/BUILDLOG_SurfaceDuo1Pkg.txt
SECTION - Summary
ERROR - Error
### 1 issue
pytool-library-0.12.1 future-0.18.3 pefile-2022.5.30 regex-2022.10.31
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Removing intermediate container 8586d804494e
---> e41a22085fa2
Step 18/18 : CMD ["/bin/bash"]
---> Running in 6d7aad35eecc
Removing intermediate container 6d7aad35eecc
---> 868154110928
Successfully built 868154110928
Successfully tagged mu:v1
root@ost268-VirtualBox:/home/ost268/MU-sm8150pkg# docker run -it mu:v1 -v ./:/build/
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "-v": executable file not found in $PATH: unknown.
ERRO[0000] error waiting for container: context canceled
root@ost268-VirtualBox:/home/ost268/MU-sm8150pkg#
### 2 issue
./setup_uefi.sh: line 3: stuart_setup: command not found
I have a Pixel 4 (flame) and I want to use this port with it, but I don't want to get my phone bricked, so I was wondering if there would be a way of using an external mass storage device instead of the internal UFS chip.
after building, i tried to boot the image and im met with loads of texts and then a prompt reboot into android, i have tried to change dtb and the CustomizedBinaries folder with up to date ones, but still no avail
heres the only picture of what was happening before crash / reboot (sadly not the clearest image)
I looked your document called simple guide, then I found I need to compile an application called UefiReader. However, its repo doesn't gave me introduction about building it. How to compile it properly?
I compiled edk2 myself for raphael, it shows windows 11 logo, then throws a "IRQL_NOT_LESS_OR_EQUAL" BSOD. How can i get logs for more troubleshooting?
We will now need to inform the build system of these files. The files DXE0.inc through DXE3.inc tell the build system about the locations of these firmware binaries for each separate device. So, we will make a copy of one of these files and modify it with the correct paths for our own files.
Commit b70eee7, PR #228 broke the automated (and probably all) builds of SM8150 OnePlus devices.
In the latest run's logs, the following can be found:
2024-02-29T12:25:36.7023757Z INFO - GenFv: ERROR 2000: Invalid parameter
2024-02-29T12:25:36.7024665Z INFO - the 13th file and 166th file have the same file GUID.
2024-02-29T12:25:36.7025543Z INFO - 643d4788-63c8-40d2-bd7a-6842e66850d1
I'm guessing this is because ufpdevicefw being added to both device specific files and SurfaceDuo1Pkg as a whole, so this gets included twice, causing the two copies of it to have the same GUID.
(I don't know where to ask about the tutorial about porting edk2 to SM8150 in the website, so I asked here.)
I extracted the xbl from the BL....md5 file from the Samsung firmware, but opening it in 7-zip resulted in an error
So, I am going to extract xbl from the device, but I don't know which xbl I get: /dev/block/by-name/xbl /dev/block/platform/soc/......ufshc/by-name/xbl
(I found the xbl paths by running find / | grep xbl and seeing the last few lines.)
Can someone please answer this question? thanks.
Hi, I would like to build for my own ported device, but the build script ./build_uefi.sh only accepts 6GB or 8GB RAM, and Samsung Galaxy note 10 Plus has 12GB RAM, so should I use 6GB or 8GB of RAM for a phone with 12 GB? Thanks.
INFO - Return Value = 2
INFO - GenFv: ERROR 3000: Invalid
INFO - the required fv image size 0x37f5f0 exceeds the set fv image size 0x300000
INFO -
INFO -
INFO -
INFO -
INFO - build.py...
INFO - : error 7000: Failed to generate FV
INFO -
INFO -
INFO -
INFO - build.py...
INFO - : error 7000: Failed to execute command
INFO -
INFO -
INFO - - Failed -
INFO - Build end time: 00:39:39, Mar.03 2024
INFO - Build total time: 00:00:20
INFO -
INFO - ------------------------------------------------
INFO - --------------Cmd Output Finished---------------
INFO - --------- Running Time (mm:ss): 00:20 ----------
INFO - ----------- Return Code: 0x00000001 ------------
INFO - ------------------------------------------------
ERROR - Compiler #7000 from : Failed to generate FV
ERROR - Compiler #7000 from : Failed to execute command
I want to port UEFI to my Pixel 4 XL. I cloned the repository,and I don't know how to start. I can't find a build guide, the old one seems to be outdated. If you know where the guide is, please tell me,thanks.