FORUMS
Remove All Ads from XDA

Boot Windows RT 8.1 installation PE on DragonBoard 410c

16 posts
Thanks Meter: 49
 
By imbushuo, Junior Member on 20th May 2016, 05:43 AM
Post Reply Email Thread


Actually, it is far more easier to boot Windows RT 8.1 PE on Dragonboard 410c compared to Lumia 520. DB410c is shipped without RPMB provisioned, Secure Boot is off, no Secure Boot keys are provisioned, nor Secure Boot Policy, and almost all UEFI settings are accessible. You need to patch nothing with Windows kernel itself on DB410c.

1. Some preparation

Flash Windows 10 IoT to have UEFI. Access Microsoft's IoT page for details.

On the back of the board, switch USB HOST to on, other switches remain OFF.
In BDS menu, switch Secure Boot off. (It should shipped with Secure Boot off)
Switches

2. Windows RT installation disk prepartion

Extract HalExtQCTimer.dll and HalExtQCWdogTimer.dll from Lumia 640XL firmware. Other Windows Phone 8.1 devices with Snapdragon 400/410/801 should work too (not S4, Qualcomm changed hardware design), but I have not tested yet.
PS. If anyone have LG Lancet Windows Phone 8.1 firmware, that's better. Reply or PM me for more if you have one.

Inject HAL extensions:
Mount boot.wim index #1.
Put the two files metioned before to \Windows\System32.
Mount \Windows\system32\config\SYSTEM registry, import HAL extension configuration, like this:

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\WinRTSYSTEM\ControlSet001\Control\OSExtensionDatabase]

[HKEY_LOCAL_MACHINE\WinRTSYSTEM\ControlSet001\Control\OSExtensionDatabase\VEN_QCOM&DEV_100A]
"HalExtension"="\SystemRoot\System32\HalExtQCTimer.dll"

[HKEY_LOCAL_MACHINE\WinRTSYSTEM\ControlSet001\Control\OSExtensionDatabase\VEN_QCOM&DEV_100B]
"HalExtension"="\SystemRoot\System32\HalExtQCWdogTimer.dll"
Repeat the operation for boot.wim image #2. Commit changes and unmount boot.wim

I haven't modified install.wim yet. You still need to inject these HAL extensions if you want to install it.

Copy files to a USB key. Modify BCD configuration:
You need boot param passed to kernel:
/REDIRECT /NOVGA /TESTSIGNING

Replace bootmgr.efi, bootarm.efi, bootmgfw.efi with Windows 10 IoT's. I am not sure whether original version will work.

3. Boot
DO NOT BOOT IT FROM UEFI SHELL. I believe there's a bug in Qualcomm's firmware. If you boot any Windows OS in UEFI shell, bootmgfw.efi will work fine, but HAL initialization will certainly fail with error code 0x5c, even Windows 10 IoT. I don't why yet.
0x5C crash (likely a firmware issue)

Insert USB key to Dragonboard, plug in power supply, press Volume- button until your USB key's LED light indicates there is I/O operation.


It should boot. Ignore the other two options in the picture. I am testing HAL extensions with them.
BOOTMGR

Installation Phase

4. Issues
  • No drivers are injected yet. I need to inject drivers in order to make USB and other devices work. I will try that after my final test. I think LG Lancet Windows Phone 8.1 firmware is the best driver source for DB410c as they MSM8916 and APQ8016 are similar.
  • I am not sure if Windows RT's kernel will accept a Windows Phone signed HAL extension without TESTSIGNING option. They have the same Root Certificate though in Windows RT 8.1/Windows Phone 8.1.
  • DB410c has only 8GB eMMC, if you want to install it on board, storage space will be a problem.
  • DO NOT BOOT IT FROM UEFI SHELL. I believe there's a bug in Qualcomm's firmware. If you boot any Windows OS in UEFI shell, bootmgfw.efi will work fine, but HAL initialization will certainly fail with error code 0x5c, even Windows 10 IoT. I don't why yet.
The Following 3 Users Say Thank You to imbushuo For This Useful Post: [ View ] Gift imbushuo Ad-Free
 
 
20th May 2016, 06:55 AM |#2  
TristanLeBoss's Avatar
Senior Member
Thanks Meter: 158
 
Donate to Me
More
You can download FFU file for LG Lancet with WP 8.10.15148.160 here: http://cellomania.com/ffu/product_codes/VW820.html
The Following User Says Thank You to TristanLeBoss For This Useful Post: [ View ] Gift TristanLeBoss Ad-Free
20th May 2016, 07:58 PM |#3  
TristanLeBoss's Avatar
Senior Member
Thanks Meter: 158
 
Donate to Me
More
Here is the list of all the files from Qualcomm packages contained in the LG Lancet ROM.

All files under "\Windows\Packages" are GZipped. Also *.rga files are REG files.

Edit: Edited the attachment to group files by package.
Attached Files
File Type: txt qualcomm.txt - [Click for QR Code] (17.2 KB, 82 views)
21st May 2016, 01:23 AM |#4  
TristanLeBoss's Avatar
Senior Member
Thanks Meter: 158
 
