GloDroid / glodroid_manifest

Android port that aims to bring both user- and developer-friendly experience in using AOSP with a set of single-board computers (SBC), phones and other devices.
471 stars 67 forks source link

Pinephone emmc install #32

Closed dewitpj closed 3 years ago

dewitpj commented 4 years ago

Hi,

I noted that you "needed" someone to test the eMMC install on PinePhone. I have done this - at the moment Wifi doesn't seem stable but let me know if you want any more tests.

Thanks !

rsglobal commented 4 years ago

Hello,

Thank you for testing and confirmation that deploying to eMMC works. Could you rename this issue to Pinephone wifi issue or open another issue and add more details?

dewitpj commented 4 years ago

I'll leave this one open for the eMMC "thing" - I'll open another issue for the Wifi issue.

dewitpj commented 4 years ago

Also - for future ref, here is how I did it:

I installed JumpDrive on a SDCard and booted the PinePhone. Using DD I wrote deploy-gpt.img to the eMMC (was /dev/disk2 for me on a Mac) I then wrote bootloader-emmc.img to /dev/disk2s1 I then wrote env.img to /dev/disk2s2

I then rebooted the device and ran flash-emmc.sh from your "r3" release for the display test :)

This flashed/rebooted (a few times) the device and I was greeted with Andriod booting - nice !

rsglobal commented 4 years ago

Did you had a problem with classic procedure, using deploy-sd-for-emmc.img (described in README.md)?

dewitpj commented 4 years ago

I didn't see that to be honest - I can reflash the phone to stock and try it again ?

rsglobal commented 4 years ago

I didn't see that to be honest - I can reflash the phone to stock and try it again ?

You can surely do that.

bigc0127 commented 4 years ago

does not boot at all when using deploy-sd-for-emmc.img

the only way I have gotten it to boot is to flash r2 then flash r3 over it manually...

dewitpj commented 4 years ago

@bigc0127 - Did you try run the flash after a few seconds ?

On my Pinephone the deploy-sd-for-emmc.img showed a black screen but the console port showed it was alive - after a reboot - and a removal of the SD Card, fastbootd booted.

So, IMHO, does it work - yes - can it be improved, yes - in all fairness, I don't know if there was a display update on the r2 build.

dewitpj commented 4 years ago

Right - I think I replicated your find:

% ./flash-emmc.sh

Did you get this too ?

rsglobal commented 4 years ago

@bigc0127 @dewitpj Thank you for testing.

It should start into bootloader fastboot mode firstly (Blank screen, just OTG flash device should be recognized by host). There are 2 issues that prevents this from happening:

  1. In the pinephone u-boot configuration OTG is turned to HOST mode only. (This forces u-boot to fallback into fastbootd)
  2. Internal u-boot issue observed on OPI-WIN (Same A64 SOC) , that does not allow to enumerate device by HOST:
    
    [128090.900528] usb 1-1: Device not responding to setup address.
    [128091.108597] usb 1-1: Device not responding to setup address.
    [128091.316246] usb 1-1: device not accepting address 39, error -71
    [128091.316373] usb usb1-port1: unable to enumerate USB device
    [128126.256487] usb 1-1: new high-speed USB device number 40 using xhci_hcd
    [128126.388514] usb 1-1: device descriptor read/64, error -71
    [128126.624309] usb 1-1: device descriptor read/64, error -71
    [128126.860281] usb 1-1: new high-speed USB device number 41 using xhci_hcd
    [128126.988605] usb 1-1: device descriptor read/64, error -71
    [128127.224289] usb 1-1: device descriptor read/64, error -71
dewitpj commented 4 years ago

Hey @rsglobal - I think I got that but it died trying to write super ?

(See the above output ?)

rsglobal commented 4 years ago

Does this happen every time?

dewitpj commented 4 years ago

Yip - done it twice now - would it be different with the r2 image ?

rsglobal commented 4 years ago

No, there is no sens to try with r2, Use v0.3.0 from releases. r2, r3 was just temporary revisions to test UI issies.

nas00 commented 4 years ago

As I mentioned on the pine64 forum, the deploy method worked fine for both sd and emmc on my braveheart unit.

rsglobal commented 4 years ago

