mirror of
https://github.com/akatrevorjay/edid-generator.git
synced 2026-01-15 23:50:28 +01:00
6
Makefile
6
Makefile
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
SOURCES := $(wildcard [0-9]*x[0-9]*.S)
|
SOURCES := $(filter-out edid.S, $(wildcard *.S))
|
||||||
|
|
||||||
BIN := $(patsubst %.S, %.bin, $(SOURCES))
|
BIN := $(patsubst %.S, %.bin, $(SOURCES))
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ clean:
|
|||||||
cc -c -DCRC="0x00" -o $@ $^
|
cc -c -DCRC="0x00" -o $@ $^
|
||||||
|
|
||||||
%.bin.nocrc: %.o
|
%.bin.nocrc: %.o
|
||||||
objcopy -Obinary $^ $@
|
objcopy -j .data -Obinary $^ $@
|
||||||
|
|
||||||
%.crc: %.bin.nocrc
|
%.crc: %.bin.nocrc
|
||||||
cat $^ | edid-decode \
|
cat $^ | edid-decode \
|
||||||
@@ -26,7 +26,7 @@ clean:
|
|||||||
cc -c -DCRC="$$(cat $*.crc)" -o $@ $*.S
|
cc -c -DCRC="$$(cat $*.crc)" -o $@ $*.S
|
||||||
|
|
||||||
%.bin: %.p
|
%.bin: %.p
|
||||||
objcopy -Obinary $^ $@
|
objcopy -j .data -Obinary $^ $@
|
||||||
|
|
||||||
%.bin.ihex: %.p
|
%.bin.ihex: %.p
|
||||||
objcopy -Oihex $^ $@
|
objcopy -Oihex $^ $@
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ template-S() {
|
|||||||
|
|
||||||
local name="${1//\"}"
|
local name="${1//\"}"
|
||||||
[[ -z "$name" ]] && echo "Could not parse modeline: $@" >&2 && return 1
|
[[ -z "$name" ]] && echo "Could not parse modeline: $@" >&2 && return 1
|
||||||
|
[[ "${#name}" -gt 12 ]] && echo "Name cannot be longer than 12 characters: $name is ${#name} characters long" >&2 && return 1
|
||||||
local fn="${name}.S"
|
local fn="${name}.S"
|
||||||
|
|
||||||
local -F pixel_clock_mhz=$2
|
local -F pixel_clock_mhz=$2
|
||||||
@@ -47,8 +48,8 @@ template-S() {
|
|||||||
local arg
|
local arg
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "${(L)arg}" in
|
case "${(L)arg}" in
|
||||||
[-+]hsync) [[ "${arg:1:1}" == "-" ]] || hsync_polarity=1 ;;
|
[-+]hsync) [[ "${arg:0:1}" == "-" ]] || hsync_polarity=1 ;;
|
||||||
[-+]vsync) [[ "${arg:1:1}" == "-" ]] || vsync_polarity=1 ;;
|
[-+]vsync) [[ "${arg:0:1}" == "-" ]] || vsync_polarity=1 ;;
|
||||||
ratio=*|xy_ratio=*) ratio="${arg#*=}" ;;
|
ratio=*|xy_ratio=*) ratio="${arg#*=}" ;;
|
||||||
dpi=*) dpi="${arg#*=}" ;;
|
dpi=*) dpi="${arg#*=}" ;;
|
||||||
edid_version=*) edid_version="${arg#*=}" ;;
|
edid_version=*) edid_version="${arg#*=}" ;;
|
||||||
@@ -60,7 +61,7 @@ template-S() {
|
|||||||
case $ratio in
|
case $ratio in
|
||||||
compute)
|
compute)
|
||||||
ratio=$(find-supported-ratio $hdisp $vdisp 'UNKNOWN')
|
ratio=$(find-supported-ratio $hdisp $vdisp 'UNKNOWN')
|
||||||
printf 'Computed ratio: %s' $ratio
|
printf 'Computed ratio: %s\n' $ratio
|
||||||
[[ $ratio != 'UNKNOWN' ]] || return 1
|
[[ $ratio != 'UNKNOWN' ]] || return 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user