summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-09-20 08:19:00 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-09-20 08:22:51 (EDT)
commiteb8c2f307e81223460157ddeddbdb66effb88201 (patch)
tree95c828019bef0a94336230ee8d1cd7482f8035bb
parent0c7517f0ecd99d347821f62d4446e4a5c0d6ba00 (diff)
downloadlibreboot-feature/gm45-lvds-second-channel-kludge.zip
libreboot-feature/gm45-lvds-second-channel-kludge.tar.gz
libreboot-feature/gm45-lvds-second-channel-kludge.tar.bz2
build/roms/withgrub_helper: Build extra dual-channel LVDS ROMsfeature/gm45-lvds-second-channel-kludge
-rwxr-xr-xresources/scripts/helpers/build/roms/withgrub_helper32
1 files changed, 32 insertions, 0 deletions
diff --git a/resources/scripts/helpers/build/roms/withgrub_helper b/resources/scripts/helpers/build/roms/withgrub_helper
index 87aa214..74c56cd 100755
--- a/resources/scripts/helpers/build/roms/withgrub_helper
+++ b/resources/scripts/helpers/build/roms/withgrub_helper
@@ -74,6 +74,25 @@ do
fi
fi
+ # XXX: Warning: Atrocious kludge! Drop when automatic LVDS second
+ # channel enablement is implemented in coreboot.
+ for lvds_channels in lvds1ch lvds2ch; do
+ if [ "x${lvds_channels}" = 'xlvds2ch' ]; then
+ case "${boardtarget}" in
+ [rt][45]00_*) ;;
+ *) continue;;
+ esac
+ mainboard_dir="$(sed -n \
+ 's/^CONFIG_MAINBOARD_DIR="\(.*\)"$/\1/p' \
+ 'config_txtmode')"
+ mv "src/mainboard/${mainboard_dir}/devicetree.cb" \
+ "src/mainboard/${mainboard_dir}/devicetree.cb.orig"
+ sed 's/\(register "gfx.lvds_dual_channel"\) = "0"/\1 = "1"/' \
+ "src/mainboard/${mainboard_dir}/devicetree.cb.orig" \
+ "src/mainboard/${mainboard_dir}/devicetree.cb"
+ fi
+ # XXX: End kludge.
+
# Build coreboot ROM image
make clean
mv "config_${romtype}" ".config"
@@ -110,10 +129,23 @@ do
./util/cbfstool/cbfstool "${boardtarget}_${keymap}_${romtype}.rom" add -f "grub_${keymap}_${romtype}.cfg" -n grub.cfg -t raw
# Insert grub test config into the image (for the user to test modifications to before modifying the main one)
./util/cbfstool/cbfstool "${boardtarget}_${keymap}_${romtype}.rom" add -f "grub_${keymap}_${romtype}_test.cfg" -n grubtest.cfg -t raw
+
+ # XXX: Warning: Atrocious kludge! Drop when automatic LVDS
+ # second channel enablement is implemented in coreboot.
+ mv "${boardtarget}_${keymap}_${romtype}.rom" \
+ "${boardtarget}_${keymap}_${romtype}_${lvds_channels}.rom"
+ # XXX: End kludge.
done
# This config-less ROM is no longer needed
rm -f "${boardtarget}_${romtype}.rom"
+
+ # XXX: Warning: Atrocious kludge! Drop when automatic LVDS second
+ # channel enablement is implemented in coreboot.
+ mv "src/mainboard/${mainboard_dir}/devicetree.cb.orig" \
+ "src/mainboard/${mainboard_dir}/devicetree.cb" \
+ done
+ # XXX: End kludge.
done
# Now we clean up and prepare the bin directory containing all the images