- Boots, Bluetooth, Reboot OK - Audio missing - spidev error (I think it's been here a while) - disabled both DWC2 patches, added 1008-rockchip-dwc2-usb-partial-power-down.patch from @Miouyouyou - Review/test, boards USB hotplug works on boot for Tinker - If other circumstances (if any) aren't addressed this way, obviously re-enable. @paolosabatino - Plugging in an old U3 USB stick made the scsi CD-ROM driver go insane. Not a modern problem. - Strange error on IRQ 56/57: [ 1.477928] WARNING: CPU: 1 PID: 1 at kernel/irq/manage.c:559 __enable_irq+0x54/0x7c [ 1.477935] Unbalanced enable for IRQ 57 [ 1.477940] Modules linked in: [ 1.477958] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.19.4-rockchip #25 [ 1.477965] Hardware name: Rockchip (Device Tree) [ 1.477995] [<c0112c64>] (unwind_backtrace) from [<c010e1d8>] (show_stack+0x20/0x24) [ 1.478016] [<c010e1d8>] (show_stack) from [<c0e40674>] (dump_stack+0x80/0x94) [ 1.478037] [<c0e40674>] (dump_stack) from [<c0125400>] (__warn+0xf0/0x108) [ 1.478055] [<c0125400>] (__warn) from [<c0125470>] (warn_slowpath_fmt+0x58/0x74) [ 1.478075] [<c0125470>] (warn_slowpath_fmt) from [<c018fb50>] (__enable_irq+0x54/0x7c) [ 1.478094] [<c018fb50>] (__enable_irq) from [<c018fbcc>] (enable_irq+0x54/0xa0) [ 1.478113] [<c018fbcc>] (enable_irq) from [<c07d59c4>] (vop_unbind+0x24/0x54) [ 1.478130] [<c07d59c4>] (vop_unbind) from [<c07e3344>] (component_unbind+0x40/0x78) [ 1.478145] [<c07e3344>] (component_unbind) from [<c07e3764>] (component_bind_all+0x1f0/0x238) [ 1.478158] [<c07e3764>] (component_bind_all) from [<c07d3628>] (rockchip_drm_bind+0xac/0x1e4) [ 1.478173] [<c07d3628>] (rockchip_drm_bind) from [<c07e3ab0>] (try_to_bring_up_master+0x15c/0x198) [ 1.478187] [<c07e3ab0>] (try_to_bring_up_master) from [<c07e3d18>] (component_master_add_with_match+0xdc/0x110) [ 1.478201] [<c07e3d18>] (component_master_add_with_match) from [<c07d39c8>] (rockchip_drm_platform_probe+0x1f4/0x2ec) [ 1.478217] [<c07d39c8>] (rockchip_drm_platform_probe) from [<c07ec708>] (platform_drv_probe+0x58/0xa8) [ 1.478234] [<c07ec708>] (platform_drv_probe) from [<c07ea2a4>] (really_probe+0x1e0/0x2cc) [ 1.478253] [<c07ea2a4>] (really_probe) from [<c07ea564>] (driver_probe_device+0x70/0x18c) [ 1.478270] [<c07ea564>] (driver_probe_device) from [<c07ea760>] (__driver_attach+0xe0/0xe4) [ 1.478286] [<c07ea760>] (__driver_attach) from [<c07e81f0>] (bus_for_each_dev+0x84/0xc4) [ 1.478303] [<c07e81f0>] (bus_for_each_dev) from [<c07e9ba8>] (driver_attach+0x2c/0x30) [ 1.478320] [<c07e9ba8>] (driver_attach) from [<c07e95ac>] (bus_add_driver+0x19c/0x220) [ 1.478336] [<c07e95ac>] (bus_add_driver) from [<c07eb4f4>] (driver_register+0x8c/0x124) [ 1.478352] [<c07eb4f4>] (driver_register) from [<c07ec658>] (__platform_driver_register+0x50/0x58) [ 1.478369] [<c07ec658>] (__platform_driver_register) from [<c1346fd8>] (rockchip_drm_init+0x74/0x90) [ 1.478388] [<c1346fd8>] (rockchip_drm_init) from [<c0103200>] (do_one_initcall+0x64/0x288) [ 1.478410] [<c0103200>] (do_one_initcall) from [<c1301370>] (kernel_init_freeable+0x360/0x3fc) [ 1.478428] [<c1301370>] (kernel_init_freeable) from [<c0e55a38>] (kernel_init+0x18/0x120) [ 1.478442] [<c0e55a38>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 1.478450] Exception stack(0xee975fb0 to 0xee975ff8) [ 1.478461] 5fa0: 00000000 00000000 00000000 00000000 [ 1.478475] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1.478486] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 1.478502] ---[ end trace 390e2ce79ed4d5fa ]--- [ 1.478567] ------------[ cut here ]------------ [ 1.478585] WARNING: CPU: 1 PID: 1 at kernel/irq/manage.c:559 __enable_irq+0x54/0x7c [ 1.478592] Unbalanced enable for IRQ 56 [ 1.478596] Modules linked in: [ 1.478614] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 4.19.4-rockchip #25 [ 1.478620] Hardware name: Rockchip (Device Tree) [ 1.478640] [<c0112c64>] (unwind_backtrace) from [<c010e1d8>] (show_stack+0x20/0x24) [ 1.478656] [<c010e1d8>] (show_stack) from [<c0e40674>] (dump_stack+0x80/0x94) [ 1.478674] [<c0e40674>] (dump_stack) from [<c0125400>] (__warn+0xf0/0x108) [ 1.478691] [<c0125400>] (__warn) from [<c0125470>] (warn_slowpath_fmt+0x58/0x74) [ 1.478710] [<c0125470>] (warn_slowpath_fmt) from [<c018fb50>] (__enable_irq+0x54/0x7c) [ 1.478728] [<c018fb50>] (__enable_irq) from [<c018fbcc>] (enable_irq+0x54/0xa0) [ 1.478745] [<c018fbcc>] (enable_irq) from [<c07d59c4>] (vop_unbind+0x24/0x54) [ 1.478760] [<c07d59c4>] (vop_unbind) from [<c07e3344>] (component_unbind+0x40/0x78) [ 1.478774] [<c07e3344>] (component_unbind) from [<c07e3764>] (component_bind_all+0x1f0/0x238) [ 1.478788] [<c07e3764>] (component_bind_all) from [<c07d3628>] (rockchip_drm_bind+0xac/0x1e4) [ 1.478802] [<c07d3628>] (rockchip_drm_bind) from [<c07e3ab0>] (try_to_bring_up_master+0x15c/0x198) [ 1.478817] [<c07e3ab0>] (try_to_bring_up_master) from [<c07e3d18>] (component_master_add_with_match+0xdc/0x110) [ 1.478831] [<c07e3d18>] (component_master_add_with_match) from [<c07d39c8>] (rockchip_drm_platform_probe+0x1f4/0x2ec) [ 1.478845] [<c07d39c8>] (rockchip_drm_platform_probe) from [<c07ec708>] (platform_drv_probe+0x58/0xa8) [ 1.478862] [<c07ec708>] (platform_drv_probe) from [<c07ea2a4>] (really_probe+0x1e0/0x2cc) [ 1.478880] [<c07ea2a4>] (really_probe) from [<c07ea564>] (driver_probe_device+0x70/0x18c) [ 1.478897] [<c07ea564>] (driver_probe_device) from [<c07ea760>] (__driver_attach+0xe0/0xe4) [ 1.478913] [<c07ea760>] (__driver_attach) from [<c07e81f0>] (bus_for_each_dev+0x84/0xc4) [ 1.478929] [<c07e81f0>] (bus_for_each_dev) from [<c07e9ba8>] (driver_attach+0x2c/0x30) [ 1.478946] [<c07e9ba8>] (driver_attach) from [<c07e95ac>] (bus_add_driver+0x19c/0x220) [ 1.478962] [<c07e95ac>] (bus_add_driver) from [<c07eb4f4>] (driver_register+0x8c/0x124) [ 1.478978] [<c07eb4f4>] (driver_register) from [<c07ec658>] (__platform_driver_register+0x50/0x58) [ 1.478993] [<c07ec658>] (__platform_driver_register) from [<c1346fd8>] (rockchip_drm_init+0x74/0x90) [ 1.479010] [<c1346fd8>] (rockchip_drm_init) from [<c0103200>] (do_one_initcall+0x64/0x288) [ 1.479028] [<c0103200>] (do_one_initcall) from [<c1301370>] (kernel_init_freeable+0x360/0x3fc) [ 1.479045] [<c1301370>] (kernel_init_freeable) from [<c0e55a38>] (kernel_init+0x18/0x120) [ 1.479059] [<c0e55a38>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 1.479066] Exception stack(0xee975fb0 to 0xee975ff8) [ 1.479077] 5fa0: 00000000 00000000 00000000 00000000 [ 1.479090] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1.479101] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 1.479109] ---[ end trace 390e2ce79ed4d5fb ]---
123 lines
4.1 KiB
Plaintext
123 lines
4.1 KiB
Plaintext
BOOTSCRIPT="boot-rockchip.cmd:boot.cmd"
|
|
BOOTENV_FILE='rockchip-default.txt'
|
|
|
|
UBOOT_TARGET_MAP=";;$SRC/packages/blobs/rockchip/rk3288_boot.bin u-boot-rockchip-with-spl.bin"
|
|
|
|
UBOOT_USE_GCC='> 6.3'
|
|
|
|
BOOTDELAY=0
|
|
|
|
BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
|
|
BOOTDIR=$MAINLINE_UBOOT_DIR
|
|
if [[ $BOARD == miqi ]]; then
|
|
BOOTBRANCH='tag:v2017.11'
|
|
else
|
|
BOOTBRANCH='tag:v2018.09'
|
|
fi
|
|
|
|
SERIALCON=ttyS2
|
|
|
|
case $BRANCH in
|
|
default)
|
|
KERNELSOURCE='https://github.com/rockchip-linux/kernel.git'
|
|
KERNELBRANCH='branch:release-4.4'
|
|
KERNELPATCHDIR='rockchip-default'
|
|
KERNELDIR='linux-rockchip'
|
|
|
|
KERNEL_USE_GCC='> 7.0'
|
|
;;
|
|
|
|
next)
|
|
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
|
KERNELBRANCH='branch:linux-4.14.y'
|
|
KERNELDIR=$MAINLINE_KERNEL_DIR
|
|
|
|
KERNEL_USE_GCC='> 7.0'
|
|
;;
|
|
|
|
dev)
|
|
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
|
KERNELBRANCH='branch:linux-4.19.y'
|
|
KERNELDIR=$MAINLINE_KERNEL_DIR
|
|
|
|
KERNEL_USE_GCC='> 7.0'
|
|
;;
|
|
|
|
esac
|
|
|
|
CPUMIN="600000"
|
|
CPUMAX="1900000"
|
|
GOVERNOR="ondemand"
|
|
|
|
write_uboot_platform()
|
|
{
|
|
dd if=/dev/zero of=$2 bs=1k count=1023 seek=1 status=noxfer > /dev/null 2>&1
|
|
dd if=$1/u-boot-rockchip-with-spl.bin of=$2 seek=64 conv=notrunc > /dev/null 2>&1
|
|
}
|
|
|
|
uboot_custom_postprocess()
|
|
{
|
|
|
|
# xt-q8l-v10 requires the original DDR init blob because u-boot does not support LPDDR2 initialization
|
|
# for rk3288 SoC (binary is in sources/rkbin-tools/rk32 path). U-boot is configured to produce a TPL
|
|
# which is thrown away. SPL does some more initial configurations, expecially pinmux for power hold,
|
|
# so reset works more reliably. U-boot image is set to be at sector 0x200 on the eMMC/SD,
|
|
# so we burn it 0x200-0x40 because of the rockchip 0x40 sectors offset.
|
|
if [[ $BOARD == xt-q8l-v10 ]]; then
|
|
tools/mkimage -n rk3288 -T rksd -d $SRC/cache/sources/rkbin-tools/rk32/rk3288_ddr_400MHz_v1.03.bin u-boot-rockchip-with-spl.bin
|
|
cat spl/u-boot-spl-dtb.bin >> u-boot-rockchip-with-spl.bin
|
|
dd if=u-boot-dtb.img of=u-boot-rockchip-with-spl.bin seek=$((0x200 - 0x40)) conv=notrunc
|
|
else
|
|
tools/mkimage -n rk3288 -T rksd -d spl/u-boot-spl-dtb.bin u-boot-rockchip-with-spl.bin
|
|
cat u-boot-dtb.bin >> u-boot-rockchip-with-spl.bin
|
|
fi
|
|
|
|
}
|
|
|
|
family_tweaks()
|
|
{
|
|
if [[ $BOARD == tinkerboard ]]; then
|
|
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable tinker-bluetooth.service >/dev/null 2>&1"
|
|
sed -i -e "/#load-module module-alsa-sink/r $SRC/packages/bsp/rockchip/pulseaudio.txt" $SDCARD/etc/pulse/default.pa >/dev/null 2>&1
|
|
fi
|
|
|
|
if [[ $BOARD == xt-q8l-v10 ]]; then
|
|
echo "fdtfile=rk3288-xt-q8l-v10.dtb" >> $SDCARD/boot/armbianEnv.txt
|
|
mkdir -p $SDCARD/etc/firmware/
|
|
ln -sf /lib/firmware/brcm/BCM4330B1.hcd $SDCARD/etc/firmware
|
|
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6330-bluetooth.service >/dev/null 2>&1"
|
|
fi
|
|
}
|
|
|
|
family_tweaks_bsp()
|
|
{
|
|
#Graphics and media
|
|
mkdir -p $destination/etc/udev/rules.d
|
|
mkdir -p $destination/usr/local/bin
|
|
cp $SRC/packages/bsp/rockchip/hdmi.rules $destination/etc/udev/rules.d
|
|
cp $SRC/packages/bsp/rockchip/50-hevc.rules $destination/etc/udev/rules.d
|
|
cp $SRC/packages/bsp/rockchip/50-mali.rules $destination/etc/udev/rules.d
|
|
cp $SRC/packages/bsp/rockchip/50-vpu.rules $destination/etc/udev/rules.d
|
|
cp $SRC/packages/bsp/rockchip/60-media.rules $destination/etc/udev/rules.d
|
|
install -m 755 $SRC/packages/bsp/rockchip/hdmi-hotplug $destination/usr/local/bin
|
|
|
|
# Peripheral access for specific groups
|
|
addgroup --system --quiet --gid 997 gpio
|
|
addgroup --system --quiet --gid 998 i2c
|
|
cp $SRC/packages/bsp/rockchip/70-gpio.rules $destination/etc/udev/rules.d
|
|
cp $SRC/packages/bsp/rockchip/71-i2c.rules $destination/etc/udev/rules.d
|
|
|
|
# Bluetooth
|
|
install -m 755 $SRC/packages/bsp/rockchip/rtk_hciattach $destination/usr/bin
|
|
install -m 755 $SRC/packages/bsp/rockchip/start_bt.sh $destination/usr/local/bin
|
|
cp $SRC/packages/bsp/rockchip/tinker-bluetooth.service $destination/lib/systemd/system/
|
|
|
|
# Sound
|
|
cp $SRC/packages/bsp/rockchip/asound.conf $destination/etc/
|
|
cp $SRC/packages/bsp/rockchip/89-pulseaudio-usb.rules $destination/etc/udev/rules.d
|
|
|
|
# ap6330 bluetooth (required for xt-q8l-v10)
|
|
cp $SRC/packages/bsp/rockchip/ap6330-bluetooth.service $destination/lib/systemd/system/
|
|
|
|
}
|