Compare commits
No commits in common. "f8a275d1a31f7fd9cb716c70d44f24f203a313ee" and "bc20f4c6b748960699c9015cbbd6275c8ccdde5e" have entirely different histories.
f8a275d1a3
...
bc20f4c6b7
36
THOUGHTS.txt
36
THOUGHTS.txt
@ -6634,39 +6634,3 @@ Read 7491584 bytes from volume recovery to 0000000048000000
|
|||||||
Using 'config-1' configuration
|
Using 'config-1' configuration
|
||||||
Trying 'kernel-1' kernel subimage
|
Trying 'kernel-1' kernel subimage
|
||||||
Description: ARM64 OpenWrt Linux-6.6.45
|
Description: ARM64 OpenWrt Linux-6.6.45
|
||||||
|
|
||||||
Sun Dec 22 17:39:56 GMT 2024
|
|
||||||
|
|
||||||
From the output above it looks like the device I have plugged in has
|
|
||||||
an openwrt "recovery" image but not a "production" image
|
|
||||||
|
|
||||||
It also looks like it will be quite hard work to persuade it to boot
|
|
||||||
from usb or anything. It doesn't have any of the extlinux stuff
|
|
||||||
but it does have uefi for what that's worth
|
|
||||||
|
|
||||||
default boot_production command reads a ubi volume called 'fit' and
|
|
||||||
calls bootm on what it finds
|
|
||||||
|
|
||||||
we could define boot_production to ubifsmount liminix; ubifs load
|
|
||||||
<addr> <filename> (which is a fit) and bootm it. *presumably* we could
|
|
||||||
do this from the openwrt recovery image
|
|
||||||
|
|
||||||
but could we install the whole system using said recovery image? I
|
|
||||||
expect we could do, it only requires getting a tarball onto it and
|
|
||||||
unpacking it
|
|
||||||
|
|
||||||
however, extlinux is not going to be helpful
|
|
||||||
(actually it might be a bit, if we ask it to write the fit as
|
|
||||||
well as/instead of the individual files)
|
|
||||||
|
|
||||||
maybe we need separate concepts of "the filesystem contains
|
|
||||||
stuff we need for boot" and "the stuff we need is the stuff
|
|
||||||
that extlinux needs"
|
|
||||||
|
|
||||||
each bootloader makes an output called bootfiles, and
|
|
||||||
the bootablerootdir output copies from bootfiles
|
|
||||||
|
|
||||||
Mon Dec 23 18:28:50 GMT 2024
|
|
||||||
|
|
||||||
it might be worth moving ubi option decls into the hardware module, if
|
|
||||||
they're hardware-dependent
|
|
||||||
|
@ -79,6 +79,11 @@
|
|||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
kernel = {
|
kernel = {
|
||||||
|
src = pkgs.pkgsBuildBuild.fetchurl {
|
||||||
|
name = "linux.tar.gz";
|
||||||
|
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
||||||
|
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
||||||
|
};
|
||||||
extraPatchPhase = ''
|
extraPatchPhase = ''
|
||||||
${pkgs.openwrt.applyPatches.mediatek}
|
${pkgs.openwrt.applyPatches.mediatek}
|
||||||
'';
|
'';
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
kernel = {
|
kernel = {
|
||||||
|
src = pkgs.pkgsBuildBuild.fetchurl {
|
||||||
|
name = "linux.tar.gz";
|
||||||
|
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
||||||
|
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
||||||
|
};
|
||||||
config = {
|
config = {
|
||||||
MTD = "y";
|
MTD = "y";
|
||||||
MTD_BLOCK = "y";
|
MTD_BLOCK = "y";
|
||||||
|
@ -161,6 +161,12 @@
|
|||||||
appendDTB = true;
|
appendDTB = true;
|
||||||
};
|
};
|
||||||
kernel = {
|
kernel = {
|
||||||
|
src = pkgs.pkgsBuildBuild.fetchurl {
|
||||||
|
name = "linux.tar.gz";
|
||||||
|
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
||||||
|
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
||||||
|
};
|
||||||
|
|
||||||
# Mainline linux 5.19 doesn't have device-tree support for
|
# Mainline linux 5.19 doesn't have device-tree support for
|
||||||
# this device or even for the SoC, so we use the extensive
|
# this device or even for the SoC, so we use the extensive
|
||||||
# OpenWrt kernel patches
|
# OpenWrt kernel patches
|
||||||
|
@ -114,6 +114,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
kernel = {
|
kernel = {
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
name = "linux.tar.gz";
|
||||||
|
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
||||||
|
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
||||||
|
};
|
||||||
extraPatchPhase = ''
|
extraPatchPhase = ''
|
||||||
${openwrt.applyPatches.ramips}
|
${openwrt.applyPatches.ramips}
|
||||||
${openwrt.applyPatches.rt2x00}
|
${openwrt.applyPatches.rt2x00}
|
||||||
|
@ -125,6 +125,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
kernel = {
|
kernel = {
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
name = "linux.tar.gz";
|
||||||
|
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
||||||
|
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
||||||
|
};
|
||||||
extraPatchPhase = ''
|
extraPatchPhase = ''
|
||||||
${openwrt.applyPatches.ramips}
|
${openwrt.applyPatches.ramips}
|
||||||
'';
|
'';
|
||||||
|
@ -50,6 +50,11 @@
|
|||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
kernel = {
|
kernel = {
|
||||||
|
src = pkgs.pkgsBuildBuild.fetchurl {
|
||||||
|
name = "linux.tar.gz";
|
||||||
|
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
||||||
|
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
||||||
|
};
|
||||||
extraPatchPhase = ''
|
extraPatchPhase = ''
|
||||||
${pkgs.openwrt.applyPatches.ramips}
|
${pkgs.openwrt.applyPatches.ramips}
|
||||||
'';
|
'';
|
||||||
|
@ -250,8 +250,14 @@
|
|||||||
# IMAGE/ramboot-factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi
|
# IMAGE/ramboot-factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi
|
||||||
|
|
||||||
kernel = {
|
kernel = {
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
name = "linux.tar.gz";
|
||||||
|
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
||||||
|
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
||||||
|
};
|
||||||
extraPatchPhase = ''
|
extraPatchPhase = ''
|
||||||
${openwrt.applyPatches.ramips}
|
${openwrt.applyPatches.ramips}
|
||||||
|
|
||||||
'';
|
'';
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
{ lib, pkgs, config, ...}:
|
{ lib, pkgs, config, ...}:
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption types ;
|
inherit (lib) mkOption types ;
|
||||||
inherit (pkgs) liminix openwrt;
|
inherit (pkgs) liminix;
|
||||||
|
|
||||||
mergeConditionals = conf : conditions :
|
mergeConditionals = conf : conditions :
|
||||||
# for each key in conditions, if it is present in conf
|
# for each key in conditions, if it is present in conf
|
||||||
@ -21,8 +21,8 @@ let
|
|||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
kernel = {
|
kernel = {
|
||||||
src = mkOption { type = types.path; default = openwrt.kernelSrc; } ;
|
src = mkOption { type = types.path; } ;
|
||||||
version = mkOption { type = types.str; default = openwrt.kernelVersion;} ;
|
version = mkOption { type = types.str; default = "5.15.137";} ;
|
||||||
modular = mkOption {
|
modular = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
@ -29,17 +29,6 @@ let
|
|||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
# The kernel sources typically used with this version of openwrt
|
|
||||||
# You can find this in `include/kernel-5.15` or similar in the
|
|
||||||
# openwrt sources
|
|
||||||
kernelSrc = pkgsBuildBuild.fetchurl {
|
|
||||||
name = "linux.tar.gz";
|
|
||||||
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
|
||||||
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
|
||||||
};
|
|
||||||
kernelVersion = "5.15.137";
|
|
||||||
|
|
||||||
applyPatches.ath79 = doPatch "ath79";
|
applyPatches.ath79 = doPatch "ath79";
|
||||||
applyPatches.ramips = doPatch "ramips";
|
applyPatches.ramips = doPatch "ramips";
|
||||||
applyPatches.mediatek = doPatch "mediatek"; # aarch64
|
applyPatches.mediatek = doPatch "mediatek"; # aarch64
|
||||||
|
Loading…
Reference in New Issue
Block a user