Merge branch 'master' of github.com:akatrevorjay/edid-generator

* 'master' of github.com:akatrevorjay/edid-generator:
  added -a paramter to local & removed debugging statements
  removed local -a from creating of variable lines. kept crashing under ubuntu 14.04
  failed because version of edid-decode had leading spaces in front of Checksum.  added pattern that matches leading spaces
This commit is contained in:
Trevor Joynson (trevorj)
2017-12-21 21:58:44 -08:00
2 changed files with 14 additions and 17 deletions

View File

@@ -20,7 +20,7 @@ clean:
%.crc: %.bin.nocrc %.crc: %.bin.nocrc
cat $^ | edid-decode \ cat $^ | edid-decode \
| sed -ne 's/^Checksum: 0x\w\+ (should be \(0x\w\+\))$$/\1/p' >$@ | sed -ne 's/^[ ]*Checksum: 0x\w\+ (should be \(0x\w\+\))$$/\1/p' >$@
%.p: %.crc %.S %.p: %.crc %.S
cc -c -DCRC="$$(cat $*.crc)" -o $@ $*.S cc -c -DCRC="$$(cat $*.crc)" -o $@ $*.S

View File

@@ -62,33 +62,30 @@ template-S() {
esac esac
local -A defines local -A defines
defines=( defines=(
TIMING_NAME "${(qqq)name}"
CLOCK "$pixel_clock_khz"
XPIX "$hdisp"
XBLANK "$((htotal - hdisp))"
XOFFSET "$((hsyncstart - hdisp))"
XPULSE "$((hsyncend - hsyncstart))"
YPIX "$vdisp"
YBLANK "$((vtotal - vdisp))"
YOFFSET "(63+$((vsyncstart - vdisp)))"
YPULSE "(63+$((vsyncend - vsyncstart)))"
VERSION "${edid_version%%.*}" VERSION "${edid_version%%.*}"
REVISION "${edid_version#*.}" REVISION "${edid_version#*.}"
CLOCK "$pixel_clock_khz"
XPIX "$hdisp"
YPIX "$vdisp"
XY_RATIO "XY_RATIO_${(U)ratio//:/_}" XY_RATIO "XY_RATIO_${(U)ratio//:/_}"
XBLANK "$((htotal - hdisp))"
YBLANK "$((vtotal - vdisp))"
XOFFSET "$((hsyncstart - hdisp))"
XPULSE "$((hsyncend - hsyncstart))"
YOFFSET "(63+$((vsyncstart - vdisp)))"
YPULSE "(63+$((vsyncend - vsyncstart)))"
DPI "$dpi" DPI "$dpi"
VFREQ "$vfreq_hz" VFREQ "$vfreq_hz"
TIMING_NAME "${(qqq)name}"
HSYNC_POL "$hsync_polarity" HSYNC_POL "$hsync_polarity"
VSYNC_POL "$vsync_polarity" VSYNC_POL "$vsync_polarity"
) )
local -a lines=('/* '"$name: $REPLY"' */') local lines=('/* '"$name: $REPLY"' */') # removed -a option
local k local k
for k in ${(k)defines}; do for k in "${(@k)defines}"; do
lines+=("#define $k ${defines[$k]}") lines+=("#define $k ${defines[$k]}")
done done
lines+=('#include "edid.S"') lines+=('#include "edid.S"')