diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index b7d4eabca382b..92683af1670bd 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -698,6 +698,15 @@ githubId = 5149377; name = "Amine Chikhaoui"; }; + amjoseph = { + name = "Adam Megacz Joseph"; + email = "adam@westernsemico.com"; + github = "amjoseph-nixpkgs"; + githubId = 54836058; + keys = [{ + fingerprint = "AD25 6548 09B0 F2A5 D246 1AFF E702 47B6 4C13 EEBE"; + }]; + }; amorsillo = { email = "andrew.morsillo@gmail.com"; github = "AndrewMorsillo"; diff --git a/pkgs/misc/drivers/em100/default.nix b/pkgs/misc/drivers/em100/default.nix new file mode 100644 index 0000000000000..3943b34b3762c --- /dev/null +++ b/pkgs/misc/drivers/em100/default.nix @@ -0,0 +1,68 @@ +{ lib +, stdenv +, curl +, pkg-config +, libusb +, fetchgit +}: +stdenv.mkDerivation rec { + pname = "em100"; + version = "unstable-2022-05-02-86631c9"; # upstream does not appear to have formal releases + src = fetchgit { + url = "https://review.coreboot.org/em100"; + rev = "7cd8c935239ab63ea7dd583183d8144e38c42186"; + hash = "sha256-zKRVhqNHtgVj6JDkTV+6GEjmM1FICqQr286uTXwUvpo="; + }; + + enableParallelBuilding = true; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + libusb + curl # for optionally downloading firmware images + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + install -m 750 em100 $out/bin/em100 + mkdir -p $out/lib/udev/rules.d/ + install -m 644 60-dediprog-em100pro.rules $out/lib/udev/rules.d/ + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://www.coreboot.org/EM100pro"; + description = "Allows operating a Dediprog EM100Pro SPI NOR Flash Emulator"; + longDescription = # copied from README + '' + This tool supports using the Dediprog EM100-Pro [1] in Linux. It supports both + the original version and the new -G2 variant. + + The 'em100' device provides a way to emulate a SPI-flash chip. Various + connectors are available to allow it to take over from the in-circuit SPI chip + so that the SoC sees the em100's internal memory as the contents of the SPI + flash. Images can be loaded into the em100 over USB in a few seconds, thus + providing a much faster development cycle than is possible by reprogramming + the SPI flash each time. + + Major features provided by the tool include: + + - Set the chip being emulated (the tool supports about 600) + - Adjust the state of the hold pin, which supports overriding the internal SPI + - Use of several em100 devices, distinguished by their serial number + - Terminal mode, allowing the SoC to send messages + - Output a trace of SPI commands issued by the SoC + - Reading / writing em100 firmware (dangerous as it can brick your em100) + + [1] https://www.dediprog.com/product/EM100Pro-G2 + ''; + license = licenses.gpl2Plus; + sourceProvenance = [ lib.sourceTypes.fromSource ]; + maintainers = with maintainers; [ amjoseph ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 85ea5f11dffc9..84afb705f16a9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34009,6 +34009,8 @@ with pkgs; terminal-parrot = callPackage ../applications/misc/terminal-parrot { }; + em100 = callPackage ../misc/drivers/em100 { }; + epson-alc1100 = callPackage ../misc/drivers/epson-alc1100 { }; epson-escpr = callPackage ../misc/drivers/epson-escpr { };