🎨 removed kernel from pacstrap
This commit is contained in:
parent
1cfa972e9f
commit
891eefd09a
3 changed files with 12 additions and 9 deletions
|
@ -51,7 +51,7 @@ pub mod zram;
|
|||
|
||||
use crate::{
|
||||
config::InstallConfig,
|
||||
pkg::{self, install_pkgs, pacstrap_at},
|
||||
pkg::{self, install_pkgs, pacstrap_at, setup_kernel},
|
||||
print_status,
|
||||
};
|
||||
|
||||
|
@ -129,7 +129,8 @@ pub fn install(mut conf: InstallConfig, bare: bool) {
|
|||
|
||||
pub fn install_mnt(conf: InstallConfig, bare: bool) {
|
||||
// Base Install
|
||||
pacstrap_at("/mnt", conf.pkg.kernel.as_ref(), &conf.pkg.pkg);
|
||||
pacstrap_at("/mnt", &conf.pkg.pkg);
|
||||
setup_kernel(conf.pkg.kernel.clone());
|
||||
genfstab();
|
||||
|
||||
// Configuration
|
||||
|
|
|
@ -67,7 +67,7 @@ fn main() {
|
|||
ensure_root();
|
||||
let dir: &String = tar_options.get_one("dir").unwrap();
|
||||
print_status("Pacstrapping root fs");
|
||||
pacstrap_at(&dir, None, &[]);
|
||||
pacstrap_at(&dir, &[]);
|
||||
setup_navos(dir.as_str());
|
||||
}
|
||||
Some(("create-img", install_args)) => {
|
||||
|
|
14
src/pkg.rs
14
src/pkg.rs
|
@ -36,18 +36,20 @@ pub fn install_pkgs(pkg: &[&str]) {
|
|||
arch_chroot(&cmd, None, true);
|
||||
}
|
||||
|
||||
pub fn setup_kernel(kernel: Option<String>) {
|
||||
let linux_kernel = "linux".to_string();
|
||||
let kernel = kernel.unwrap_or(linux_kernel);
|
||||
let headers = format!("{kernel}-headers");
|
||||
install_pkgs(&[kernel.as_str(), headers.as_str()]);
|
||||
}
|
||||
|
||||
// PACSTRAP
|
||||
|
||||
/// Initial system pacstrap
|
||||
pub fn pacstrap_at(dir: &str, kernel: Option<&String>, pkg: &[String]) {
|
||||
pub fn pacstrap_at(dir: &str, pkg: &[String]) {
|
||||
// TODO : rearrange pkgs + minify
|
||||
let mut cmd: Vec<&str> = vec!["pacstrap", "-K", dir, "base"];
|
||||
|
||||
let linux_kernel = "linux".to_string();
|
||||
let kernel = kernel.unwrap_or(&linux_kernel);
|
||||
let headers = format!("{kernel}-headers");
|
||||
cmd.extend(&[kernel.as_str(), headers.as_str()]);
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
{
|
||||
cmd.extend(&["archlinuxarm-keyring"]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue