summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* scripts: Remove python23compat.pyKevin O'Connor2021-12-193-21/+3
| | | | | | | It's simpler to use b"" designations around binary strings than to use the as_bytes() function. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* readserial: Improve Python3 compatibilityKevin O'Connor2021-12-191-17/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Increase BUILD_MIN_BIOSTABLE for large romsGerd Hoffmann2021-06-041-0/+4
| | | | | | | | | | | | | BUILD_MIN_BIOSTABLE reserves space in the f-segment. Some data structures -- for example disk drives known to seabios -- must be stored there, so the space available here limits the number of devices seabios is able to manage. This patch sets BUILD_MIN_BIOSTABLE to 8k for bios images being 256k or larger in size. 32bit code is moved off in that case, so we have more room in the f-segment then. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ldnoexec: Add script to remove ET_EXEC flag from intermediate build objectsKevin O'Connor2020-07-241-0/+32
| | | | | | | | Add a script to remove the ET_EXEC flag from the 16bit and "32bit segmented" intermediate objects. This avoids build failures with some linkers that will not allow linking these objects again. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Use git describe --alwaysKevin O'Connor2018-02-271-1/+1
| | | | | | | | Add --always flag to "git describe" command to get a build identifier even if one checks out the repo with a depth parameter that prunes out the last tagged version. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* checkstack: Handle conditional checks at start of functionsKevin O'Connor2016-08-101-0/+5
| | | | | | | | Recent versions of gcc will sometimes place conditional checks in the code prior to setting up the function's stack frame. Handle this case correctly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: fix .text section address alignmentKevin O'Connor2016-02-191-4/+10
| | | | | | | | | | | Some linkers verify that sections have a start address that is aligned with the minimum alignment of that section. Add extra padding to the ".text" section to ensure it is always aligned with the maximum alignment of any section placed in ".text". Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reported by: Ed Maste <emaste@FreeBSD.org>
* build: fix typo in buildversion.pyRoger Pau Monne2015-12-281-1/+1
| | | | | | | | | | | | | | | | | Fixes the following build error: Building ld scripts Traceback (most recent call last): File "./scripts/buildversion.py", line 134, in <module> main() File "./scripts/buildversion.py", line 114, in main cleanbuild, toolstr = tool_versions(options.tools) File "./scripts/buildversion.py", line 90, in tool_versions vers[isbinutils] = "mixed" NameError: global name 'vers' is not defined Makefile:160: recipe for target 'out/romlayout16.lds' failed Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
* acpi: Remove build check for iaslKevin O'Connor2015-11-191-13/+0
| | | | | | | The iasl program is no longer used on a default build. Do not require it to be installed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* acpi_extract: Make the generated .hex files more human readableKevin O'Connor2015-11-191-4/+11
| | | | | | | | Add a comment to the top of the generated file indicating that is is an automatically generated file. Compress output so that up to eight hex values are placed on a single line. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* acpi_extract: Move main code to new function main()Kevin O'Connor2015-11-191-110/+115
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* buildversion: Add debugging messagesKevin O'Connor2015-11-111-2/+19
| | | | | | | Add ability to output debug messages from the buildversion.py build script. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* buildversion: Avoid subprocess.check_output() as that requires python2.7Kevin O'Connor2015-11-091-13/+19
| | | | | | | Don't require python2.7 in buildversion.py. Also, ignore only those exceptions that are known to be possible. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Allow official tarball builds to be considered "clean"Kevin O'Connor2015-10-231-2/+8
| | | | | | | | | | | If building from an official tarball and EXTRAVERSION info is provided, then consider the build to be "clean" (don't include hostname/build timestamp). This is done on the expectation that EXTRAVERSION will have enough information to allow developers to find the builder and build environment should a defect be reported, and therefore the hostname/timestamp is not necessary. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Be more permissive in buildversion.py tool version scanKevin O'Connor2015-10-221-25/+23
| | | | | | | | There is some variation in version strings between various tool chain builds. Make the version tool scan more permissive to attempt to handle these variations. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Generate "reproducible" version strings on "clean" buildsKevin O'Connor2015-10-151-4/+6
| | | | | | | | If the build environment looks "clean" then don't add the build hostname or build time to the version string. This makes the default build string reproducible across builds. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Report gcc and binutils versions in debug logKevin O'Connor2015-10-151-4/+43
| | | | | | | Attempt to extract the gcc and binutils versions. Report that information in the debug log. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Rework version generation; don't allow make version overrideKevin O'Connor2015-10-152-31/+66
| | | | | | | | | | | Convert the script to generate the build version from a shell script to a python script. Remove the ability to override the version at build time via "make VERSION=xyz". Replace it with ability to add extra version information at build time via "make EXTRAVERSION=xyz". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Fix typos found by codespellStefan Weil2015-10-091-1/+1
| | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Support "make VERSION=xyz" to override the default build versionKevin O'Connor2015-06-031-6/+10
| | | | | | | | | | Add a build option to explicitly set the version information compiled into the seabios and seavgabios binaries. This may assist in reproducible builds or to better link builds to distribution packages. If the new "VERSION=" parameter is not provided then the default build version remains unchanged. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Add multiboot support.Vladimir Serbinenko2015-06-011-0/+8
| | | | | | | | | | | | | | | | | | | | I've been successfully using SeaBIOS as secondary bootloader. In more details I have GRUB2-as-payload in flash together with coreboot. SeaBIOS binary is on the HDD and loaded by GRUB when needed. This has an unfortunate consequence that I have to keep vga oprom in flash even if usually I boot without it. This patches makes bios.bin.elf multiboot executable with files passed as modules. Example: menuentry "SeaBIOS (mb)" --unrestricted { root=ahci0,2 multiboot /bios.bin.elf module /vgabios_x230.rom name=pci8086,0166.rom } the parameter name= specifies under which name SeaBIOS will see it. Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* checkstack: Minor - continue if not a regular asm lineKevin O'Connor2015-04-171-54/+54
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Emulate "leal" instructionKevin O'Connor2015-04-111-3/+58
| | | | | | | Emulate the "leal" instruction so that the vgabios can run on older versions of x86emu. (This removes the previous "leal" trap.) Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* checkrom: Fix typo in error messageAndreas Färber2015-03-201-1/+1
| | | | | | increate -> increase Signed-off-by: Andreas Färber <afaerber@suse.de>
* checkstack: Prefer passing "function" class instead of function addressKevin O'Connor2015-03-191-15/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* checkstack: Simplify yield calculationsKevin O'Connor2015-03-191-33/+21
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* checkstack: Replace function information tuple with classKevin O'Connor2015-03-191-69/+77
| | | | | | | Replace the six-tuple storing information on each parsed function with a class. This makes the code more readable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* checkstack: Handle callw instructionKevin O'Connor2015-01-191-0/+2
| | | | | | Minor update to the checkstack.py tool. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* readserial: Enhance pipe supportKevin O'Connor2015-01-011-15/+14
| | | | | | | Automatically close and open the pipe if it closes. Also, better document that the -f option is for pipes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* add scripts/tarball.shGerd Hoffmann2014-11-251-0/+36
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* build: Support declaring 32bit C functions that must reside in the f-segmentKevin O'Connor2014-10-111-5/+11
| | | | | | | | Add support for a FUNCFSEG macro that will force a "32bit flat" C function to be located in the f-segment. This is useful for 32bit code with inline assembler that thunks to 16bit mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Update kconfig to version in Linux 3.16.Kevin O'Connor2014-08-2522-32/+48
| | | | | | | | | | | Update kconfig (from Linux v3.13) to the latest version (Linux v3.16). This copies kconfig from Linux with only the changes necessary to work with the SeaBIOS build (the equivalent of the earlier SeaBIOS 0da7bfdf commit) and the changes necessary to always emit symbols (SeaBIOS b623e7c5 commit). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Minor - fix comments referring to old tools/ directory.Kevin O'Connor2014-06-114-4/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Get fixed address variables from 32bit compile pass (not 16bit)Kevin O'Connor2014-06-111-4/+6
| | | | | | | | | Update the layoutrom.py build script so that fixed address sections can come from the 32bit compiled C code. Update the C code so that all VAR16FIXED variables instead use the new VARFSEGFIXED which is defined in 32bit mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Only export needed fields in LayoutInfo in layoutrom.py.Kevin O'Connor2014-06-111-63/+67
| | | | | | | A number of fields were exported from the layout info that weren't used. Don't bother exporting them. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Use fileid instead of category to write sections in layoutrom.py.Kevin O'Connor2014-06-111-21/+28
| | | | | | | | The 'category' really determines the memory location while the 'fileid' determines which link stage the section is in. So, use 'fileid' when writing the linker scripts. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Keep segmented sections separate until final link step.Kevin O'Connor2014-06-111-32/+20
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Rework getRelocs() to use a hash instead of categories in layoutrom.pyKevin O'Connor2014-06-111-19/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Refactor findInit() function.Kevin O'Connor2014-06-111-28/+18
| | | | | | Push findInit() into main() and unify the category setting code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Use customized entry point for each type of build.Kevin O'Connor2014-06-111-12/+15
| | | | | | | | | | | | | | | Set an appropriate elf entry point (entry_elf, entry_csm, reset_vector) for each type of build (coreboot, csm, qemu). Use that entry point when determining which sections to keep. Also, remove the '.export.' mechanism to keep a section in the final binary - it is no longer used. This allows the build to slightly reduce the overall size as entry_elf is no longer needed on non-coreboot builds and entry_csm is no longer needed on non-csm builds. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Refactor layoutrom.py gc() function.Kevin O'Connor2014-06-111-25/+15
| | | | | | | Eliminate the per-section 'keep' variable - the list of sections that will be emitted is sufficient to track that state. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Extract section visiting logic in layoutrom.py.Kevin O'Connor2014-06-111-57/+60
| | | | | | | Extract out the logic that visits all reachable sections into new function findReachable(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Remove unused function getSectionsStart() from layoutrom.py.Kevin O'Connor2014-06-111-5/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* python3 fixes for vgabios and csm builds.rel-1.7.5Kevin O'Connor2014-05-272-19/+19
| | | | | | | | Avoid using chr() as this produces unicode strings on python3. Make sure to only use ord() on slices as the python3 bytearray type returns an integer on a non-slice array access. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* scripts: Allow encodeint.py to take integers in hex notation.Kevin O'Connor2014-01-221-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Update kconfig to version in Linux 3.13.Kevin O'Connor2014-01-2211-361/+392
| | | | | | | | | | | | Update kconfig (from Linux v3.11-rc6) to the latest version (Linux v3.13). This copyies kconfig from Linux with only the changes necessary to work with the SeaBIOS build (the equivalent of the earlier SeaBIOS 0da7bfdf commit) and the changes necessary to always emit symbols (SeaBIOS b623e7c5 commit). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Be careful with unicode and byte strings for python3 compatibility.Johannes Krampf2014-01-207-18/+44
| | | | Signed-off-by: Johannes Krampf <johannes.krampf@googlemail.com>
* build: Avoid sort() on unordered classes for python3 compatibility.Johannes Krampf2014-01-201-3/+4
| | | | Signed-off-by: Johannes Krampf <johannes.krampf@googlemail.com>
* build: Be explicit that we want integers when dividing for python3 compat.Johannes Krampf2014-01-203-5/+5
| | | | Signed-off-by: Johannes Krampf <johannes.krampf@googlemail.com>
* build: Make print statements in scripts python3 compatible.Johannes Krampf2014-01-205-38/+38
| | | | Signed-off-by: Johannes Krampf <johannes.krampf@googlemail.com>