I am trying to use busybox to dump files in /sys and /proc.

I happen to have an embedded device with busybox 1.31.

I noticed that xxd does not have the -e option for little endian.

I can't figure out how to do this in od or hexdump either, with busybox's limited set of options.

Any ideas?

Example of what does not work:

# hexdump fsl,mf-mix-wakeup-irq
0000000 c007 0000 0000 007d 0000 0000 4001 4006

# od -X fsl,mf-mix-wakeup-irq
0000000         0000c007        007d0000        00000000        40064001

This is the byte order that I want (from the source code):

0x7c00000 0x7d00 0x0 0x1400640
  • 1
    Can you edit your question to show what sort of output you get (with e.g. od -c), and what you want to get instead? What are the files?
    – ilkkachu
    Feb 23, 2021 at 20:11
  • 1
    Is your data in machine endianness or not? What's wrong with xxd -g4 or od -tx4? Feb 23, 2021 at 20:29

1 Answer 1


Gilles had the solution:

# xxd -g4 fsl,mf-mix-wakeup-irq
00000000: 07c00000 00007d00 00000000 01400640  ......}......@.@

Note that various od options are invalid in busybox:

# od -tx4 fsl,mf-mix-wakeup-irq
od: invalid option -- 't'
BusyBox v1.31.0 (2021-02-24 17:49:57 UTC) multi-call binary.

Usage: od [-aBbcDdeFfHhIiLlOovXx] [FILE]
  • 1
    ok, right, Busybox has two versions of od, the one in od_bloaty.c is enabled only if ENABLE_DESKTOP is set, so the one on my Debian is more featureful, it does have od -t x4.
    – ilkkachu
    Feb 24, 2021 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.