[rk3568-plc] update to v0.1

This commit is contained in:
luck 2024-05-13 15:20:52 +08:00
parent 9307f64367
commit fae81ee9a9
5 changed files with 47 additions and 14 deletions

11
main.sh
View File

@ -9,11 +9,14 @@ sudo echo "">/dev/null
export ACO_GIT_USR_NAME=""
export ACO_GIT_PASWD=""
echo "请输入36服务器的git用户名:"
read ACO_GIT_USR_NAME
echo "请输入36服务器的git密码:"
read -s ACO_GIT_PASWD
if [ -z ${ACO_SELF_BUILD_DTB} ]; then
echo "请输入36服务器的git用户名:"
read ACO_GIT_USR_NAME
echo "请输入36服务器的git密码:"
read -s ACO_GIT_PASWD
fi
export ACO_TMPDIR=$(mktemp /tmp/aco_pub_sample_task_XXXX)
ACO_SCRIPT_REL_PATH=$(dirname "$0")

View File

@ -0,0 +1,11 @@
#!/bin/bash
#env > /home/ubuntu/usb_env.txt
NEW_NAME=$(echo $ID_PATH | awk -F ":" '{a=$1;sub("platform-xhci-hcd.", "enx", a);sub(".auto-usb-", "u", a);print a$2;}')
if [ "_$ID_NET_NAME" != "_$NEW_NAME" ]; then
#echo "=== change to $NEW_NAME" >> /home/ubuntu/usb_env.txt
sudo ip link set dev $ID_NET_NAME name $NEW_NAME
#else
#echo "=== same name $NEW_NAME" >> /home/ubuntu/usb_env.txt
fi

View File

@ -52,6 +52,15 @@ function install_kernel()
rm -fr ${TARGET_DIR}/tmp/ker_deb/
}
function install_other_pkgs()
{
echo "excuting install other pkgs"
sudo chroot ${TARGET_DIR} bash -c 'apt install -y lshw gettext netplan.io libnetplan-dev python-pip'
if [ $? -eq 0 ]; then
echo "install other pkgs successed"
fi
}
function override_rootfs()
{
echo "excuting cp -ar ${ACO_SCRIPT_ABS_PATH}/pkgs/rootfs/u22_rootfs/override/* ${TARGET_DIR}"
@ -61,7 +70,10 @@ function override_rootfs()
echo "Executing $(basename $0)..."
install_kernel $@
install_docker_script
if [ -z ${ACO_QUICK_BUILD} ]; then
install_docker_script
install_other_pkgs
fi
override_rootfs
exit 0

View File

@ -95,6 +95,7 @@ fi
cd ../mkbootimg
mkimage -f ./boot.its -E -p 0x800 fitImage
# scp -f fitImage ${RK_4_19_SDK_HOST}:${RK_4_19_SDK_PATH}kernel/boot.img
cp fitImage ${CUR_PRODUCT_DIST_DIR}/boot.img
scp fitImage ${RK_4_19_SDK_HOST}:/tmp/fitImage
ssh -t -o BatchMode=yes ${RK_4_19_SDK_HOST} " \
echo \" \" | sudo -S mv /tmp/fitImage ${RK_4_19_SDK_PATH}kernel/boot.img"

View File

@ -11,14 +11,20 @@ if [ -z "$RK3568_PLC_DTS_TAG_OR_BRANCH" ]; then
exit 1
fi
tmpdir=`mktemp -d /tmp/rk3568_dts_XXXX`
cd ${tmpdir}
git clone http://${ACO_GIT_USR_NAME}:${ACO_GIT_PASWD}@36.110.67.90:31472/AcoSail/rk3568_plc_dts.git
if [ -z ${ACO_SELF_BUILD_DTB} ]; then
tmpdir=`mktemp -d /tmp/rk3568_dts_XXXX`
cd rk3568_plc_dts && git checkout ${RK3568_PLC_DTS_TAG_OR_BRANCH}
./build.sh
cp -f output.dtb ${ROOT_SCRIPT_PATH}/../mkbootimg/input/rk3568-plc.dtb
cp -f output.dtb ${ROOT_SCRIPT_PATH}/../recovery/input/dtb
cd -
cd ${tmpdir}
git clone http://${ACO_GIT_USR_NAME}:${ACO_GIT_PASWD}@36.110.67.90:31472/AcoSail/rk3568_plc_dts.git
rm -rf ${tmpdir}
cd rk3568_plc_dts && git checkout ${RK3568_PLC_DTS_TAG_OR_BRANCH}
./build.sh
cp -f output.dtb ${ROOT_SCRIPT_PATH}/../mkbootimg/input/rk3568-plc.dtb
cp -f output.dtb ${ROOT_SCRIPT_PATH}/../recovery/input/dtb
cd -
rm -rf ${tmpdir}
else
sshpass -p ${ACO_SELF_BUILD_DTB_PASSWD} scp ${ACO_SELF_BUILD_DTB} ${ROOT_SCRIPT_PATH}/../mkbootimg/input/rk3568-plc.dtb
sshpass -p ${ACO_SELF_BUILD_DTB_PASSWD} scp ${ACO_SELF_BUILD_DTB} ${ROOT_SCRIPT_PATH}/../recovery/input/dtb
fi