GithubHelp home page GithubHelp logo

molejar / pyuboot Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 7.0 321 KB

Python module for manipulating with U-Boot images and environment variables

License: Apache License 2.0

Python 100.00%
python u-boot uboot-enviroment uboot-image

pyuboot's People

Contributors

caesurus avatar kethen avatar molejar avatar seanmollet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pyuboot's Issues

'StdImage' object has no attribute 'compression'

Expected Behavior

mkimg should extract the image

Actual Behavior

$ mkimg extract <image path>

'StdImage' object has no attribute 'compression'

Steps to Reproduce the Problem

  1. Install uboot
  2. Unpack the image using mkimg extract

Specifications

  • Environment:
    Python 3.6.8
uboot==0.1.1
  - click [required: ==7.0, installed: 7.0]
  - easy-enum [required: ==0.2.0, installed: 0.2.0]
  - fdt [required: ==0.1.2, installed: 0.1.2]
    - click [required: >=5.0, installed: 7.0]
  • System: Ubuntu 18.04.2 LTS

pypi release update

Hi

I was trying to figure out what are the differences between the 0.1 version released in pypi and the master branch.

Can we get a tag 0.1 tag for the version released in pypi? Or perhaps a new tagged release into pypi ^^

In any case thanks for this neat module.

AttributeError: module 'uboot' has no attribute 'parse'

Running your second example "how to create Multi-File U-Boot image with uboot module" from the README with python3, I get the following error:

Magic Number:  0x27051956
Header CRC:    0xEEC05BB6
Created:       Mon Jul 24 13:04:33 2017
Data Size:     0.74 kB
Load Address:  0x00000000
Entry Address: 0x00000000
Data CRC:      0x9EB1726A
OS Type:       LINUX
Arch Type:     ARM
Image Type:    MULTI
Compression:   NONE
Image Name:    Multi-File Test Image
Content:       2 Images
[ Image: 0 ]
Magic Number:  0x27051956
Header CRC:    0x6E60C70A
Created:       Mon Jul 24 13:04:33 2017
Data Size:     0.50 kB
Load Address:  0x00000000
Entry Address: 0x00000000
Data CRC:      0x83E5C6FF
OS Type:       LINUX
Arch Type:     ARM
Image Type:    FIRMWARE
Compression:   NONE
Image Name:    Firmware Test Image
Content:       Binary Blob (512 Bytes)
[ Image: 1 ]
Image Name:    Test Script Image
Created:       Mon Jul 24 13:04:33 2017
Image Type:    ARM Linux Script (uncompressed)
Data Size:     0.11 kB
Load Address:  0x00000000
Entry Address: 0x00000000
Content:       4 Commands
  0) echo '===== U-Boot settings ====='
  1) setenv stdin serial
  2) setenv stdout serial
  3) setenv rootdev mmcblk2p2

Traceback (most recent call last):
  File "pull.py", line 54, in <module>
    img = uboot.parse(data)

parse doesn't handle copyright char in name

Unfortunately I encountered a uboot image with a \xa9 character in it,
RT-AC55UHP©
this throws an error:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa9 in position 28: invalid start byte

I have forked the project and will attempt a fix and submit a PR if you're open to that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.