path: root/utils/imxtools/sbtools
AgeCommit message (Collapse)AuthorFilesLines
2013-08-21sbtools: fix redAmaury Pouly1-1/+1
Change-Id: I28b7d4d59d8f14abbba2a70e2bdea6987b6a3a98
2013-08-21sbtools: more code refactoringAmaury Pouly11-98/+66
Factor all printf method with a unique one defined in misc.h Change-Id: I58fbf8916b76e873a2e6678506d2c8aece7834ec
2013-08-10sbtools: more printf fixingAmaury Pouly3-44/+49
Change-Id: Id617297c196b381fd1c381da3eff4345e3157529
2013-08-06sbtools: fix output printingAmaury Pouly3-25/+60
The code used printf instead of the provided printf functions, resulting in strange output. Change-Id: I2c7c2531d8d54ecdea97e8c189d18d351320ca7d
2013-08-06sbtools: fix handling of NOP instructionsAmaury Pouly2-1/+16
Change-Id: I05ab8176f368a6e2d075dfb2059692871e0c00b3
2013-08-06elf: fix handling of virtual/physical addressesAmaury Pouly4-16/+3
Remove the hackish elf_translate_addresses which should not have existed in the first place, on write always compute the physical address of a section using elf_translate_virtual_address which makes it possible to specify any virtual to physical mapping and fail nicely if there is none. Change-Id: I4f436945e90280a6fd9430de6c642dbeb8e23d40
2013-08-06sbtools: various fixesAmaury Pouly2-2/+5
Change-Id: I82c4642aea325cf22d66e9b49fc2d47319cd70eb
2013-08-06sbtools: standard sb print function is now standardAmaury Pouly1-2/+3
Change-Id: I2746bfff9a360ef4fc823853859609ffed5d2b67
2013-08-06sbtools: elf library can now load global symbolsAmaury Pouly3-35/+171
Change-Id: I4d9f38ce31e65542d6ab192158bff52b6fad8f09
2013-08-06sbtools: add helper to determine if a file is a valid ELF imageAmaury Pouly2-0/+15
Change-Id: Ie0e9c05569ca9b02fd36f31fd7323f02b14e1b60
2013-08-06sbtools: make code aware of elf section namesAmaury Pouly3-23/+39
Change-Id: I7ab657959e38d2fcb2c7e6d9858facfb83101423
2013-07-18sbtools: refactor and cleanupAmaury Pouly12-123/+131
Factor common elf/sb read/write/printf routines. Factor sb zero key, move sb version guess. Change-Id: I5ae1885587456736e782e623610281bbee545039
2013-06-18sbtools: fix sbloader (allow transfer size override)Amaury Pouly1-2/+5
Change-Id: Id6d3188b7f837726c29845f01b0b1588acf40407
2013-06-17sbtools: various little fixes, mostly cosmeticsAmaury Pouly3-20/+23
Change-Id: Ic53ef0283bdaee8d3272f648b71eff567b25059b
2013-06-17sbtools: add Sansa Express bootloader keyAmaury Pouly1-0/+1
Change-Id: I167a6410e40478173e5ce496ace4f705c3e26a1b
2013-06-15sbtools,mkximboot: fix whitespaceAmaury Pouly15-83/+83
Change-Id: I8d8adb783707172d1aaef302366c240310350ed8
2013-06-13imxtools: add Zen, Zen Mozaic and Zen X-Fi bootloader keysAmaury Pouly3-0/+3
Change-Id: I856e5b91c8e9a1c02b367960052c36f9b527046b
2013-06-13imxtools: rewrite sbloader to handle both versions + user friendlyAmaury Pouly1-36/+346
The tool can now load sb1 and sb files to devices. Detection has been improved and the tool can infer the packet size for the HID description as well. The command line interface has been vastly improved too, this breaks the old one. Change-Id: I01a0ff8f8a007514aa81c56f114c0f0a86e3303c
2013-06-13sbtools: fix encryption and cosmeticsAmaury Pouly1-4/+9
Change-Id: Id302f236ad3ec13a5166de4e22a3fc85b2a6c64f
2013-02-18imxtools/sbtools: silence warningAmaury Pouly1-0/+1
Change-Id: I423e760bbc8e418bcce3afe01c5831b5a3e655f3
2013-02-18imxtools/sbtools: add -jump command, fix helpAmaury Pouly1-0/+8
Change-Id: I0d5d61c1dc137333bda5e403d06a43d16f2750bf
2013-02-18sbtools/elftosb1: implement key file loadingAmaury Pouly1-0/+8
Change-Id: I2273b8d6314250620611ec50d159237edc6d76c2
2013-02-16sbtools: add brute force option for sb1 in sbtoelfAmaury Pouly6-3/+218
After some reverse engineering, it appears that the keys of the sb1 format are very weak: the 128 bytes are generated from the laserfuse words 4,5 and 6 but in a weird manner: 4 and 5 are simply ORed and 6 is only half used (somehow), making it "only" a 48 bit word to find. Change-Id: I40702e19d0924ef51c01894efce3cb65bd664456
2013-02-16sbtools: increase performance by compiling with O3, add zenv keyAmaury Pouly3-1/+2
Change-Id: I2301f695e49d306d21bb9efa9c44acf1d3296a08
2013-01-29imxtools/sbtoelf: add more robust version guessAmaury Pouly1-8/+12
Change-Id: I41ce1005d997cf35153e085b19294bb7d418e968
2013-01-26imxtools/sbtools: fix file type detectionAmaury Pouly1-4/+8
Change-Id: I872e98f5810df3ecc975e025385f9c5ca7b47a44
2012-12-26imxtools/sbtools: improve sb1 key handlingAmaury Pouly1-7/+12
Change-Id: Ib014a102fe44a67dd256e45e804bca9b5812eb61
2012-12-26imxtools/sbtools: add crypto code for documentation purposeAmaury Pouly1-0/+43
Change-Id: I4f3c659d65c1453b192cbce4bf6c85d882761929
2012-12-26elftosb1: fix usage()Amaury Pouly1-0/+10
Change-Id: I9ce73b907fa6276b9cd1f285156623bdafa6d548
2012-12-16imxtools/sbtools: implement rom/product/component version switchAmaury Pouly1-0/+51
Change-Id: If3ebae2e60f324c93f85a4f1a6f30257cccb735d
2012-12-16imxtools/sbtools: fix sb1 product/component version writingAmaury Pouly1-0/+2
Change-Id: I0153192f41ccc5fb98e7e9f6f110d97bd76dbc47
2012-12-16imxtools/sbtools: "fix" address handling in ELFAmaury Pouly1-1/+1
This is a common problem that proprietary tools don't handle ELF files correctly. ELF sections use a virtual address and the virtual -> physical translation is done though segments. This allows to have a load (physical) address different from the virtual one. Here is the trick: proprietary tools usually don't take the pain to do the translation and just grab the virtual address. This commit implements proper translation in elftosb1 knowing that this introduce a deviation from the behaviour of the proprietary tool. Change-Id: I91721a3a8dead382a0603f84ae3b35c5eb9704eb
2012-12-16imxtools/sbtools: introduce elftosb1 for stmp36xxAmaury Pouly2-1/+547
The tool still lacks some feature of the proprietary one but can create files with all the basic features. Change-Id: Ib0c91210940ca829291ce70945f88dc510a49974
2012-12-16imxtools/sbtools: fix some instruction handling & cryptoAmaury Pouly2-8/+17
Change-Id: I6530bdf27896d8325dec4e2ba31c7e6a0131a286
2012-12-16imxtools/sbtools: add elf function (sort by address)Amaury Pouly2-1/+57
Change-Id: Ib68746e11b43eadbbe0443626d4dc65d998348fa
2012-12-16imxtools/sbtools: update misc with MINAmaury Pouly1-0/+4
Change-Id: I17daaff068fcd3a8c70c52db5fa209082461173f
2012-12-16imxtools/sbtoelf: use new method to get default xor keyAmaury Pouly1-21/+6
Change-Id: Ie00306a3c78e7490afe9964bd55ce53019e603ed
2012-12-16imxtools/sbtools: implement sb1 writeAmaury Pouly2-16/+181
Change-Id: Ic36d3a8fcf09350dff5988eb860d76eb11608cc2
2012-12-16imxtools/elftosb: remove duplicate includeAmaury Pouly1-1/+0
Change-Id: I34776ba3608bb5d25ce0d0fb3c6f228a4c9effc0
2012-12-13imxtools/sbloader: implement stmp36xx recovery supportAmaury Pouly1-2/+30
Change-Id: I6cfb432cd474ca00d7dff77577c0aa499b78fe2d
2012-12-13sbtools/sbload: prepare support for the stmp36xxAmaury Pouly1-75/+95
Change-Id: I13147009f2573d80c2c3dca2852a6d7b45174e9d
2012-12-13sbootls/rsrc: fix warningsAmaury Pouly1-1/+2
Change-Id: Id756cab14c9151ea74d628d002e1a203c5fbf01a
2012-12-06rsrctool: improve debug outputAmaury Pouly1-1/+15
Change-Id: I3a4fc048466b9e4d7290237efc1cefb07fd0a118
2012-12-02rsrctool: produce an actually usuable entry list of the rsrc fileAmaury Pouly5-12/+71
Change-Id: I6c8e5f3faf04741e4a13c1e705e9e869ccf8cfec
2012-11-29imxtools: introduce rsrctool to manipulate rsrc sectionsAmaury Pouly4-1/+505
This tool is very preliminary but could be use for whatever purpose since the format of the rsrc sections is now known. By the way it appears that this format is the same as the one use by the stmp36xx for its resources. Change-Id: Idd7057f5cdce5af9726904169bb100c8bacb0981
2012-11-28sbtoelf: add switch to prevent elf simplificationAmaury Pouly1-6/+15
While elf simplification is a powerful tool it can be useful to prevent it from happening for debug purposes. Also add a missing switch description in usage() and missing static. Change-Id: I80a1904dc4340c412bd3de1c124a2e38d6ac11a2
2012-11-28sbtoelf: also simplify elf files for sb2Amaury Pouly1-0/+1
This is less useful is most cases because sb2 doesn't have the size restritions but some elf are produced with one section per file and still yield dozens or hundreds of sections. And this free anyway so we can do it. Change-Id: Ia5ca83a8375063ecc7052d1ea73b2b21c00be730
2012-11-28sbtoelf: implement elf simplificationAmaury Pouly1-0/+90
Change-Id: Icfac5a2aa6a7b3582054321df003c6bb217b59d0
2012-11-27sbtoelf: implement sb extraction for sb1Amaury Pouly3-4/+54
Load, fill and call/jump instructions are extracted as elf files like for sb2. Because of the size limitations of the sb1 instructions, the resulting elf files can easily have hundreds of sections. The (currently) implemented elf simplification method will hopefully reduce this to a few sections only Change-Id: I8fd6ed935ac3128f244bbd71c782e2a0a1c6d44a
2012-11-27sbtoelf: implement sb1 loading and dumpingAmaury Pouly6-30/+240
Implement actual loading of a sb1 file to a structure in full generality. Also implement dumping for debug purpose Change-Id: I320035ea628719480a79aaccb05dce9a83256927