View Single Post
Old 07-12-2024, 12:46 PM   #9
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 3,058
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
"echo" just writes the following stuff to standard output. "-n" tells it to not add a linefeed character at the end. "-e" tells it to enable interpretation of backslash escapes. "\xNN" echoes the binary byte 0xNN. So, "\x00\xff" would echo the two bytes 0x00 and 0xff to standard output. I didn't put quotes around the input, so I had to escape the backslashes: '\x00\xff' == \\x00\\xff (no quotes). And of course, " > hwconfig" redirects standard output to the file named "hwconfig". So, my command just wrote the two binary bytes 0x00 and 0xff to the file named "hwconfig". I suspect that writing such garbage input to that file caused problems for uboot and made it stop and bring up an interactive session.
rkomar is offline   Reply With Quote