Categorygithub.com/jamesits/go-rkvendorstorage
repositorypackage
0.1.5
Repository: https://github.com/jamesits/go-rkvendorstorage.git
Documentation: pkg.go.dev

# README

go-rkvendorstorage

A pure Golang implementation of Rockchip rknand vendor storage interface.

Go Reference

Usage

package main

import (
	"fmt"
	"github.com/jamesits/go-rkvendorstorage"
)

func main() {
	size, data, err := rkvendorstorage.Read(rkvendorstorage.IDVendorSN)
	fmt.Printf("size=%d, data=%s, err=%s\n", size, string(data), err)
}

See read_test.go for more examples.

Caveats

  • Linux is the only OS supported for now
  • An artificial 1024-byte limit is applied to the read/write buffer
  • Endianness is hardcoded as little endian

If you have valid use cases that exceed the current limitations, please raise an issue.

Acknowledgements

The following articles are referenced during the development of this library:

Thank Qingping for sponsoring some RK3128 development boards.