Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/modules/base/kspost.50.zip_bootfiles.nochroot.inc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/base/kspost.50.zip_bootfiles.nochroot.inc')
-rw-r--r--modules/base/kspost.50.zip_bootfiles.nochroot.inc40
1 files changed, 35 insertions, 5 deletions
diff --git a/modules/base/kspost.50.zip_bootfiles.nochroot.inc b/modules/base/kspost.50.zip_bootfiles.nochroot.inc
index e5d4cc8..31cd84b 100644
--- a/modules/base/kspost.50.zip_bootfiles.nochroot.inc
+++ b/modules/base/kspost.50.zip_bootfiles.nochroot.inc
@@ -1,12 +1,16 @@
+. $OOB__shlib
+
# Put the unsigned kernel/initramfs in zip files and remove the originals
# This avoids duplication for signed builds (where these zips will be signed
# later), where otherwise we would be shipped both signed and unsigned kernels
# and losing some disk space.
+suffix=$(read_laptop_model_number)
+
# Create zip files
create_unsigned_zip() {
local infile=$1
- local tgt=$2
+ local tgt=${2}${suffix}
cd $INSTALL_ROOT/boot
[ -e $1 ] || return
@@ -40,7 +44,33 @@ remove_original() {
#remove_original initrd.img
# symlink actXX to runXX (or the other way) if any of them are missing
-[ -e $INSTALL_ROOT/boot/actos.zip ] || ln -s runos.zip $INSTALL_ROOT/boot/actos.zip
-[ -e $INSTALL_ROOT/boot/actrd.zip ] || ln -s runrd.zip $INSTALL_ROOT/boot/actrd.zip
-[ -e $INSTALL_ROOT/boot/runos.zip ] || ln -s actos.zip $INSTALL_ROOT/boot/runos.zip
-[ -e $INSTALL_ROOT/boot/runrd.zip ] || ln -s actrd.zip $INSTALL_ROOT/boot/runrd.zip
+create_missing() {
+ local dest=${1}${suffix}.zip
+ local source=${2}${suffix}.zip
+
+ [ -e $INSTALL_ROOT/boot/$dest ] && return 0
+ ln -s $source $INSTALL_ROOT/boot/$dest
+}
+create_missing actos runos
+create_missing actrd runrd
+create_missing runos actos
+create_missing runrd actrd
+
+
+create_compat() {
+ local compat=${1}.zip
+ local dest=${1}${suffix}.zip
+
+ [ -e $INSTALL_ROOT/boot/${dest} ] || return 0
+ ln -s $dest $INSTALL_ROOT/boot/$compat
+}
+
+# Some old, released firmware versions for XO-1 and XO-1.5 don't support the
+# new "versioned" zip file naming scheme. Create symlinks to the old names
+# for backwards compatibility.
+if [ "$suffix" -lt 3 ]; then
+ create_compat actos
+ create_compat actrd
+ create_compat runos
+ create_compat runrd
+fi