Update for Orange Pi 5 v1.1.0

This commit is contained in:
orangepi-xunlong
2023-01-06 16:05:10 +08:00
parent 1e88c5d827
commit 86c287f010
29 changed files with 2406 additions and 265 deletions

View File

@@ -43,24 +43,24 @@ compile_atf()
display_alert "Compiling ATF" "" "info"
# build aarch64
if [[ $(dpkg --print-architecture) == amd64 ]]; then
# build aarch64
if [[ $(dpkg --print-architecture) == amd64 ]]; then
local toolchain
toolchain=$(find_toolchain "$ATF_COMPILER" "$ATF_USE_GCC")
[[ -z $toolchain ]] && exit_with_error "Could not find required toolchain" "${ATF_COMPILER}gcc $ATF_USE_GCC"
local toolchain
toolchain=$(find_toolchain "$ATF_COMPILER" "$ATF_USE_GCC")
[[ -z $toolchain ]] && exit_with_error "Could not find required toolchain" "${ATF_COMPILER}gcc $ATF_USE_GCC"
if [[ -n $ATF_TOOLCHAIN2 ]]; then
local toolchain2_type toolchain2_ver toolchain2
toolchain2_type=$(cut -d':' -f1 <<< "${ATF_TOOLCHAIN2}")
toolchain2_ver=$(cut -d':' -f2 <<< "${ATF_TOOLCHAIN2}")
toolchain2=$(find_toolchain "$toolchain2_type" "$toolchain2_ver")
[[ -z $toolchain2 ]] && exit_with_error "Could not find required toolchain" "${toolchain2_type}gcc $toolchain2_ver"
if [[ -n $ATF_TOOLCHAIN2 ]]; then
local toolchain2_type toolchain2_ver toolchain2
toolchain2_type=$(cut -d':' -f1 <<< "${ATF_TOOLCHAIN2}")
toolchain2_ver=$(cut -d':' -f2 <<< "${ATF_TOOLCHAIN2}")
toolchain2=$(find_toolchain "$toolchain2_type" "$toolchain2_ver")
[[ -z $toolchain2 ]] && exit_with_error "Could not find required toolchain" "${toolchain2_type}gcc $toolchain2_ver"
fi
# build aarch64
fi
# build aarch64
fi
display_alert "Compiler version" "${ATF_COMPILER}gcc $(eval env PATH="${toolchain}:${PATH}" "${ATF_COMPILER}gcc" -dumpversion)" "info"
local target_make target_patchdir target_files
@@ -110,9 +110,6 @@ compile_atf()
[[ -f license.md ]] && cp license.md "${atftempdir}"/
}
compile_uboot()
{
# not optimal, but extra cleaning before overlayfs_wrapper should keep sources directory clean
@@ -136,24 +133,24 @@ compile_uboot()
display_alert "Compiling u-boot" "v$version" "info"
# build aarch64
if [[ $(dpkg --print-architecture) == amd64 ]]; then
# build aarch64
if [[ $(dpkg --print-architecture) == amd64 ]]; then
local toolchain
toolchain=$(find_toolchain "$UBOOT_COMPILER" "$UBOOT_USE_GCC")
[[ -z $toolchain ]] && exit_with_error "Could not find required toolchain" "${UBOOT_COMPILER}gcc $UBOOT_USE_GCC"
local toolchain
toolchain=$(find_toolchain "$UBOOT_COMPILER" "$UBOOT_USE_GCC")
[[ -z $toolchain ]] && exit_with_error "Could not find required toolchain" "${UBOOT_COMPILER}gcc $UBOOT_USE_GCC"
if [[ -n $UBOOT_TOOLCHAIN2 ]]; then
local toolchain2_type toolchain2_ver toolchain2
toolchain2_type=$(cut -d':' -f1 <<< "${UBOOT_TOOLCHAIN2}")
toolchain2_ver=$(cut -d':' -f2 <<< "${UBOOT_TOOLCHAIN2}")
toolchain2=$(find_toolchain "$toolchain2_type" "$toolchain2_ver")
[[ -z $toolchain2 ]] && exit_with_error "Could not find required toolchain" "${toolchain2_type}gcc $toolchain2_ver"
if [[ -n $UBOOT_TOOLCHAIN2 ]]; then
local toolchain2_type toolchain2_ver toolchain2
toolchain2_type=$(cut -d':' -f1 <<< "${UBOOT_TOOLCHAIN2}")
toolchain2_ver=$(cut -d':' -f2 <<< "${UBOOT_TOOLCHAIN2}")
toolchain2=$(find_toolchain "$toolchain2_type" "$toolchain2_ver")
[[ -z $toolchain2 ]] && exit_with_error "Could not find required toolchain" "${toolchain2_type}gcc $toolchain2_ver"
fi
# build aarch64
fi
# build aarch64
fi
display_alert "Compiler version" "${UBOOT_COMPILER}gcc $(eval env PATH="${toolchain}:${toolchain2}:${PATH}" "${UBOOT_COMPILER}gcc" -dumpversion)" "info"
[[ -n $toolchain2 ]] && display_alert "Additional compiler version" "${toolchain2_type}gcc $(eval env PATH="${toolchain}:${toolchain2}:${PATH}" "${toolchain2_type}gcc" -dumpversion)" "info"
@@ -706,6 +703,59 @@ compile_orangepi-zsh()
compile_plymouth-theme-orangepi()
{
local tmp_dir work_dir
tmp_dir=$(mktemp -d)
chmod 700 ${tmp_dir}
trap "ret=\$?; rm -rf \"${tmp_dir}\" ; exit \$ret" 0 1 2 3 15
plymouth_theme_orangepi_dir=orangepi-plymouth-theme_${REVISION}_all
display_alert "Building deb" "orangepi-plymouth-theme" "info"
mkdir -p "${tmp_dir}/${plymouth_theme_orangepi_dir}"/{DEBIAN,usr/share/plymouth/themes/orangepi}
# set up control file
cat <<- END > "${tmp_dir}/${plymouth_theme_orangepi_dir}"/DEBIAN/control
Package: orangepi-plymouth-theme
Version: $REVISION
Architecture: all
Maintainer: $MAINTAINER <$MAINTAINERMAIL>
Depends: plymouth, plymouth-themes
Section: universe/x11
Priority: optional
Description: boot animation, logger and I/O multiplexer - orangepi theme
END
cp "${EXTER}"/packages/plymouth-theme-orangepi/debian/{postinst,prerm,postrm} \
"${tmp_dir}/${plymouth_theme_orangepi_dir}"/DEBIAN/
chmod 755 "${tmp_dir}/${plymouth_theme_orangepi_dir}"/DEBIAN/{postinst,prerm,postrm}
#convert -resize 256x256 \
# "${EXTER}"/packages/plymouth-theme-orangepi/orangepi-logo.png \
# "${tmp_dir}/${plymouth_theme_orangepi_dir}"/usr/share/plymouth/themes/orangepi/bgrt-fallback.png
# convert -resize 52x52 \
# "${EXTER}"/packages/plymouth-theme-orangepi/spinner.gif \
# "${tmp_dir}/${plymouth_theme_orangepi_dir}"/usr/share/plymouth/themes/orangepi/animation-%04d.png
convert -resize 52x52 \
"${EXTER}"/packages/plymouth-theme-orangepi/spinner.gif \
"${tmp_dir}/${plymouth_theme_orangepi_dir}"/usr/share/plymouth/themes/orangepi/throbber-%04d.png
cp "${EXTER}"/packages/plymouth-theme-orangepi/watermark.png \
"${tmp_dir}/${plymouth_theme_orangepi_dir}"/usr/share/plymouth/themes/orangepi/
cp "${EXTER}"/packages/plymouth-theme-orangepi/{bullet,capslock,entry,keyboard,keymap-render,lock}.png \
"${tmp_dir}/${plymouth_theme_orangepi_dir}"/usr/share/plymouth/themes/orangepi/
cp "${EXTER}"/packages/plymouth-theme-orangepi/orangepi.plymouth \
"${tmp_dir}/${plymouth_theme_orangepi_dir}"/usr/share/plymouth/themes/orangepi/
fakeroot dpkg-deb -b -Z${DEB_COMPRESS} "${tmp_dir}/${plymouth_theme_orangepi_dir}" > /dev/null
rsync --remove-source-files -rq "${tmp_dir}/${plymouth_theme_orangepi_dir}.deb" "${DEB_STORAGE}/"
rm -rf "${tmp_dir}"
}
compile_orangepi-config()
{

View File

@@ -24,6 +24,7 @@ HOSTRELEASE=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d"=" -f2)
cd "${SRC}" || exit
[[ -z "${ROOTFSCACHE_VERSION}" ]] && ROOTFSCACHE_VERSION=11
[[ -z "${CHROOT_CACHE_VERSION}" ]] && CHROOT_CACHE_VERSION=7
[[ -z $PLYMOUTH ]] && PLYMOUTH="yes"
cd ${SRC}/scripts
BUILD_REPOSITORY_URL=$(improved_git remote get-url $(improved_git remote 2>/dev/null | grep origin) 2>/dev/null)

View File

@@ -137,7 +137,7 @@ create_rootfs_cache()
local apt_extra="-o Acquire::http::Proxy=\"http://${APT_PROXY_ADDR:-localhost:3142}\""
local apt_mirror="http://${APT_PROXY_ADDR:-localhost:3142}/$APT_MIRROR"
else
local apt_mirror="https://$APT_MIRROR"
local apt_mirror="http://$APT_MIRROR"
fi
# fancy progress bars

View File

@@ -392,6 +392,15 @@ POST_INSTALL_KERNEL_DEBS
fi
fi
# install plymouth-theme-orangepi
if [[ $PLYMOUTH == yes ]]; then
if [[ "${REPOSITORY_INSTALL}" != *plymouth-theme-orangepi* ]]; then
install_deb_chroot "${DEB_STORAGE}/orangepi-plymouth-theme_${REVISION}_all.deb"
else
install_deb_chroot "orangepi-plymouth-theme" "remote"
fi
fi
# install kernel sources
if [[ -f ${DEB_STORAGE}/${CHOSEN_KSRC}_${REVISION}_all.deb && $INSTALL_KSRC == yes ]]; then
install_deb_chroot "${DEB_STORAGE}/${CHOSEN_KSRC}_${REVISION}_all.deb"

View File

@@ -54,6 +54,7 @@ cleaning()
find "${DEB_STORAGE}" -name "${CHOSEN_UBOOT}_*.deb" -delete
find "${DEB_STORAGE}" \( -name "${CHOSEN_KERNEL}_*.deb" -o \
-name "orangepi-*.deb" -o \
-name "plymouth-theme-orangepi_*.deb" -o \
-name "${CHOSEN_KERNEL/image/dtb}_*.deb" -o \
-name "${CHOSEN_KERNEL/image/headers}_*.deb" -o \
-name "${CHOSEN_KERNEL/image/source}_*.deb" -o \
@@ -1493,7 +1494,7 @@ prepare_host()
fi
mkdir -p $DEST/debs/{extra,u-boot} $DEST/{config,debug,patch,images} $USERPATCHES_PATH/overlay $EXTER/cache/{debs,sources,hash} $SRC/toolchains $SRC/.tmp
# build aarch64
# build aarch64
if [[ $(dpkg --print-architecture) == amd64 ]]; then
if [[ "${SKIP_EXTERNAL_TOOLCHAINS}" != "yes" ]]; then
@@ -1835,8 +1836,11 @@ install_docker() {
;;
esac
#mirror_url=https://mirrors.aliyun.com
mirror_url=https://repo.huaweicloud.com
if [[ ${SELECTED_CONFIGURATION} == desktop ]]; then
mirror_url=https://repo.huaweicloud.com
else
mirror_url=https://mirrors.aliyun.com
fi
chroot "${SDCARD}" /bin/bash -c "curl -fsSL ${mirror_url}/docker-ce/linux/${distributor_id}/gpg | apt-key add -"
echo "deb [arch=${ARCH}] ${mirror_url}/docker-ce/linux/${distributor_id} ${RELEASE} stable" > "${SDCARD}"/etc/apt/sources.list.d/docker.list

View File

@@ -442,7 +442,7 @@ if [[ ${IGNORE_UPDATES} != yes ]]; then
fi
if [[ ${BOARD} =~ orangepi5 && $RELEASE =~ bullseye|jammy ]]; then
if [[ ${BOARD} =~ orangepi5 && $RELEASE =~ bullseye|focal|jammy ]]; then
[[ ${BUILD_OPT} == image ]] && fetch_from_repo "https://github.com/orangepi-xunlong/rk-rootfs-build.git" "${EXTER}/cache/sources/rk3588_packages_${RELEASE}" "branch:rk3588_packages_${RELEASE}"
@@ -525,9 +525,13 @@ if [[ $BUILD_OPT == rootfs || $BUILD_OPT == image ]]; then
[[ "${REPOSITORY_INSTALL}" != *orangepi-zsh* ]] && compile_orangepi-zsh
fi
# Compile plymouth-theme-orangepi if packed .deb does not exist or use the one from repository
if [[ ! -f ${DEB_STORAGE}/plymouth-theme-orangepi_${REVISION}_all.deb ]]; then
[[ "${REPOSITORY_INSTALL}" != *plymouth-theme-orangepi* ]] && compile_plymouth-theme-orangepi
fi
# Compile orangepi-firmware if packed .deb does not exist or use the one from repository
if [[ "${REPOSITORY_INSTALL}" != *orangepi-firmware* ]]; then
if ! ls "${DEB_STORAGE}/orangepi-firmware_${REVISION}_all.deb" 1> /dev/null 2>&1; then
@@ -550,21 +554,14 @@ if [[ $BUILD_OPT == rootfs || $BUILD_OPT == image ]]; then
overlayfs_wrapper "cleanup"
# create board support package
[[ -n $RELEASE && ! -f ${DEB_STORAGE}/$RELEASE/${BSP_CLI_PACKAGE_FULLNAME}.deb ]] && create_board_package
# create desktop package
#[[ -n $RELEASE && $DESKTOP_ENVIRONMENT && ! -f ${DEB_STORAGE}/$RELEASE/${CHOSEN_DESKTOP}_${REVISION}_all.deb ]] && create_desktop_package
#[[ -n $RELEASE && $DESKTOP_ENVIRONMENT && ! -f ${DEB_STORAGE}/${RELEASE}/${BSP_DESKTOP_PACKAGE_FULLNAME}.deb ]] && create_bsp_desktop_package
[[ -n $RELEASE && $DESKTOP_ENVIRONMENT ]] && create_desktop_package
[[ -n $RELEASE && $DESKTOP_ENVIRONMENT ]] && create_bsp_desktop_package
# build additional packages
[[ $EXTERNAL_NEW == compile ]] && chroot_build_packages