Skip to content

Commit

Permalink
2023年8月1日版本
Browse files Browse the repository at this point in the history
1、各软件包版本更新到2023年8月1日的状态。
2、修改部分软件包的制作步骤。
  • Loading branch information
sunhaiyong1978 committed Aug 1, 2023
1 parent 036cc7d commit 4bf44f7
Show file tree
Hide file tree
Showing 694 changed files with 14,666 additions and 157,735 deletions.
3 changes: 3 additions & 0 deletions loongarch64/arch_step
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

%step/target_base/linux-header|
%step/cross-tools/grub|
%step/target_base/valgrind|
%step/base_support/jdk20|g_opt
%step/base_support/perf|g_opt
%step/boot/linux-kernel|
%step/boot/grub|
%step/computer_language/golang|g_opt,target-dist,golang
114 changes: 106 additions & 8 deletions loongarch64/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ BASE_DIR="${PWD}"
declare FORCE_BUILD=0
declare FORCE_ALL_BUILD=0
declare OPT_SET_STR=""
declare OPT_SET_ENV=""
declare ONLY_BUILD=0
declare REQUIRES_BUILD=0
declare SINGLE_PACKAGE=0
declare FORCE_ALL_DOWNLOAD=0
declare DATA_SUFF=""

while getopts 'fao:rsdh' OPT; do
while getopts 'fao:rsde:h' OPT; do
case $OPT in
f)
FORCE_BUILD=1
Expand All @@ -37,6 +38,9 @@ while getopts 'fao:rsdh' OPT; do
d)
FORCE_ALL_DOWNLOAD=1
;;
e)
OPT_SET_ENV=$OPTARG
;;
h|?)
echo "目标系统构建命令。"
echo ""
Expand All @@ -61,6 +65,60 @@ done
shift $(($OPTIND - 1))


