Remove old files

This commit is contained in:
Rodrigo Arias 2024-01-24 13:09:30 +01:00
parent 9653377ba5
commit 630b8ac90f
18 changed files with 0 additions and 999 deletions

View File

@ -1,56 +0,0 @@
{ config, pkgs, lib, ... }:
{
# Remove ZFS
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" "ext4" "vfat" ];
# RISC-V Quirks and patches, should be upstreamed
nixpkgs.overlays = [
(final: prev: {
hpcg = prev.callPackage ./examples/hpcg.nix { };
vte = (prev.vte.override {
stdenv = prev.stdenv;
}).overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ prev.gobject-introspection prev.glib ];
depsBuildHost = [ prev.pkg-config ];
#nativeBuildInputs = old.nativeBuildInputs ++ [ prev.glib ];
propagatedBuildInputs = [ prev.gtk3 pkgs.pango ];
#NIX_DEBUG = 5;
});
gusb = prev.gusb.overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ prev.gobject-introspection ];
});
colord = prev.colord.overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ prev.gobject-introspection ];
});
cage = prev.cage.overrideAttrs (old: {
depsBuildBuild = [ prev.pkg-config ];
});
# ebook_tools = prev.ebook_tools.overrideAttrs (_old: {
# preConfigure = ''
# NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $($PKG_CONFIG --cflags libzip)"
# '';
# });
discount = prev.discount.overrideAttrs (_old: {
configurePlatforms = [];
});
sane-backends = prev.sane-backends.overrideAttrs (_old: {
CFLAGS = "-DHAVE_MMAP=0";
});
curl = prev.curl.overrideAttrs (_old: {
CFLAGS = "-w";
LDFLAGS = "-latomic";
});
x265 = prev.x265.override { multibitdepthSupport = false; };
})
];
users = {
users.default = {
password = "visionfive-nix";
isNormalUser = true;
extraGroups = [
"wheel"
];
};
};
}

View File

@ -1,32 +0,0 @@
{ lib, stdenv, fetchFromGitHub, cmake } :
stdenv.mkDerivation rec {
pname = "hpcg";
version = "114602d";
src = fetchFromGitHub {
owner = "hpcg-benchmark";
repo = pname;
rev = "114602d458d1034faa52b71e4c15aba9b3a17698";
hash = "sha256-n+Qz0G630SyG3v1E1buwjHO8t779tq2TbWBcAjwwvxw=";
};
nativeBuildInputs = [ cmake ];
enableParallelBuilding = true;
installPhase = ''
mkdir -p $out/bin $out/share/hpcg
cp xhpcg $out/bin
#cp hpcg.dat $out/share/hpcg
'';
meta = with lib; {
description = "HPC conjugate gradient benchmark";
homepage = "https://www.hpcg-benchmark.org";
platforms = platforms.linux;
license = licenses.bsd3;
maintainers = [ maintainers.markuskowa ];
};
}

View File

@ -1,17 +0,0 @@
{ config, lib, pkgs, ... }:
let
welcomeMessage = "visionfive-nix";
xtermWelcomeScript = pkgs.writeScript "xterm-visionfive-welcome.sh" ''
${pkgs.figlet}/bin/figlet -c ${welcomeMessage}
${pkgs.neofetch}/bin/neofetch
sh
'';
in
{
hardware.opengl.enable = true;
services.cage = {
enable = true;
user = "default";
program = "${pkgs.xterm}/bin/xterm -fa 'Monospace' -fs 14 -bg black -fg white -e sh -c '${xtermWelcomeScript}'";
};
}

View File

@ -1,10 +0,0 @@
{
programs = {
sway.enable = true;
bash.loginShellInit = ''
if [[ "$(tty)" == /dev/tty1 ]]; then
exec sway &> /dev/null
fi
'';
};
}

View File

@ -1,18 +0,0 @@
{
networking.firewall.allowedTCPPorts = [ 1883 ];
services.mosquitto = {
enable = true;
settings.max_keepalive = 300;
listeners = [
{
port = 1883;
omitPasswordAuth = true;
users = {};
settings = {
allow_anonymous = true;
};
acl = [ "topic readwrite #" ];
}
];
};
}

View File

