CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
orangepi-xunlong

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: orangepi-xunlong/orangepi-build
Path: blob/next/external/config/sources/families/meson-sm1.conf
Views: 3960
1
#
2
# SPDX-License-Identifier: GPL-2.0
3
#
4
# Copyright (c) 2013-2023 Igor Pecovnik, [email protected]
5
#
6
# This file is a part of the Armbian Build Framework
7
# https://github.com/armbian/build/
8
#
9
source "${BASH_SOURCE%/*}/include/meson64_common.inc"
10
11
CPUMIN=667000
12
CPUMAX=1800000
13
GOVERNOR=ondemand
14
15
case $BRANCH in
16
17
#current)
18
19
# UBOOT_TARGET_MAP=";;build/u-boot.bin.sd.bin:u-boot.bin"
20
# BOOTPATCHDIR="v2015.01"
21
# BOOTBRANCH='branch:u-boot-2015.01'
22
# UBOOT_COMPILER="aarch64-linux-gnu-"
23
# UBOOT_USE_GCC='< 5.0'
24
# UBOOT_TOOLCHAIN2='arm-none-eabi-:5.0'
25
26
# KERNELBRANCH='branch:orange-pi-5.15-s905d3'
27
# KERNELPATCHDIR='rockchip-rk3588-legacy'
28
# LINUXCONFIG="linux-5.15-s905d3-current"
29
# KERNEL_USE_GCC='> 10.0'
30
31
# BOOT_FDT_FILE="meson-sm1-orangepi-3-plus.dtb"
32
33
# ;;
34
35
next)
36
37
UBOOT_TARGET_MAP="u-boot-dtb.img;;u-boot.bin.sd.bin:u-boot.bin u-boot-dtb.img u-boot-spi.bin:u-boot-spi.bin"
38
BOOTPATCHDIR="v2023.07-meson64"
39
BOOTBRANCH='branch:v2023.07-meson64'
40
41
KERNELBRANCH='branch:orange-pi-6.1-meson64'
42
LINUXCONFIG="linux-6.1-meson64-next"
43
44
#KERNELBRANCH='branch:orange-pi-6.5-meson64'
45
#LINUXCONFIG="linux-6.5-meson64-next"
46
47
KERNELPATCHDIR='meson64-next'
48
KERNEL_USE_GCC='> 10.0'
49
ASOUND_STATE='asound.state.orangepi3plus-next'
50
51
;;
52
esac
53
54
write_uboot_platform_mtd() {
55
dd if=$1/u-boot-spi.bin of=/dev/mtdblock0
56
}
57
58
family_tweaks() {
59
60
#if [[ ${BRANCH} == current ]]; then
61
# sed -i 's/^debug_uart.*/debug_uart=ttyS0/' "${SDCARD}"/boot/orangepiEnv.txt
62
# SERIALCON="ttyS0"
63
#fi
64
65
install_wiringop
66
67
rsync -a --chown=root:root --exclude=etc/pulse "${EXTER}"/packages/bsp/overlays_s905d3/* ${SDCARD}/
68
69
chroot $SDCARD /bin/bash -c "apt-get -y -qq install usb-modeswitch tree dnsmasq v4l-utils swig python3-dev python3-setuptools bluez libncurses-dev" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
70
71
#install_balenaEtcher
72
}
73
74
uboot_custom_postprocess() {
75
76
cd "${BOOTSOURCEDIR}"
77
78
if [[ ${BOARD} == orangepi3plus && ${BRANCH} == next ]]; then
79
80
# Preserve the u-boot produced (unsigned) u-boot.bin
81
cp -v u-boot.bin u-boot.bin.orig
82
83
# Sign using the old FIP blobs (amlogic-boot-fip-vim3-spi), for use exclusively with SPI booting.
84
display_alert "Signing u-boot for SPI booting with old blobs" "${BOARD}" "info"
85
uboot_g12_postprocess "${EXTER}"/cache/sources/amlogic-boot-fip-spi/${BOARD} g12a
86
87
# Once done, store the resulting u-boot.bin as u-boot-spi.bin referenced in the UBOOT_TARGET_MAP above.
88
cp -v u-boot.bin u-boot-spi.bin
89
90
# Restore the original, so we can do everything again.
91
cp -v u-boot.bin.orig u-boot.bin
92
93
# Do the normal signing, using the regular/updated FIP blobs. This is for eMMC booting.
94
display_alert "Signing u-boot for eMMC/SD booting with new blobs" "${BOARD}" "info"
95
uboot_g12_postprocess "${EXTER}"/cache/sources/amlogic-boot-fip/${BOARD} g12a
96
97
display_alert "Done postprocessing u-boot with new/old FIP blobs" "${BOARD}" "info"
98
fi
99
100
#if [[ ${BOARD} == orangepi3plus && ${BRANCH} == current ]]; then
101
102
# UBOOT_SRC_FOLDER="${BOOTSOURCEDIR}"
103
104
# source fip/variables.sh "${BOOTSOURCEDIR}"
105
# source fip/lib.sh
106
# source fip/build_bl2.sh
107
# source fip/build_bl30.sh
108
# source fip/build_bl31.sh
109
# source fip/build_bl32.sh
110
# source fip/build_bl33.sh
111
# source fip/build_bl40.sh
112
113
# # Cleanup old binaries
114
# rm -rf ${FIP_BUILD_FOLDER}
115
116
# # source uboot pre-build configs
117
# source ${SOURCE_FILE}
118
119
# CUR_SOC=${CONFIG_SYS_SOC}
120
121
# if [ "y" == "${CONFIG_NEED_BL32}" ]; then
122
# BLX_NEEDFUL[3]="true"
123
# fi
124
125
# export_variables
126
127
# source ${FIP_FOLDER}${CUR_SOC}/variable_soc.sh
128
129
# # compile fip tools for ddr_parse and map_tool
130
# prepare_tools > /dev/null 2>&1 || true
131
132
# # source soc package script
133
# source ${FIP_FOLDER}${CUR_SOC}/build.sh
134
135
# # source configs
136
# source ${CONFIG_FILE}
137
# if [ "y" == "${CONFIG_SUPPORT_CUSOTMER_BOARD}" ]; then
138
# BOARD_DIR="customer/board/${CONFIG_SYS_BOARD}"
139
# else
140
# BOARD_DIR="${CONFIG_BOARDDIR}"
141
# fi
142
143
# mkdir -p ${FIP_BUILD_FOLDER}
144
145
# cp ${FIP_FOLDER}${CUR_SOC}/bl2.bin $FIP_BUILD_FOLDER
146
# cp ${FIP_FOLDER}${CUR_SOC}/bl30.bin $FIP_BUILD_FOLDER
147
# cp ${FIP_FOLDER}${CUR_SOC}/bl31.bin $FIP_BUILD_FOLDER
148
# cp ${FIP_FOLDER}${CUR_SOC}/bl31.img $FIP_BUILD_FOLDER
149
# #cp ${FIP_FOLDER}${CUR_SOC}/bl32.bin $FIP_BUILD_FOLDER
150
151
# # cp bl33(uboot)
152
# copy_bl33
153
154
# # cp other firmwares(soc related)
155
# copy_other_soc
156
157
# # package final bootloader
158
# package
159
160
# if [ "y" != "${CONFIG_AML_SIGNED_UBOOT}" ]; then
161
# # copy bootloader to main folder
162
# mkdir -p ${BUILD_FOLDER}
163
# cp ${FIP_BUILD_FOLDER}u-boot.bin ${BUILD_FOLDER}u-boot.bin
164
# cp ${FIP_BUILD_FOLDER}u-boot.bin.encrypt ${BUILD_FOLDER}u-boot.bin.encrypt
165
# cp ${FIP_BUILD_FOLDER}u-boot.bin.encrypt.efuse ${BUILD_FOLDER}u-boot.bin.encrypt.efuse
166
# cp ${FIP_BUILD_FOLDER}u-boot.bin.encrypt.sd.bin ${BUILD_FOLDER}u-boot.bin.encrypt.sd.bin
167
# cp ${FIP_BUILD_FOLDER}u-boot.bin.encrypt.usb.bl2 ${BUILD_FOLDER}u-boot.bin.encrypt.usb.bl2
168
# cp ${FIP_BUILD_FOLDER}u-boot.bin.encrypt.usb.tpl ${BUILD_FOLDER}u-boot.bin.encrypt.usb.tpl
169
# cp ${FIP_BUILD_FOLDER}u-boot.bin.sd.bin ${BUILD_FOLDER}u-boot.bin.sd.bin
170
# cp ${FIP_BUILD_FOLDER}u-boot.bin.usb.bl2 ${BUILD_FOLDER}u-boot.bin.usb.bl2
171
# cp ${FIP_BUILD_FOLDER}u-boot.bin.usb.tpl ${BUILD_FOLDER}u-boot.bin.usb.tpl
172
173
# if [ "y" == "${CONFIG_AML_CRYPTO_IMG}" ]; then
174
# cp ${FIP_BUILD_FOLDER}boot.img.encrypt ${BUILD_FOLDER}boot.img.encrypt
175
# fi
176
# fi
177
#fi
178
}
179
180