nccgroup / depthcharge

A U-Boot hacking toolkit for security researchers and tinkerers
https://depthcharge.readthedocs.io
BSD 3-Clause "New" or "Revised" License
257 stars 14 forks source link

Create 'NoneLE32' and `NoneBE32` Architectures, set former as default #42

Closed jynik closed 3 years ago

jynik commented 4 years ago

The current default for the architecture selection is ARM -- the only supported architecture.

As expected, all Hell breaks loose 🔥 when testing on a MIPS target. (This was largely the motivation for migrating to opt-in --allow-deploy / --allow-reboot semantics.)

To further make life a bit easier on "new" targets, Depthcharge should change the default to a 'NoneLE32' target that defines no GD location, no registers, etc -- nothing beyond 32-bit word size, 4-byte alignment (maybe 8?), and little-endiannes.

Should be trivial to toss in a NoneBE32 as well, albeit probably not tested and debugged well just yet.

jynik commented 4 years ago

32-bit little endian default is called "Generic". Big-endian version is Generic BE. Then there's Generic64 and Generic64BE.

Staged in next @ d327acec98f79aa94c65ded3a3e31d5a07f2a291.