function set_build_env
{
declare -a SET_ENV
declare SET_COUNT=0
declare SET_STR="${2}"
declare -a USE_ENV=(${1})
declare USE_ENV_COUNT=${#USE_ENV[@]}

for i in $(echo "${SET_STR}" | tr "," "\\n")
do
SET_ENV[${SET_COUNT}]=${i}
((SET_COUNT++))
done

for i in ${SET_ENV[*]}
do
USE_ENV[${USE_ENV_COUNT}]=${i}
((USE_ENV_COUNT++))
done
echo "${USE_ENV[@]}"
}



function get_all_can_set_env_str
{
declare -a SET_ENV
declare SET_COUNT=0
declare GET_ENV_VALUE=""
declare SET_STR="${1}"
declare -a USE_ENV=("")
declare USE_ENV_COUNT=${#USE_ENV[@]}

for i in $(echo "${SET_STR}" | tr "," "\\n")
do
if [ "x${i:0:1}" == "x%" ]; then
SET_ENV[${SET_COUNT}]=${i:1}
((SET_COUNT++))
fi
done

for i in ${SET_ENV[*]}
do
GET_ENV_VALUE=""
GET_ENV_VALUE="$(cat ${NEW_TARGET_SYSDIR}/set_env.conf | grep "^export YONGBAO_SET_ENV_${i}=" | awk -F'=' '{ print $2 }')"
if [ "x${GET_ENV_VALUE}" != "x" ]; then
USE_ENV[${USE_ENV_COUNT}]=${GET_ENV_VALUE}
((USE_ENV_COUNT++))
fi
done
echo $(IFS=_; echo "${USE_ENV[*]}")
}


function create_date_suff
{
if [ ! -f ${NEW_TARGET_SYSDIR}/datetime_stemp ]; then
Expand Down Expand Up @@ -440,7 +498,9 @@ function set_to_default_opt
if [ "x${i:0:1}" == "x+" ]; then
USE_OPT[${USE_COUNT}]=${i:1}
else
USE_OPT[${USE_COUNT}]=${i}
if [ "x${i:0:1}" != "x%" ]; then
USE_OPT[${USE_COUNT}]=${i}
fi
fi
((USE_COUNT++))
fi
Expand Down Expand Up @@ -484,10 +544,17 @@ function test_opt_can_run
OPT=${i:1}
INVERT=1
else
OPT=${i}
INVERT=0
if [ "x${i:0:1}" == "x%" ]; then
continue
else
OPT=${i}
INVERT=0
fi
fi
fi
if [ "x${INVERT}" == "x1" ]; then
TEST_STATUS=1
fi
for j in $(echo ${USE_OPT[*]})
do
if [ "x${j}" == "x" ]; then
Expand All @@ -504,6 +571,7 @@ function test_opt_can_run
break;
fi
done
# if [ "x${TEST_STATUS}" == "x0" ] && [ "x${INVERT}" == "x0" ]; then
if [ "x${TEST_STATUS}" == "x0" ]; then
# ${i} 标记没有找到,${1} 测试不通过"
echo "1"
Expand Down Expand Up @@ -589,8 +657,6 @@ function step_to_index
USE_OPT=($(set_to_default_opt "$(echo ${USE_OPT[@]})" "${OPT_SET_STR}"))
USE_COUNT=${#USE_OPT[@]}



if [ "x${STEP_PKG_STR}" != "x" ]; then
FORMAT_STRING=$(format_step_str "${STEP_PKG_STR}")
echo "指定了编译步骤:${FORMAT_STRING}"
Expand Down Expand Up @@ -644,6 +710,7 @@ function step_to_index
COUNT_NAME=${TMP_NAME/-/_}_COUNT
printf -v SHOW_COUNT "%05d" ${!COUNT_NAME}

#echo "test_opt_can_run" "$(echo ${USE_OPT[@]})" "${STEP_OPT}"
if [ "x$(test_opt_can_run "$(echo ${USE_OPT[@]})" "${STEP_OPT}")" == "x0" ]; then
if [ "x${GREP_STR}" == "x" ]; then
echo -n "${SHOW_COUNT} "
Expand Down Expand Up @@ -689,6 +756,22 @@ function step_to_index


mkdir -p ${NEW_TARGET_SYSDIR}

declare -a USE_SET_ENV
declare USE_SET_ENV_COUNT=0

USE_SET_ENV=($(set_build_env "" "${OPT_SET_ENV}"))
USE_SET_ENV_COUNT=${#USE_SET_ENV[@]}

echo -n "" > ${NEW_TARGET_SYSDIR}/set_env.conf
for set_env in ${USE_SET_ENV[*]}
do
ENV_KEY=$(echo ${set_env} | awk -F'=' '{ print $1 }')
ENV_VALUE=$(echo ${set_env} | awk -F'=' '{ print $2 }')
echo "export YONGBAO_SET_ENV_${ENV_KEY}=${ENV_VALUE}" >> ${NEW_TARGET_SYSDIR}/set_env.conf
done


create_date_suff
echo "创将索引文件......"
step_to_index "${1}"
Expand Down Expand Up @@ -761,13 +844,25 @@ echo -n "" > ${NEW_TARGET_SYSDIR}/logs/step_overlay_before_run_save
echo -n "" > ${NEW_TARGET_SYSDIR}/logs/step_overlay_after_run_save
echo -n "" > ${NEW_TARGET_SYSDIR}/logs/step_overlay_temp_fix_run_save

cat ${STEP_FILE} | awk -F'|' '{ print $1 }' | while read line

if [ -f ${NEW_TARGET_SYSDIR}/logs/info_pool ]; then
mv ${NEW_TARGET_SYSDIR}/logs/info_pool{,.$(date +%Y%m%d%H%M%S)}
fi
touch ${NEW_TARGET_SYSDIR}/logs/info_pool

# cat ${STEP_FILE} | awk -F'|' '{ print $1 }' | while read line
cat ${STEP_FILE} | while read line_all
do
line=$(echo "${line_all}" | awk -F'|' '{ print $1 }')
PACKAGE_ALL_OPT="$(echo "${line_all}" | awk -F'|' '{ print $2 }')"
RET_VAL=0
PACKAGE_INDEX=$(echo "${line}" | sed "s@ *step@@g" | awk -F'/' '{ print $1 }')
STEP_STAGE=$(echo "${line}" | sed "s@ *step@@g" | awk -F'/' '{ print $2 }')
PACKAGE_NAME=$(echo "${line}" | sed "s@ *step@@g" | awk -F'/' '{ print $3 }')
STATUS_FILE="${PACKAGE_NAME}_${STEP_STAGE}_${PACKAGE_INDEX}"

PACKAGE_SET_ENV=$(get_all_can_set_env_str "${PACKAGE_ALL_OPT}")

STATUS_FILE="${PACKAGE_NAME}${PACKAGE_SET_ENV}_${STEP_STAGE}_${PACKAGE_INDEX}"
SCRIPT_FILE=$(echo "${line}" | awk -F' ' '{ print $2 }' | sed "s@ *step\/@@g")
if [ "x${PACKAGE_NAME}" == "xbegin_run" ] || [ "x${PACKAGE_NAME}" == "xoverlay_before_run" ] || [ "x${PACKAGE_NAME}" == "xoverlay_after_run" ] || [ "x${PACKAGE_NAME}" == "xoverlay_temp_fix_run" ]; then
echo "${STEP_STAGE}" >> ${NEW_TARGET_SYSDIR}/logs/step_${PACKAGE_NAME}_save
Expand Down Expand Up @@ -884,6 +979,9 @@ done

if [ "x$?" == "x0" ]; then
echo -e "\r编译制作过程完成。\033[0K\n"

cat ${NEW_TARGET_SYSDIR}/logs/info_pool

if [ "x${1}" == "x" ]; then
echo "接下来可以使用./strip_os.sh脚本来清除调试信息,使用./install_os_run.sh安装系统启动脚本,以及使用./pack_os.sh脚本来打包系统。"
fi
Expand Down
1 change: 1 addition & 0 deletions loongarch64/env/DE-KDE/config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export PATH=${CROSSTOOLS_DIR}/bin:/usr/bin:/bin
export CROSS_TARGET="loongarch64-unknown-linux-gnu"
export MABI="lp64d"
export LIB_SUFF="64"
export ARCH_BIT=64
export PREFIX=/usr
export LDFLAGS="-Wl,-rpath-link=${SYSROOT_DIR}/usr/lib${LIB_SUFF}"
export PKG_CONFIG_SYSROOT_DIR=${SYSROOT_DIR}
Expand Down
1 change: 1 addition & 0 deletions loongarch64/env/base_support/config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export PATH=${CROSSTOOLS_DIR}/bin:/usr/bin:/bin
export CROSS_TARGET="loongarch64-unknown-linux-gnu"
export MABI="lp64d"
export LIB_SUFF="64"
export ARCH_BIT=64
export PREFIX=/usr
export LDFLAGS="-Wl,-rpath-link=${SYSROOT_DIR}/usr/lib${LIB_SUFF}"
export PKG_CONFIG_SYSROOT_DIR=${SYSROOT_DIR}
Expand Down
1 change: 1 addition & 0 deletions loongarch64/env/boot/config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export PATH=${CROSSTOOLS_DIR}/bin:/usr/bin:/bin
export CROSS_TARGET="loongarch64-unknown-linux-gnu"
export MABI="lp64d"
export LIB_SUFF="64"
export ARCH_BIT=64
export PREFIX=/usr
export LDFLAGS="-Wl,-rpath-link=${SYSROOT_DIR}/usr/lib${LIB_SUFF}"
export PKG_CONFIG_SYSROOT_DIR=${SYSROOT_DIR}
Expand Down
1 change: 1 addition & 0 deletions loongarch64/env/bootstrap/config
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ export PATH=${CROSSTOOLS_DIR}/bin:/usr/bin:/bin
export CROSS_TARGET="loongarch64-unknown-linux-gnu"
export MABI="lp64d"
export LIB_SUFF="64"
export ARCH_BIT=64
1 change: 1 addition & 0 deletions loongarch64/env/computer_language/config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export PATH=${CROSSTOOLS_DIR}/bin:/usr/bin:/bin
export CROSS_TARGET="loongarch64-unknown-linux-gnu"
export MABI="lp64d"
export LIB_SUFF="64"
export ARCH_BIT=64
export PREFIX=/usr
export LDFLAGS="-Wl,-rpath-link=${SYSROOT_DIR}/usr/lib${LIB_SUFF}"
export PKG_CONFIG_SYSROOT_DIR=${SYSROOT_DIR}
Expand Down
2 changes: 2 additions & 0 deletions loongarch64/env/cross-toolchains/config
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ export PATH=${CROSSTOOLS_DIR}/bin:/usr/bin:/bin
export CROSS_TARGET="loongarch64-unknown-linux-gnu"
export MABI="lp64d"
export LIB_SUFF="64"
export ARCH_BIT=64
export CROSS_TOOLS_PREFIX=${SYSDIR}/cross-toolchains
export PREFIX=${CROSS_TOOLS_PREFIX}
export MINGW_HOST=x86_64-w64-mingw32ucrt
export X86_64_HOST=x86_64-unknown-linux-gnu
export X86_HOST=i686-unknown-linux-gnu
export MAKE_AND_INSTALL="make -j${JOBS} && make install"
export YONGBAO_TARGET_ARCH=loongarch64
export YONGBAO_TARGET_ARCH_NAME=loongarch
Expand Down
2 changes: 2 additions & 0 deletions loongarch64/env/cross-tools/config
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ export PATH=${CROSSTOOLS_DIR}/bin:/usr/bin:/bin
export CROSS_TARGET="loongarch64-unknown-linux-gnu"
export MABI="lp64d"
export LIB_SUFF="64"
export ARCH_BIT=64
export CROSS_TOOLS_PREFIX=${CROSSTOOLS_DIR}
export PREFIX=${CROSSTOOLS_DIR}
export COMMON_CONFIG="--prefix=${PREFIX}"
export PKG_CONFIG_PATH="${CROSSTOOLS_DIR}/lib64/pkgconfig:${CROSSTOOLS_DIR}/lib/pkgconfig:${CROSSTOOLS_DIR}/share/pkgconfig"
export MAKE_AND_INSTALL="make -j${JOBS} && make install"
export LD_LIBRARY_PATH=${CROSSTOOLS_DIR}/lib64:${CROSSTOOLS_DIR}/lib
export YONGBAO_TARGET_ARCH=loongarch64
export YONGBAO_TARGET_ARCH_NAME=loongarch
export TARGET_ABI=lp64
1 change: 1 addition & 0 deletions loongarch64/env/desktop-app/config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export PATH=${CROSSTOOLS_DIR}/bin:/usr/bin:/bin
export CROSS_TARGET="loongarch64-unknown-linux-gnu"
export MABI="lp64d"
export LIB_SUFF="64"
export ARCH_BIT=64
export PREFIX=/usr
export LDFLAGS="-Wl,-rpath-link=${SYSROOT_DIR}/usr/lib${LIB_SUFF}"
export PKG_CONFIG_SYSROOT_DIR=${SYSROOT_DIR}
Expand Down
4 changes: 2 additions & 2 deletions loongarch64/env/distro.info
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
DISTRO_ARCH=loongarch64
DISTRO_ARCH_NAME=loongarch64
DISTRO_NAME=Yongbao
DISTRO_VERSION=1.2
DISTRO_VERSION=1.0
DISTRO_ARCHIVE_MODE=squashfs
DISTRO_DEFAULT_USER=loongarch
DISTRO_DEFAULT_USER_PASSWD=loongson
DISTRO_DEFAULT_USER_PASSWD=loongarch
export DISTRO_ARCH DISTRO_ARCH_NAME DISTRO_NAME DISTRO_VERSION DISTRO_ARCHIVE_MODE DISTRO_DEFAULT_USER
Loading

0 comments on commit 4bf44f7

Please sign in to comment.