Change Python version to 3 because /usr/bin/python is removed in Ubuntu 19.04 and python3 is already used in older Linux distros. I tested in coreboot and it still works.
Signed-off-by: Eloy Degen degeneloy@gmail.com --- Makefile | 17 ++++++++--------- scripts/acpi_extract.py | 2 +- scripts/acpi_extract_preprocess.py | 2 +- scripts/buildrom.py | 2 +- scripts/buildversion.py | 2 +- scripts/checkrom.py | 2 +- scripts/checkstack.py | 2 +- scripts/checksum.py | 2 +- scripts/encodeint.py | 2 +- scripts/layoutrom.py | 2 +- scripts/readserial.py | 2 +- scripts/transdump.py | 2 +- scripts/vgafixup.py | 2 +- 13 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/Makefile b/Makefile index d2d11db..a0c2f2f 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,6 @@ LD=$(CROSS_PREFIX)ld OBJCOPY=$(CROSS_PREFIX)objcopy OBJDUMP=$(CROSS_PREFIX)objdump STRIP=$(CROSS_PREFIX)strip -PYTHON=python CPP=cpp IASL:=iasl LD32BIT_FLAG:=-melf_i386 @@ -160,14 +159,14 @@ $(OUT)romlayout.o: src/romlayout.S $(OUT)autoconf.h $(OUT)asm-offsets.h
$(OUT)romlayout16.lds: $(OUT)ccode32flat.o $(OUT)code32seg.o $(OUT)ccode16.o $(OUT)romlayout.o src/version.c scripts/layoutrom.py scripts/buildversion.py @echo " Building ld scripts" - $(Q)$(PYTHON) ./scripts/buildversion.py -e "$(EXTRAVERSION)" -t "$(CC);$(AS);$(LD);$(OBJCOPY);$(OBJDUMP);$(STRIP)" $(OUT)autoversion.h + $(Q) ./scripts/buildversion.py -e "$(EXTRAVERSION)" -t "$(CC);$(AS);$(LD);$(OBJCOPY);$(OBJDUMP);$(STRIP)" $(OUT)autoversion.h $(Q)$(CC) $(CFLAGS32FLAT) -c src/version.c -o $(OUT)version.o $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode32flat.o $(OUT)version.o -o $(OUT)code32flat.o $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode16.o $(OUT)romlayout.o -o $(OUT)code16.o $(Q)$(OBJDUMP) -thr $(OUT)code32flat.o > $(OUT)code32flat.o.objdump $(Q)$(OBJDUMP) -thr $(OUT)code32seg.o > $(OUT)code32seg.o.objdump $(Q)$(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump - $(Q)$(PYTHON) ./scripts/layoutrom.py $(OUT)code16.o.objdump $(OUT)code32seg.o.objdump $(OUT)code32flat.o.objdump $(OUT)$(KCONFIG_AUTOHEADER) $(OUT)romlayout16.lds $(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds + $(Q) ./scripts/layoutrom.py $(OUT)code16.o.objdump $(OUT)code32seg.o.objdump $(OUT)code32flat.o.objdump $(OUT)$(KCONFIG_AUTOHEADER) $(OUT)romlayout16.lds $(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds
# These are actually built by scripts/layoutrom.py above, but by pulling them # into an extra rule we prevent make -j from spawning layoutrom.py 4 times. @@ -190,7 +189,7 @@ $(OUT)bios.bin.prep: $(OUT)rom.o scripts/checkrom.py $(Q)rm -f $(OUT)bios.bin $(OUT)Csm16.bin $(OUT)bios.bin.elf $(Q)$(OBJDUMP) -thr $< > $<.objdump $(Q)$(OBJCOPY) -O binary $< $(OUT)bios.bin.raw - $(Q)$(PYTHON) ./scripts/checkrom.py $<.objdump $(CONFIG_ROM_SIZE) $(OUT)bios.bin.raw $(OUT)bios.bin.prep + $(Q) ./scripts/checkrom.py $<.objdump $(CONFIG_ROM_SIZE) $(OUT)bios.bin.raw $(OUT)bios.bin.prep
$(OUT)bios.bin: $(OUT)bios.bin.prep @echo " Creating $@" @@ -220,7 +219,7 @@ $(OUT)vgaccode16.raw.s: $(OUT)autoconf.h $(patsubst %.c, $(OUT)%.o,$(SRCVGA)) ;
$(OUT)vgaccode16.o: $(OUT)vgaccode16.raw.s scripts/vgafixup.py @echo " Fixup VGA rom assembler" - $(Q)$(PYTHON) ./scripts/vgafixup.py $< $(OUT)vgaccode16.s + $(Q) ./scripts/vgafixup.py $< $(OUT)vgaccode16.s $(Q)$(AS) --32 src/code16gcc.s $(OUT)vgaccode16.s -o $@ else $(OUT)vgaccode16.o: $(OUT)autoconf.h $(patsubst %.c, $(OUT)%.o,$(SRCVGA)) ; $(call whole-compile, $(CFLAGS16) -Isrc, $(SRCVGA),$@) @@ -232,7 +231,7 @@ $(OUT)vgaentry.o: vgasrc/vgaentry.S $(OUT)autoconf.h $(OUT)asm-offsets.h
$(OUT)vgarom.o: $(OUT)vgaccode16.o $(OUT)vgaentry.o $(OUT)vgasrc/vgalayout.lds vgasrc/vgaversion.c scripts/buildversion.py @echo " Linking $@" - $(Q)$(PYTHON) ./scripts/buildversion.py -e "$(EXTRAVERSION)" -t "$(CC);$(AS);$(LD);$(OBJCOPY);$(OBJDUMP);$(STRIP)" $(OUT)autovgaversion.h + $(Q) ./scripts/buildversion.py -e "$(EXTRAVERSION)" -t "$(CC);$(AS);$(LD);$(OBJCOPY);$(OBJDUMP);$(STRIP)" $(OUT)autovgaversion.h $(Q)$(CC) $(CFLAGS16) -c vgasrc/vgaversion.c -o $(OUT)vgaversion.o $(Q)$(LD) --gc-sections -T $(OUT)vgasrc/vgalayout.lds $(OUT)vgaccode16.o $(OUT)vgaentry.o $(OUT)vgaversion.o -o $@
@@ -242,7 +241,7 @@ $(OUT)vgabios.bin.raw: $(OUT)vgarom.o
$(OUT)vgabios.bin: $(OUT)vgabios.bin.raw scripts/buildrom.py @echo " Finalizing rom $@" - $(Q)$(PYTHON) ./scripts/buildrom.py $< $@ + $(Q) ./scripts/buildrom.py $< $@
################ DSDT build rules @@ -253,9 +252,9 @@ iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \ %.hex: %.dsl ./scripts/acpi_extract_preprocess.py ./scripts/acpi_extract.py @echo " Compiling IASL $@" $(Q)$(CPP) $(CPPFLAGS) $< -o $(OUT)$*.dsl.i.orig - $(Q)$(PYTHON) ./scripts/acpi_extract_preprocess.py $(OUT)$*.dsl.i.orig > $(OUT)$*.dsl.i + $(Q) ./scripts/acpi_extract_preprocess.py $(OUT)$*.dsl.i.orig > $(OUT)$*.dsl.i $(Q)$(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $(OUT)$* $(OUT)$*.dsl.i - $(Q)$(PYTHON) ./scripts/acpi_extract.py $(OUT)$*.lst > $(OUT)$*.off + $(Q) ./scripts/acpi_extract.py $(OUT)$*.lst > $(OUT)$*.off $(Q)cat $(OUT)$*.off > $@
iasl: src/fw/acpi-dsdt.hex src/fw/ssdt-proc.hex src/fw/ssdt-pcihp.hex src/fw/ssdt-misc.hex diff --git a/scripts/acpi_extract.py b/scripts/acpi_extract.py index 3ed863b..f368a0d 100755 --- a/scripts/acpi_extract.py +++ b/scripts/acpi_extract.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin mst@redhat.com # # This file may be distributed under the terms of the GNU GPLv3 license. diff --git a/scripts/acpi_extract_preprocess.py b/scripts/acpi_extract_preprocess.py index 2698118..370512b 100755 --- a/scripts/acpi_extract_preprocess.py +++ b/scripts/acpi_extract_preprocess.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin mst@redhat.com # # This file may be distributed under the terms of the GNU GPLv3 license. diff --git a/scripts/buildrom.py b/scripts/buildrom.py index 0499049..821f421 100755 --- a/scripts/buildrom.py +++ b/scripts/buildrom.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Fill in checksum/size of an option rom, and pad it to proper length. # # Copyright (C) 2009 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/buildversion.py b/scripts/buildversion.py index 8875497..13624ce 100755 --- a/scripts/buildversion.py +++ b/scripts/buildversion.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Generate version information for a program # # Copyright (C) 2015 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/checkrom.py b/scripts/checkrom.py index aced5e2..3f1065c 100755 --- a/scripts/checkrom.py +++ b/scripts/checkrom.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Script to check a bios image and report info on it. # # Copyright (C) 2008 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/checkstack.py b/scripts/checkstack.py index 255768a..3bb58bc 100755 --- a/scripts/checkstack.py +++ b/scripts/checkstack.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Script that tries to find how much stack space each function in an # object is using. # diff --git a/scripts/checksum.py b/scripts/checksum.py index 773fa7a..bef875a 100755 --- a/scripts/checksum.py +++ b/scripts/checksum.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#/usr/bin/env python3 # Script to report the checksum of a file. # # Copyright (C) 2009 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/encodeint.py b/scripts/encodeint.py index 0d34aee..e861d81 100755 --- a/scripts/encodeint.py +++ b/scripts/encodeint.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Encode an integer in little endian format in a file. # # Copyright (C) 2011 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/layoutrom.py b/scripts/layoutrom.py index 6616721..f30326a 100755 --- a/scripts/layoutrom.py +++ b/scripts/layoutrom.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Script to analyze code and arrange ld sections. # # Copyright (C) 2008-2014 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/readserial.py b/scripts/readserial.py index a7383e8..fdee3af 100755 --- a/scripts/readserial.py +++ b/scripts/readserial.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Script that can read from a serial device and show timestamps. # # Copyright (C) 2009 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/transdump.py b/scripts/transdump.py index 665f04a..9877b33 100755 --- a/scripts/transdump.py +++ b/scripts/transdump.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3
# This script is useful for taking the output of memdump() and # converting it back into binary output. This can be useful, for diff --git a/scripts/vgafixup.py b/scripts/vgafixup.py index 2053cd5..01ec814 100644 --- a/scripts/vgafixup.py +++ b/scripts/vgafixup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Work around x86emu bugs by replacing problematic instructions. # # Copyright (C) 2012 Kevin O'Connor kevin@koconnor.net