Raw binary blob support#1583
Conversation
|
Hi @technikelly, welcome and thank you for your contribution. Though the motivation behind this PR does resonate with me, I believe it introduces a special use case that could be covered by the existing Blob loader with minimal changes. While providing a convenient method for their users, special use cases tend to serve a very focused or limited purpose and introduce more complexity to the framework as it needs to support these cases on various components. This is what I've picked up in my review:
Also, please note that we cannot accept proprietary code with copyrights. [BTW - you may want to consider udbserver as a simpler method to debug Unicorn scripts] |
|
Hi @elicn, thank you for getting back to me so quickly. I appreciate your thorough explanation of your reasoning and I fully agree that this could be achieved with a much smaller code change to qiling and monkeypatching the user script. I'll go ahead and make the change you suggested - of Regarding the copyrights, the code is not proprietary. Cisco requires a copyright notice on open source contributions, but the code ultimately falls under the license of the overall project which in this case is GPLv2. With that additional information is it still an issue to have copyright notices included with contributions to qiling? Thanks for the tip about udbserver - it definitely is simpler, but having code coverage in addition to debug is really nice. |
Hi, Thank you for PR and also welcome to Qiling Framework. We do have the "tradition" to include author (PR) during the early days. Along the way we found out the list will get longer and longer in the specific file. Later, we decided update changelog and put the names in sparate for easier maintainance. I hope you understand where we come from. |
elicn
left a comment
There was a problem hiding this comment.
@technikelly, thanks for the fixes.
Please see my review comments inline.
I believe we would need to get rid of those repeating copyright notices, as @xwings suggested we can include your name and your employer's name in the contributors list.
|
Thank you @elicn and @xwings for explaining about the issue with copyright notices. I was able to get an exception, so I've removed them. I've also implemented the changes requested by @elicn (thank you for the review!). As it stands now, the changes in this PR consist of:
As stated in the comments, let me know if you would prefer not to include an example with this PR. I also wanted to point out that I modified the two instances of uboot_bin.ql so that they contain |
|
Everything looks good to me. Thanks @technikelly. |
|
Great, thank you @elicn! I just enabled the test and updated rootfs. |
|
@xwings, pending your review. |
|
Merged and thanks! Again, welcome to Qiling Framework |
Checklist
Which kind of PR do you create?
Coding convention?
Extra tests?
Changelog?
Target branch?
One last thing
Overview
This PR introduces a small code change that allows users to specify BLOB_RAW in the profile, instructing the Qiling loader not to map any memory segments. This functionality is particularly useful for emulating small code snippets or bare-metal code without an operating system, offering greater customization and flexibility. Users can now define all memory mappings directly within their Qiling scripts, tailoring the environment precisely to their use case.
With this change, it becomes easier to port existing Unicorn scripts to Qiling and take advantage of additional features Qiling provides, such as debugging support and code coverage generation. Users can simply replace Unicorn API calls with equivalent Qiling API calls to benefit from these enhancements.
Notes
The added unit tests are currently disabled because the test binary has not been merged to rootfs. The added example code will also not work until the test binary has been merged into rootfs. Corresponding rootfs PR - qilingframework/rootfs#36