mirror of
https://ghproxy.com/https://github.com/tossp/redpill-tool-chain.git
synced 2024-09-20 08:07:43 +00:00
chore(all): update to v0.11.1
This commit is contained in:
parent
717cb2d4e0
commit
eafa572666
11
README.md
11
README.md
|
@ -6,10 +6,10 @@
|
|||
|
||||
感谢 @haydibe 提供 RedPill Tool Chain
|
||||
|
||||
# 关于项目?
|
||||
## 关于项目?
|
||||
|
||||
- 基于[红丸团队](https://github.com/RedPill-TTG)源码制作
|
||||
- 为apollolake提供适当的DSM7支持 (thnx @jumkey)
|
||||
- 基于[RedPill-TTG](https://github.com/RedPill-TTG)源码制作
|
||||
- 为apollolake提供适当的DSM7支持 (thnx [@jumkey](https://github.com/jumkey))
|
||||
- 针对DSM6.2.4和DSM7.0从基于内核源代码的构建切换到基于工具包开发人员的构建 (thnx [@jumkey](https://github.com/jumkey))
|
||||
- `redpill_lkm_make_target`字段的可选值有 `dev-v6`, `dev-v7`, `test-v6`, `test-v7`, `prod-v6` 或者 `prod-v7`,
|
||||
需要注意后缀为`-v6`的值用于 DSM6 版本构建, 需要注意后缀为`-v7`的值用于 DSM7 版本构建. 默认使用的是 `dev-v6` 和 `dev-v7`。
|
||||
|
@ -21,7 +21,7 @@
|
|||
|
||||
对于所有其他问题:请向社区提出——我知道的并不比其他人多。
|
||||
|
||||
# 如何使用?
|
||||
## 如何使用?
|
||||
|
||||
1. 复制`sample_user_config.json`为`bromolow_user_config.json`或者`apollolake_user_config.json`
|
||||
1. 编辑`<platform>_user_config.json`比如 918+ 就编辑 `apollolake_user_config.json` 文件
|
||||
|
@ -39,7 +39,8 @@
|
|||
|
||||
依赖: `docker`
|
||||
|
||||
# 其他说明
|
||||
## 其他说明
|
||||
|
||||
为了方便我自己
|
||||
- `docker/Dockerfile` 中补入了阿里云镜像
|
||||
- `redpill_tool_chain.sh add <URL>`添加扩展驱动
|
||||
|
|
|
@ -8,6 +8,7 @@ THX @haydibe
|
|||
- Caches .pat downloads inside the container on the host.
|
||||
- Configuration is done in the JSON file `global_config.json`; custom <platform_version> entries can be added underneath the `building_configs` block. Make sure the id is unique per block!
|
||||
- Supports a `user_config.json` per <platform_version>
|
||||
- Supports to bind a local redpill-lkm folder into the container (set `"docker.local_rp_lkm_use": "true"` and set `"docker.local_rp_lkm_path": "path/to/rp-lkm"`)
|
||||
- Supports to bind a local redpill-load folder into the container (set `"docker.local_rp_load_use": "true"` and set `"docker.local_rp_load_path": "path/to/rp-load"`)
|
||||
- Supports to clean old image versions and the build cache per <platform_version> or for `all` of them at once.
|
||||
- Supports to auto clean old image versions and the build cache for the current build image, set `"docker.auto_clean":`to `"true"`.
|
||||
|
|
|
@ -24,8 +24,8 @@ ARG REDPILL_LOAD_REPO=https://github.com/RedPill-TTG/redpill-load.git
|
|||
ARG REDPILL_LOAD_BRANCH=master
|
||||
ARG REDPILL_LOAD_SRC=/opt/redpill-load
|
||||
|
||||
RUN git clone --depth 50 ${REDPILL_LKM_REPO} -b ${REDPILL_LKM_BRANCH} ${REDPILL_LKM_SRC} && \
|
||||
git clone --depth 50 ${REDPILL_LOAD_REPO} -b ${REDPILL_LOAD_BRANCH} ${REDPILL_LOAD_SRC}
|
||||
RUN git clone ${REDPILL_LKM_REPO} -b ${REDPILL_LKM_BRANCH} ${REDPILL_LKM_SRC} && \
|
||||
git clone ${REDPILL_LOAD_REPO} -b ${REDPILL_LOAD_BRANCH} ${REDPILL_LOAD_SRC}
|
||||
|
||||
ARG TARGET_PLATFORM
|
||||
ARG TARGET_VERSION
|
||||
|
@ -37,7 +37,7 @@ ARG REDPILL_LKM_MAKE_TARGET
|
|||
LABEL redpill-tool-chain=${TARGET_PLATFORM}-${TARGET_VERSION}-${TARGET_REVISION}
|
||||
|
||||
ENV ARCH=x86_64 \
|
||||
LINUX_SRC=${REDPILL_LKM_SRC}/${COMPILE_WITH}-${TARGET_PLATFORM}-${TARGET_VERSION}-${TARGET_REVISION} \
|
||||
LINUX_SRC=/opt/${COMPILE_WITH}-${TARGET_PLATFORM}-${TARGET_VERSION}-${TARGET_REVISION} \
|
||||
REDPILL_LKM_SRC=${REDPILL_LKM_SRC} \
|
||||
REDPILL_LOAD_SRC=${REDPILL_LOAD_SRC} \
|
||||
TARGET_PLATFORM=${TARGET_PLATFORM} \
|
||||
|
|
|
@ -5,15 +5,20 @@ if [ $# -eq 0 ];then
|
|||
git -C ${REDPILL_LKM_SRC} fetch
|
||||
git -C ${REDPILL_LOAD_SRC} fetch
|
||||
|
||||
REDPILL_LKM_BRANCH=$(git -C ${REDPILL_LKM_SRC} name-rev --name-only HEAD)
|
||||
echo "Checking if redpill-lkm sources require pull."
|
||||
if [ $(git -C ${REDPILL_LKM_SRC} rev-list HEAD...origin/${REDPILL_LKM_BRANCH} --count ) -eq 0 ];then
|
||||
echo " Nothing to do."
|
||||
if [ "${LOCAL_RP_LKM_USE}" == "false" ]; then
|
||||
REDPILL_LKM_BRANCH=$(git -C ${REDPILL_LKM_SRC} name-rev --name-only HEAD)
|
||||
echo "Checking if redpill-lkm sources require pull."
|
||||
if [ $(git -C ${REDPILL_LKM_SRC} rev-list HEAD...origin/${REDPILL_LKM_BRANCH} --count ) -eq 0 ];then
|
||||
echo " Nothing to do."
|
||||
else
|
||||
git -C ${REDPILL_LKM_SRC} pull
|
||||
echo "Pulled latest commits."
|
||||
fi
|
||||
else
|
||||
git -C ${REDPILL_LKM_SRC} pull
|
||||
echo "Pulled latest commits."
|
||||
echo "Redpill-lkm sources are mapped into the build container, skipping pull of latest sources."
|
||||
fi
|
||||
|
||||
|
||||
if [ "${LOCAL_RP_LOAD_USE}" == "false" ]; then
|
||||
REDPILL_LOAD_BRANCH=$(git -C ${REDPILL_LOAD_SRC} name-rev --name-only HEAD)
|
||||
echo "Check if redpill-load sources require pull."
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
"use_buildkit": "true",
|
||||
"image_name": "redpill-tool-chain",
|
||||
"download_folder": "docker/downloads",
|
||||
"local_rp_lkm_use": "false",
|
||||
"local_rp_lkm_path": "./redpill-lkm",
|
||||
"local_rp_load_use": "false",
|
||||
"local_rp_load_path": "./redpill-load",
|
||||
"auto_clean": "false",
|
||||
|
|
|
@ -77,6 +77,10 @@ function runContainer(){
|
|||
echo "user config does not exist: ${USER_CONFIG_JSON}"
|
||||
exit 1
|
||||
fi
|
||||
if [[ "${LOCAL_RP_LKM_USE}" == "true" && ! -e $(realpath "${LOCAL_RP_LKM_PATH}") ]]; then
|
||||
echo "Local redpill-lkm path does not exist: ${LOCAL_RP_LKM_PATH}"
|
||||
exit 1
|
||||
fi
|
||||
if [[ "${LOCAL_RP_LOAD_USE}" == "true" && ! -e $(realpath "${LOCAL_RP_LOAD_PATH}") ]]; then
|
||||
echo "Local redpill-load path does not exist: ${LOCAL_RP_LOAD_PATH}"
|
||||
exit 1
|
||||
|
@ -99,6 +103,7 @@ function runContainer(){
|
|||
--volume /dev:/dev \
|
||||
$( [ "${USE_CUSTOM_BIND_MOUNTS}" == "true" ] && echo "${BINDS}") \
|
||||
$( [ "${LOCAL_RP_LOAD_USE}" == "true" ] && echo "--volume $(realpath ${LOCAL_RP_LOAD_PATH}):/opt/redpill-load") \
|
||||
$( [ "${LOCAL_RP_LKM_USE}" == "true" ] && echo "--volume $(realpath ${LOCAL_RP_LKM_PATH}):/opt/redpill-lkm") \
|
||||
$( [ -e "${USER_CONFIG_JSON}" ] && echo "--volume $(realpath ${USER_CONFIG_JSON}):/opt/redpill-load/user_config.json") \
|
||||
--volume ${REDPILL_LOAD_CACHE}:/opt/redpill-load/cache \
|
||||
--volume ${REDPILL_LOAD_IMAGES}:/opt/redpill-load/images \
|
||||
|
@ -107,6 +112,7 @@ function runContainer(){
|
|||
--env TARGET_VERSION="${TARGET_VERSION}" \
|
||||
--env DSM_VERSION="${DSM_VERSION}" \
|
||||
--env REVISION="${TARGET_REVISION}" \
|
||||
--env LOCAL_RP_LKM_USE="${LOCAL_RP_LKM_USE}" \
|
||||
--env LOCAL_RP_LOAD_USE="${LOCAL_RP_LOAD_USE}" \
|
||||
${DOCKER_IMAGE_NAME}:${TARGET_PLATFORM}-${TARGET_VERSION}-${TARGET_REVISION} $( [ "${CMD}" == "run" ] && echo "/bin/bash")
|
||||
}
|
||||
|
@ -274,6 +280,8 @@ if [[ "${ACTION}" != "del" && "${ACTION}" != "add" && "${ID}" != "all" ]]; then
|
|||
USE_BUILDKIT=$(getValueByJsonPath ".docker.use_buildkit" "${CONFIG}")
|
||||
DOCKER_IMAGE_NAME=$(getValueByJsonPath ".docker.image_name" "${CONFIG}")
|
||||
DOWNLOAD_FOLDER=$(getValueByJsonPath ".docker.download_folder" "${CONFIG}")
|
||||
LOCAL_RP_LKM_USE=$(getValueByJsonPath ".docker.local_rp_lkm_use" "${CONFIG}")
|
||||
LOCAL_RP_LKM_PATH=$(getValueByJsonPath ".docker.local_rp_lkm_path" "${CONFIG}")
|
||||
LOCAL_RP_LOAD_USE=$(getValueByJsonPath ".docker.local_rp_load_use" "${CONFIG}")
|
||||
LOCAL_RP_LOAD_PATH=$(getValueByJsonPath ".docker.local_rp_load_path" "${CONFIG}")
|
||||
TARGET_PLATFORM=$(getValueByJsonPath ".platform_version | split(\"-\")[0]" "${BUILD_CONFIG}")
|
||||
|
@ -306,9 +314,6 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
case "${ACTION}" in
|
||||
add) __ext_add "${2}"
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue
Block a user