Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google-marlin: fix partitions #104

Merged
merged 2 commits into from Mar 28, 2020
Merged

google-marlin: fix partitions #104

merged 2 commits into from Mar 28, 2020

Conversation

ashkitten
Copy link
Contributor

this phone uses a/b partitions and has a vendor partition, so we should load from them

based on google-walleye config

@danielfullmer
Copy link
Contributor

LGTM

@ashkitten
Copy link
Contributor Author

for some reason i'm having issues now getting it to boot to system with boot_as_recovery = true. i'm 100% sure it was passing skip_initramfs before, but now it's just booting to recovery every time...

@samueldr samueldr added the 4. type: enhancement New feature or request label Mar 26, 2020
@samueldr
Copy link
Member

samueldr commented Mar 26, 2020

@danielfullmer can you report, whenever convenient, on whether your marlin boots in recovery mode with and without that change?

I may have a similar issue with oneplus 3, it seems all boots are recovery mode there too. Looking at the full /proc/cmdline may help here. androidboot.mode I believe is set by the bootloader.

(Related, #107)

@danielfullmer
Copy link
Contributor

Before this PR:
No problems with booting into nixos system. Recovery mode doesn't seem to work--it just boots into the system.

After this PR:
While booting, it would display an error mounting the vendor partition. Simply adding "ro" to the list of mount options in modules/initrd-vendor.nix was sufficient to fix this.
After this, I have no problems booting again. Booting into recovery seems to work as well.

As an aside:
I was having trouble with the aarch64 community builder (NixOS/nix#3422), and so I couldn't build a system.img. I've reflashed an android build at some point, so I didn't have an existing ext4 partition on userdata with the label NIXOS_SYSTEM. In this case, it would hang at the mobile nixos boot image. It would be nice if it would display an error message like it seemed to do for the missing vendor partition. (I was eventually able to find an old system.img I had created long ago and use that)

@samueldr
Copy link
Member

samueldr commented Mar 27, 2020

Thanks for taking a look!

Recovery

"Before this PR", there was no way to get in recovery mode for your device, since it uses the main boot.img as recovery. This is why you couldn't get in recovery mode.

Weird how your vendor partition requires "ro". Though it makes sense to use "ro" there, considering we should treat the vendor partition as a static opaque blob.

I wonder what makes it so @ashkitten's device continuously boots in recovery mode.

Failure in stage-1

Yep, #78 is tracking this. Right now if a task's dependencies never resolves it continues waiting forever. With a timeout the error condition will be made obvious.

@samueldr samueldr merged commit 744ae56 into NixOS:master Mar 28, 2020
@samueldr
Copy link
Member

Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants