forked from dan/liminix
tftpboot: explicitly mark phram as mappable
This commit is contained in:
parent
f4369c3afb
commit
69429404ab
@ -121,6 +121,7 @@ in {
|
||||
node=$(printf "phram-rootfs@%x" $rootfsStart)
|
||||
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 i dtb /reserved-memory/$node no-map 0
|
||||
|
||||
cmd="liminix ${cmdline} mtdparts=phram0:''${rootfsSize}(rootfs) phram.phram=phram0,''${rootfsStart},''${rootfsSize},${toString config.hardware.flash.eraseBlockSize} root=/dev/mtdblock0";
|
||||
fdtput -t s dtb /chosen ${config.boot.commandLineDtbNode} "$cmd"
|
||||
|
@ -61,9 +61,8 @@ stdenv.mkDerivation rec {
|
||||
patches = [
|
||||
./cmdline-cookie.patch
|
||||
./mips-malta-fdt-from-bootloader.patch
|
||||
./phram-always-memremap.patch
|
||||
];# ++ lib.optional (lib.versionOlder version "5.18.0")
|
||||
#./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
|
||||
# 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