mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 09:40:58 +07:00
5fa3ea047a
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
73 lines
2.0 KiB
Bash
73 lines
2.0 KiB
Bash
#!/usr/bin/env bash
|
|
# Copyright (c) 2000-2020 Synology Inc. All rights reserved.
|
|
|
|
[ -z "$__INCLUDE_PLATFORM__" ] || return
|
|
readonly __INCLUDE_PLATFORM__=defined
|
|
|
|
|
|
# shellcheck source=/dev/null
|
|
source "SynoBuildConf/_env"
|
|
|
|
platform_target()
|
|
{
|
|
case $PLATFORM_FAMILY in
|
|
SYNOPLAT_F_X86_64)
|
|
echo "bzImage"
|
|
;;
|
|
SYNOPLAT_F_ARMV8)
|
|
echo "Image.lzma"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
# displayed image name should be matched with the result of
|
|
# platform_customize_image()
|
|
platform_image_name()
|
|
{
|
|
[ -f ".config" ] || return
|
|
|
|
if [ "$PLATFORM_FAMILY" = "SYNOPLAT_F_X86_64" ]; then
|
|
make -s image_name
|
|
elif [ "$PLATFORM_FAMILY" = "SYNOPLAT_F_ARMV8" ]; then
|
|
make -s image_name
|
|
else
|
|
echo "ENOENT"
|
|
fi
|
|
}
|
|
|
|
# shellcheck disable=SC2154
|
|
platform_customize_rtd1619b_mango_image()
|
|
{
|
|
# shellcheck disable=SC2043
|
|
for model in mango; do
|
|
DTBIMG="${KernelDir}/arch/arm64/boot/dts/realtek/rtd-1619b-synology-${model}.dtb"
|
|
mkdir -p "${DebDevBuild}/image/files/sds-sii/dtbs/synology_rtd1619bmango_${model}/"
|
|
cp -vf "${DTBIMG}" "${DebDevBuild}/image/files/sds-sii/dtbs/synology_rtd1619bmango_${model}/model-vendor.dtb"
|
|
done
|
|
}
|
|
|
|
# shellcheck disable=SC2154
|
|
platform_customize_rtd1619b_image()
|
|
{
|
|
# shellcheck disable=SC2043
|
|
for model in ds223j ds423 ds223 ds124; do
|
|
DTBIMG="${KernelDir}/arch/arm64/boot/dts/realtek/rtd-1619b-synology-${model}.dtb"
|
|
mkdir -p "${DebDevBuild}/image/files/sds-sii/dtbs/synology_rtd1619b_${model}/"
|
|
cp -vf "${DTBIMG}" "${DebDevBuild}/image/files/sds-sii/dtbs/synology_rtd1619b_${model}/model-vendor.dtb"
|
|
done
|
|
}
|
|
|
|
# some platforms such as REALTEK_RTD1296, may need customized kernel image.
|
|
# please leave your customization here.
|
|
platform_customize_image()
|
|
{
|
|
if [ "$PLATFORM_FAMILY" = "SYNOPLAT_F_X86_64" ]; then
|
|
: # do nothing
|
|
elif [ "$BUILD_TARGET" = "REALTEK_RTD1619B" ]; then
|
|
platform_customize_rtd1619b_image
|
|
else
|
|
: # customized by platform later
|
|
fi
|
|
}
|
|
|