Compare commits
7 Commits
6f83282ff5
...
c8e3d84bf4
Author | SHA1 | Date |
---|---|---|
Daniel Barlow | c8e3d84bf4 | |
Daniel Barlow | dd8ec18881 | |
Daniel Barlow | 1730cf07b1 | |
Daniel Barlow | de51bfe13d | |
Daniel Barlow | b09723345c | |
Daniel Barlow | 1781d4b6e4 | |
Daniel Barlow | c219350d7c |
42
THOUGHTS.txt
42
THOUGHTS.txt
|
@ -3845,3 +3845,45 @@ store. Also probably it should mkdir $prefix/persist. Also it needs to
|
|||
create $prefix/boot: it's too late to do that with `activate`
|
||||
because u-boot will need it to exist in order to load the initramfs
|
||||
that runs activate
|
||||
|
||||
Thu Jan 11 23:36:47 GMT 2024
|
||||
|
||||
squashfs rootfsType doesn't rebuild when the kernel config is changed
|
||||
|
||||
Mon Jan 22 19:04:45 GMT 2024
|
||||
|
||||
setenv serverip 10.0.0.1
|
||||
setenv ipaddr 10.0.0.8
|
||||
compraddr=0x01000000
|
||||
tftpboot ${compraddr} recovery.img.lzma
|
||||
setexpr writeaddr ${filesize} + $compraddr
|
||||
lzmadec ${compraddr} $writeaddr
|
||||
usb start
|
||||
usb dev 0
|
||||
wdt dev watchdog@20300
|
||||
wdt stop
|
||||
usb write ${writeaddr} 0 ${filesize}
|
||||
|
||||
|
||||
Thu Jan 25 11:55:36 GMT 2024
|
||||
|
||||
openwrt:
|
||||
CONFIG_BROADCOM_PHY=m
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_IP17XX_PHY=m ?
|
||||
CONFIG_MARVELL_PHY=y
|
||||
CONFIG_MVSW61XX_PHY=y ?
|
||||
CONFIG_RTL8366RB_PHY=m ?
|
||||
CONFIG_RTL8366S_PHY=m ?
|
||||
CONFIG_RTL8367B_PHY=m ?
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_USB_PHY=y
|
||||
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_MARVELL_PHY=y
|
||||
CONFIG_PHY_MVEBU_A3700_COMPHY=y
|
||||
CONFIG_PHY_MVEBU_A38X_COMPHY=y
|
||||
CONFIG_SWPHY=y
|
||||
#
|
||||
|
|
|
@ -67,6 +67,7 @@ in {
|
|||
go-l2tp
|
||||
min-copy-closure
|
||||
fennelrepl
|
||||
lzma
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -132,6 +132,9 @@
|
|||
PHY_MVEBU_A38X_COMPHY = "y"; # for eth2
|
||||
MARVELL_PHY = "y";
|
||||
|
||||
USB_XHCI_MVEBU = "y";
|
||||
USB_XHCI_HCD = "y";
|
||||
|
||||
MVPP2 = "y";
|
||||
MV_XOR = "y";
|
||||
|
||||
|
|
|
@ -4,11 +4,16 @@ let
|
|||
svc = config.system.service;
|
||||
inherit (pkgs.pseudofile) dir symlink;
|
||||
inherit (pkgs.liminix.services) oneshot longrun bundle target;
|
||||
|
||||
some-util-linux = pkgs.runCommand "some-util-linux" {} ''
|
||||
mkdir -p $out/bin
|
||||
cd ${pkgs.util-linux-small}/bin
|
||||
cp fdisk sfdisk mkswap $out/bin
|
||||
'';
|
||||
in rec {
|
||||
imports = [
|
||||
../modules/network
|
||||
../modules/ssh
|
||||
../modules/usb.nix
|
||||
../modules/schnapps
|
||||
../modules/outputs/mtdimage.nix
|
||||
../modules/outputs/mbrimage.nix
|
||||
|
@ -26,6 +31,7 @@ in rec {
|
|||
boot.tftp = {
|
||||
ipaddr = "10.0.0.8"; # my address
|
||||
serverip = "10.0.0.1"; # build machine or other tftp server
|
||||
freeSpaceBytes = 1024 * 1024 * 4;
|
||||
};
|
||||
|
||||
hostname = "recovery";
|
||||
|
@ -63,7 +69,10 @@ in rec {
|
|||
};
|
||||
mnt = dir {};
|
||||
};
|
||||
rootfsType = "squashfs";
|
||||
rootfsType = "ext4";
|
||||
# sda is most likely correct for the boot-from-USB case. For tftp
|
||||
# it's overridden by the boot.scr anyway, so maybe it all works out
|
||||
hardware.rootDevice = "/dev/sda1";
|
||||
users.root = {
|
||||
# the password is "secret". Use mkpasswd -m sha512crypt to
|
||||
# create this hashed password string
|
||||
|
@ -75,7 +84,7 @@ in rec {
|
|||
btrfs-progs
|
||||
mtdutils # mtd, jffs2, ubifs
|
||||
dtc # you never know when you might need device tree stuff
|
||||
util-linux-small # fdisk
|
||||
some-util-linux
|
||||
libubootenv # fw_{set,print}env
|
||||
pciutils
|
||||
];
|
||||
|
|
|
@ -72,6 +72,7 @@ in {
|
|||
hex() { printf "0x%x" $1; }
|
||||
rootfsStart=${toString cfg.loadAddress}
|
||||
rootfsSize=$(binsize64k ${o.rootfs} )
|
||||
rootfsSize=$(($rootfsSize + ${toString cfg.freeSpaceBytes} ))
|
||||
dtbStart=$(($rootfsStart + $rootfsSize))
|
||||
dtbSize=$(binsize ${o.dtb} )
|
||||
imageStart=$(($dtbStart + $dtbSize))
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
# support for USB block devices and the common filesystems
|
||||
# they're likely to provide
|
||||
|
||||
{lib, config, ... }:
|
||||
{
|
||||
kernel = {
|
||||
config = {
|
||||
USB = "y";
|
||||
USB_EHCI_HCD = "y";
|
||||
USB_EHCI_HCD_PLATFORM = "y";
|
||||
USB_OHCI_HCD = "y";
|
||||
USB_OHCI_HCD_PLATFORM = "y";
|
||||
USB_SUPPORT = "y";
|
||||
USB_COMMON = "y";
|
||||
USB_STORAGE = "y";
|
||||
USB_STORAGE_DEBUG = "n";
|
||||
USB_UAS = "y";
|
||||
USB_ANNOUNCE_NEW_DEVICES = "y";
|
||||
SCSI = "y";
|
||||
BLK_DEV_SD = "y";
|
||||
USB_PRINTER = "y";
|
||||
MSDOS_PARTITION = "y";
|
||||
EFI_PARTITION = "y";
|
||||
EXT4_FS = "y";
|
||||
EXT4_USE_FOR_EXT2 = "y";
|
||||
FS_ENCRYPTION = "y";
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue