uimg.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:pyUBoot 作者: molejar 项目源码 文件源码
def __init__(self, **kwargs):
        """ U-Boot Image Header Constructor
        :param laddr:    Load address
        :param eaddr:    Entry point address
        :param arch:     Architecture (ARCHType Enum)
        :param os:       Operating system (OSType Enum)
        :param image:    Image type (IMGType Enum)
        :param compress: Image compression (COMPRESSType Enum)
        :param name:     Image name (max: 32 chars)
        """
        self.MagicNumber  = 0x27051956  # U-Boot Default Value is 0x27051956
        self.TimeStamp    = int(time.time())
        self.DataSize     = 0
        self.DataCRC      = 0
        self.LoadAddress  = 0 if 'laddr' not in kwargs else kwargs['laddr']
        self.EntryAddress = 0 if 'eaddr' not in kwargs else kwargs['eaddr']
        self.OsType       = OSType.LINUX if 'os' not in kwargs else kwargs['os']
        self.ArchType     = ARCHType.ARM if 'arch' not in kwargs else kwargs['arch']
        self.ImageType    = IMGType.STD if 'image' not in kwargs else kwargs['image']
        self.Compression  = COMPRESSType.NONE if 'compress' not in kwargs else kwargs['compress']
        self.Name         = '' if 'name' not in kwargs else kwargs['name']
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号