mirror of
https://github.com/morluto/rea.git
synced 2026-11-20 13:45:30 +00:00
fix(ci): preserve UEFI decoder reachability in Knip (#12545)
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
This commit is contained in:
1 parent
f5573a0064
commit
d06d6a6110
4 files changed
+3
-32
No files matched your search
@@ -60,11 +60,6 @@ export const ffsChecksumVerdictSchema = z.enum([
|
||||
"pad-file-unchecked",
|
||||
"unchecked",
|
||||
]);
|
||||
/** FFS file types that carry sections in FFS2 layout. */
|
||||
export const sectionedFfsTypeNameSchema = ffsTypeNameSchema.exclude([
|
||||
"raw",
|
||||
"freeform",
|
||||
]);
|
||||
const alignmentSchema = z.enum([
|
||||
"1",
|
||||
"16",
|
||||
@@ -529,10 +524,6 @@ export type UefiInspectResult = z.infer<
|
||||
export type UefiExtractResult = z.infer<
|
||||
(typeof uefiResultSchemas)["extract_uefi_firmware"]
|
||||
>;
|
||||
export type UefiNvramVariableRecord = z.infer<
|
||||
typeof uefiNvramVariableRecordSchema
|
||||
>;
|
||||
export type UefiNvramStoreRecord = z.infer<typeof uefiNvramStoreRecordSchema>;
|
||||
export type UefiNvramInspectResult = z.infer<
|
||||
(typeof uefiResultSchemas)["inspect_uefi_nvram"]
|
||||
>;
|
||||
@@ -76,16 +76,6 @@ export const FFS_ATTRIBUTE_MASKS = {
|
||||
checksumValid: 0x40,
|
||||
} as const;
|
||||
|
||||
/** FFS state bits after erase-polarity normalization (PI Specification 3.3.5). */
|
||||
export const FFS_STATE_BITS = {
|
||||
headerConstruction: 0x01,
|
||||
headerValid: 0x02,
|
||||
dataValid: 0x04,
|
||||
markedForUpdate: 0x08,
|
||||
deleted: 0x10,
|
||||
headerInvalid: 0x20,
|
||||
} as const;
|
||||
|
||||
/** FIRMWARE_VOLUME_ATTRIBUTES: bit 0x800 marks bits-on-erased-when-set polarity. */
|
||||
export const FV_ATTRIBUTE_ERASE_POLARITY = 0x800;
|
||||
|
||||
|
||||
@@ -63,9 +63,9 @@ const main = async (): Promise<void> => {
|
||||
);
|
||||
let reply: UefiLzmaReply;
|
||||
try {
|
||||
const require2 = createRequire(import.meta.url);
|
||||
const lzma = require2("lzma-purejs");
|
||||
const workerModulePath = require2.resolve("lzma-purejs");
|
||||
const require = createRequire(import.meta.url);
|
||||
const lzma = require("lzma-purejs");
|
||||
const workerModulePath = require.resolve("lzma-purejs");
|
||||
const upstreamMetadata = JSON.parse(
|
||||
await readFile(join(workerModulePath, "..", "package.json"), "utf8"),
|
||||
);
|
||||
|
||||
Vendored
-10
@@ -1,7 +1,5 @@
|
||||
import { Buffer } from "node:buffer";
|
||||
|
||||
import { formatGuidLittleEndian } from "../../src/uefi/UefiGuid.js";
|
||||
|
||||
/** LZMA custom GUIDed-section definition GUID (display form). */
|
||||
export const GUID_LZMA_CUSTOM_DISPLAY = "ee4e5898-3914-4259-9d6e-dc7bd79403cf";
|
||||
|
||||
@@ -279,11 +277,3 @@ export function buildImage(spec: ImageSpec): Buffer {
|
||||
}
|
||||
return Buffer.concat(chunks);
|
||||
}
|
||||
|
||||
/** Round-trip sanity: a built FV header must parse its checksum as valid. */
|
||||
export function assertBuiltFvHeaderIntegrity(fv: BuiltFv): void {
|
||||
const guid = formatGuidLittleEndian(fv.buffer, 16);
|
||||
if (guid == null || guid !== "8c8ce578-8a3d-4f1c-9935-896185c32dd3") {
|
||||
throw new Error("fixture FV header GUID mismatch");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user