Compare commits
2 Commits
c6c41e331e
...
b6ef6f391e
Author | SHA1 | Date |
---|---|---|
Daniel Barlow | b6ef6f391e | |
Daniel Barlow | 133b64613d |
7
NEWS
7
NEWS
|
@ -1,6 +1,13 @@
|
|||
A brief guide to backward-incompatible changes
|
||||
that are likely to break configurations or workflows
|
||||
|
||||
2023-07-13
|
||||
|
||||
* a significant re-arrangement of modules and services, which will
|
||||
probably break any configuration written before this time. For a
|
||||
detailed explanation, see
|
||||
https://www.liminix.org/doc/configuration.html#modules
|
||||
|
||||
2023-12-10
|
||||
|
||||
* configurations (usually) need no longer import modules from
|
||||
|
|
20
README.md
20
README.md
|
@ -18,22 +18,14 @@ outside word goes across it.
|
|||
|
||||
Liminix is pre-1.0. We are still finding new and better ways to do things,
|
||||
and there is no attempt to maintain backward compatibility with the old
|
||||
ways. This will change when it settles down.
|
||||
ways.
|
||||
|
||||
_In general:_ development mostly happens on the `main` branch, which is
|
||||
therefore not guaranteed to build or to work on every commit. For the
|
||||
latest functioning version, see [the CI system](https://build.liminix.org/jobset/liminix/build) and pick a revision with all jobs green.
|
||||
The [NEWS](NEWS) file (available wherever you found this README) is
|
||||
a high-level overview of breaking changes.
|
||||
|
||||
_In particular:_ as of July 2023, a significant re-arrangement of
|
||||
modules and services is ongoing:
|
||||
|
||||
* if you are using out-of-tree configurations created before commit
|
||||
2e50368, especially if they reference things under pkgs.liminix,
|
||||
they will need updating. Look at changes to examples/rotuer.nix
|
||||
for guidance
|
||||
|
||||
* the same is intermittently true for examples/{extensino,arhcive}.nix
|
||||
where I've updated rotuer and not updated them to match.
|
||||
Development mostly happens on the `main` branch, which is therefore
|
||||
not guaranteed to build or to work on every commit. For the latest
|
||||
functioning version, see [the CI system](https://build.liminix.org/jobset/liminix/build) and pick a revision with all jobs green.
|
||||
|
||||
|
||||
## Documentation
|
||||
|
|
|
@ -69,7 +69,7 @@ in
|
|||
out what's in the image, which is nice if it's unexpectedly huge
|
||||
'';
|
||||
};
|
||||
rootfsFiles = mkOption {
|
||||
rootdir = mkOption {
|
||||
type = types.package;
|
||||
internal = true;
|
||||
description = ''
|
||||
|
@ -108,7 +108,7 @@ in
|
|||
inherit kernel;
|
||||
inherit dtb;
|
||||
};
|
||||
rootfsFiles =
|
||||
rootdir =
|
||||
let
|
||||
inherit (pkgs.pkgsBuildBuild) runCommand;
|
||||
in runCommand "mktree" { } ''
|
||||
|
@ -120,6 +120,15 @@ in
|
|||
(cd $out && cp -a $path .$path)
|
||||
done
|
||||
'';
|
||||
bootablerootdir =
|
||||
let inherit (pkgs.pkgsBuildBuild) runCommand;
|
||||
in runCommand "add-slash-boot" { } ''
|
||||
cp -a ${o.rootdir} $out
|
||||
${if config.boot.loader.extlinux.enable
|
||||
then "(cd $out && chmod -R +w . && rmdir boot && cp -a ${o.extlinux} boot)"
|
||||
else ""
|
||||
}
|
||||
'';
|
||||
manifest = writeText "manifest.json" (builtins.toJSON config.filesystem.contents);
|
||||
};
|
||||
};
|
||||
|
|
|
@ -28,16 +28,12 @@ in
|
|||
in runCommand "mkfs.ext4" {
|
||||
depsBuildBuild = [ e2fsprogs ];
|
||||
} ''
|
||||
cp -a ${o.rootfsFiles} tmp
|
||||
${if config.boot.loader.extlinux.enable
|
||||
then "(cd tmp && chmod -R +w . && rmdir boot && cp -a ${o.extlinux} boot)"
|
||||
else ""
|
||||
}
|
||||
size=$(du -s --apparent-size --block-size 1024 tmp |cut -f1)
|
||||
tree=${o.bootablerootdir}
|
||||
size=$(du -s --apparent-size --block-size 1024 $tree |cut -f1)
|
||||
# add 25% for filesystem overhead
|
||||
size=$(( 5 * $size / 4))
|
||||
dd if=/dev/zero of=$out bs=1024 count=$size
|
||||
mke2fs -t ext4 -j -d tmp $out
|
||||
mke2fs -t ext4 -j -d $tree $out
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -34,12 +34,8 @@ in
|
|||
in runCommand "make-jffs2" {
|
||||
depsBuildBuild = [ mtdutils ];
|
||||
} ''
|
||||
cp -a ${o.rootfsFiles} tmp
|
||||
${if config.boot.loader.extlinux.enable
|
||||
then "(cd tmp && ln -s ${o.extlinux} boot)"
|
||||
else ""
|
||||
}
|
||||
(cd tmp && mkfs.jffs2 --compression-mode=size ${endian} -e ${toString config.hardware.flash.eraseBlockSize} --enable-compressor=lzo --pad --root . --output $out --squash --faketime )
|
||||
tree=${o.bootablerootdir}
|
||||
(cd $tree && mkfs.jffs2 --compression-mode=size ${endian} -e ${toString config.hardware.flash.eraseBlockSize} --enable-compressor=lzo --pad --root . --output $out --squash --faketime )
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -36,12 +36,8 @@ in
|
|||
depsBuildBuild = [ mtdutils ];
|
||||
} ''
|
||||
mkdir tmp
|
||||
cp -a ${o.rootfsFiles} tmp
|
||||
${if config.boot.loader.extlinux.enable
|
||||
then "(cd tmp && ln -s ${o.extlinux} boot)"
|
||||
else ""
|
||||
}
|
||||
mkfs.ubifs -x favor_lzo -c ${cfg.maxLEBcount} -m ${cfg.minIOSize} -e ${cfg.eraseBlockSize} -y -r tmp --output $out --squash-uids -o $out
|
||||
tree=${o.bootablerootdir}
|
||||
mkfs.ubifs -x favor_lzo -c ${cfg.maxLEBcount} -m ${cfg.minIOSize} -e ${cfg.eraseBlockSize} -y -r $tree --output $out --squash-uids -o $out
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue