Merge branch 'main' of git.sr.ht:~fabianmv/triviOS
This commit is contained in:
		
						commit
						5dc5a79f29
					
				
					 4 changed files with 89 additions and 89 deletions
				
			
		
							
								
								
									
										95
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										95
									
								
								flake.nix
									
										
									
									
									
								
							|  | @ -1,102 +1,19 @@ | ||||||
| { | { | ||||||
|   inputs = { |   inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; | ||||||
|     nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; |  | ||||||
|   }; |  | ||||||
| 
 | 
 | ||||||
|   outputs = { self, nixpkgs }: |   outputs = { self, nixpkgs }: | ||||||
|     let |     let | ||||||
|       system = "x86_64-linux"; |       system = "x86_64-linux"; | ||||||
|       crossSystem = "aarch64-linux"; |       crossSystem = "aarch64-linux"; | ||||||
|  | 
 | ||||||
|       pkgs = import nixpkgs { |       pkgs = import nixpkgs { | ||||||
|         inherit system; |         inherit system; | ||||||
| 
 |         crossSystem = import ./triviOS/cross.nix; | ||||||
|         overlays = [ |         overlays = [ (import ./triviOS/overlay.nix) ]; | ||||||
|           (self: super: { |  | ||||||
|             systemd = super.systemd.override { |  | ||||||
|               pname = "systemd-minimal"; |  | ||||||
|               withAcl = false; |  | ||||||
|               withAnalyze = false; |  | ||||||
|               withApparmor = false; |  | ||||||
|               withAudit = false; |  | ||||||
|               withCompression = false; |  | ||||||
|               withCoredump = false; |  | ||||||
|               withCryptsetup = false; |  | ||||||
|               withDocumentation = false; |  | ||||||
|               withEfi = false; |  | ||||||
|               withFido2 = false; |  | ||||||
|               withHostnamed = false; |  | ||||||
|               withHomed = false; |  | ||||||
|               withImportd = false; |  | ||||||
|               withLibBPF = false; |  | ||||||
|               withLibidn2 = false; |  | ||||||
|               withLocaled = false; |  | ||||||
|               withMachined = false; |  | ||||||
|               withNetworkd = false; |  | ||||||
|               withNss = false; |  | ||||||
|               withOomd = false; |  | ||||||
|               withPCRE2 = false; |  | ||||||
|               withPolkit = false; |  | ||||||
|               withPortabled = false; |  | ||||||
|               withRemote = false; |  | ||||||
|               withResolved = false; |  | ||||||
|               withShellCompletions = false; |  | ||||||
|               withTimedated = false; |  | ||||||
|               withTimesyncd = false; |  | ||||||
|               withTpm2Tss = false; |  | ||||||
|               withUserDb = false; |  | ||||||
|               # This is necessary for any installation |  | ||||||
|               # withPam = false; |  | ||||||
|               # withHwdb = false; |  | ||||||
|               # withLogind = false; |  | ||||||
|             }; |  | ||||||
| 
 |  | ||||||
|             libaom = super.libaom.override { |  | ||||||
|               enableButteraugli = false; |  | ||||||
|             }; |  | ||||||
| 
 |  | ||||||
|             pin_control = self.callPackage ./pin_control { }; |  | ||||||
|           }) |  | ||||||
|         ]; |  | ||||||
| 
 |  | ||||||
|         crossSystem = { |  | ||||||
|           gcc.cpu = "cortex-a53"; |  | ||||||
|           config = "aarch64-unknown-linux-gnu"; |  | ||||||
|           linux-kernel = { |  | ||||||
|             DTB = true; |  | ||||||
|             autoModules = true; |  | ||||||
|             baseConfig = "defconfig"; |  | ||||||
| 
 |  | ||||||
|             extraConfig = '' |  | ||||||
|               # Raspberry Pi 3 stuff. Not needed for   s >= 4.10. |  | ||||||
|               ARCH_BCM2835 y |  | ||||||
|               BCM2835_MBOX y |  | ||||||
|               BCM2835_WDT y |  | ||||||
|               RASPBERRYPI_FIRMWARE y |  | ||||||
|               RASPBERRYPI_POWER y |  | ||||||
|               SERIAL_8250_BCM2835AUX y |  | ||||||
|               SERIAL_8250_EXTENDED y |  | ||||||
|               SERIAL_8250_SHARE_IRQ y |  | ||||||
| 
 |  | ||||||
|               # Cavium ThunderX stuff. |  | ||||||
|               PCI_HOST_THUNDER_ECAM y |  | ||||||
|                |  | ||||||
|               # Nvidia Tegra stuff. |  | ||||||
|               PCI_TEGRA y |  | ||||||
|                |  | ||||||
|               # The default (=y) forces us to have the XHCI firmware available in initrd, |  | ||||||
|               # which our initrd builder can't currently do easily. |  | ||||||
|               USB_XHCI_TEGRA m |  | ||||||
|             ''; |  | ||||||
| 
 |  | ||||||
|             name = "aarch64-multiplatform"; |  | ||||||
|             preferBuiltin = true; |  | ||||||
|             target = "Image"; |  | ||||||
|           }; |  | ||||||
|         }; |  | ||||||
|       }; |       }; | ||||||
|     in |     in | ||||||
|     { |     { | ||||||
|       packages.${crossSystem} = pkgs; |       formatter.${system} = pkgs.pkgsBuildBuild.nixpkgs-fmt; | ||||||
| 
 | 
 | ||||||
|       nixosConfigurations.triviOS = nixpkgs.lib.nixosSystem { |       nixosConfigurations.triviOS = nixpkgs.lib.nixosSystem { | ||||||
|         inherit pkgs; |         inherit pkgs; | ||||||
|  | @ -104,6 +21,6 @@ | ||||||
|         modules = [ ./triviOS ]; |         modules = [ ./triviOS ]; | ||||||
|       }; |       }; | ||||||
| 
 | 
 | ||||||
|       formatter.${system} = pkgs.pkgsBuildBuild.nixpkgs-fmt; |       packages.${crossSystem} = pkgs; | ||||||
|     }; |     }; | ||||||
| } | } | ||||||
|  |  | ||||||
							
								
								
									
										36
									
								
								triviOS/cross.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								triviOS/cross.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,36 @@ | ||||||
|  | { | ||||||
|  |   config = "aarch64-unknown-linux-gnu"; | ||||||
|  |   gcc.cpu = "cortex-a53"; | ||||||
|  | 
 | ||||||
|  |   linux-kernel = { | ||||||
|  |     DTB = true; | ||||||
|  |     autoModules = true; | ||||||
|  |     baseConfig = "defconfig"; | ||||||
|  | 
 | ||||||
|  |     extraConfig = '' | ||||||
|  |       # Raspberry Pi 3 stuff. Not needed for   s >= 4.10. | ||||||
|  |       ARCH_BCM2835 y | ||||||
|  |       BCM2835_MBOX y | ||||||
|  |       BCM2835_WDT y | ||||||
|  |       RASPBERRYPI_FIRMWARE y | ||||||
|  |       RASPBERRYPI_POWER y | ||||||
|  |       SERIAL_8250_BCM2835AUX y | ||||||
|  |       SERIAL_8250_EXTENDED y | ||||||
|  |       SERIAL_8250_SHARE_IRQ y | ||||||
|  | 
 | ||||||
|  |       # Cavium ThunderX stuff. | ||||||
|  |       PCI_HOST_THUNDER_ECAM y | ||||||
|  |        | ||||||
|  |       # Nvidia Tegra stuff. | ||||||
|  |       PCI_TEGRA y | ||||||
|  |        | ||||||
|  |       # The default (=y) forces us to have the XHCI firmware available in initrd, | ||||||
|  |       # which our initrd builder can't currently do easily. | ||||||
|  |       USB_XHCI_TEGRA m | ||||||
|  |     ''; | ||||||
|  | 
 | ||||||
|  |     name = "aarch64-multiplatform"; | ||||||
|  |     preferBuiltin = true; | ||||||
|  |     target = "Image"; | ||||||
|  |   }; | ||||||
|  | } | ||||||
							
								
								
									
										46
									
								
								triviOS/overlay.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								triviOS/overlay.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,46 @@ | ||||||
|  | self: super: { | ||||||
|  |   systemd = super.systemd.override { | ||||||
|  |     pname = "systemd-minimal"; | ||||||
|  |     withAcl = false; | ||||||
|  |     withAnalyze = false; | ||||||
|  |     withApparmor = false; | ||||||
|  |     withAudit = false; | ||||||
|  |     withCompression = false; | ||||||
|  |     withCoredump = false; | ||||||
|  |     withCryptsetup = false; | ||||||
|  |     withDocumentation = false; | ||||||
|  |     withEfi = false; | ||||||
|  |     withFido2 = false; | ||||||
|  |     withHostnamed = false; | ||||||
|  |     withHomed = false; | ||||||
|  |     withImportd = false; | ||||||
|  |     withLibBPF = false; | ||||||
|  |     withLibidn2 = false; | ||||||
|  |     withLocaled = false; | ||||||
|  |     withMachined = false; | ||||||
|  |     withNetworkd = false; | ||||||
|  |     withNss = false; | ||||||
|  |     withOomd = false; | ||||||
|  |     withPCRE2 = false; | ||||||
|  |     withPolkit = false; | ||||||
|  |     withPortabled = false; | ||||||
|  |     withRemote = false; | ||||||
|  |     withResolved = false; | ||||||
|  |     withShellCompletions = false; | ||||||
|  |     withTimedated = false; | ||||||
|  |     withTimesyncd = false; | ||||||
|  |     withTpm2Tss = false; | ||||||
|  |     withUserDb = false; | ||||||
|  | 
 | ||||||
|  |     # Se implican y son necesarios: | ||||||
|  |     # withPam = true; | ||||||
|  |     # withHwdb = true; | ||||||
|  |     # withLogind = true; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   libaom = super.libaom.override { | ||||||
|  |     enableButteraugli = false; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   pin_control = self.callPackage ../pin_control { }; | ||||||
|  | } | ||||||
|  | @ -37,6 +37,7 @@ | ||||||
| 
 | 
 | ||||||
|     udev.extraRules = '' |     udev.extraRules = '' | ||||||
|       KERNEL=="gpiochip*", GROUP="uwsgi", MODE="660" |       KERNEL=="gpiochip*", GROUP="uwsgi", MODE="660" | ||||||
|  |       KERNEL=="video*", GROUP="uwsgi", MODE="660" | ||||||
|     ''; |     ''; | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue