using lk2nd/extlinux so nixos can manage /boot
and there is no need to update it by dd#'ing the partition image
This commit is contained in:
parent
e2ee645ad0
commit
b3e505a1e9
19
Makefile
19
Makefile
@ -1,12 +1,12 @@
|
|||||||
DEVICE=root@biscuit.lan
|
DEVICE=root@biscuit.lan
|
||||||
# NFLAGS=-I nixpkgs=../nixpkgs
|
# NFLAGS=-I nixpkgs=../nixpkgs
|
||||||
|
|
||||||
.PHONY: toplevel android-bootimg default update android-recovery
|
.PHONY: toplevel android-bootimg default update android-recovery android-extlinux-boot
|
||||||
|
|
||||||
default toplevel:
|
default toplevel:
|
||||||
nix-build $(NFLAGS) -A outputs.$@ -o $@
|
nix-build $(NFLAGS) -A outputs.$@ -o $@
|
||||||
|
|
||||||
android-bootimg android-recovery:
|
android-bootimg android-recovery android-extlinux-boot:
|
||||||
nix-build $(NFLAGS) -A outputs.android.$@ -o $@
|
nix-build $(NFLAGS) -A outputs.android.$@ -o $@
|
||||||
|
|
||||||
lk2nd:
|
lk2nd:
|
||||||
@ -16,18 +16,3 @@ lk2nd:
|
|||||||
update: toplevel
|
update: toplevel
|
||||||
nix-copy-closure --to $(DEVICE) -v --include-outputs ./toplevel
|
nix-copy-closure --to $(DEVICE) -v --include-outputs ./toplevel
|
||||||
ssh $(DEVICE) "nix-env --profile /nix/var/nix/profiles/system --set `readlink toplevel` && /nix/var/nix/profiles/system/bin/switch-to-configuration switch"
|
ssh $(DEVICE) "nix-env --profile /nix/var/nix/profiles/system --set `readlink toplevel` && /nix/var/nix/profiles/system/bin/switch-to-configuration switch"
|
||||||
|
|
||||||
update-boot: update android-bootimg
|
|
||||||
cat android-bootimg | ssh $(DEVICE) "cat >/boot/boot.img"
|
|
||||||
|
|
||||||
boot-in-system.img: android-bootimg
|
|
||||||
dd if=/dev/zero of=$@ bs=1M count=50
|
|
||||||
mkdir -p boot-in-system
|
|
||||||
-rm -f boot-in-system/boot.img
|
|
||||||
(cd boot-in-system && cp ../android-bootimg ./boot.img)
|
|
||||||
mke2fs -d boot-in-system boot-in-system.img
|
|
||||||
|
|
||||||
|
|
||||||
flash: default boot-in-system.img
|
|
||||||
fastboot flash system boot-in-system.img
|
|
||||||
fastboot flash userdata default/system.img
|
|
||||||
|
Loading…
Reference in New Issue
Block a user