How deep is U-Boot's `bootm` command checking for a valid header?
Clash Royale CLAN TAG#URR8PPP
TL;DR: How many ways can the bootm
command fail with this error in version 1.1.4?:
# bootm
Booting image at 31000000
Bad Magic Number
Background:
I've bricked a device whose U-Boot is deeply crippled as far as its ability to load bytes from external sources, so I've written a quick script to automatically generate mm
commands details here (including healthy boot messages) to populate the RAM and write that back to the flash with nandw
and that seems to be working but the bootm
command is still grumpy.
The binary data is a valid uImage file and is written into address 0x31000000 and it does have the magic number of 0x27051956 at that memory address but the system is cowardly refusing to boot. Here's the whole header from hexdump -C
of the uImage file:
00000000 27 05 19 56 f4 91 0f 3f 4c 11 3c 57 00 17 a3 40 |'..V...?L.<W...@|
00000010 30 00 80 00 30 00 80 00 f4 67 23 80 05 02 02 00 |0...0....g#.....|
00000020 4c 69 6e 75 78 2d 32 2e 36 2e 31 38 2e 32 2d 6e |Linux-2.6.18.2-n|
00000030 74 78 36 30 30 2d 76 30 2e 38 32 00 00 00 00 00 |tx600-v0.82.....|
00000040 00 00 a0 e1 00 00 a0 e1 00 00 a0 e1 00 00 a0 e1 |................|
I'm not sure what I'm doing wrong here, but I'm expecting to at least get to the CRC check.
embedded arm u-boot
add a comment |
TL;DR: How many ways can the bootm
command fail with this error in version 1.1.4?:
# bootm
Booting image at 31000000
Bad Magic Number
Background:
I've bricked a device whose U-Boot is deeply crippled as far as its ability to load bytes from external sources, so I've written a quick script to automatically generate mm
commands details here (including healthy boot messages) to populate the RAM and write that back to the flash with nandw
and that seems to be working but the bootm
command is still grumpy.
The binary data is a valid uImage file and is written into address 0x31000000 and it does have the magic number of 0x27051956 at that memory address but the system is cowardly refusing to boot. Here's the whole header from hexdump -C
of the uImage file:
00000000 27 05 19 56 f4 91 0f 3f 4c 11 3c 57 00 17 a3 40 |'..V...?L.<W...@|
00000010 30 00 80 00 30 00 80 00 f4 67 23 80 05 02 02 00 |0...0....g#.....|
00000020 4c 69 6e 75 78 2d 32 2e 36 2e 31 38 2e 32 2d 6e |Linux-2.6.18.2-n|
00000030 74 78 36 30 30 2d 76 30 2e 38 32 00 00 00 00 00 |tx600-v0.82.....|
00000040 00 00 a0 e1 00 00 a0 e1 00 00 a0 e1 00 00 a0 e1 |................|
I'm not sure what I'm doing wrong here, but I'm expecting to at least get to the CRC check.
embedded arm u-boot
It looks like I messed up the endianess of the data I was storing so that's the answer here. In looking at the source code, it looks like it's only the magic number in the header.
– RandomInsano
Feb 18 at 4:30
add a comment |
TL;DR: How many ways can the bootm
command fail with this error in version 1.1.4?:
# bootm
Booting image at 31000000
Bad Magic Number
Background:
I've bricked a device whose U-Boot is deeply crippled as far as its ability to load bytes from external sources, so I've written a quick script to automatically generate mm
commands details here (including healthy boot messages) to populate the RAM and write that back to the flash with nandw
and that seems to be working but the bootm
command is still grumpy.
The binary data is a valid uImage file and is written into address 0x31000000 and it does have the magic number of 0x27051956 at that memory address but the system is cowardly refusing to boot. Here's the whole header from hexdump -C
of the uImage file:
00000000 27 05 19 56 f4 91 0f 3f 4c 11 3c 57 00 17 a3 40 |'..V...?L.<W...@|
00000010 30 00 80 00 30 00 80 00 f4 67 23 80 05 02 02 00 |0...0....g#.....|
00000020 4c 69 6e 75 78 2d 32 2e 36 2e 31 38 2e 32 2d 6e |Linux-2.6.18.2-n|
00000030 74 78 36 30 30 2d 76 30 2e 38 32 00 00 00 00 00 |tx600-v0.82.....|
00000040 00 00 a0 e1 00 00 a0 e1 00 00 a0 e1 00 00 a0 e1 |................|
I'm not sure what I'm doing wrong here, but I'm expecting to at least get to the CRC check.
embedded arm u-boot
TL;DR: How many ways can the bootm
command fail with this error in version 1.1.4?:
# bootm
Booting image at 31000000
Bad Magic Number
Background:
I've bricked a device whose U-Boot is deeply crippled as far as its ability to load bytes from external sources, so I've written a quick script to automatically generate mm
commands details here (including healthy boot messages) to populate the RAM and write that back to the flash with nandw
and that seems to be working but the bootm
command is still grumpy.
The binary data is a valid uImage file and is written into address 0x31000000 and it does have the magic number of 0x27051956 at that memory address but the system is cowardly refusing to boot. Here's the whole header from hexdump -C
of the uImage file:
00000000 27 05 19 56 f4 91 0f 3f 4c 11 3c 57 00 17 a3 40 |'..V...?L.<W...@|
00000010 30 00 80 00 30 00 80 00 f4 67 23 80 05 02 02 00 |0...0....g#.....|
00000020 4c 69 6e 75 78 2d 32 2e 36 2e 31 38 2e 32 2d 6e |Linux-2.6.18.2-n|
00000030 74 78 36 30 30 2d 76 30 2e 38 32 00 00 00 00 00 |tx600-v0.82.....|
00000040 00 00 a0 e1 00 00 a0 e1 00 00 a0 e1 00 00 a0 e1 |................|
I'm not sure what I'm doing wrong here, but I'm expecting to at least get to the CRC check.
embedded arm u-boot
embedded arm u-boot
asked Feb 17 at 21:22
RandomInsanoRandomInsano
15015
15015
It looks like I messed up the endianess of the data I was storing so that's the answer here. In looking at the source code, it looks like it's only the magic number in the header.
– RandomInsano
Feb 18 at 4:30
add a comment |
It looks like I messed up the endianess of the data I was storing so that's the answer here. In looking at the source code, it looks like it's only the magic number in the header.
– RandomInsano
Feb 18 at 4:30
It looks like I messed up the endianess of the data I was storing so that's the answer here. In looking at the source code, it looks like it's only the magic number in the header.
– RandomInsano
Feb 18 at 4:30
It looks like I messed up the endianess of the data I was storing so that's the answer here. In looking at the source code, it looks like it's only the magic number in the header.
– RandomInsano
Feb 18 at 4:30
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501237%2fhow-deep-is-u-boots-bootm-command-checking-for-a-valid-header%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501237%2fhow-deep-is-u-boots-bootm-command-checking-for-a-valid-header%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It looks like I messed up the endianess of the data I was storing so that's the answer here. In looking at the source code, it looks like it's only the magic number in the header.
– RandomInsano
Feb 18 at 4:30