123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- source "${BASH_SOURCE%/*}/include/sunxi64_common.inc"
- LINUXFAMILY=sun55iw3
- NAME_KERNEL="uImage"
- NAME_INITRD="uInitrd"
- SRC_CMDLINE="earlycon=uart8250,mmio32,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyAS0,115200 console=tty0 loglevel=8 cma=64M init=/sbin/init rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles"
- [[ -z $CPUMIN ]] && CPUMIN=480000
- [[ -z $CPUMAX ]] && CPUMAX=1512000
- GOVERNOR=ondemand
- #ASOUND_STATE=asound.state.sun55iw3-${BRANCH}
- case $BRANCH in
- current)
- OVERLAY_PREFIX='sun55i-t527'
- KERNELBRANCH="branch:orange-pi-5.15-sun55iw3"
- LINUXCONFIG="linux-5.15-sun55iw3-current"
- [[ $BOARD =~ orangepi4a ]] && BOOTBRANCH='branch:v2018.05-t527'
- KERNELPATCHDIR=${BOARDFAMILY}-${BRANCH}
- UBOOT_TARGET_MAP=";;dts/${BOARD}-u-boot.dts boot0_sdcard.fex boot_package.fex"
- UBOOT_COMPILER="arm-linux-gnueabi-"
- UBOOT_USE_GCC='> 6.0'
- BOOTENV_FILE=sun50iw9-default.txt
- BOOTSCRIPT='boot-sun50iw9.cmd:boot.cmd'
- KERNEL_USE_GCC='> 10.0'
- OFFSET=20
- ATFSOURCE=""
- ATF_COMPILE="no"
- INITRD_ARCH=arm
- ;;
- esac
- family_tweaks_s()
- {
- if [[ ${DESKTOP_ENVIRONMENT} == gnome ]]; then
- run_on_sdcard "DEBIAN_FRONTEND=noninteractive apt-get install -y gnome-screenshot tightvncserver gnome-bluetooth"
- cp $EXTER/packages/blobs/desktop/desktop-wallpapers/orangepi-default.png ${SDCARD}/usr/share/backgrounds/warty-final-ubuntu.png
- fi
- if [[ $RELEASE == bookworm && ${DESKTOP_ENVIRONMENT} == gnome ]]; then
- sed -i "s/user-session.*/user-session=gnome-wayland/" ${SDCARD}/etc/lightdm/lightdm.conf.d/22-orangepi-autologin.conf
- run_on_sdcard "systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target" > /dev/null 2>&1
- fi
- if [[ "${BOARD}x" == orangepi4ax ]]; then
- nvram=$EXTER/cache/sources/orangepi-firmware-git
- [[ -f ${nvram}/nvram_ap6256.txt-$BOARD ]] && cp ${nvram}/nvram_ap6256.txt-${BOARD} ${SDCARD}/lib/firmware/nvram_ap6256.txt
- fi
- rsync -a --chown=root:root "${EXTER}"/packages/bsp/overlays_arm64/* ${SDCARD}/
- chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools ir-keytable tree lirc v4l-utils dnsmasq" >/dev/null 2>&1
- if [[ $BUILD_DESKTOP == yes ]]; then
- sed -i "s/auto-profiles = yes/auto-profiles = no/" ${SDCARD}/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf
- if [[ $BRANCH =~ legacy ]]; then
- echo "load-module module-alsa-sink device=hw:0,0 sink_name=AudioCodec-Playback sink_properties=\"device.description='Audio Codec'\"" >> ${SDCARD}/etc/pulse/default.pa
- echo "load-module module-alsa-sink device=hw:1,0 sink_name=HDMI-Playback sink_properties=\"device.description='HDMI Audio'\"" >> ${SDCARD}/etc/pulse/default.pa
- elif [[ $BRANCH =~ current|next ]]; then
- echo "load-module module-alsa-sink device=hw:0,0 sink_name=AudioCodec-Playback sink_properties=\"device.description='Audio Codec'\"" >> ${SDCARD}/etc/pulse/default.pa
- echo "load-module module-alsa-sink device=hw:2,0 sink_name=HDMI-Playback sink_properties=\"device.description='HDMI Audio'\"" >> ${SDCARD}/etc/pulse/default.pa
- fi
- fi
- if [[ ${BRANCH} == current ]]; then
- [[ ${SRC_EXTLINUX} != "yes" ]] && sed -i 's/^debug_uart.*/debug_uart=ttyAS0/' "${SDCARD}"/boot/orangepiEnv.txt
- SERIALCON="ttyAS0"
- fi
- rsync -a --chown=root:root "${EXTER}"/packages/bsp/t527/* ${SDCARD}/
- if [[ ${SELECTED_CONFIGURATION} == desktop ]]; then
- local packages_to_install=("mesa" "libcedarc" "gst-omx")
- chroot $SDCARD /bin/bash -c "apt-get -y -qq install gstreamer1.0-x" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
- for package in ${packages_to_install[@]}; do
- dpkg_install_debs_chroot $EXTER/cache/sources/t527_packages/$RELEASE/$package
- done
- if [[ $RELEASE == jammy ]]; then
- chroot $SDCARD /bin/bash -c "apt-get -y -qq install glmark2 glmark2-wayland" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
- elif [[ $RELEASE == bookworm ]]; then
- chroot $SDCARD /bin/bash -c "apt-get -y -qq install glmark2-x11 glmark2-wayland" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
- fi
- fi
- install_wiringop
- }
- family_tweaks_bsp()
- {
- install -m 755 $EXTER/packages/blobs/bt/brcm_patchram_plus/brcm_patchram_plus_${ARCH} $destination/usr/bin/brcm_patchram_plus
- }
- uboot_custom_postprocess()
- {
- if [[ ${BRANCH} =~ legacy|current && $(dpkg --print-architecture) == amd64 ]]; then
- rm dts/*.dts sys_config ${BOARD}-u-boot-${BRANCH}.dtb -r
- export PATH=${EXTER}/packages/pack-uboot/${BOARDFAMILY}/tools/:$PATH
- cp ${EXTER}/packages/pack-uboot/${BOARDFAMILY}/bin/* . -r
- cp sys_config/sys_config_${BOARD}.fex sys_config.fex
- cp u-boot.bin u-boot.fex
- if [[ $KERNELBRANCH == "branch:orange-pi-5.15-sun55iw3" ]]; then
- mv monitor.fex-linux5.15 monitor.fex
- mv boot_package.cfg-linux5.15 boot_package.cfg
- mv boot0_sdcard.fex-linux5.15 boot0_sdcard.fex
- fi
- cp dts/${BOARD}-u-boot-${BRANCH}.dts dts/${BOARD}-u-boot.dts
- # make u-boot dtb
- $EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/dtc -p 2048 -W no-unit_address_vs_reg -@ -O dtb -o ${BOARD}-u-boot.dtb -b 0 dts/${BOARD}-u-boot-${BRANCH}.dts
- [[ ! -f ${BOARD}-u-boot.dtb ]] && exit_with_error "dts compilation failed"
- busybox unix2dos sys_config.fex
- $EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/script sys_config.fex
- cp ${BOARD}-u-boot.dtb sunxi.fex
- $EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/update_dtb sunxi.fex 4096
- $EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/update_uboot -no_merge u-boot.fex sys_config.bin
- update_uboot -no_merge u-boot.bin sys_config.bin
- #pack boot package
- busybox unix2dos boot_package.cfg
- $EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/dragonsecboot -pack boot_package.cfg
- if [[ ${MERGE_UBOOT} == yes ]]; then
- display_alert "Merge u-boot" "u-boot-${BOARD}-merged.bin" "info"
- dd if=/dev/zero of=u-boot-${BOARD}-merged.bin bs=1M count=20
- dd if=boot0_sdcard.fex of=u-boot-${BOARD}-merged.bin bs=8k seek=1 conv=fsync
- dd if=boot_package.fex of=u-boot-${BOARD}-merged.bin bs=8k seek=2050 conv=fsync
- mv u-boot-${BOARD}-merged.bin ${DEB_STORAGE}/u-boot/
- fi
- fi
- }
|