Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/config/sources/families/rockchip.conf
Views: 3960
ARCH=armhf1BOOTSCRIPT="boot-rockchip.cmd:boot.cmd"2BOOTENV_FILE='rockchip.txt'3OVERLAY_PREFIX='rockchip'4UBOOT_TARGET_MAP=";;$SRC/packages/blobs/rockchip/rk3288_boot.bin u-boot-rockchip-with-spl.bin"5BOOTDELAY=16if [[ $BOARD == miqi ]]; then7BOOTBRANCH='tag:v2017.11'8elif [[ $BOARD == xt-q8l-v10 ]]; then9BOOTBRANCH='tag:v2020.04'10else11BOOTBRANCH='tag:v2018.11'12fi1314SERIALCON=ttyS21516case $BRANCH in1718legacy)1920KERNELSOURCE='https://github.com/rockchip-linux/kernel.git'21KERNELBRANCH='branch:stable-4.4-rk3288-linux'22KERNELDIR='linux-rockchip'2324;;2526current)2728KERNELBRANCH='branch:linux-5.7.y'2930;;3132dev)3334KERNELBRANCH='branch:linux-5.7.y'3536;;3738esac3940CPUMIN="600000"41CPUMAX="1900000"42GOVERNOR="ondemand"4344write_uboot_platform()45{46dd if=/dev/zero of=$2 bs=1k count=1023 seek=1 status=noxfer > /dev/null 2>&147dd if=$1/u-boot-rockchip-with-spl.bin of=$2 seek=64 conv=notrunc > /dev/null 2>&148}4950uboot_custom_postprocess()51{5253# xt-q8l-v10 requires the original DDR init blob because u-boot does not support LPDDR2 initialization54# for rk3288 SoC (binary is in sources/rkbin-tools/rk32 path). U-boot is configured to produce a TPL55# which is thrown away. SPL does some more initial configurations, expecially pinmux for power hold,56# so reset works more reliably. U-boot image is set to be at sector 0x200 on the eMMC/SD,57# so we burn it 0x200-0x40 because of the rockchip 0x40 sectors offset.58if [[ $BOARD == xt-q8l-v10 ]]; then59tools/mkimage -n rk3288 -T rksd -d $SRC/cache/sources/rkbin-tools/rk32/rk3288_ddr_400MHz_v1.08.bin u-boot-rockchip-with-spl.bin60cat spl/u-boot-spl-dtb.bin >> u-boot-rockchip-with-spl.bin61dd if=u-boot-dtb.img of=u-boot-rockchip-with-spl.bin seek=$((0x200 - 0x40)) conv=notrunc62else63tools/mkimage -n rk3288 -T rksd -d spl/u-boot-spl-dtb.bin u-boot-rockchip-with-spl.bin64cat u-boot-dtb.bin >> u-boot-rockchip-with-spl.bin65fi6667}6869family_tweaks()70{71if [[ $BOARD == tinkerboard ]]; then72chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools"73chroot $SDCARD /bin/bash -c "systemctl --no-reload enable tinker-bluetooth.service >/dev/null 2>&1"74sed -i -e "/#load-module module-alsa-sink/r $SRC/packages/bsp/rockchip/pulseaudio.txt" $SDCARD/etc/pulse/default.pa >/dev/null 2>&175fi7677if [[ $BOARD == xt-q8l-v10 ]]; then78mkdir -p $SDCARD/etc/firmware/79ln -sf /lib/firmware/brcm/BCM4330B1.hcd $SDCARD/etc/firmware80chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6330-bluetooth.service >/dev/null 2>&1"81fi82}8384family_tweaks_bsp()85{86#Graphics and media87mkdir -p $destination/etc/udev/rules.d88mkdir -p $destination/usr/local/bin89cp $SRC/packages/bsp/rockchip/hdmi.rules $destination/etc/udev/rules.d90cp $SRC/packages/bsp/rockchip/50-hevc.rules $destination/etc/udev/rules.d91cp $SRC/packages/bsp/rockchip/50-mali.rules $destination/etc/udev/rules.d92cp $SRC/packages/bsp/rockchip/50-vpu.rules $destination/etc/udev/rules.d93cp $SRC/packages/bsp/rockchip/60-media.rules $destination/etc/udev/rules.d94install -m 755 $SRC/packages/bsp/rockchip/hdmi-hotplug $destination/usr/local/bin9596# Peripheral access for specific groups97addgroup --system --quiet --gid 997 gpio98addgroup --system --quiet --gid 998 i2c99cp $SRC/packages/bsp/rockchip/70-gpio.rules $destination/etc/udev/rules.d100cp $SRC/packages/bsp/rockchip/71-i2c.rules $destination/etc/udev/rules.d101102# Bluetooth103install -m 755 $SRC/packages/bsp/rockchip/rtk_hciattach $destination/usr/bin104install -m 755 $SRC/packages/bsp/rockchip/start_bt.sh $destination/usr/local/bin105cp $SRC/packages/bsp/rockchip/tinker-bluetooth.service $destination/lib/systemd/system/106107# Sound108cp $SRC/packages/bsp/rockchip/asound.conf $destination/etc/109cp $SRC/packages/bsp/rockchip/89-pulseaudio-usb.rules $destination/etc/udev/rules.d110111# ap6330 bluetooth (required for xt-q8l-v10)112cp $SRC/packages/bsp/rockchip/ap6330-bluetooth.service $destination/lib/systemd/system/113114}115116117