Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mobile-nixos/mobile-nixos
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7803d9ec0e35
Choose a base ref
...
head repository: mobile-nixos/mobile-nixos
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5abd83784854
Choose a head ref
  • 4 commits
  • 5 files changed
  • 1 contributor

Commits on Jan 10, 2020

  1. hard-{shutdown,reboot}: remove

    This will be replaced with a better utility.
    samueldr committed Jan 10, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    dtzWill Will Dietz
    Copy the full SHA
    5fa2110 View commit details
  2. hardshutdown: init at 0.0.1

    samueldr committed Jan 10, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    27fe769 View commit details
  3. Copy the full SHA
    104c09a View commit details

Commits on Jan 11, 2020

  1. Merge pull request #68 from samueldr-wip/feature/hardshutdown

    Fix shutdown/reboot in stage-1
    samueldr authored Jan 11, 2020
    Copy the full SHA
    5abd837 View commit details
Showing with 25 additions and 37 deletions.
  1. +2 −13 modules/initrd-base.nix
  2. +22 −0 overlay/hardshutdown/default.nix
  3. +0 −11 overlay/misc/hard-reboot.nix
  4. +0 −11 overlay/misc/hard-shutdown.nix
  5. +1 −2 overlay/overlay.nix
15 changes: 2 additions & 13 deletions modules/initrd-base.nix
Original file line number Diff line number Diff line change
@@ -6,20 +6,9 @@ let
cfg = config.mobile.boot.stage-1;
in
{
options.mobile.boot.stage-1.hard-reboot = {
enable = mkOption {
type = types.bool;
default = true;
description = ''
Adds hard-reboot/hard-shutdown script.
'';
};
};

config.mobile.boot.stage-1 = {
extraUtils = with pkgs; lib.mkIf cfg.hard-reboot.enable [
hard-reboot
hard-shutdown
extraUtils = with pkgs; [
hardshutdown
];
};
}
22 changes: 22 additions & 0 deletions overlay/hardshutdown/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ stdenv, fetchFromGitHub }:

stdenv.mkDerivation {
pname = "hardshutdown";
version = "0.0.1";

src = fetchFromGitHub {
owner = "mobile-nixos";
repo = "hardshutdown";
rev = "6beb4b77b273bbd045870ecd8de8630b5007451b";
sha256 = "0vxflpfx8dr5rzr9y6hm0zv7jxcc3sgisqvkyicwzg8mvl2vfshi";
};

makeFlags = [
"PREFIX=${placeholder "out"}"
];

meta = with stdenv.lib; {
description = "Single-call binary handling shutdown/reboot syscalls";
license = licenses.gpl2;
};
}
11 changes: 0 additions & 11 deletions overlay/misc/hard-reboot.nix

This file was deleted.

11 changes: 0 additions & 11 deletions overlay/misc/hard-shutdown.nix

This file was deleted.

3 changes: 1 addition & 2 deletions overlay/overlay.nix
Original file line number Diff line number Diff line change
@@ -19,8 +19,6 @@ in
adbd = callPackage ./adbd { };
android-headers = callPackage ./android-headers { };
dtbTool = callPackage ./dtbtool { };
hard-reboot = callPackage ./misc/hard-reboot.nix { };
hard-shutdown = callPackage ./misc/hard-shutdown.nix { };
libhybris = callPackage ./libhybris {
# FIXME : verify how it acts on native aarch64 build.
stdenv = if self.buildPlatform != self.targetPlatform then
@@ -59,6 +57,7 @@ in
#

make_ext4fs = callPackage ./make_ext4fs {};
hardshutdown = callPackage ./hardshutdown {};

#
# Hacks