section

package
v0.0.0-...-341aec2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2025 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Firmware size limits
	FirmwareSize32MB = 32 * 1024 * 1024 // 32MB for older cards
	FirmwareSize64MB = 64 * 1024 * 1024 // 64MB for newer cards

	// ITOC entry size
	ITOCEntrySize = 32

	// Entry size in dwords conversion
	DwordSize = 4

	// CRC sizes
	CRCDwordSize = 7 // 28 bytes = 7 dwords for ITOC/DTOC CRC
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Replacer

type Replacer struct {
	// contains filtered or unexported fields
}

Replacer handles section replacement with proper firmware structure updates

func NewReplacer

func NewReplacer(fwParser *fs4.Parser, firmwareData []byte, logger *zap.Logger) *Replacer

NewReplacer creates a new section replacer

func (*Replacer) ReplaceSection

func (r *Replacer) ReplaceSection(targetSection interfaces.CompleteSectionInterface, newData []byte) ([]byte, error)

ReplaceSection replaces a section and updates all affected structures

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL