forked from dan/liminix
Compare commits
3 Commits
d0f7109bea
...
83095f7a4b
Author | SHA1 | Date | |
---|---|---|---|
|
83095f7a4b | ||
|
10ba772a0b | ||
|
9cdbd3c409 |
@ -113,7 +113,7 @@ in {
|
|||||||
[ s6 s6-init-bin execline s6-linux-init s6-rc ];
|
[ s6 s6-init-bin execline s6-linux-init s6-rc ];
|
||||||
|
|
||||||
boot.commandLine = [
|
boot.commandLine = [
|
||||||
"panic=10 oops=panic init=/bin/init loglevel=8"
|
"panic=10 oops=panic init=/bin/init loglevel=8 debug"
|
||||||
"root=${config.hardware.rootDevice}"
|
"root=${config.hardware.rootDevice}"
|
||||||
"rootfstype=${config.rootfsType}"
|
"rootfstype=${config.rootfsType}"
|
||||||
"fw_devlink=off"
|
"fw_devlink=off"
|
||||||
|
@ -95,7 +95,7 @@ in {
|
|||||||
# decompression code will assume that any memory after the
|
# decompression code will assume that any memory after the
|
||||||
# end of the kernel is free
|
# end of the kernel is free
|
||||||
|
|
||||||
dtbStart=$(($rootfsStart + $rootfsSize))
|
imageStart=$(($rootfsStart + $rootfsSize))
|
||||||
${if cfg.compressRoot
|
${if cfg.compressRoot
|
||||||
then ''
|
then ''
|
||||||
lzma -z9cv ${o.rootfs} > rootfs.lz
|
lzma -z9cv ${o.rootfs} > rootfs.lz
|
||||||
@ -121,7 +121,8 @@ in {
|
|||||||
fdtput -p -t s dtb /reserved-memory/$node compatible phram
|
fdtput -p -t s dtb /reserved-memory/$node compatible phram
|
||||||
fdtput -p -t lx dtb /reserved-memory/$node reg $ac_prefix $(hex $rootfsStart) $sz_prefix $(hex $rootfsSize)
|
fdtput -p -t lx dtb /reserved-memory/$node reg $ac_prefix $(hex $rootfsStart) $sz_prefix $(hex $rootfsSize)
|
||||||
|
|
||||||
cmd="liminix ${cmdline} mtdparts=phram0:''${rootfsSize}(rootfs) phram.phram=phram0,''${rootfsStart},''${rootfsSize},${toString config.hardware.flash.eraseBlockSize} root=/dev/fit0";
|
cmd="liminix ${cmdline} mtdparts=phram0:''${rootfsSize}(rootfs) phram.phram=phram0,''${rootfsStart},''${rootfsSize},${toString config.hardware.flash.eraseBlockSize} root=/dev/mtdblock0";
|
||||||
|
#cmd="liminix ${cmdline}"
|
||||||
fdtput -t s dtb /chosen ${config.boot.commandLineDtbNode} "$cmd"
|
fdtput -t s dtb /chosen ${config.boot.commandLineDtbNode} "$cmd"
|
||||||
|
|
||||||
dtbSize=$(binsize ./dtb )
|
dtbSize=$(binsize ./dtb )
|
||||||
@ -144,22 +145,10 @@ cat << _VARS >> mkimage.its
|
|||||||
data = /incbin/("./dtb");
|
data = /incbin/("./dtb");
|
||||||
arch = "${arch}";
|
arch = "${arch}";
|
||||||
};
|
};
|
||||||
ramdisk-1 {
|
|
||||||
description = "${arch} Liminix rootfs";
|
|
||||||
data = /incbin/("./rootfs");
|
|
||||||
type = "ramdisk";
|
|
||||||
arch = "${arch}";
|
|
||||||
os = "linux";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
configurations {
|
|
||||||
config-1 {
|
|
||||||
ramdisk = "ramdisk-1";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
_VARS
|
_VARS
|
||||||
mkimage -f mkimage.its kernel.uimage
|
mkimage -f mkimage.its image
|
||||||
tftpcmd="tftpboot $(hex $imageStart) result/image "
|
tftpcmd="tftpboot $(hex $imageStart) result/image "
|
||||||
bootcmd="bootm $(hex $imageStart)"
|
bootcmd="bootm $(hex $imageStart)"
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@ let
|
|||||||
s6
|
s6
|
||||||
s6-init-bin
|
s6-init-bin
|
||||||
s6-linux-init
|
s6-linux-init
|
||||||
stdenvNoCC;
|
stdenvNoCC
|
||||||
|
writeShellScript;
|
||||||
inherit (lib.lists) unique concatMap;
|
inherit (lib.lists) unique concatMap;
|
||||||
inherit (pkgs.pseudofile) dir symlink;
|
inherit (pkgs.pseudofile) dir symlink;
|
||||||
inherit (pkgs.liminix.services) oneshot bundle longrun;
|
inherit (pkgs.liminix.services) oneshot bundle longrun;
|
||||||
@ -281,6 +282,9 @@ in {
|
|||||||
};
|
};
|
||||||
bin = dir {
|
bin = dir {
|
||||||
init = symlink "${s6-init-bin}/bin/init";
|
init = symlink "${s6-init-bin}/bin/init";
|
||||||
|
#init = symlink (writeShellScript "myinit.sh" ''
|
||||||
|
# echo 'tralala'
|
||||||
|
#'');
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -61,8 +61,9 @@ stdenv.mkDerivation rec {
|
|||||||
patches = [
|
patches = [
|
||||||
./cmdline-cookie.patch
|
./cmdline-cookie.patch
|
||||||
./mips-malta-fdt-from-bootloader.patch
|
./mips-malta-fdt-from-bootloader.patch
|
||||||
] ++ lib.optional (lib.versionOlder version "5.18.0")
|
./phram-always-memremap.patch
|
||||||
./phram-allow-cached-mappings.patch;
|
];# ++ lib.optional (lib.versionOlder version "5.18.0")
|
||||||
|
#./phram-allow-cached-mappings.patch
|
||||||
|
|
||||||
# this is here to work around what I think is a bug in nixpkgs
|
# this is here to work around what I think is a bug in nixpkgs
|
||||||
# packaging of ncurses: it installs pkg-config data files which
|
# packaging of ncurses: it installs pkg-config data files which
|
||||||
|
20
pkgs/kernel/phram-always-memremap.patch
Normal file
20
pkgs/kernel/phram-always-memremap.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- a/drivers/mtd/devices/phram.c 2024-12-20 23:42:19.248462526 +0100
|
||||||
|
+++ b/drivers/mtd/devices/phram.c 2024-12-20 23:41:11.344218259 +0100
|
||||||
|
@@ -85,7 +85,7 @@
|
||||||
|
{
|
||||||
|
void *addr = NULL;
|
||||||
|
|
||||||
|
- if (phram->cached)
|
||||||
|
+ if (phram->cached || true)
|
||||||
|
addr = memremap(start, len, MEMREMAP_WB);
|
||||||
|
else
|
||||||
|
addr = (void __force *)ioremap(start, len);
|
||||||
|
@@ -101,7 +101,7 @@
|
||||||
|
{
|
||||||
|
void *addr = phram->mtd.priv;
|
||||||
|
|
||||||
|
- if (phram->cached) {
|
||||||
|
+ if (phram->cached || true) {
|
||||||
|
memunmap(addr);
|
||||||
|
return;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user