I've found that hsic PLL has not initialized by u-boot on A64. That means USB should not work on any device. So, it's very weird that it works for some.

@nas00 , I was wondering, if you have a developer (uart) cable? If so, can you launch minicom, and stop u-boot by pressing any key, then enter console command:

md 0x01c20000 80
nas00 commented 4 years ago

I'm afraid not but I need a new back cover anyway so I'll order serial cable at same time.

nas00 commented 4 years ago

@nas00 , I was wondering, if you have a developer (uart) cable? If so, can you launch minicom, and stop u-boot by pressing any key, then enter console command:

md 0x01c20000 80

The cable turned up. Disabled hardware flow control as per this post to get it working. Here are the results:

U-Boot 2020.07-rc4-gdc857ca23c8b-dirty (Jul 23 2020 - 19:34:16 +0300) Allwinnery

CPU:   Allwinner A64 (SUN50I)                                                   
Model: SoPine with baseboard                                                    
DRAM:  2 GiB                                                                    
MMC:   mmc@1c0f000: 0, mmc@1c11000: 1                                           
Loading Environment from FAT... Unable to use mmc 1:1... In:    serial          
Out:   serial                                                                   
Err:   serial                                                                   
Allwinner Sun4I USB PHY driver loaded                                           
sun4i_usb_phy_xlate: phy_id = 0                                                 
Allwinner mUSB OTG (Peripheral)                                                 
Net:   phy interface7                                                           
eth0: ethernet@1c30000                                                          
Warning: usb_ether using MAC address from ROM                                   
, eth1: usb_ether                                                               
Hit any key to stop autoboot:  0                                                
=> md 0x01c20000 80                                                             
01c20000: 90001031 00000000 00035514 00000000    1........U......               
01c20010: 03006207 00000000 03006207 00000000    .b.......b......               
01c20020: 00001000 00000000 90041811 00041811    ................               
01c20030: 03006207 00000000 03006207 00000000    .b.......b......               
01c20040: 00000515 03001300 03006207 90002d00    .........b...-..               
01c20050: 00020102 00003180 01000000 00000001    .....1..........               
01c20060: 00824500 00000001 00000020 00010000    .E...... .......               
01c20070: 00000000 00000000 00000000 00000000    ................               
01c20080: 00000001 00000000 80000000 00000000    ................               
01c20090: 8100000b 00000000 00000000 00000000    ................               
01c200a0: 00000000 00000000 00000000 00000000    ................               
01c200b0: 00000000 00000000 00000000 00000000    ................               
01c200c0: 00000000 00000000 00000000 00000101    ................               
01c200d0: 00000000 00000000 00000000 00000000    ................               
01c200e0: 00000000 00000000 00000000 00000000    ................               
01c200f0: 00000000 80100000 ccca0000 80000000    ................               
01c20100: 00000000 00000000 00000000 00000000    ................               
01c20110: 00000000 00000000 00000000 00000000    ................               
01c20120: 00000000 00000000 00000000 00000000    ................               
01c20130: 00000000 00000000 00000000 00000000    ................               
01c20140: 00000000 00000000 00000000 00000000    ................               
01c20150: 00000000 00000000 00000000 81000002    ................               
01c20160: 00000000 00000000 00000000 00000000    ................               
01c20170: 00000000 00000000 00000000 00000000    ................               
01c20180: 00000000 00000000 00000000 00000000    ................               
01c20190: 00000000 00000000 00000000 00000000    ................               
01c201a0: 00000000 00000000 00000000 00000000    ................               
01c201b0: 80000000 00000000 00000000 00000000    ................               
01c201c0: 00000000 00000000 00000000 00000000    ................               
01c201d0: 00000000 00000000 00000000 00000000    ................               
01c201e0: 00000000 00000000 00000000 00000000    ................               
01c201f0: 00000000 00000000 00000000 00000000    ................               
=> 
a64-scripts commented 4 years ago

@dewitpj The latest build works with emmc install. please close this issue if it works for you

Shatur commented 3 years ago

Tested the latest build (v0.5.1), works fine.

rsglobal commented 3 years ago

Can't reproduce. Please check on v0.6.0 and feel free to reopen in case issue is still valid.