add installation of x86 kernel

This commit is contained in:
parazyd 2016-09-29 22:59:37 +02:00
parent 296f733dbc
commit fbf3c68b5a
No known key found for this signature in database
GPG Key ID: F0CB28FCF78637DE
2 changed files with 70 additions and 9 deletions

View File

@ -27,16 +27,19 @@ devprocsys() {
ckreq || return 1 ckreq || return 1
if [[ $watdo = mount ]]; then if [[ $watdo = mount ]]; then
sudo mount -o bind /sys $werdo/sys && act "mounted sys" sudo mount -o bind /sys $werdo/sys && act "mounted sys" && \
sudo mount -t proc proc $werdo/proc && act "mounted proc" sudo mount -t proc proc $werdo/proc && act "mounted proc" && \
sudo mount -o bind /dev $werdo/dev && act "mounted dev" sudo mount -o bind /dev $werdo/dev && act "mounted dev" && \
sudo mount -o bind /dev/pts $werdo/dev/pts && act "mounted dev/pts" sudo mount -o bind /dev/pts $werdo/dev/pts && act "mounted dev/pts" && \
return 0
elif [[ $watdo = umount ]]; then elif [[ $watdo = umount ]]; then
sudo umount $werdo/dev/pts && act "umounted dev/pts" && sleep 2 sudo umount $werdo/dev/pts && act "umounted dev/pts" && sleep 1 && \
sudo umount $werdo/dev && act "umounted dev" && sleep 2 sudo umount $werdo/dev && act "umounted dev" && sleep 1 && \
sudo umount $werdo/proc && act "umounted proc" && sleep 2 sudo umount $werdo/proc && act "umounted proc" && sleep 1 && \
sudo umount $werdo/sys && act "umounted sys" && sleep 2 sudo umount $werdo/sys && act "umounted sys" && sleep 1 && \
return 0
fi fi
return 1
} }
findloopmapp() { findloopmapp() {
@ -85,7 +88,7 @@ silly() {
"Supplying monkeys with typewriters" "Supplying monkeys with typewriters"
"Swapping time and space" "Swapping time and space"
"Self potato" "Self potato"
"it's all lies" "god is porco"
"A million hamsters are spinning their wheels right now" "A million hamsters are spinning their wheels right now"
) )
local rnd=$(shuf -i1-30 -n 1) local rnd=$(shuf -i1-30 -n 1)

58
zlibs/kernel Normal file
View File

@ -0,0 +1,58 @@
#!/usr/bin/env zsh
# Copyright (c) 2016 Dyne.org Foundation
# libdevuansdk is maintained by Ivan J. <parazyd@dyne.org>
#
# This file is part of libdevuansdk
#
# This source code is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this source code. If not, see <http://www.gnu.org/licenses/>.
## all windows users are suckers
kernel_install_amd64() {
fn kernel_install_amd64
req=(strapdir arch)
freq=($strapdir/.done)
ckreq || return 1
local kernel_base="linux-image"
local kernel="${kernel_base}-amd64"
notice "installing stock kernel for $arch"
devprocsys mount $strapdir
sudo chroot $strapdir \
apt-get --yes --force-yes install $kernel
devprocsys umount $strapdir
}
kernel_install_i386() {
fn kernel_install_i386
req=(strapdir arch)
freq=($strapdir/.done)
ckreq || return 1
local kernel_base="linux-image"
local kernel="${kernel_base}-586"
notice "installing stock kernel for $arch"
devprocsys mount $strapdir
sudo chroot $strapdir \
apt-get --yes --force-yes install $kernel
devprocsys umount $strapdir
}