* dump out dmidecode standard vars
* start trying to auto build a kernel
This commit is contained in:
parent
f84f50088e
commit
714596c2fa
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash -x
|
||||||
|
|
||||||
|
dmidecode -s bios-vendor
|
||||||
|
dmidecode -s bios-version
|
||||||
|
dmidecode -s bios-release-date
|
||||||
|
dmidecode -s system-manufacturer
|
||||||
|
dmidecode -s system-product-name
|
||||||
|
dmidecode -s system-version
|
||||||
|
dmidecode -s system-serial-number
|
||||||
|
dmidecode -s system-uuid
|
||||||
|
dmidecode -s baseboard-manufacturer
|
||||||
|
dmidecode -s baseboard-product-name
|
||||||
|
dmidecode -s baseboard-version
|
||||||
|
dmidecode -s baseboard-serial-number
|
||||||
|
dmidecode -s baseboard-asset-tag
|
||||||
|
dmidecode -s chassis-manufacturer
|
||||||
|
dmidecode -s chassis-type
|
||||||
|
dmidecode -s chassis-version
|
||||||
|
dmidecode -s chassis-serial-number
|
||||||
|
dmidecode -s chassis-asset-tag
|
||||||
|
dmidecode -s processor-family
|
||||||
|
dmidecode -s processor-manufacturer
|
||||||
|
dmidecode -s processor-version
|
||||||
|
dmidecode -s processor-frequency
|
||||||
|
|
|
@ -20,3 +20,5 @@ rpm -qa > $STAMP/rpminfo
|
||||||
dpkg -l > $STAMP/dpkginfo
|
dpkg -l > $STAMP/dpkginfo
|
||||||
lsmod > $STAMP/lsmod
|
lsmod > $STAMP/lsmod
|
||||||
cat /proc/partitions > $STAMP/partitions
|
cat /proc/partitions > $STAMP/partitions
|
||||||
|
|
||||||
|
./dmidecode.sh > $STAMP/dmidecode.all
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
print "Running on " . `hostname`;
|
||||||
|
|
||||||
|
if ( ! -e "linux-3.0.8.tar.xz") {
|
||||||
|
my $return = system("wget -c http://69.55.54.91/linux-3.0.8.tar.xz");
|
||||||
|
}
|
||||||
|
if ( ! -d "linux-3.0.8") {
|
||||||
|
system("tar xfJ linux-3.0.8.tar.xz");
|
||||||
|
system("sync");
|
||||||
|
}
|
||||||
|
|
||||||
|
chdir "linux-3.0.8";
|
||||||
|
system("cp /root/download/kernel/config-3.0.7 .config");
|
||||||
|
|
||||||
|
install_gcc();
|
||||||
|
|
||||||
|
|
||||||
|
system("make odlconfig");
|
||||||
|
my $cpus = `cat /proc/cpuinfo |grep QEMU |wc -l`;
|
||||||
|
chomp $cpus;
|
||||||
|
system("make -j$cpus");
|
||||||
|
|
||||||
|
sub install_gcc {
|
||||||
|
my $return = system("gcc --version");
|
||||||
|
print "gcc RETURN: $return\n";
|
||||||
|
|
||||||
|
if ($return eq "-1") {
|
||||||
|
if (-e "/etc/gentoo-release") {
|
||||||
|
system "emerge gcc";
|
||||||
|
} elsif (-e "/etc/redhat-release") {
|
||||||
|
my @parts = split " ", `cat /etc/redhat-release`;
|
||||||
|
if ($parts[2] eq "5.6") {
|
||||||
|
my $arch = `uname -m`;
|
||||||
|
chomp $arch;
|
||||||
|
if ($arch eq "x86_64") {
|
||||||
|
system "yum install gcc -y";
|
||||||
|
} else {
|
||||||
|
system "yum install gcc -y";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
system "yum install gcc -y";
|
||||||
|
} else {
|
||||||
|
system "apt-get -y install gcc";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
system "gcc --version";
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue