Browse Source

x230: include x230_before_first_install in x230_skulls

All we do is the bios vendor/version check. We can do that in any case.
Requirements don't change.
pull/102/head
Martin Kepplinger 5 years ago
parent
commit
eb91023c99
4 changed files with 20 additions and 65 deletions
  1. +2
    -2
      x230/README.md
  2. +1
    -1
      x230/release.sh
  3. +0
    -62
      x230/x230_before_first_install.sh
  4. +17
    -0
      x230/x230_skulls.sh

+ 2
- 2
x230/README.md View File

@ -33,7 +33,7 @@ beautiful:
* [How to rebuild](#how-to-reproduce-the-release-images)
## TL;DR
1. run `sudo ./x230_before_first_install.sh` on your current X230 Linux system
1. run `sudo ./x230_skulls.sh` on your current X230 Linux system
2. Power down, remove the battery. Remove the keyboard and palmrest. Connect
a hardware flasher to an external PC (or a Raspberry Pi with a SPI 8-pin chip clip
can directly be used), and run
@ -48,7 +48,7 @@ branch is _not_ meant to be stable. Use it for testing only.
## First-time installation
#### before you begin
Before starting, run Linux on your X230, install `dmidecode` and run
`sudo ./x230_before_first_install.sh`. It simply prints system information and
`sudo ./x230_skulls.sh`. It simply prints system information and
helps you to be up to date.
Also make sure you have the latest skulls-x230 package release by running `./upgrade.sh`.


+ 1
- 1
x230/release.sh View File

@ -133,7 +133,7 @@ cp ../SOURCE.md "$RELEASE_DIR"
# copy in x230 stuff
cp -a README.md NEWS util LICENSE* functions.sh \
x230_before_first_install.sh x230_skulls.sh x230_heads.sh \
x230_skulls.sh x230_heads.sh \
external_install_bottom.sh external_install_top.sh \
upgrade.sh \
"$RELEASE_DIR"


+ 0
- 62
x230/x230_before_first_install.sh View File

@ -1,62 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-3.0+
# Copyright (C) 2018, Martin Kepplinger <martink@posteo.de>
source functions.sh
set -e
usage()
{
echo "Skulls for the X230"
echo " Run this script on the X230 directly."
echo " It checks BIOS and hardware for relevant"
echo " things if you plan to install Skulls"
echo " please make sure dmidecode is installed"
echo ""
echo "Usage: $0"
}
args=$(getopt -o h -- "$@")
if [ $? -ne 0 ] ; then
usage
exit 1
fi
eval set -- "$args"
while [ $# -gt 0 ]
do
case "$1" in
-h)
usage
exit 1
;;
--)
shift
break
;;
*)
echo "Invalid option: $1"
exit 1
;;
esac
shift
done
force_x230_and_root
BIOS_VENDOR=$(dmidecode -t bios | grep Vendor | cut -d':' -f2)
if [[ $BIOS_VENDOR = *"coreboot"* ]] ; then
echo "coreboot already installed. Ready to use x230_skulls.sh"
exit 0
fi
BIOS_VERSION=$(dmidecode -s bios-version | grep -o '[1-2].[0-7][0-9]')
bios_major=$(echo "$BIOS_VERSION" | cut -d. -f1)
bios_minor=$(echo "$BIOS_VERSION" | cut -d. -f2)
if [ "${bios_minor}" -ge "60" ] ; then
echo "Ready to use external_install_bottom.sh and external_install_top.sh"
else
echo -e "The installed original BIOS is very old and doesn't include the latest Embedded Controller Firmware."
echo -e "${RED}Please upgrade${NC} before installing coreboot."
fi

+ 17
- 0
x230/x230_skulls.sh View File

@ -52,6 +52,23 @@ done
force_x230_and_root
BIOS_VENDOR=$(dmidecode -t bios | grep Vendor | cut -d':' -f2)
if [[ $BIOS_VENDOR != *"coreboot"* ]] ; then
BIOS_VERSION=$(dmidecode -s bios-version | grep -o '[1-2].[0-7][0-9]')
bios_major=$(echo "$BIOS_VERSION" | cut -d. -f1)
bios_minor=$(echo "$BIOS_VERSION" | cut -d. -f2)
if [ "${bios_minor}" -ge "60" ] ; then
echo "Ready to use external_install_bottom.sh and external_install_top.sh"
echo "Please run both scripts from a different computer with a"
echo "hardware SPI flasher."
else
echo -e "The installed original BIOS is very old."
echo -e "${RED}Please upgrade${NC} from lenovo.com before installing coreboot."
fi
exit 0
fi
if [ ! "$have_input_image" -gt 0 ] ; then
image_available=$(ls -1 | grep x230_coreboot_seabios || true)
if [ -z "${image_available}" ] ; then


Loading…
Cancel
Save