@ -1,65 +0,0 @@
{ lib
, fetchFromGitHub
, buildLinux
, vendor-kernel
, ... } @ args:
let
kernelVersion = rec {
# Fully constructed string, example: "5.10.0-rc5".
string = "${version + "." + patchlevel + "." + sublevel + (lib.optionalString (extraversion != "") extraversion)}";
file = "${vendor-kernel}/Makefile";
version = toString (builtins.match ".+VERSION = ([0-9]+).+" (builtins.readFile file));
patchlevel = toString (builtins.match ".+PATCHLEVEL = ([0-9]+).+" (builtins.readFile file));
sublevel = toString (builtins.match ".+SUBLEVEL = ([0-9]+).+" (builtins.readFile file));
# rc, next, etc.
extraversion = toString (builtins.match ".+EXTRAVERSION = ([a-z0-9-]+).+" (builtins.readFile file));
};
modDirVersion = "${kernelVersion.string}";
in buildLinux (args // {
inherit modDirVersion;
version = "${modDirVersion}-visionfive";
src = vendor-kernel;
kernelPatches = [];
defconfig = "starfive_jh7100_fedora_defconfig";
structuredExtraConfig = with lib.kernel; {
KEXEC = yes;
SERIAL_8250_DW = yes;
PINCTRL_STARFIVE = yes;
# Doesn't build as a module
DW_AXI_DMAC_STARFIVE = yes;
# stmmac hangs when built as a module
#PTP_1588_CLOCK = yes;
#STMMAC_ETH = yes;
#STMMAC_PCI = yes;
# For qemu
BLOCK = yes;
BLK_DEV = yes;
DEVTMPFS = yes;
VIRTIO_MENU = yes;
VIRTIO_BLK = yes;
# For 9P: https://wiki.qemu.org/Documentation/9psetup
NET_9P = yes;
NET_9P_VIRTIO = yes;
NET_9P_DEBUG = yes;
"9P_FS" = yes;
"9P_FS_POSIX_ACL" = yes;
PCI = yes;
VIRTIO_PCI = yes;
PCI_HOST_GENERIC = yes;
};
extraMeta = {
description = "Linux kernel for StarFive's JH7100 RISC-V SoC (VisionFive)";
platforms = [ "riscv64-linux" ];
hydraPlatforms = [ "riscv64-linux" ];
};
} // (args.argsOverride or { }))

View File

