File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
2- SOURCES := $(wildcard [0-9] * x[0-9] * .S )
2+ SOURCES := $(filter-out edid.S, $( wildcard * .S) )
33
44BIN := $(patsubst % .S, % .bin, $(SOURCES ) )
55
1616 cc -c -DCRC=" 0x00" -o $@ $^
1717
1818% .bin.nocrc : % .o
19- objcopy -Obinary $^ $@
19+ objcopy -j .data - Obinary $^ $@
2020
2121% .crc : % .bin.nocrc
2222 cat $^ | edid-decode \
2626 cc -c -DCRC=" $$ (cat $* .crc)" -o $@ $* .S
2727
2828% .bin : % .p
29- objcopy -Obinary $^ $@
29+ objcopy -j .data - Obinary $^ $@
3030
3131% .bin.ihex : % .p
3232 objcopy -Oihex $^ $@
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ template-S() {
3232
3333 local name=" ${1// \" } "
3434 [[ -z " $name " ]] && echo " Could not parse modeline: $@ " >&2 && return 1
35+ [[ " ${# name} " -gt 12 ]] && echo " Name cannot be longer than 12 characters: $name is ${# name} characters long" >&2 && return 1
3536 local fn=" ${name} .S"
3637
3738 local -F pixel_clock_mhz=$2
@@ -47,8 +48,8 @@ template-S() {
4748 local arg
4849 for arg in " $@ " ; do
4950 case " ${(L)arg} " in
50- [-+]hsync) [[ " ${arg: 1 : 1} " == " -" ]] || hsync_polarity=1 ;;
51- [-+]vsync) [[ " ${arg: 1 : 1} " == " -" ]] || vsync_polarity=1 ;;
51+ [-+]hsync) [[ " ${arg: 0 : 1} " == " -" ]] || hsync_polarity=1 ;;
52+ [-+]vsync) [[ " ${arg: 0 : 1} " == " -" ]] || vsync_polarity=1 ;;
5253 ratio=* |xy_ratio=* ) ratio=" ${arg#* =} " ;;
5354 dpi=* ) dpi=" ${arg#* =} " ;;
5455 edid_version=* ) edid_version=" ${arg#* =} " ;;
@@ -60,7 +61,7 @@ template-S() {
6061 case $ratio in
6162 compute)
6263 ratio=$( find-supported-ratio $hdisp $vdisp ' UNKNOWN' )
63- printf ' Computed ratio: %s' $ratio
64+ printf ' Computed ratio: %s\n ' $ratio
6465 [[ $ratio != ' UNKNOWN' ]] || return 1
6566 ;;
6667 esac
You can’t perform that action at this time.
0 commit comments