diff --git a/README.md b/README.md index 27a6b8c5..39a6119c 100644 --- a/README.md +++ b/README.md @@ -76,17 +76,28 @@ sphinx-autobuild source build/html #### Publish BIOS ROM Images -BIOS ROM images are written to OPNsense appliances using a FAT32 formatted drive containing in its root directory +BIOS ROM images are written to Deciso appliances using a FAT32 formatted (thumb) drive containing in its root directory the combined contents of the `source/hardware/files/BIOS_update_sources.zip` file and the latest platform-specific compressed BIOS ROM image. The BIOS_update_sources directory contains the EFI boot structure to trigger the -`startup.nsh` file when booting from the drive. +`startup.nsh` file when booting from the drive and kickstart the update using the `LATEST.FD` file. + +The SHA256 hash of the `BIOS_update.sources.zip` file: ``` 0cf1b042223482ea073a7a3599d6170be7c849ff8399936cf5a9db1ec5406dcf BIOS_update_sources.zip ``` -Place a `.FD` ROM image into the `source/hardware/files/` directory and run: +To create a publishable archive, use the provided `make_bios.py` script and give it the platform type, version number and +source `.fd` file: ``` -./make_bios.py --platform --source <.FD filename> +./make_bios.py --platform --version --source <.FD filename> ``` + +Example output: + +``` +2d5143f221fa120ef6d5c8799a90bd2c08e8238b3b9dd350327336d0605944a6 source/hardware/files/A10_v30_bios.tar.gz +``` + +A SHA256 hash of the resulting compressed archive is provided for integrity checking. diff --git a/make_bios.py b/make_bios.py index d0166e6e..6410280b 100755 --- a/make_bios.py +++ b/make_bios.py @@ -86,20 +86,29 @@ def calculate_sha256(file_path): if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--platform', help='BIOS platform [A10|A20|A30]') - parser.add_argument('--source', help='BIOS ROM image name in source/hardware/files') + parser.add_argument('--version', help='BIOS version (for example: 13a)') + parser.add_argument('--source', help='BIOS ROM image file (.fd)') args = parser.parse_args() if not args.platform or args.platform not in ['A10', 'A20', 'A30']: - print('invalid platform') + print('invalid platform, expected A10, A20 or A30') exit(1) - if not args.source.endswith('.FD'): - print('invalid source file, must be a .FD file') + if not args.version: + print('No version specified') + exit(1) + + if not args.source.lower().endswith('.fd'): + print('invalid source file') + exit(1) + + if not os.path.isfile(args.source): + print('source file not found') exit(1) static = 'source/hardware/files/BIOS_update_sources.zip' - source = f'source/hardware/files/{args.source}' - output = f'source/hardware/files/{args.platform}_bios' + source = args.source + output = f'source/hardware/files/{args.platform}_v{args.version}_bios' merge_files(static, source, output) print(calculate_sha256(f'{output}.tar.gz'), f'{output}.tar.gz') diff --git a/source/hardware/bios.rst b/source/hardware/bios.rst index 1c7bae28..1c96eb3d 100644 --- a/source/hardware/bios.rst +++ b/source/hardware/bios.rst @@ -23,7 +23,7 @@ DEC800, DEC3800 & DEC4000 series +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | Download |SHA256 Checksum | +=========================================================================+===============================================================================+ -|:download:`Archive ` |da3bb83194d92af5b61b37a44286dd181f0d44e4e4d9683968c3bd60cbcb89a6 | +|:download:`Archive ` |9089a1875617fedf0ae634515d31e683e67f494ae55df8cfcac2db6edfb00888 | +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | CVE Update. | +---------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -38,7 +38,7 @@ DEC700 and DEC2700 series +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | Download |SHA256 Checksum | +=========================================================================+===============================================================================+ -|:download:`Archive ` |30b3df027140b9eaa8affe8c571f5ab580cc895d2102d613cf52341cd8eb6a86 | +|:download:`Archive ` |2d5143f221fa120ef6d5c8799a90bd2c08e8238b3b9dd350327336d0605944a6 | +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | CVE Update. | +---------------------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/source/hardware/files/A10_bios.tar.gz b/source/hardware/files/A10_v30_bios.tar.gz similarity index 90% rename from source/hardware/files/A10_bios.tar.gz rename to source/hardware/files/A10_v30_bios.tar.gz index 33fe7a25..5e4a8046 100644 Binary files a/source/hardware/files/A10_bios.tar.gz and b/source/hardware/files/A10_v30_bios.tar.gz differ diff --git a/source/hardware/files/A20_bios.tar.gz b/source/hardware/files/A20_v15_bios.tar.gz similarity index 74% rename from source/hardware/files/A20_bios.tar.gz rename to source/hardware/files/A20_v15_bios.tar.gz index 07c7837d..36eff978 100644 Binary files a/source/hardware/files/A20_bios.tar.gz and b/source/hardware/files/A20_v15_bios.tar.gz differ