# 打包

radare2有自己的[包管理器](https://github.com/Heersin/radare2book/tree/84444eae158ee6b5c0efce8a492126055759a4be/src/tools/r2pm/intro.md)，可以很容易地向里面添加新写的插件，其他用户可以从该仓库下载。

所有的包都放在[radare2-pm](https://github.com/radareorg/radare2-pm)仓库里，包的文本格式都很简单：

```
R2PM_BEGIN

R2PM_GIT "https://github.com/user/mycpu"
R2PM_DESC "[r2-arch] MYCPU disassembler and analyzer plugins"

R2PM_INSTALL() {
    ${MAKE} clean
    ${MAKE} all || exit 1
    ${MAKE} install R2PM_PLUGDIR="${R2PM_PLUGDIR}"
}

R2PM_UNINSTALL() {
    rm -f "${R2PM_PLUGDIR}/asm_mycpu."*
    rm -f "${R2PM_PLUGDIR}/anal_mycpu."*
}

R2PM_END
```

把它加入radare2-pm repo的`/db`目录下，然后向mainline发一个PR就行。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://heersin.gitbook.io/radare2/intro-10/r2pm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
