mirror of
https://github.com/DrHo1y/orangepi-build.git
synced 2026-10-16 20:46:38 +07:00
Support Orange Pi RV
This commit is contained in:
@@ -42,7 +42,7 @@ create_chroot()
|
||||
components['buster']='main,contrib'
|
||||
components['bullseye']='main,contrib'
|
||||
components['bookworm']='main,contrib'
|
||||
components['sid']='main,contrib'
|
||||
components['sid']='main'
|
||||
components['xenial']='main,universe,multiverse'
|
||||
components['bionic']='main,universe,multiverse'
|
||||
components['focal']='main,universe,multiverse'
|
||||
|
||||
@@ -202,11 +202,20 @@ create_rootfs_cache()
|
||||
# Lets export the value of the pipe inside eval so we know outside what happened:
|
||||
# ONEVAR="testing" eval 'bash -e -c "echo value once $ONEVAR && false && echo value twice $ONEVAR"' '| grep value' '| grep value' ';EVALPIPE=(${PIPESTATUS[@]})' ; echo ${EVALPIPE[*]}
|
||||
|
||||
local release_version=${RELEASE}
|
||||
|
||||
if [[ ${RELEASE} == "sid" ]]; then
|
||||
release_version=unstable
|
||||
apt_mirror="https://snapshot.debian.org/archive/debian-ports/20221225T084846Z"
|
||||
DEBOOTSTRAP_OPTION="--no-check-gpg --no-merged-usr"
|
||||
PACKAGE_LIST_EXCLUDE="usr-is-merged"
|
||||
fi
|
||||
|
||||
display_alert "Installing base system" "Stage 1/2" "info"
|
||||
cd $SDCARD # this will prevent error sh: 0: getcwd() failed
|
||||
|
||||
eval 'debootstrap --variant=minbase --include=${DEBOOTSTRAP_LIST// /,} ${PACKAGE_LIST_EXCLUDE:+ --exclude=${PACKAGE_LIST_EXCLUDE// /,}} \
|
||||
--arch=$ARCH --components=${DEBOOTSTRAP_COMPONENTS} $DEBOOTSTRAP_OPTION --foreign $RELEASE $SDCARD/ $apt_mirror' \
|
||||
--arch=$ARCH --components=${DEBOOTSTRAP_COMPONENTS} $DEBOOTSTRAP_OPTION --foreign ${release_version} $SDCARD/ ${apt_mirror}' \
|
||||
${PROGRESS_LOG_TO_FILE:+' | tee -a $DEST/${LOG_SUBPATH}/debootstrap.log'} \
|
||||
${OUTPUT_DIALOG:+' | dialog --backtitle "$backtitle" --progressbox "Debootstrap (stage 1/2)..." $TTY_Y $TTY_X'} \
|
||||
${OUTPUT_VERYSILENT:+' >/dev/null 2>/dev/null'} ';EVALPIPE=(${PIPESTATUS[@]})'
|
||||
@@ -228,6 +237,14 @@ create_rootfs_cache()
|
||||
|
||||
mount_chroot "$SDCARD"
|
||||
|
||||
if [[ ${RELEASE} == "sid" ]]; then
|
||||
mkdir -p $SDCARD/etc/apt/apt.conf.d/
|
||||
echo "Acquire::Check-Valid-Until no;" > $SDCARD/etc/apt/apt.conf.d/99-no-check-valid-until
|
||||
wget -qnc -P ${EXTER}/cache/debs/ https://snapshot.debian.org/archive/debian-ports/20220616T194833Z/pool-riscv64/main/i/icu/libicu71_71.1-3_riscv64.deb
|
||||
cp -v ${EXTER}/cache/debs/libicu71_71.1-3_riscv64.deb $SDCARD/
|
||||
LC_ALL=C LANG=C chroot $SDCARD /bin/bash -c "dpkg -i /libicu71_71.1-3_riscv64.deb" &> /dev/null
|
||||
fi
|
||||
|
||||
display_alert "Diverting" "initctl/start-stop-daemon" "info"
|
||||
# policy-rc.d script prevents starting or reloading services during image creation
|
||||
printf '#!/bin/sh\nexit 101' > $SDCARD/usr/sbin/policy-rc.d
|
||||
|
||||
@@ -168,21 +168,22 @@ install_common()
|
||||
# NOTE: this needs to be executed before family_tweaks
|
||||
local bootscript_src=${BOOTSCRIPT%%:*}
|
||||
local bootscript_dst=${BOOTSCRIPT##*:}
|
||||
local bootdir=$([[ "$BOOTFS_TYPE" == "fat" ]] || echo "/boot")
|
||||
|
||||
# create extlinux config file
|
||||
if [[ $SRC_EXTLINUX == yes ]]; then
|
||||
mkdir -p $SDCARD/boot/extlinux
|
||||
cat <<-EOF > "$SDCARD/boot/extlinux/extlinux.conf"
|
||||
label ${VENDOR}
|
||||
kernel /boot/$NAME_KERNEL
|
||||
initrd /boot/$NAME_INITRD
|
||||
kernel $bootdir/$NAME_KERNEL
|
||||
initrd $bootdir/$NAME_INITRD
|
||||
EOF
|
||||
if [[ -n $BOOT_FDT_FILE ]]; then
|
||||
if [[ $BOOT_FDT_FILE != "none" ]]; then
|
||||
echo " fdt /boot/dtb/$BOOT_FDT_FILE" >> "$SDCARD/boot/extlinux/extlinux.conf"
|
||||
echo " fdt $bootdir/dtb/$BOOT_FDT_FILE" >> "$SDCARD/boot/extlinux/extlinux.conf"
|
||||
fi
|
||||
else
|
||||
echo " fdtdir /boot/dtb/" >> "$SDCARD/boot/extlinux/extlinux.conf"
|
||||
echo " fdtdir $bootdir/dtb/" >> "$SDCARD/boot/extlinux/extlinux.conf"
|
||||
fi
|
||||
else
|
||||
|
||||
|
||||
@@ -218,10 +218,11 @@ create_sources_list()
|
||||
|
||||
sid) # sid is permanent unstable development and has no such thing as updates or security
|
||||
cat <<- EOF > "${basedir}"/etc/apt/sources.list
|
||||
deb http://${DEBIAN_MIRROR} $release main contrib non-free non-free-firmware
|
||||
deb https://snapshot.debian.org/archive/debian-ports/20221225T084846Z unstable main
|
||||
#deb http://${DEBIAN_MIRROR} $release main contrib non-free non-free-firmware
|
||||
#deb-src http://${DEBIAN_MIRROR} $release main contrib non-free non-free-firmware
|
||||
|
||||
deb http://${DEBIAN_MIRROR} unstable main contrib non-free non-free-firmware
|
||||
#deb http://${DEBIAN_MIRROR} unstable main contrib non-free non-free-firmware
|
||||
#deb-src http://${DEBIAN_MIRROR} unstable main contrib non-free non-free-firmware
|
||||
EOF
|
||||
;;
|
||||
@@ -1869,7 +1870,7 @@ show_checklist_variables ()
|
||||
|
||||
install_wiringop()
|
||||
{
|
||||
install_deb_chroot "$EXTER/cache/debs/arm64/wiringpi_2.55.deb"
|
||||
install_deb_chroot "$EXTER/cache/debs/${ARCH}/wiringpi_2.55.deb"
|
||||
chroot "${SDCARD}" /bin/bash -c "apt-mark hold wiringpi" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
|
||||
|
||||
if [[ ${IGNORE_UPDATES} != yes ]]; then
|
||||
|
||||
@@ -245,6 +245,7 @@ if [[ -z $BOARD ]]; then
|
||||
options+=("orangepi5plus" "Rockchip RK3588 octa core 4-32GB RAM 2.5GBE USB3 USB-C WiFi/BT NVMe eMMC")
|
||||
options+=("orangepicm4" "Rockchip RK3566 quad core 2-8GB RAM GBE eMMC USB3 NvMe WiFi/BT")
|
||||
options+=("orangepi3b" "Rockchip RK3566 quad core 2-8GB RAM GBE eMMC USB3 NvMe WiFi/BT")
|
||||
options+=("orangepirv" "Starfive JH7110 quad core 2-8GB RAM GBE USB3 NvMe WiFi/BT")
|
||||
#options+=("orangepir1plus" "Rockchip RK3328 quad core 1GB RAM 2xGBE USB2 SPI")
|
||||
#options+=("orangepi3plus" "Amlogic S905D3 quad core 2/4GB RAM SoC eMMC GBE USB3 SPI WiFi/BT")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user