[rk3568-plc] install matched modules at selfbuild and update readme
This commit is contained in:
parent
0e229c1482
commit
ecbd64dda0
17
README.md
17
README.md
|
@ -109,13 +109,25 @@ rootfs_commit_number=
|
|||
- [x] 错误检查错误处理不完善
|
||||
- [ ] 构建中间产物应该和源码分离或者统一后缀方便添加至gitignore
|
||||
- [ ] e2000 d2000 rk3588构建脚本
|
||||
- [ ] 指定内核构建目录时, 模块未安装到rootfs内, 造成不匹配
|
||||
- [x] 指定内核构建目录时, 模块未安装到rootfs内, 造成不匹配
|
||||
- [ ] 预构建材料最好统一放在归档服务器上, 不要和构建脚本放在一起
|
||||
- [ ] 过分依赖原厂构建sdk, 未分离
|
||||
- [ ] 没有集成构建内核, 构建rootfs的编译流程, 需要预编译好, 这个脚本目前只是选择编译好的内核deb包或者镜像以及在选择的rootfs二进制中添加客户需求的包版本
|
||||
- [ ] 整个打包控制粒度还有待降低
|
||||
- [ ] 由于直接ssh其他主机, 在某些路径进行构建, 故还需做好打包中的标记, 防止多人同时构建, 以及修改原厂build.sh同样做他人构建中检测
|
||||
- [x] 不支持单个构建, 之前的做法是手动在configs目录只保留一个配置文件
|
||||
- [ ] 还存在需要个人账号信息的情况, 如需用到36 git服务器上luck账号, 密码是luck9994dv
|
||||
|
||||
## 100Tai构建示例
|
||||
目前是用osc从obs下包, luckluck的obs密码是luckluck
|
||||
osc使用方法见此文档最下方https://acosail.yuque.com/ln4neu/dgzu0u/qp3vu0rxa0zawgrx
|
||||
```bash
|
||||
bash main.sh --set
|
||||
# 选择 1)./public_configs/100Tai_bpo6_custom-b.txt
|
||||
```
|
||||
![100Tai_start](./assets/100Tai刚开始选择产品截图.jpeg)
|
||||
完成截图
|
||||
![100Tai_end](./assets/100Tai完成截图.jpeg)
|
||||
|
||||
## rk3568-plc构建示例
|
||||
**编译:**
|
||||
|
@ -162,11 +174,14 @@ ACO_QUICK_BUILD=1 \
|
|||
bash main.sh
|
||||
```
|
||||
|
||||
![rk3568-plc_start](./assets/rk3568-plc刚开始选择产品截图.jpeg)
|
||||
|
||||
产物路径:
|
||||
dists/build_dists_[时间戳]/[产品名称-内核版本-rootfs类型-源码形式]/
|
||||
- boot.img
|
||||
- ubuntu-rootfs.img: rootfs镜像
|
||||
- update.img: 完整的刷机镜像
|
||||
![rk3568-plc_end](./assets/rk3568-plc完成截图.jpeg)
|
||||
|
||||
# 注意事项
|
||||
1. 如果当前目录下的./pkgs/rootfs/u22_rootfs/ubuntu22.04_rootfs.tgz用git lfs拉取不下来(显示还是ascii文件)则从这个地址[ubuntu-rootfs-base](http://10.10.10.59:8080/rootfs/ubuntu-rootfs-bin/base-240517/)下载到上面这个路径
|
||||
|
|
BIN
assets/100Tai刚开始选择产品截图.jpeg
Normal file
BIN
assets/100Tai刚开始选择产品截图.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 81 KiB |
BIN
assets/100Tai完成截图.jpeg
Normal file
BIN
assets/100Tai完成截图.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
BIN
assets/rk3568-plc刚开始选择产品截图.jpeg
Normal file
BIN
assets/rk3568-plc刚开始选择产品截图.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
BIN
assets/rk3568-plc完成截图.jpeg
Normal file
BIN
assets/rk3568-plc完成截图.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
|
@ -20,7 +20,13 @@ trap cleanup EXIT
|
|||
|
||||
TARGET_ROOTFS_DIR=${TMPDIR}/u22.04_rootfs # 定义目标根文件系统目录路径
|
||||
ROOTFSIMAGE=ubuntu-rootfs.img # 定义根文件系统镜像文件名
|
||||
EXTRA_SIZE_MB=1500 # 定义额外的磁盘空间大小
|
||||
# EXTRA_SIZE_MB 定义磁盘镜像额外空间大小
|
||||
if [[ X${ACO_KERNEL_IMG_SRC} == "Xselfbuild" ]]; then
|
||||
EXTRA_SIZE_MB=1600 # 目前的kernel config编出来的modules.tar解压开1.1G, CONFIG_DEBUG_INFO=n去掉空间才够
|
||||
# make tar-pkg 不支持类似INSTALL_MOD_STRIP=1的选项
|
||||
else
|
||||
EXTRA_SIZE_MB=1500
|
||||
fi
|
||||
IMAGE_SIZE_MB=$(( $(sudo du -sh -m ${TARGET_ROOTFS_DIR} | cut -f1) + ${EXTRA_SIZE_MB} )) # 计算根文件系统镜像文件大小
|
||||
MNT_ROOTFS_DIR=_tmp_rootmnt
|
||||
|
||||
|
|
|
@ -37,17 +37,23 @@ EOF
|
|||
|
||||
function install_kernel()
|
||||
{
|
||||
echo "Adding dirs and links..."
|
||||
|
||||
echo "Adding dirs and links..."
|
||||
|
||||
mkdir -p ${TARGET_DIR}/tmp/ker_deb/
|
||||
# copy kernel debs into target dir
|
||||
cp ${CUR_DISTS_DIR}/common_debs/rt/*deb ${TARGET_DIR}/tmp/ker_deb/
|
||||
cp ${CUR_DISTS_DIR}/common_debs/common/*deb ${TARGET_DIR}/tmp/ker_deb/
|
||||
sudo chroot ${TARGET_DIR} bash -c 'apt install -y /tmp/ker_deb/*.deb'
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "chroot apt install kernel failed"
|
||||
if [ ! -z $ACO_SELF_BUILD_PATH ]; then
|
||||
if [ -f ${CUR_DISTS_DIR}/common_debs/modules_for_mk_all_dist.tar ]; then
|
||||
tar -xvf ${CUR_DISTS_DIR}/common_debs/modules_for_mk_all_dist.tar -C ${TARGET_DIR}/
|
||||
fi
|
||||
else
|
||||
echo "chroot apt install kernel sucessufully"
|
||||
# copy kernel debs into target dir
|
||||
cp ${CUR_DISTS_DIR}/common_debs/rt/*deb ${TARGET_DIR}/tmp/ker_deb/
|
||||
cp ${CUR_DISTS_DIR}/common_debs/common/*deb ${TARGET_DIR}/tmp/ker_deb/
|
||||
sudo chroot ${TARGET_DIR} bash -c 'apt install -y /tmp/ker_deb/*.deb'
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "chroot apt install kernel failed"
|
||||
else
|
||||
echo "chroot apt install kernel sucessufully"
|
||||
fi
|
||||
fi
|
||||
rm -fr ${TARGET_DIR}/tmp/ker_deb/
|
||||
}
|
||||
|
|
|
@ -39,8 +39,16 @@ prepare_materials() {
|
|||
fi
|
||||
scp ${ACO_SELF_BUILD_PATH}/arch/arm64/boot/Image ${ACO_SCRIPT_ABS_PATH}/materials/kernel_Image/debs/none/boot/Image
|
||||
scp ${ACO_SELF_BUILD_PATH}/arch/arm64/boot/Image ${ACO_SCRIPT_ABS_PATH}/materials/kernel_Image/debs/rt/boot/Image
|
||||
scp ${ACO_SELF_BUILD_PATH}/../*deb ${CUR_DISTS_DIR}/common_debs/rt
|
||||
scp ${ACO_SELF_BUILD_PATH}/../*deb ${CUR_DISTS_DIR}/common_debs/rt
|
||||
# scp ${ACO_SELF_BUILD_PATH}/../*deb ${CUR_DISTS_DIR}/common_debs/rt
|
||||
# scp ${ACO_SELF_BUILD_PATH}/../*deb ${CUR_DISTS_DIR}/common_debs/rt
|
||||
scp ${ACO_SELF_BUILD_PATH}/modules_for_mk_all_dist.tar ${CUR_DISTS_DIR}/common_debs/
|
||||
if [ -f ${CUR_DISTS_DIR}/common_debs/modules_for_mk_all_dist.tar ]; then
|
||||
echo "successfully get modules.tar"
|
||||
else
|
||||
echo "请在${ACO_SELF_BUILD_PATH}目录下执行make tar-pkg, 然后将产物(linux-*-arm64.tar)改名为modules_for_mk_all_dist.tar"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
set +e
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue
Block a user