jmsmods

package
v0.0.0-...-19051da Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const HookVersion string = "00.00.05" //This 8-byte string must be updated whenever the definitions change incompatibly

Variables

View Source
var HookBinaryReset []byte
View Source
var JMS578_414 = []byte{0x5e, 0x67, 0x7d, 0xaa, 0xc3, 0xdc, 0x3e, 0x31, 0xa0, 0x54, 0x81, 0x13, 0xf5, 0x60, 0x51, 0xde, 0x2e, 0x1d, 0x0b, 0x51}

JMS578_STD_v00.04.01.04_Self Power + ODD.bin

Functions

func PatchBootromForHAL

func PatchBootromForHAL(bootrom []byte) ([]byte, error)

func PatchCreate

func PatchCreate(fw []byte, mods []Mod) ([]byte, error)

func PatchReadInfo

func PatchReadInfo(hookInfoTable [128]byte) ([]uint16, string)

Types

type HookFunc

type HookFunc struct {
	Binary   []byte
	Relocate func(in []byte, loadAddr uint16) []byte
}

type Mod

type Mod string
const (
	/* Make the firmware not write to the flash at all (so you can write protect it) */
	ModFlashNoWrite Mod = "FlashNoWrite"

	/* Make the firmware send the right commands for Adesto AT25DN512 flash */
	ModFlashSupportAT25DN512 Mod = "FlashSupportAT25DN512"

	/* Ignore any nvram present in the firmware file */
	ModClearNVRAM Mod = "ClearNVRAM"

	/* Try to remove all debug commands to secure the device */
	ModNoDebug Mod = "NoDebug"

	/* Add hook to firmware to allow this library to work without rebooting to our own stub */
	ModAddHooks Mod = "AddHooks"
)

Jump to

Keyboard shortcuts

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