forked from dan/liminix
Compare commits
No commits in common. "83095f7a4bdf5791cd067f15078afdc5c8a562b2" and "d0f7109bea4972ded4c0ed7aba854c66dbc81085" have entirely different histories.
83095f7a4b
...
d0f7109bea
@ -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 debug"
|
"panic=10 oops=panic init=/bin/init loglevel=8"
|
||||||
"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
|
||||||
|
|
||||||
imageStart=$(($rootfsStart + $rootfsSize))
|
dtbStart=$(($rootfsStart + $rootfsSize))
|
||||||
${if cfg.compressRoot
|
${if cfg.compressRoot
|
||||||
then ''
|
then ''
|
||||||
lzma -z9cv ${o.rootfs} > rootfs.lz
|
lzma -z9cv ${o.rootfs} > rootfs.lz
|
||||||
@ -121,8 +121,7 @@ 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/mtdblock0";
|
cmd="liminix ${cmdline} mtdparts=phram0:''${rootfsSize}(rootfs) phram.phram=phram0,''${rootfsStart},''${rootfsSize},${toString config.hardware.flash.eraseBlockSize} root=/dev/fit0";
|
||||||
#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 )
|
||||||
@ -145,10 +144,22 @@ 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 image
|
mkimage -f mkimage.its kernel.uimage
|
||||||
tftpcmd="tftpboot $(hex $imageStart) result/image "
|
tftpcmd="tftpboot $(hex $imageStart) result/image "
|
||||||
bootcmd="bootm $(hex $imageStart)"
|
bootcmd="bootm $(hex $imageStart)"
|
||||||
|
|
||||||
|
@ -5,8 +5,7 @@ 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;
|
||||||
@ -282,9 +281,6 @@ 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,9 +61,8 @@ stdenv.mkDerivation rec {
|
|||||||
patches = [
|
patches = [
|
||||||
./cmdline-cookie.patch
|
./cmdline-cookie.patch
|
||||||
./mips-malta-fdt-from-bootloader.patch
|
./mips-malta-fdt-from-bootloader.patch
|
||||||
./phram-always-memremap.patch
|
] ++ lib.optional (lib.versionOlder version "5.18.0")
|
||||||
];# ++ lib.optional (lib.versionOlder version "5.18.0")
|
./phram-allow-cached-mappings.patch;
|
||||||
#./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
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
--- 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