Giter VIP home page Giter VIP logo

woa-msmnile / msmnilepkg Goto Github PK

View Code? Open in Web Editor NEW
105.0 10.0 83.0 255.65 MB

Trying to port SurfaceDuoPkg for other qcom devices.

Home Page: https://t.me/woa_msmnile_issues

License: BSD 2-Clause "Simplified" License

Python 1.32% C 17.26% NASL 0.01% C++ 0.10% Assembly 7.41% Shell 0.03% Dockerfile 0.01% Makefile 0.02% BitBake 12.25% ASL 61.44% Perl 0.07% DenizenScript 0.08%
projectmu woa phones windows msmnile sm8150 arm64 firmware uefi

msmnilepkg's Introduction

This Repo Is Based On mu_andromeda_platforms

Thanks for Gustave's instructions!

Project Mu UEFI Implementation for Devices with Snapdragon™ inside.

For users

You can download the latest UEFI build by clicking here.

ActionStatus

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
  • Display FrameBuffer

What can you do?

Please see https://woa-msmnile.github.io for some tutorials.

Build

Minimum System Requirements

  • 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:
  1. Setup Base environment
./build_setup.sh
pip install --upgrade -r pip-requirements.txt

Alternatively, use docker if you don't have Ubuntu 22.04 environment

sudo docker build -t mu:v1 .
sudo docker run -v $(pwd):/build/ -it mu:v1

Then finish the following process in docker environment

  1. Build UEFI & Generate Android Boot Image

Usage: build_uefi.py -d <target-device> -s <secureboot status> -t <build type>

  • Exmaple with secure boot off and release build:

    ./build_uefi.py -d <target-name>
    
  • Exmaple with secure boot on:

    ./build_uefi.py -d <target-name> -s 1
    
  • Exmaple with secure boot off and DEBUG build:

    ./build_uefi.py -d <target-name> -t DEBUG
    
  • Tips:

    • use -p all to build devices in all platforms.
    • use -d all -p <target-platform> to build all devices in same platform.
  • You will find Build/xxxxPkg/<target-device>.img after successfully building.

Target list

Snapdragon 855/855+/860 (SM8150)

Qualcomm Technologies, Inc. Devices

Device Target name DSDT Support Contributors
Qualcomm Technologies, Inc. MTP 8150 qcom-mtp8150 NONE
Qualcomm Technologies, Inc. QRD 8150 qcom-qrd8150 sunflower2333

ASUS Devices

Device Target name DSDT Support Contributors
ASUS ROG2 asus-I001DC sunflower2333

Axon Devices

Device Target name DSDT Support Contributors
Axon Stage 5G kakao-pine AKA

BlackShark Devices

Device Target name DSDT Support Contributors
BlackShark 2 blackshark-skywalker NONE
BlackShark 2 Pro blackshark-darklighter NONE

HTC Devices

Device Target name DSDT Support Contributors
HTC 5G Hub htc-rtx NONE

LG Devices

Device Target name DSDT Support Contributors
LG G8 lg-alphaplus sunflower2333
LG G8S lg-betalm J0SH1X
LG G8X lg-mh2lm Molly Sophia
LG V50 lg-flashlmdd AKA
LG V50S lg-mh2lm5g AKA

Meizu Devices

Device Target name DSDT Support Contributors
Meizu 16s meizu-m971q NONE
Meizu 16T meizu-m928q NONE

Nubia Devices

Device Target name DSDT Support Contributors
Nubia Mini 5G nubia-tp1803 Alula
Nubia RedMagic 3 nubia-nx629j NONE
Nubia RedMagic 3S nubia-nx629jv1s NONE

OnePlus Devices

Device Target name DSDT Support Contributors
OnePlus 7 oneplus-guacamoleb NONE
OnePlus 7 Pro oneplus-guacamole Waseem Alkurdi
OnePlus 7T oneplus-hotdogb UNKNOWN
OnePlus 7T Pro oneplus-hotdog Morc
OnePlus 7T Pro 5G oneplus-hotdogg NONE

OPPO Devices

Device Target name DSDT Support Contributors
OPPO Reno 10X oppo-op46c3 NONE
OPPO Reno ACE oppo-pclm10 NONE

Realme Devices

Device Target name DSDT Support Contributors
Realme X2 Pro realme-rmx1931 NONE
Realme X3 SuperZoom realme-rmx2086 NONE

Samsung Devices

Device Target name DSDT Support Contributors
Samsung Galaxy Fold samsung-winner Ost268
Samsung Galaxy S10 samsung-beyond1qlte Ww
Samsung Galaxy Tab S6 samsung-gts6l NONE
Samsung Galaxy Tab S6 WIFI samsung-gts6lwifi qaz6750

Smartisan Devices

Device Target name DSDT Support Contributors
Smartisan Pro 3 smartisan-aries NONE

Xiaomi Devices

Device Target name DSDT Support Contributors
Xiaomi 9 xiaomi-cepheus qaz6750
Xiaomi Hercules xiaomi-hercules Ww
Xiaomi K20 Pro xiaomi-raphael Degdag&sunflower2333
Xiaomi Mix Alpha u2 xiaomi-avenger NONE
Xiaomi Mix3 5G xiaomi-andromeda NONE
Xiaomi Pad 5 xiaomi-nabu Map220v
Xiaomi Poco X3 Pro xiaomi-vayu Degdag

Snapdragon 675/720G/7c/7c Gen 2 (SM6250/SM7125/SC7180)

Qualcomm Technologies, Inc. Devices

Device Target name DSDT Support Maintainers
Qualcomm Technologies, Inc. QRD 7125 qcom-qrd7125 sunflower2333

Xiaomi Devices

Device Target name DSDT Support Contributors
Xiaomi Note 10 Pro xiaomi-sweet dopaemon
Xiaomi Note 9S xiaomi-miatoll Icesito

Snapdragon 778G/7c+ Gen 3 (SM7325/SC7280)

Qualcomm Technologies, Inc. Devices

Device Target name DSDT Support Maintainers
Qualcomm Technologies, Inc. QRD 7325 qcom-qrd7325 Ayu&sunflower2333

Snapdragon 888/888+/888 4G/G3x Gen 1 (SM8350/SM8350P/SG8175P)

Qualcomm Technologies, Inc. Devices

Device Target name DSDT Support Maintainers
Qualcomm Technologies, Inc. MTP 8350 qcom-mtp8350 Ayu

Samsung Devices

Device Target name DSDT Support Contributors
Galaxy Z Fold 3 5G samsung-q2q None

ZTE Devices

Device Target name DSDT Support Contributors
ZTE A31 Pro zte-p875a02 None

Xiaomi Devices

Device Target name DSDT Support Contributors
Xiaomi K40 Pro xiaomi-haydn None

Snapdragon 8 Gen 2 (SM8550)

Qualcomm Technologies, Inc. Devices

Device Target name DSDT Support Maintainers
Qualcomm Technologies, Inc. QRD 8550 qcom-qrd8550 None

AYANEO Devices

Device Target name DSDT Support Contributors
AYANEO Pocket S ayaneo-aps None

AYN Devices

Device Target name DSDT Support Contributors
AYN Odin 2 ayn-odin2 None

Nubia Devices

Device Target name DSDT Support Contributors
Nubia RedMagic 8 Pro nubia-nx729j None

Oneplus Devices

Device Target name DSDT Support Contributors
Oneplus 11 5G oneplus-salami None

Xiaomi Devices

Device Target name DSDT Support Contributors
Xiaomi 13 xiaomi-fuxi None
Xiaomi 13 Pro xiaomi-nuwa None
Xiaomi Pad6 S Pro xiaomi-sheng None
Xiaomi K60 Pro xiaomi-socrates None

Acknowledgements

License License

Check our memePkg[https://github.com/woa-msmnile/memePkg] for other SoCs support!

msmnilepkg's People

Contributors

5-super-rookie-5 avatar akasaliza avatar alula avatar bibarub avatar degdag avatar dependabot[bot] avatar gus33000 avatar halal-beef avatar hiprivsid avatar icesito68 avatar idonotkno avatar j0sh1x avatar lujianhua avatar map220v avatar mcusr120 avatar mollysophia avatar mouzei avatar n1kroks avatar netuserpro avatar ost268 avatar qaz6750 avatar remtrik avatar sc-ah avatar sunflower2333 avatar themorc avatar waseemalkurdi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

msmnilepkg's Issues

Error building with `./build_uefi.sh`

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

Build issues

### 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

### 3 issue
build.sh: Command not found

Using external storage instead of UFS?

Refering to issue #50:

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.

edk2 unable to boot on vayu

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)

image

How to compile UefiReader?

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?

Raphael not able to boot

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?

Confused by step 4 in the build instructions in MU-sm8150 porting guide

Step 4 in the tutorial

This is what it says in step 4:

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.

Let's copy it as follows:

(SurfaceDuo) $ cp Platforms/SurfaceDuoPkg/Include/DXE3.inc Platforms/SurfaceDuoPkg/Include/DXE4.inc

Then, we'll open it in Nano:

(SurfaceDuo) $ nano Platforms/SurfaceDuoPkg/Include/DXE4.inc

In nano, we will find the following string:

SECTION PE32 = SurfaceDuoPkg/CustomizedBinaries/XiaoMi/Andromeda_MIX3_5G/

But there is no Platforms/SurfaceDuoPkg/Include/DXE3.inc, so can anyone please help? thanks.

SM8150 OnePlus images not building anymore

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.

Confused on extracting xbl from samsung

(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.

Oneplus CrashDump Error

On part of oneplus devices with OOS11 or OOS12, they may enconter CrashDumpMode while loading windows.

Vayu: the required fv image size 0x37f5f0 exceeds the set fv image size 0x300000

MU Doesn't builds for vayu giving error

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.