Donate to Me
More
Ok, here is the list of all the packages (sorted alphabetically) with their files.

I discovered that 2 files (MainOS\Windows\Packages\RegistryFilesLGE.BASE.Pho ne.MainOS.reg & MainOS\Windows\Packages\RegistryFiles\LGE.BASE.Var iant.MainOS.reg) contained registry entries for other packages so I made a small script to extract them (you will find them in the attached reg.zip file) and to link them back with their corresponding package.

So, in the packages.txt file, if a reg file has no path, it means you will find it in the reg.zip file

The Windows.zip file contains all the files from MainOS\Windows\Packages ready to be read (no more gzipped).

Hope it helps you
Attached Files
File Type: zip reg.zip - [Click for QR Code] (124.9 KB, 62 views)
File Type: txt pakages.txt - [Click for QR Code] (431.1 KB, 52 views)
File Type: zip Windows.zip - [Click for QR Code] (3.81 MB, 94 views)
21st May 2016, 04:27 AM |#5  
OP Junior Member
Thanks Meter: 49
 
More
Quote:
Originally Posted by TristanLeBoss

Ok, here is the list of all the packages (sorted alphabetically) with their files.

I discovered that 2 files (MainOS\Windows\Packages\RegistryFilesLGE.BASE.Pho ne.MainOS.reg & MainOS\Windows\Packages\RegistryFiles\LGE.BASE.Var iant.MainOS.reg) contained registry entries for other packages so I made a small script to extract them (you will find them in the attached reg.zip file) and to link them back with their corresponding package.

So, in the packages.txt file, if a reg file has no path, it means you will find it in the reg.zip file

The Windows.zip file contains all the files from MainOS\Windows\Packages ready to be read (no more gzipped).

Hope it helps you

Much thanks. The major issue now is, Dragonboard uses a Chipidea dual-role USB controller, which might not have propitiate driver support on Windows 8.1. I checked LG Lancet, its USB directly connects to Chipidea USB controller(not dual role). Since they both use 8x16, I believe there is someway to switch it.
21st May 2016, 05:09 AM |#6  
TristanLeBoss's Avatar
Senior Member
Thanks Meter: 158
 
Donate to Me
More
Quote:
Originally Posted by imbushuo

Much thanks. The major issue now is, Dragonboard uses a Chipidea dual-role USB controller, which might not have propitiate driver support on Windows 8.1. I checked LG Lancet, its USB directly connects to Chipidea USB controller(not dual role). Since they both use 8x16, I believe there is someway to switch it.

More phones which use MSM8916 SoC:

- Mouse Computer MADOSMA Q501: http://www.mouse-jp.co.jp/phone/madosma/
- Blu X150Q Win HD LTE Dual SIM
- Blu X130Q Win Jr LTE Dual SIM
- KAZAM Thunder 450WL LTE

Unfortunately, none of them seems to have USB OTG.

---------- Post added at 04:09 AM ---------- Previous post was at 03:58 AM ----------

Btw, did you find out which package from the LG controls USB?

Also, do you have a VID/PID (or any type of applicable identifier) for the USB controller?

You may want to try the Windows 10 drivers... I don't think the BSP offered by Qualcomm is different if you use Windows Mobile 8.10 or 10 (When a phone is upgraded from 8.1 to 10, the drivers are not updated). The inf file may not be working but the sys/dll may work. It's worth the try.
21st May 2016, 05:19 AM |#7  
OP Junior Member
Thanks Meter: 49
 
More
Quote:
Originally Posted by TristanLeBoss

More phones which use MSM8916 SoC:

- Mouse Computer MADOSMA Q501: http://www.mouse-jp.co.jp/phone/madosma/
- Blu X150Q Win HD LTE Dual SIM
- Blu X130Q Win Jr LTE Dual SIM
- KAZAM Thunder 450WL LTE

Unfortunately, none of them seems to have USB OTG.

---------- Post added at 04:09 AM ---------- Previous post was at 03:58 AM ----------

Btw, did you find out which package from the LG controls USB?

Also, do you have a VID/PID (or any type of applicable identifier) for the USB controller?

You may want to try the Windows 10 drivers... I don't think the BSP offered by Qualcomm is different if you use Windows Mobile 8.10 or 10 (When a phone is upgraded from 8.1 to 10, the drivers are not updated). The inf file may not be working but the sys/dll may work. It's worth the try.

Yeah, their ACPI tree structure is:
- USB Controller
-- USBFn extensions #1
-- USBFn extensions #2
-- ....

I am installing Ubuntu to see how it deals with 410c.
21st May 2016, 05:31 AM |#8  
TristanLeBoss's Avatar
Senior Member
Thanks Meter: 158
 
Donate to Me
More
Quote:
Originally Posted by imbushuo

Yeah, their ACPI tree structure is:
- USB Controller
-- USBFn extensions #1
-- USBFn extensions #2
-- ....

I am installing Ubuntu to see how it deals with 410c.

More info page 10 and 12 of this PDF: http://static.chip1stop.com/pdf/libl...anual_v4.1.pdf