@ -1,44 +0,0 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1657645802,
"narHash": "sha256-wd+LiuGtHP8mTIc0gZrO2yqzmEPVvh5IyWrB8WCQNKM=",
"owner": "matthewcroughan",
"repo": "nixpkgs",
"rev": "39a827f18b870afb02f6c0f09151c69f2d8e7a4d",
"type": "github"
},
"original": {
"owner": "matthewcroughan",
"ref": "mc/riscv-testing",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"vendor-kernel": "vendor-kernel"
}
},
"vendor-kernel": {
"flake": false,
"locked": {
"lastModified": 1657526524,
"narHash": "sha256-NiEeWgYzEhqLbvB0krpjoRv8oXXsJYp6KeDor+f9tak=",
"owner": "starfive-tech",
"repo": "linux",
"rev": "74003f14f92e3c8eb31536b599c1f0c7aba3cdf2",
"type": "github"
},
"original": {
"owner": "starfive-tech",
"repo": "linux",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,63 +0,0 @@
{
inputs = {
nixpkgs.url = "github:matthewcroughan/nixpkgs/mc/riscv-testing";
# VisionFive ("v1")
vendor-kernel = {
url = "github:starfive-tech/linux";
flake = false;
};
};
outputs = { self, nixpkgs, vendor-kernel, ... }:
let
inherit (nixpkgs) lib;
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; };
modules = [
{ nixpkgs.overlays = [ self.overlay ]; }
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-riscv64-visionfive-installer.nix"
./base.nix
./configuration.nix
];
in
{
overlay = final: prev: {
linuxPackages_visionfive = final.linuxPackagesFor (
(
final.callPackage ./kernel.nix { inherit vendor-kernel; }
).override {
patches = [];
}
);
};
legacyPackages.${system} =
{
inherit (pkgs.pkgsCross.riscv64.linux) linuxPackages_visionfive;
};
images = {
visionfive-cross = self.nixosConfigurations.visionfive-cross.config.system.build.sdImage;
visionfive-native = self.nixosConfigurations.visionfive-native.config.system.build.sdImage;
visionfive2-cross = self.nixosConfigurations.visionfive2-cross.config.system.build.sdImage;
visionfive2-native = self.nixosConfigurations.visionfive2-native.config.system.build.sdImage;
};
nixosConfigurations = {
visionfive-cross = nixpkgs.lib.nixosSystem {
system = "${system}";
modules = modules ++ [
{
nixpkgs.crossSystem = {
gcc.arch = "rv64gv";
gcc.tune = "rv64gv";
system = "riscv64-linux";
};
}
];
};
visionfive-native = nixpkgs.lib.nixosSystem {
system = "riscv64-linux";
modules = modules;
};
};
};
}

View File

@ -1,61 +0,0 @@
# VisionFive 2
As of writing, VisionFive 2 support is quite experimental; see [kernel/README.md](kernel/README.md).
## Flash the bootloader via serial connection
This step may be optional.
Make the serial connection according to the section "Recovering the Bootloader" in <https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf>.
Flip the tiny switches towards the H (as opposed to L) marking on the PCB (towards edge of the board) as described that section (Step 2).
Power up, and assuming your serial device is `/dev/ttyUSB0`, run:
```shellSession
nix run .#visionFive2_bootloader_recover /dev/ttyUSB0
```
## Write a bootable SD card
```shellSession
$ nix build .#images.visionfive2-cross
```
Insert an SD card of which all contents will be replaced.
These instructions assume your SD card reader is `/dev/mmcblk0`.
Make sure no partitions are mounted.
```shellSession
$ echo /dev/mmcblk0p*
$ sudo umount /dev/mmcblk0p1
$ sudo umount /dev/mmcblk0p2
... repeat for all partitions
```
`pv` provides a rough progress indicator based on the compressed size.
If you don't have `pv`, run in `nix shell nixpkgs#pv` or use `cat` instead.
```shellSession
$ sudo sh -c 'pv <result/sd-image/nixos-sd-image-*.img.zst | zstd -d | dd of=/dev/mmcblk0'
$ sync
```
## Other commands
### Enter the firmware recovery via serial
Prepare as you would for flashing the bootloader, and then:
```shellSession
nix run .#visionFive2_recovery_start /dev/ttyUSB0
```
### Establish a serial connection
Compatible with the recovery mode, but also suitable for the Linux terminal
```shellSession
nix run .#visionFive2_recovery_resume /dev/ttyUSB0
```

View File

@ -1,107 +0,0 @@
{ inputs, pkgs }:
let
wrapSudo = command:
pkgs.writeShellScript "wrapped.sh" ''
if $(groups | grep --quiet --word-regexp "dialout"); then
echo "User is in dialout group, avoiding sudo"
${command} "$@"
else
echo "User is not in dialout group, using sudo"
sudo ${command} "$@"
fi
'';
visionFive2_recovery_start =
let
expectScript = pkgs.writeScript "expect-visionfive-recoverBootLoader" ''
#!${pkgs.expect}/bin/expect -f
set timeout -1
spawn ${pkgs.picocom}/bin/picocom [lindex $argv 0] -b 115200 -s "${pkgs.lrzsz}/bin/sz -X"
expect "CC"
send "\x01\x13"
expect "*** file:"
send "${inputs.jh7110_recovery_binary}"
send "\r"
expect "Transfer complete"
'';
program = pkgs.writeShellScript "flash-visionfive.sh" ''
echo >&2 NOTE: If your board appears to hang, RX/TX may be flipped,
echo >&2 _depending on boot setting_!!!
echo "$0"
${expectScript} "$@"
echo >&2 "Launching new session. Hint enter to display help."
${visionFive2_recovery_resume.program} "$@"
'';
in { type = "app"; program = "${wrapSudo program}"; };
visionFive2_recovery_resume =
let
program = pkgs.writeScript "recoverBootloader_resume" ''
#!${pkgs.runtimeShell}
set -eu
${pkgs.picocom}/bin/picocom $1 -b 115200 -s "${pkgs.lrzsz}/bin/sz -X"
'';
in { type = "app"; program = "${wrapSudo program}"; };
visionFive2_bootloader_recover =
let
expectScript = pkgs.writeScript "expect-visionfive-recover-bootLoader" ''
#!${pkgs.expect}/bin/expect -f
set timeout -1
spawn ${pkgs.picocom}/bin/picocom [lindex $argv 0] -b 115200 -s "${pkgs.lrzsz}/bin/sz -X"
expect "CC"
send "\x01\x13"
expect "*** file:"
send "${inputs.jh7110_recovery_binary}"
send "\r"
expect "Transfer complete"
# Wait for menu and install SPL
expect "0: update 2ndboot/SPL in flash"
send "0\r"
expect "CC"
send "\x01\x13"
expect "*** file:"
send "${inputs.jh7110_u-boot-spl-bin}"
send "\r"
expect "Transfer complete"
# Wait for menu and install u-boot
expect "2: update fw_verif/uboot in flash"
send "2\r"
expect "CC"
send "\x01\x13"
expect "*** file:"
send "${inputs.jh7110_u-boot-bin}"
send "\r"
expect "Transfer complete"
'';
program = pkgs.writeShellScript "flash-visionfive.sh" ''
cat >&2 <<EOF
NOTE: If you haven't already switched the boot mode
- power off
- flip the tiny switches towards the H (as opposed to L)
marking on the PCB (towards edge of the board)
EOF
${expectScript} "$@"
cat >&2 <<EOF
NOTE: If all went well, flip the switches back to the L (as opposed
to H) marking on the PCB (away from edge of board).
'';
in
{
type = "app";
program = "${wrapSudo program}";
};
in
{
inherit
visionFive2_recovery_start
visionFive2_recovery_resume
visionFive2_bootloader_recover
;
}

View File

@ -1,4 +0,0 @@
# VisionFive 2 kernel
The VisionFive 2 kernel is still under development. Most of the contents of this directory only exist in order to work around build errors and a crash or two. As such, the settings described here are by no means final, or even good.

View File

@ -1,37 +0,0 @@
{ inputs, ... }:
{ lib, pkgs, ... }:
{
disabledModules = [
"profiles/all-hardware.nix" # references virtio_pci kernel module, which we don't have
];
config = {
boot = {
kernelPackages = pkgs.linuxPackagesFor (import ./package/default.nix { inherit pkgs inputs; });
kernelParams = [
"console=tty0"
"console=ttyS0,115200n8"
"earlycon=sbi"
];
blacklistedKernelModules = [
# Last thing to log before crash...
"axp15060-regulator"
# Also sus
"at24"
# Also also sus
"jh7110-vin"
# Maybe??
"starfive-jh7110-regulator"
# This one stopped the crashing
"starfivecamss"
];
};
# Example: hardware.deviceTree.name = "starfive/jh7110-visionfive-v2-A11.dtb";
hardware.deviceTree.name = lib.mkDefault "starfive/jh7110-visionfive-v2.dtb";
};
}

View File

@ -1,3 +0,0 @@
{ pkgs, inputs }:
pkgs.callPackage ./package.nix { src = inputs.jh7110-kernel; }

View File

@ -1,319 +0,0 @@
{ lib
, fetchFromGitHub
, fetchpatch
, buildLinux
, src
, ... } @ args:
let
kernelVersion = rec {
# Fully constructed string, example: "5.10.0-rc5".
string = "${version + "." + patchlevel + "." + sublevel + (lib.optionalString (extraversion != "") extraversion)}";
file = "${src}/Makefile";
version = toString (builtins.match ".+VERSION = ([0-9]+).+" (builtins.readFile file));
patchlevel = toString (builtins.match ".+PATCHLEVEL = ([0-9]+).+" (builtins.readFile file));
sublevel = toString (builtins.match ".+SUBLEVEL = ([0-9]+).+" (builtins.readFile file));
# rc, next, etc.
extraversion = toString (builtins.match ".+EXTRAVERSION = ([a-z0-9-]+).+" (builtins.readFile file));
};
modDirVersion = "${kernelVersion.string}";
in buildLinux (args // {
inherit modDirVersion;
version = "${modDirVersion}-visionfive2";
inherit src;
kernelPatches = [
{ patch = fetchpatch {
url = "https://github.com/torvalds/linux/commit/215bebc8c6ac438c382a6a56bd2764a2d4e1da72.diff";
hash = "sha256-1ZqmVOkgcDBRkHvVRPH8I5G1STIS1R/l/63PzQQ0z0I=";
includes = ["security/keys/dh.c"];
};
}
{ patch = ./visionfive-2-duplicate-init-module.patch; }
{ patch = ./visionfive-2-pl330-name-collision.patch; }
{ patch = ./visionfive-2-gpu.patch; }
];
defconfig = "starfive_visionfive2_defconfig";
structuredExtraConfig = with lib.kernel; {
# USB Wifi
RT2800USB_RT53XX = yes;
RT2800USB = module;
RT2800USB_RT3573 = yes;
KEXEC = yes;
SERIAL_8250_DW = yes;
SOC_STARFIVE = yes;
# CLK_STARFIVE_JH7110_SYS = yes;
RESET_STARFIVE_JH7110 = yes;
PINCTRL_STARFIVE_JH7110 = yes;
# MMC_DW_STARFIVE = yes;
# # Doesn't build as a module
# DW_AXI_DMAC_STARFIVE = yes;
# # stmmac hangs when built as a module (at least on VisionFive v1, apparently)
PTP_1588_CLOCK = yes;
STMMAC_ETH = yes;
STMMAC_PCI = yes;
# Fix build error
# RIPE-MD and other algos appears to have been removed, correlating with https://github.com/starfive-tech/linux/commit/d210ee3fdfe8584f84f8fdd0ac4a9895d023325b
# defconfig out of date?
CRYPTO_RMD128 = no;
CRYPTO_RMD160 = yes;
CRYPTO_RMD256 = no;
CRYPTO_RMD320 = no;
CRYPTO_TGR192 = no;
CRYPTO_SALSA20 = no;
# sm4 lacks a symbol
CRYPTO_DEV_CCREE = no;
CRYPTO_SM4 = no;
# Can't be built as modules
SPI_PL022 = yes;
SPI_PL022_STARFIVE = yes;
RTC_DRV_STARFIVE = yes;
# Compile errors
STARFIVE_DSI = no;
VIDEO_HDPVR = no;
VIDEO_PVRUSB2_DVB = no;
DRM_IMG = no; # gpu module doesn't compile at this time
DRM_IMG_ROGUE = no;
DRM_VERISILICON = no;
# DRM_LEGACY = no;
DRM_PANEL_JADARD_JD9365DA_H3 = no;
VERISILICON_DW_MIPI_DSI = no;
VGA_ARB = no;
# brute force disable drm
CEC_CORE = no;
CEC_NOTIFIER = no;
DRM = no;
DRM_MIPI_DBI = no;
DRM_MIPI_DSI = no;
DRM_DP_AUX_BUS = no;
DRM_DP_AUX_CHARDEV = lib.mkForce no;
DRM_KMS_HELPER = no;
DRM_FBDEV_EMULATION = no;
DRM_LOAD_EDID_FIRMWARE = lib.mkForce no;
DRM_TTM = no;
DRM_VRAM_HELPER = no;
DRM_TTM_HELPER = no;
DRM_GEM_CMA_HELPER = no;
DRM_KMS_CMA_HELPER = no;
DRM_GEM_SHMEM_HELPER = no;
DRM_SCHED = no;
DRM_I2C_CH7006 = no;
DRM_I2C_SIL164 = no;
DRM_I2C_NXP_TDA998X = no;
DRM_I2C_NXP_TDA9950 = no;
DRM_KOMEDA = no;
DRM_RADEON = no;
DRM_AMDGPU = no;
DRM_AMDGPU_SI = lib.mkForce no;
DRM_AMDGPU_CIK = lib.mkForce no;
DRM_AMDGPU_USERPTR = lib.mkForce no;
DRM_AMD_DC = no;
DRM_AMD_DC_HDCP = lib.mkForce no;
DRM_AMD_DC_SI = lib.mkForce no;
DRM_NOUVEAU = no;
NOUVEAU_LEGACY_CTX_SUPPORT = no;
DRM_NOUVEAU_BACKLIGHT = no;
DRM_VGEM = no;
DRM_VKMS = no;
DRM_UDL = no;
DRM_AST = no;
DRM_MGAG200 = no;
DRM_RCAR_DW_HDMI = no;
DRM_QXL = no;
DRM_VIRTIO_GPU = no;
DRM_PANEL = no;
DRM_PANEL_ABT_Y030XX067A = no;
DRM_PANEL_ARM_VERSATILE = no;
DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 = no;
DRM_PANEL_BOE_HIMAX8279D = no;
DRM_PANEL_BOE_TV101WUM_NL6 = no;
DRM_PANEL_DSI_CM = no;
DRM_PANEL_LVDS = no;
DRM_PANEL_SIMPLE = no;
DRM_PANEL_ELIDA_KD35T133 = no;
DRM_PANEL_FEIXIN_K101_IM2BA02 = no;
DRM_PANEL_FEIYANG_FY07024DI26A30D = no;
DRM_PANEL_ILITEK_IL9322 = no;
DRM_PANEL_ILITEK_ILI9341 = no;
DRM_PANEL_ILITEK_ILI9881C = no;
DRM_PANEL_INNOLUX_EJ030NA = no;
DRM_PANEL_INNOLUX_P079ZCA = no;
DRM_PANEL_JDI_LT070ME05000 = no;
DRM_PANEL_KHADAS_TS050 = no;
DRM_PANEL_KINGDISPLAY_KD097D04 = no;
DRM_PANEL_LEADTEK_LTK050H3146W = no;
DRM_PANEL_LEADTEK_LTK500HD1829 = no;
DRM_PANEL_SAMSUNG_LD9040 = no;
DRM_PANEL_LG_LB035Q02 = no;
DRM_PANEL_LG_LG4573 = no;
DRM_PANEL_NEC_NL8048HL11 = no;
DRM_PANEL_NOVATEK_NT35510 = no;
DRM_PANEL_NOVATEK_NT36672A = no;
DRM_PANEL_NOVATEK_NT39016 = no;
DRM_PANEL_MANTIX_MLAF057WE51 = no;
DRM_PANEL_OLIMEX_LCD_OLINUXINO = no;
DRM_PANEL_ORISETECH_OTM8009A = no;
DRM_PANEL_OSD_OSD101T2587_53TS = no;
DRM_PANEL_PANASONIC_VVX10F034N00 = no;
DRM_PANEL_RASPBERRYPI_TOUCHSCREEN = no;
DRM_PANEL_RAYDIUM_RM67191 = no;
DRM_PANEL_RAYDIUM_RM68200 = no;
DRM_PANEL_RONBO_RB070D30 = no;
DRM_PANEL_SAMSUNG_ATNA33XC20 = no;
DRM_PANEL_SAMSUNG_DB7430 = no;
DRM_PANEL_SAMSUNG_S6D16D0 = no;
DRM_PANEL_SAMSUNG_S6E3HA2 = no;
DRM_PANEL_SAMSUNG_S6E63J0X03 = no;
DRM_PANEL_SAMSUNG_S6E63M0 = no;
DRM_PANEL_SAMSUNG_S6E63M0_SPI = no;
DRM_PANEL_SAMSUNG_S6E63M0_DSI = no;
DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 = no;
DRM_PANEL_SAMSUNG_S6E8AA0 = no;
DRM_PANEL_SAMSUNG_SOFEF00 = no;
DRM_PANEL_SEIKO_43WVF1G = no;
DRM_PANEL_SHARP_LQ101R1SX01 = no;
DRM_PANEL_SHARP_LS037V7DW01 = no;
DRM_PANEL_SHARP_LS043T1LE01 = no;
DRM_PANEL_SITRONIX_ST7701 = no;
DRM_PANEL_SITRONIX_ST7703 = no;
DRM_PANEL_SITRONIX_ST7789V = no;
DRM_PANEL_SONY_ACX565AKM = no;
DRM_PANEL_TDO_TL070WSH30 = no;
DRM_PANEL_TPO_TD028TTEC1 = no;
DRM_PANEL_TPO_TD043MTEA1 = no;
DRM_PANEL_TPO_TPG110 = no;
DRM_PANEL_TRULY_NT35597_WQXGA = no;
DRM_PANEL_VISIONOX_RM69299 = no;
DRM_PANEL_WIDECHIPS_WS2401 = no;
DRM_PANEL_XINPENG_XPP055C272 = no;
DRM_BRIDGE = no;
DRM_PANEL_BRIDGE = no;
DRM_CDNS_DSI = no;
DRM_CHIPONE_ICN6211 = no;
DRM_CHRONTEL_CH7033 = no;
DRM_DISPLAY_CONNECTOR = no;
DRM_LONTIUM_LT8912B = no;
DRM_LONTIUM_LT9611 = no;
DRM_LONTIUM_LT9611UXC = no;
DRM_ITE_IT66121 = no;
DRM_LVDS_CODEC = no;
DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW = no;
DRM_NWL_MIPI_DSI = no;
DRM_NXP_PTN3460 = no;
DRM_PARADE_PS8622 = no;
DRM_PARADE_PS8640 = no;
DRM_SIL_SII8620 = no;
DRM_SII902X = no;
DRM_SII9234 = no;
DRM_SIMPLE_BRIDGE = no;
DRM_THINE_THC63LVD1024 = no;
DRM_TOSHIBA_TC358762 = no;
DRM_TOSHIBA_TC358764 = no;
DRM_TOSHIBA_TC358767 = no;
DRM_TOSHIBA_TC358768 = no;
DRM_TOSHIBA_TC358775 = no;
DRM_TI_TFP410 = no;
DRM_TI_SN65DSI83 = no;
DRM_TI_SN65DSI86 = no;
DRM_TI_TPD12S015 = no;
DRM_ANALOGIX_ANX6345 = no;
DRM_ANALOGIX_ANX78XX = no;
DRM_ANALOGIX_DP = no;
DRM_ANALOGIX_ANX7625 = no;
DRM_I2C_ADV7511 = no;
DRM_I2C_ADV7511_CEC = no;
DRM_CDNS_MHDP8546 = no;
DRM_DW_HDMI = no;
DRM_DW_HDMI_AHB_AUDIO = no;
DRM_DW_HDMI_I2S_AUDIO = no;
DRM_DW_HDMI_CEC = no;
DRM_ETNAVIV = no;
DRM_ETNAVIV_THERMAL = no;
DRM_MXS = no;
DRM_MXSFB = no;
DRM_ARCPGU = no;
DRM_BOCHS = no;
DRM_CIRRUS_QEMU = no;
DRM_GM12U320 = no;
TINYDRM_HX8357D = no;
TINYDRM_ILI9225 = no;
TINYDRM_ILI9341 = no;
TINYDRM_ILI9486 = no;
TINYDRM_MI0283QT = no;
TINYDRM_REPAPER = no;
TINYDRM_ST7586 = no;
TINYDRM_ST7735R = no;
DRM_GUD = no;
DRM_LEGACY = no;
DRM_TDFX = no;
DRM_R128 = no;
DRM_MGA = no;
DRM_VIA = no;
DRM_SAVAGE = no;
VIDEOMODE_HELPERS = no;
SND_PCM_ELD = no;
SND_PCM_IEC958 = no;
SND_HDA_COMPONENT = no;
SND_SOC_HDMI_CODEC = no;
VIRTIO_DMA_SHARED_BUFFER = no;
#end
USB_WIFI_ECR6600U = no;
VIN_SENSOR_IMX219 = no;
VIDEO_IMX219 = no;
VIN_SENSOR_OV5640 = no;
VIDEO_OV5640 = no;
# missing MODULE_LICENSE()
SND_SOC_WM8960 = no;
# # Wonky config generation? Its dependency and dependent are enabled as module,
# # but VIRTIO_PCI itself was not listed in the .config
# # Error was: modprobe: FATAL: Module virtio_pci not found in directory
# VIRTIO = no;
# VIRTIO_PCI = module;
# VIRTIO_PCI_LIB = no;
# # VIRTIO_VSOCKETS = no;
# # BT_VIRTIO = no;
# # NET_9P_VIRTIO = no;
# # VIRTIO_BLK = no;
# # SCSI_VIRTIO = no;
# # VIRTIO_NET = no;
# # VIRTIO_CONSOLE = no;
# # HW_RANDOM_VIRTIO = no;
# # I2C_VIRTIO = no;
# # GPIO_VIRTIO = no;
# # SND_VIRTIO = no;
# # VIRTIO_MENU = no;
# # RPMSG_VIRTIO = no;
# # VIRTIO_FS = no;
# # CRYPTO_DEV_VIRTIO = no;
# SND_SOC_STARFIVE_PWMDAC = yes;
# SND_SOC_STARFIVE = yes;
# SND = no;
};
extraMeta = {
description = "Linux kernel for StarFive's JH7110 RISC-V SoC (VisionFive 2)";
platforms = [ "riscv64-linux" ];
hydraPlatforms = [ "riscv64-linux" ];
};
} // (args.argsOverride or { }))

View File

@ -1,62 +0,0 @@
diff --git a/sound/soc/starfive/pwmdac.h b/sound/soc/starfive/pwmdac.h
index d4742f99a51b..4b1f4586e901 100644
--- a/sound/soc/starfive/pwmdac.h
+++ b/sound/soc/starfive/pwmdac.h
@@ -154,6 +154,9 @@ int sf_pwmdac_pcm_register(struct platform_device *pdev)
{
return -EINVAL;
}
+void pwmdac_dit_driver_init(void);
+void pwmdac_dit_driver_exit(void);
+
#endif
#endif
diff --git a/sound/soc/starfive/starfive_pwmdac.c b/sound/soc/starfive/starfive_pwmdac.c
index fba58e22d7ef..20cbf7083e10 100644
--- a/sound/soc/starfive/starfive_pwmdac.c
+++ b/sound/soc/starfive/starfive_pwmdac.c
@@ -968,14 +968,15 @@ static struct platform_driver sf_pwmdac_driver = {
},
};
-
static int __init pwmdac_driver_init(void)
{
+ pwmdac_dit_driver_init();
return platform_driver_register(&sf_pwmdac_driver);
}
static void pwmdac_driver_exit(void)
{
+ pwmdac_dit_driver_exit();
platform_driver_unregister(&sf_pwmdac_driver);
}
diff --git a/sound/soc/starfive/starfive_pwmdac_transmitter.c b/sound/soc/starfive/starfive_pwmdac_transmitter.c
index 6d58fcfd5592..0c50c82c4c20 100755
--- a/sound/soc/starfive/starfive_pwmdac_transmitter.c
+++ b/sound/soc/starfive/starfive_pwmdac_transmitter.c
@@ -90,20 +90,16 @@ static struct platform_driver pwmdac_dit_driver = {
},
};
-static int __init pwmdac_dit_driver_init(void)
+int __init pwmdac_dit_driver_init(void)
{
return platform_driver_register(&pwmdac_dit_driver);
}
-static void pwmdac_dit_driver_exit(void)
+void pwmdac_dit_driver_exit(void)
{
platform_driver_unregister(&pwmdac_dit_driver);
}
-late_initcall(pwmdac_dit_driver_init);
-module_exit(pwmdac_dit_driver_exit);
-
-
MODULE_AUTHOR("curry.zhang <curry.zhang@starfivetech.com>");
MODULE_DESCRIPTION("pwmdac dummy codec driver");
MODULE_LICENSE("GPL v2");

