heads/initrd/bin/x230-flash.init
Kyle Rankin 3eb62eed1a
Use global /tmp/config that combines multiple config files
As part of the config gui we want to be able to have the system define
new config options without them being lost if the user makes their own
changes in CBFS. To allow that this change creates a function initiated
in init that combines all /etc/config* files into /tmp/config. All
existing scripts have been changed to source /tmp/config instead of
/etc/config. The config-gui.sh script now uses /etc/config.user to hold
user configuration options but the combine_configs function will allow
that to expand as others want to split configuration out further.

As it stands here are the current config files:

/etc/config -- Compiled-in configuration options
/etc/config.user -- User preferences that override /etc/config
/tmp/config -- Running config referenced by the BIOS, combination
               of existing configs
2018-12-06 15:24:28 -08:00

27 lines
582 B
Bash
Executable File

#!/bin/sh
# Initialize the USB and network device drivers,
# invoke a recovery shell and prompt the user for how to proceed
. /etc/functions
. /tmp/config
insmod /lib/modules/ehci-hcd.ko
insmod /lib/modules/ehci-pci.ko
insmod /lib/modules/xhci-hcd.ko
insmod /lib/modules/xhci-pci.ko
insmod /lib/modules/e1000e.ko
insmod /lib/modules/usb-storage.ko
tpm extend -ix 4 -ic recovery
sleep 2
echo '***** Starting recovery shell'
echo ''
echo 'To install from flash drive:'
echo ''
echo ' mount -o ro /dev/sdb1 /media'
echo ' flashrom-x230.sh /media/x230.rom'
echo ''
exec /bin/ash