Compare commits
No commits in common. "812e35b7b9e732f5d6b507063896631bc5ad29bf" and "420552ce98600e6b3307c93ab82b1d8c2ca60ad4" have entirely different histories.
812e35b7b9
...
420552ce98
@ -225,6 +225,11 @@
|
|||||||
# WARNING: unmet direct dependencies detected for ARCH_WANT_LIBATA_LEDS
|
# WARNING: unmet direct dependencies detected for ARCH_WANT_LIBATA_LEDS
|
||||||
ATA = "y";
|
ATA = "y";
|
||||||
|
|
||||||
|
PSTORE = "y";
|
||||||
|
PSTORE_RAM = "y";
|
||||||
|
PSTORE_CONSOLE = "y";
|
||||||
|
# PSTORE_DEFLATE_COMPRESS = "n";
|
||||||
|
|
||||||
BLOCK = "y";
|
BLOCK = "y";
|
||||||
MMC="y";
|
MMC="y";
|
||||||
PWRSEQ_EMMC="y"; # ???
|
PWRSEQ_EMMC="y"; # ???
|
||||||
|
@ -138,15 +138,9 @@ Logs written to :file:`/run/log/` will not survive a reboot or crash,
|
|||||||
as it is an ephemeral filesystem.
|
as it is an ephemeral filesystem.
|
||||||
|
|
||||||
On supported hardware you can enable logging to `pstore
|
On supported hardware you can enable logging to `pstore
|
||||||
<https://www.kernel.org/doc/Documentation/ABI/testing/pstore>`_ which
|
<https://www.kernel.org/doc/Documentation/ABI/testing/pstore>` which
|
||||||
means the most recent log messages will be preserved on reboot. Set
|
means the most recent log messages will be preserved on reboot.
|
||||||
the config option ``logging.persistent.enable = true`` to log messages
|
Set the config option ``logging.persistent.enable = true``, log messages will be written to :file:/dev/pmsg0. After rebooting,
|
||||||
to :file:`/dev/pmsg0` as well as to the regular log. This is a
|
|
||||||
circular buffer, so when it fills up newer messages will overwrite the
|
|
||||||
oldest messages.
|
|
||||||
|
|
||||||
To check the previous messages after a (planned or forced) reboot,
|
|
||||||
you need to mooun the pstore filesystem.
|
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
|
@ -56,31 +56,31 @@ let
|
|||||||
else "";
|
else "";
|
||||||
in "unlink(${qpathname}); ${cmd} ${chown}";
|
in "unlink(${qpathname}); ${cmd} ${chown}";
|
||||||
in mapAttrsToList (makeFile prefix) attrset;
|
in mapAttrsToList (makeFile prefix) attrset;
|
||||||
|
activateScript = attrset: writeText "makedevs.c" ''
|
||||||
|
#include "defs.h"
|
||||||
|
int main(int argc, char* argv[]) {
|
||||||
|
chdir(argv[1]);
|
||||||
|
${(builtins.concatStringsSep "\n" (visit "." attrset))}
|
||||||
|
}
|
||||||
|
'';
|
||||||
in attrset:
|
in attrset:
|
||||||
let
|
let makedevs = activateScript attrset;
|
||||||
activateScript = writeText "activate.c" ''
|
|
||||||
#include "defs.h"
|
|
||||||
int main(int argc, char* argv[]) {
|
|
||||||
chdir(argv[1]);
|
|
||||||
${(builtins.concatStringsSep "\n" (visit "." attrset))}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
name="system-configuration";
|
name="make-stuff";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
CFLAGS = "-Os";
|
CFLAGS = "-Os";
|
||||||
LDFLAGS = "-static -Xlinker -static";
|
LDFLAGS = "-static -Xlinker -static";
|
||||||
|
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
cp ${activateScript} activate.c
|
cp ${makedevs} makedevs.c
|
||||||
'';
|
'';
|
||||||
makeFlags = ["activate"];
|
makeFlags = ["makedevs"];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
closure=${closureInfo { rootPaths = [ activateScript ]; }}
|
closure=${closureInfo { rootPaths = [ makedevs ]; }}
|
||||||
mkdir -p $out/bin $out/etc
|
mkdir -p $out/bin $out/etc
|
||||||
cp $closure/store-paths $out/etc/nix-store-paths
|
cp $closure/store-paths $out/etc/nix-store-paths
|
||||||
$STRIP --remove-section=.note --remove-section=.comment --strip-all activate -o $out/bin/activate
|
$STRIP --remove-section=.note --remove-section=.comment --strip-all makedevs -o $out/bin/activate
|
||||||
ln -s ${s6-init-bin}/bin/init $out/bin/init
|
ln -s ${s6-init-bin}/bin/init $out/bin/init
|
||||||
cp -p ${writeFennel "restart-services" {} ./restart-services.fnl} $out/bin/restart-services
|
cp -p ${writeFennel "restart-services" {} ./restart-services.fnl} $out/bin/restart-services
|
||||||
# obfuscate the store path of min-copy-closure so that the output
|
# obfuscate the store path of min-copy-closure so that the output
|
||||||
|
Loading…
Reference in New Issue
Block a user