View File

@ -1,13 +0,0 @@
diff --git a/drivers/gpu/drm/i2c/tda998x_pin.c b/drivers/gpu/drm/i2c/tda998x_pin.c
index 995efc8e55ed..48a616a7e851 100644
--- a/drivers/gpu/drm/i2c/tda998x_pin.c
+++ b/drivers/gpu/drm/i2c/tda998x_pin.c
@@ -30,7 +30,7 @@ static const struct of_device_id tda998x_rgb_dt_ids[] = {
{ .compatible = "starfive,tda998x_rgb_pin", },
{ /* sentinel */ },
};
-MODULE_DEVICE_TABLE(of, starfive_drm_dt_ids);
+MODULE_DEVICE_TABLE(of, tda998x_rgb_dt_ids);
static struct platform_driver starfive_drm_platform_driver = {
.probe = starfive_drm_platform_probe,

View File

@ -1,40 +0,0 @@
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 110de8a60058..0a01256ef9e4 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -1050,7 +1050,7 @@ static bool _trigger(struct pl330_thread *thrd)
return true;
}
-static bool _start(struct pl330_thread *thrd)
+static bool _dma_start(struct pl330_thread *thrd)
{
switch (_state(thrd)) {
case PL330_STATE_FAULT_COMPLETING:
@@ -1702,7 +1702,7 @@ static int pl330_update(struct pl330_dmac *pl330)
thrd->req_running = -1;
/* Get going again ASAP */
- _start(thrd);
+ _dma_start(thrd);
/* For now, just make a list of callbacks to be done */
list_add_tail(&descdone->rqd, &pl330->req_done);
@@ -2089,7 +2089,7 @@ static void pl330_tasklet(struct tasklet_struct *t)
} else {
/* Make sure the PL330 Channel thread is active */
spin_lock(&pch->thread->dmac->lock);
- _start(pch->thread);
+ _dma_start(pch->thread);
spin_unlock(&pch->thread->dmac->lock);
}
@@ -2107,7 +2107,7 @@ static void pl330_tasklet(struct tasklet_struct *t)
if (power_down) {
pch->active = true;
spin_lock(&pch->thread->dmac->lock);
- _start(pch->thread);
+ _dma_start(pch->thread);
spin_unlock(&pch->thread->dmac->lock);
power_down = false;
}

View File

@ -1,48 +0,0 @@
{ inputs, importApply, ... }:
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/profiles/base.nix")
(modulesPath + "/installer/sd-card/sd-image.nix")
(importApply ./kernel/nixos-module.nix { inherit inputs; })
];
environment.systemPackages = with pkgs; [ mtdutils ];
boot = {
consoleLogLevel = lib.mkDefault 7;
initrd.kernelModules = [
# "dw-axi-dmac-platform"
];
initrd.includeDefaultModules = false;
initrd.availableKernelModules = [
"dw_mmc-pltfm"
"dw_mmc-starfive"
"spi-dw-mmio"
"mmc_block"
"nvme"
"sdhci" #?
"sdhci-pci" #?
"sdhci-of-dwcmshc"
];
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
};
sdImage = {
imageName = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-visionfive-2.img";
populateFirmwareCommands = ''
'';
populateRootCommands = ''
mkdir -p ./files/boot
${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot
'';
};
}