1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-16 11:43:21 +03:00

system-types/android: Review default output name

`android-device` was a poor name choice. Especially now that we have
flashable zips, which are equally as usable as fastboot-flashable
outputs.
This commit is contained in:
Samuel Dionne-Riel 2021-02-28 14:54:40 -05:00
parent d17e09c075
commit 3941294673
3 changed files with 15 additions and 6 deletions

View File

@ -30,8 +30,7 @@ let
# either of fastboot or the outputs.
# This is because this output should have no refs. A simple tarball of this
# output should be usable even on systems without Nix.
# TODO: Embed device-specific fastboot instructions as `echo` in the script.
android-device = pkgs.runCommandNoCC "android-device-${device.name}" {} ''
android-fastboot-images = pkgs.runCommandNoCC "android-fastboot-images-${device.name}" {} ''
mkdir -p $out
cp -v ${rootfs}/${rootfs.filename} $out/system.img
cp -v ${android-bootimg} $out/boot.img
@ -69,6 +68,11 @@ let
chmod +x $out/flash-critical.sh
'';
# The output name `android-device` does not describe well what it is.
# This is kept for some backwards compatibility (6 months)
# Change to a throw by or after September 2021.
android-device = builtins.trace "The output `android-device` has been renamed to: `android-systems-image`." android-fastboot-images;
mkBootimgOption = name: lib.mkOption {
type = types.str;
internal = true;
@ -158,8 +162,13 @@ in
(lib.mkIf enabled {
system.build = {
default = android-device;
inherit android-bootimg android-recovery android-device;
default = android-fastboot-images;
inherit
android-device
android-bootimg
android-recovery
android-fastboot-images
;
};
mobile.HAL.boot.rebootModes = [

View File

@ -19,7 +19,7 @@ Make backups.
This will produce a folder with a flashing script, and the partition images for
your _<%= info["fullName"] %>_.
$ nix-build --argstr device <%= info["identifier"] %> -A build.android-device
$ nix-build --argstr device <%= info["identifier"] %> -A build.android-fastboot-images
Alternatively, you can build a specific partition image:

View File

@ -19,7 +19,7 @@ Make backups.
This will produce a folder with a flashing script, and the partition images for
your _<%= info["fullName"] %>_.
$ nix-build --argstr device <%= info["identifier"] %> -A build.android-device
$ nix-build --argstr device <%= info["identifier"] %> -A build.android-fastboot-images
Alternatively, you can build a specific partition image: