Skip to content

Commit

Permalink
fix OPENSBI_USE_GCC unset error.
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsx committed Sep 24, 2023
1 parent 6d45c52 commit b600f16
Show file tree
Hide file tree
Showing 6 changed files with 376 additions and 43 deletions.
35 changes: 5 additions & 30 deletions lib/compilation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# compile_kernel
# compile_firmware
# compile_armbian-config
# compile_xilinx_bootgen
# grab_version
# find_toolchain
# advanced_patch
Expand Down Expand Up @@ -163,11 +162,11 @@ compile_uboot()
# create patch for manual source changes
[[ $CREATE_PATCHES == yes ]] && userpatch_create "u-boot"

if [[ -n $OPENSBISOURCE ]]; then
cp -Rv "${opensbitempdir}"/*.bin .
cp -Rv "${opensbitempdir}"/*.elf .
rm -rf "${opensbitempdir}"
fi
#if [[ -n $OPENSBISOURCE ]]; then
# cp -Rv "${opensbitempdir}"/*.bin .
# cp -Rv "${opensbitempdir}"/*.elf .
# rm -rf "${opensbitempdir}"
#fi

echo -e "\n\t== u-boot make $BOOTCONFIG ==\n" >> "${DEST}"/${LOG_SUBPATH}/compilation.log
eval CCACHE_BASEDIR="$(pwd)" env PATH="${toolchain}:${toolchain2}:${PATH}" \
Expand Down Expand Up @@ -432,9 +431,6 @@ Before any olddefconfig any Kconfig make is called.
A good place to customize the .config directly.
CUSTOM_KERNEL_CONFIG

# hack for deb builder. To pack what's missing in headers pack.
cp "${SRC}"/patch/misc/headers-debian-byteshift.patch /tmp

if [[ $KERNEL_CONFIGURE != yes ]]; then
if [[ $BRANCH == default ]]; then
eval CCACHE_BASEDIR="$(pwd)" env PATH="${toolchain}:${PATH}" \
Expand Down Expand Up @@ -731,27 +727,6 @@ compile_armbian-config()
rm -rf "${tmp_dir}"
}

compile_xilinx_bootgen()
{
# Source code checkout
(fetch_from_repo "$GITHUB_SOURCE/Xilinx/bootgen.git" "xilinx-bootgen" "branch:master")

pushd "${SRC}"/cache/sources/xilinx-bootgen || exit

# Compile and install only if git commit hash changed
# need to check if /usr/local/bin/bootgen to detect new Docker containers with old cached sources
if [[ ! -f .commit_id || $(improved_git rev-parse @ 2>/dev/null) != $(<.commit_id) || ! -f /usr/local/bin/bootgen ]]; then
display_alert "Compiling" "xilinx-bootgen" "info"
make -s clean >/dev/null
make -s -j$(nproc) bootgen >/dev/null
mkdir -p /usr/local/bin/
install bootgen /usr/local/bin >/dev/null 2>&1
improved_git rev-parse @ 2>/dev/null > .commit_id
fi

popd
}

grab_version()
{
local ver=()
Expand Down
2 changes: 1 addition & 1 deletion lib/configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ SDCARD="${SRC}/.tmp/rootfs-${MOUNT_UUID}"
MOUNT="${SRC}/.tmp/mount-${MOUNT_UUID}"
DESTIMG="${SRC}/.tmp/image-${MOUNT_UUID}"

[[ -n $OPENSBISOURCE && -z $ATF_USE_GCC ]] && exit_with_error "Error in configuration: ATF_USE_GCC is unset"
[[ -n $OPENSBISOURCE && -z $OPENSBI_USE_GCC ]] && exit_with_error "Error in configuration: OPENSBI_USE_GCC is unset"
[[ -z $UBOOT_USE_GCC ]] && exit_with_error "Error in configuration: UBOOT_USE_GCC is unset"
[[ -z $KERNEL_USE_GCC ]] && exit_with_error "Error in configuration: KERNEL_USE_GCC is unset"

Expand Down
2 changes: 1 addition & 1 deletion lib/general.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ prepare_host()
display_alert "Checking for external GCC compilers" "" "info"
# download external Linaro compiler and missing special dependencies since they are needed for certain sources

local toolchain="https://github.com/chainsx/armbian-d1-build/releases/download/toolchain/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-20220906.tar.gz"
local toolchain="${GITHUB_SOURCE}/chainsx/armbian-d1-build/releases/download/toolchain/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-20220906.tar.gz"
if [[ ! -d ${SRC}/cache/toolchain/gcc-toolchain/ ]]; then
wget ${toolchain} -O "${SRC}/cache/toolchain/toolchain.tar.gz"
tar -zxf "${SRC}/cache/toolchain/toolchain.tar.gz" -C ${SRC}/cache/toolchain/
Expand Down
9 changes: 0 additions & 9 deletions packages/armbian/builddeb
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,6 @@ deploy_kernel_headers() {
fi
} > debian/hdrobjfiles

if is_native; then
echo "info: Build native: Skip headers-debian-byteshift.patch" >&2
elif is_build_on_amd64; then
(
cd $destdir
patch -p1 < /tmp/headers-debian-byteshift.patch
)
fi

tar -c -f - -C $srctree -T debian/hdrsrcfiles | tar -xf - -C $destdir
tar -c -f - -T debian/hdrobjfiles | tar -xf - -C $destdir
rm -f debian/hdrsrcfiles debian/hdrobjfiles
Expand Down
4 changes: 2 additions & 2 deletions patch/kernel/thead-current/000-builddeb.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- builddeb 2023-08-30 23:34:33.515646129 +0800
+++ builddeb.2 2023-08-30 23:35:59.386906141 +0800
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -126,7 +126,7 @@
installed_image_path="usr/bin/linux-$version"
;;
Expand Down
Loading

0 comments on commit b600f16

Please sign in to comment.