Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when creating u-boot script #8

Open
nagos opened this issue Aug 31, 2018 · 0 comments
Open

Issue when creating u-boot script #8

nagos opened this issue Aug 31, 2018 · 0 comments

Comments

@nagos
Copy link

nagos commented Aug 31, 2018

I use mkimage.py to create boot stcipt for arm platform (unrelated to pycorn).

Mkimage from Ubuntu 16.04
mkimage -A arm -O linux -T script -C none -n "bootscript" -d boot.script u-boot.scr

00000000  27 05 19 56 18 76 24 35  5b 89 19 25 00 00 00 48  |'..V.v$5[..%...H|
00000010  00 00 00 00 00 00 00 00  75 42 39 3a 05 02 06 00  |........uB9:....|
00000020  62 6f 6f 74 73 63 72 69  70 74 00 00 00 00 00 00  |bootscript......|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  00 00 00 40 00 00 00 00  31 31 31 31 31 31 31 31  |...@....11111111|
00000050  31 31 31 31 31 31 31 31  31 31 31 31 31 31 31 31  |1111111111111111|
00000060  31 31 31 31 31 31 31 31  31 31 31 31 31 31 31 31  |1111111111111111|
00000070  31 31 31 31 31 31 31 31  31 31 31 31 31 31 31 31  |1111111111111111|
00000080  31 31 31 31 31 31 31 0a                           |1111111.|
00000088

mkimage.py
python mkimage.py -A arm -O linux -T script -C none -n "bootscript" -d boot.script u-boot.scr

00000000  27 05 19 56 94 43 04 e9  5b 89 19 0b 00 00 00 40  |'..V.C..[......@|
00000010  00 00 00 00 00 00 00 00  fb fa 04 76 05 02 06 00  |...........v....|
00000020  62 6f 6f 74 73 63 72 69  70 74 00 00 00 00 00 00  |bootscript......|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  31 31 31 31 31 31 31 31  31 31 31 31 31 31 31 31  |1111111111111111|
00000050  31 31 31 31 31 31 31 31  31 31 31 31 31 31 31 31  |1111111111111111|
00000060  31 31 31 31 31 31 31 31  31 31 31 31 31 31 31 31  |1111111111111111|
00000070  31 31 31 31 31 31 31 31  31 31 31 31 31 31 31 0a  |111111111111111.|
00000080

Look like mkimage.py skips length and some padding.

I fixed it for my project, but not tested it thoroughly c1f634e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant