forked from DGNum/liminix
fix(tftpboot): revert squashfs use and go back to JFFS2
squashfs doesn't copy all the files we need. Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
parent
3ed1564235
commit
b468275f53
1 changed files with 16 additions and 7 deletions
|
@ -12,10 +12,15 @@ let
|
||||||
arch = pkgs.stdenv.hostPlatform.linuxArch;
|
arch = pkgs.stdenv.hostPlatform.linuxArch;
|
||||||
|
|
||||||
# UBI cannot run on the top of phram.
|
# UBI cannot run on the top of phram.
|
||||||
needsSquashfs = config.rootfsType == "ubifs";
|
needsJffs2 = config.rootfsType == "ubifs";
|
||||||
rootfstype = if needsSquashfs then "squashfs" else config.rootfsType;
|
# squashfs doesn't work out for us because only `bootablerootdir`
|
||||||
rootfs = if needsSquashfs then
|
# contain what we need to boot, not `config.filesystem.contents` alas.
|
||||||
liminix.builders.squashfs config.filesystem.contents
|
rootfstype = if needsJffs2 then "jffs2" else config.rootfsType;
|
||||||
|
rootfs = if needsJffs2 then
|
||||||
|
liminix.builders.jffs2 {
|
||||||
|
bootableRootDirectory = config.system.outputs.bootablerootdir;
|
||||||
|
inherit (config.hardware.flash) eraseBlockSize;
|
||||||
|
}
|
||||||
else config.system.outputs.rootfs;
|
else config.system.outputs.rootfs;
|
||||||
in {
|
in {
|
||||||
imports = [ ../ramdisk.nix ];
|
imports = [ ../ramdisk.nix ];
|
||||||
|
@ -82,9 +87,13 @@ in {
|
||||||
config = {
|
config = {
|
||||||
boot.ramdisk.enable = true;
|
boot.ramdisk.enable = true;
|
||||||
|
|
||||||
kernel.config = mkIf needsSquashfs {
|
kernel.config = mkIf needsJffs2 {
|
||||||
SQUASHFS = "y";
|
JFFS2_FS = "y";
|
||||||
SQUASHFS_XZ = "y";
|
JFFS2_LZO = "y";
|
||||||
|
JFFS2_RTIME = "y";
|
||||||
|
JFFS2_COMPRESSION_OPTIONS = "y";
|
||||||
|
JFFS2_ZLIB = "y";
|
||||||
|
JFFS2_CMODE_SIZE = "y";
|
||||||
};
|
};
|
||||||
|
|
||||||
system.outputs = rec {
|
system.outputs = rec {
|
||||||
|
|
Loading…
Reference in a new issue