You may want to try Windows 10 IoT USB drivers with Windows 8.1 RT... they may work.

Linux support was added in 2015: https://lkml.org/lkml/2015/7/8/702
21st May 2016, 07:39 AM |#9  
OP Junior Member
Thanks Meter: 49
 
More
Quote:
Originally Posted by TristanLeBoss

More phones which use MSM8916 SoC:

- Mouse Computer MADOSMA Q501: http://www.mouse-jp.co.jp/phone/madosma/
- Blu X150Q Win HD LTE Dual SIM
- Blu X130Q Win Jr LTE Dual SIM
- KAZAM Thunder 450WL LTE

Unfortunately, none of them seems to have USB OTG.

---------- Post added at 04:09 AM ---------- Previous post was at 03:58 AM ----------

Btw, did you find out which package from the LG controls USB?

Also, do you have a VID/PID (or any type of applicable identifier) for the USB controller?

You may want to try the Windows 10 drivers... I don't think the BSP offered by Qualcomm is different if you use Windows Mobile 8.10 or 10 (When a phone is upgraded from 8.1 to 10, the drivers are not updated). The inf file may not be working but the sys/dll may work. It's worth the try.

I didn't find which package, but the ID is ACPI\QCOM2488, it is a USBFN device, located in \\_SB.UFN1 (in dsdt), while DB410c has \\_SB.URS0.USB0 and \\_SB.URS0.UFN0.
21st May 2016, 02:39 PM |#10  
TristanLeBoss's Avatar
Senior Member
Thanks Meter: 158
 
Donate to Me
More
Quote:
Originally Posted by imbushuo

I didn't find which package, but the ID is ACPI\QCOM2488, it is a USBFN device, located in \\_SB.UFN1 (in dsdt), while DB410c has \\_SB.URS0.USB0 and \\_SB.URS0.UFN0.

Ok, if I understand, for LG Lancet :

ACPI\QCOM2488
-> \\_SB.UFN1

For 410c:

ACPI\QCOM2488
-> \\_SB.URS0.USB0
-> \\_SB.URS0.UFN0

If you look at the packages.txt file, there is a package named "Microsoft.Drivers.UfxChipIdea" and one named "Microsoft.Drivers.UsbFnChipIdea". It seems they hold the driver for the Chipidea chip. I don't know if they support OTG but you should try.

I attached a small packages_usb.txt with updated packages files for the USB packages and new reg files for those packages (which were inside Microsoft.MainOS.Production.reg).

These drivers are also part of Windows 10 so maybe the one from Windows 10 IoT are backward compatible?

I am wondering if the OTG support is built inside these drivers, part of another driver or part of the OS?
Attached Files
File Type: txt packages_usb.txt - [Click for QR Code] (1.8 KB, 32 views)
File Type: zip reg_usb.zip - [Click for QR Code] (9.0 KB, 46 views)
21st May 2016, 03:46 PM |#11  
TristanLeBoss's Avatar
Senior Member
Thanks Meter: 158
 
Donate to Me
More
https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx

"The Microsoft USB Role Switch (URS) driver allows a system implementer to take advantage of the dual-role USB capability of their platform."

"These drivers are provided by Microsoft as in-box drivers. Chipidea High-Speed USB OTG Controller. Inbox INF: UrsChipidea.inf."

"URS0 is the ACPI definition for the USB dual-role controller. This is the ACPI device on which the URS driver will load.
USB0 and UFN0 are child devices inside the scope of URS0. USB0 and UFN0 represent the two child stacks that will be enumerated by the URS driver, and the host and function stacks respectively. Note that _ADR is the means by which ACPI matches these device definitions with the device objects that the URS driver creates."

"On a system that has a USB micro-AB connector, the driver makes use of hardware interrupts that indicates the state of the ID pin on the connector. This pin is used to detect whether the controller needs to assume the host role or the function role in a connection."

"Driver installation packages:
If you're an IHV or an OEM and you're thinking of providing your own driver package, here are some things to consider:

-> URS driver package
It is expected that the Hardware ID for the dual-role controller on each platform will be added to the inbox INF for URS. However, if for some reason the ID cannot be added, the IHV/OEM may provide a driver package with an INF that Needs/Includes the inbox INF and matches their Hardware ID.
This is necessary in the case where the IHV/OEM requires a filter driver to be present in the driver stack.

-> Host driver package.
An IHV/OEM-provided driver package that Needs/Includes the inbox usbxhci.inf and matches the host device Hardware ID is required. The Hardware ID match would be based on the scheme described in the preceding section.
This is necessary in the case where the IHV/OEM requires a filter driver to be present in the driver stack.
There is work in progress to make URS driver assign the XHCI Compatible ID for the host device.

-> Function driver package
An IHV/OEM-provided driver package that Needs/Includes the inbox Ufxsynopsys.inf and matches the peripheral device Hardware ID is required. The Hardware ID match would be based on the scheme described in the preceding section.
The IHV/OEM can also include a filter driver in the driver package."

This page is for WIndows 10 and it's not sure that Windows 8.1 supported dual-role drivers... because I found nothing on Google.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes