Commit Graph

64 Commits

Author SHA1 Message Date
Hamish Coleman
ea767e935d Add support to the FL2_copyIMG script to search for the NAPI header, thus allowing x61 FL2 images to be supported 2019-03-11 19:14:46 +08:00
Hamish Coleman
d417ce260a Attempt to fix bad bootsectors
Some (recent) ISO images have started having a zero byte as the first
byte of the MBR boot code embedded in the hard disk image.

When the original Lenovo ISO is booted, nobody has reported any issues,
however when a patched IMG file is created from that, it just hangs
- which does match with having bad bootcode data.

I was unable to reproduce the issue when running the images in qemu,
which is even more confusing.

Since every working image has the same first byte (a "CLI" instruction)
we attempt to repair things by simply changing it back to that byte.
2019-02-16 11:14:16 +08:00
Hamish Coleman
78e6203a7b Add a generic extractor for x60 era FL2 files 2019-02-15 09:35:48 +08:00
Hamish Coleman
ea4e9da2ac Rename the _EC header detector to be more specific 2019-02-15 09:03:02 +08:00
Hamish Coleman
875e43cfbc Add some details for X60 firmware - Just a Description entry and updates to the FL2_copyIMG script - this is a firmware update package that is not structured the way the rest of the process expects 2019-02-14 21:19:50 +08:00
Hamish Coleman
c7e7502201 Make the location of the known all 0xff block variable 2019-02-14 21:17:32 +08:00
Hamish Coleman
a6a46828d7 Throw the known data block around by reference, rather than looking it up on use 2019-02-14 21:14:07 +08:00
Hamish Coleman
ceb2aa01f0 Bail out immediately if we have no matching known signature 2019-02-14 21:08:01 +08:00
Hamish Coleman
9c6e3df503 Note where this signature came from 2019-02-14 21:06:22 +08:00
Hamish Coleman
ee69775ebc Update Copyright notices for a new year 2019-02-14 20:57:10 +08:00
Hamish Coleman
eb2ba3eb0b Notice that another year has gone past and update the copyright headers 2018-11-30 09:27:50 +08:00
Hamish Coleman
dfbd7e8127 Provide slightly more details when a patch fails 2018-11-30 09:22:38 +08:00
Hamish Coleman
d5e4cb161d Add some guesses to FL2_copyIMG for older X200 extraction.
The FL2_copyIMG tool uses some heuristics to work out how to extract the
EC firmware image from inside the FL2 container.  Many of these are simply
guesses, so there are checks to try to only match files that "look" right.

Add some matches for the 7XHT21WW and 7XHT22WW firmware (See #104)
2018-11-29 16:34:54 +08:00
Hamish Coleman
b9ae23d169 Consistantly call perl the same way each time 2018-10-25 16:32:20 +01:00
Hamish Coleman
23232fb0d6 Address shellcheck issues with script - ensuring it is plain shell with no extensions 2018-10-25 16:31:36 +01:00
Hamish Coleman
4cae4d7745 Address shellcheck issues and convert to standard shell 2018-10-25 16:23:16 +01:00
Hamish Coleman
f9029928ad Script doesnt need bash extensions, simply convert it 2018-10-25 16:22:55 +01:00
Hamish Coleman
8ddbbe7559 Address shellcheck issue with describe script 2018-10-25 16:18:40 +01:00
Hamish Coleman
0e4f08e6df Skip over deps lines with tagging errors - but warn about it 2018-08-07 22:48:38 +08:00
Hamish Coleman
b3a51d5b4e Actually return failure when scripts/FL2_copyIMG has failed 2018-07-12 08:24:18 +01:00
Hamish Coleman
09b2a27abb dont show the output of the mtools install test 2018-05-06 18:23:23 +08:00
Hamish Coleman
24d4072bd2 Add a sanity check to try and ensure that we have the right tools installed 2018-04-14 10:41:19 +08:00
Hamish Coleman
867d3860af Improve error outputs from FL2 extraction/guessing to remind me that there might be a whitelist change needed 2018-03-30 13:18:19 +08:00
Hamish Coleman
d8adcb5a11 Add x280 EC image extraction 2018-03-30 13:17:43 +08:00
Hamish Coleman
d16e339a51 Allow keeping files with bad checksums, for investigation 2018-02-15 11:19:39 +08:00
Hamish Coleman
8580e64b9a Add support for perl versions older than 5.12 by removing unimplmented elipsis (ref #63) 2018-02-05 17:16:16 +11:00
Hamish Coleman
ceb0fe1728 Ignore case in checksum comparisons 2017-10-20 10:09:47 +08:00
Hamish Coleman
cadeaf302e Add a quick way to generate a directory list of any iso firware file 2017-10-07 17:25:22 +08:00
Hamish Coleman
da2da763e9 Remember to cite skochinsky as the original contributor of the PFH header details 2017-09-05 12:56:31 +08:00
Hamish Coleman
c1f42903d9 Add support for extracting firmware images from FL1 files with PFH headers embedded in the file 2017-09-05 11:36:01 +08:00
Hamish Coleman
844a6d1ad6 Remvoe trailing spaces from scripts 2017-09-05 11:19:38 +08:00
Hamish Coleman
361e37003d Support sha256 checksums 2017-09-05 10:57:18 +08:00
Hamish Coleman
e57d26dc05 Check for at least one type of syntax error in the Descriptions file 2017-07-17 22:52:02 +10:00
Hamish Coleman
615f87dd2b Remove the last manually maintained list from the Makefile - all lists of rules are now generated from the Descriptions.txt 2017-07-03 19:02:49 +08:00
Hamish Coleman
c0b2178942 Remove most of the variables from the autoexec.bat template
Instead use a *.report file for each component and add data as we
go, culminating in the built image simply catting the report to the
screen to show the user what is about to occur.

This is on the path towards removing all variables from the autoexec
template - which would make it simpler to reuse the same template for
other commands (e.g the x200 series does not use dosflash.exe)
2017-07-03 18:17:54 +08:00
Hamish Coleman
409f88c75c Rename the FL2 copy script to make it clear that it deals with ISO files - and use the same naming as the IMG copy script 2017-07-03 17:43:53 +08:00
Hamish Coleman
73d58f4211 Allow the .bat file to be generated only on the insert phase, and remove the dep where it is not known how to make a full build 2017-07-03 14:52:40 +08:00
Hamish Coleman
b9b1e2977f use the Descriptions file to generate most of the static rules 2017-07-03 14:12:42 +08:00
Hamish Coleman
96485bb94d Enhance the format of the descriptions file - allowing more data to be added.
Changing the "generator" field to be tagged with its contents will allow the
use of alternate checksum types and also will allow for the additional
information needed to generate some of the make rules automatically.
2017-07-02 17:20:58 +08:00
Hamish Coleman
ae52989189 Remove the last set of the *.slice files and replace them with a script that can generically extract all currently known firmware images from their FL2 files 2017-07-01 09:22:52 +08:00
Hamish Coleman
5f34b3220b Ensure that copyFL2 does not interactively prompt 2017-06-30 11:36:58 +08:00
Hamish Coleman
d0c011aecf Remove the .orig from all the Descriptions.txt entries - this will make it easier to create automatic rules in the future 2017-06-30 11:36:36 +08:00
Hamish Coleman
93cd2279e2 Make the args checking in scripts/checksum more consistant 2017-06-30 11:35:33 +08:00
Hamish Coleman
4bdea62a10 Partially revert 73049887 - Much of the functionallity of this script is impaired by the new shell opts 2017-06-30 11:34:49 +08:00
Hamish Coleman
390f5bb659 Cannot error on unset variables and at the same time process maybe-empty commandline args 2017-06-30 11:04:48 +08:00
Hamish Coleman
46cb7c09a8 Add img extraction to the FL2_copyIMG script 2017-06-30 09:48:04 +08:00
Hamish Coleman
5a46265e58 Convert FL2_copyIMG to hand around buffer refs, not copy buffers - allowing sane use for larger buffers 2017-06-30 09:35:53 +08:00
Hamish Coleman
34ab798830 Add the start of a script that will allow removing the *.FL2.slice files 2017-06-30 09:03:49 +08:00
Hamish Coleman
43506237f0 Allow the makefile to explicitly specify to copyFL2 which FL2 file should be worked on 2017-06-29 12:51:03 +08:00
Hamish Coleman
f5941006c4 Run shellcheck over other scripts too 2017-06-29 12:15:26 +08:00