Skip to content

Instantly share code, notes, and snippets.

View zavorka's full-sized avatar
🙈
LGTM

Roman Beránek zavorka

🙈
LGTM
  • Prusa Research, s.r.o.
  • Prague, CZ
View GitHub Profile
@zavorka
zavorka / ubi.patch
Created July 5, 2017 14:40
Ambarella fucking things up again.
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 03331c173bd0..f93f0e54b904 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -905,15 +905,34 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
if (ubi_num == UBI_DEV_NUM_AUTO) {
/* Search for an empty slot in the @ubi_devices array */
- for (ubi_num = 0; ubi_num < UBI_MAX_DEVICES; ubi_num++)
- if (!ubi_devices[ubi_num])
diff -Nur a/src/shared/path-lookup.c b/src/shared/path-lookup.c
--- a/src/shared/path-lookup.c 2017-09-14 01:58:38.769073700 +0200
+++ b/src/shared/path-lookup.c 2017-09-14 02:00:46.638939469 +0200
@@ -130,10 +130,10 @@
};
const char * const data_unit_paths[] = {
- "/usr/local/lib/systemd/user",
+ "/usr/local/lib64/systemd/user",
"/usr/local/share/systemd/user",
--- nsswitch.conf.old 2017-11-14 07:19:50.023102530 +0100
+++ nsswitch.conf 2017-11-14 07:19:40.264108889 +0100
@@ -1,13 +1,13 @@
# /etc/nsswitch.conf:
# $Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/nsswitch.conf,v 1.1 2006/09/29 23:52:23 vapier Exp $
-passwd: compat
-shadow: compat
-group: compat
+#passwd: compat
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.10
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 3
bMaxPacketSize0 9
idVendor 0x1d6b Linux Foundation
@zavorka
zavorka / Install_gcc7_ubuntu_16.04.md
Created September 5, 2018 23:34 — forked from jlblancoc/Install_gcc7_ubuntu_16.04.md
Installing gcc-7 & g++-7 in Ubuntu 16.04LTS Xenial

Run the following in the terminal:

Install the gcc-7 packages:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y

Set it up so the symbolic links gcc, g++ point to the newer version:

@zavorka
zavorka / beatnik-calculate-score-from-thresholded-input.patch
Created September 26, 2018 13:20
libbeatnik: Calculate score from thresholded input
diff --git a/include/re/beatnik/tracker/tracker.hpp b/include/re/beatnik/tracker/tracker.hpp
index 8c29389..ec83a0b 100644
--- a/include/re/beatnik/tracker/tracker.hpp
+++ b/include/re/beatnik/tracker/tracker.hpp
@@ -34,6 +34,13 @@ public:
bool
update_score(T odf_value) noexcept
{
+
+ threshold_sum += odf_value;
root@lime-a64-mainline:~# [ 1588.328298] rcu: INFO: rcu_preempt self-detected stall on CPU
[ 1588.334237] rcu: 1-...!: (1 ticks this GP) idle=3ea/0/0x1 softirq=39241/39241 fqs=0
[ 1588.342269] rcu: (t=734440 jiffies g=100073 q=1)
[ 1588.347194] rcu: rcu_preempt kthread starved for 734440 jiffies! g100073 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=1
[ 1588.358162] rcu: RCU grace-period kthread stack dump:
[ 1588.363346] rcu_preempt I 0 10 2 0x00000028
[ 1588.368982] Call trace:
[ 1588.371509] __switch_to+0x94/0xd8
[ 1588.375007] __schedule+0x1d4/0x5a0
[ 1588.378590] schedule+0x38/0xa0
[ 1880.996659] rcu: INFO: rcu_preempt self-detected stall on CPU
[ 1881.009698] rcu: 3-...0: (5 ticks this GP) idle=c9a/0/0x1 softirq=29604/29606 fqs=2
[ 1881.025080] rcu: (t=3002400045684 jiffies g=100073 q=4642)
[ 1881.037217] RTL8723BS: linked_status_chk(wlan0) disconnect or roaming
[ 1881.038486] Task dump for CPU 3:
[ 1881.038491] swapper/3 R running task 0 0 1 0x0000002a
[ 1881.038502] Call trace:
[ 1881.038522] dump_backtrace+0x0/0x1a8
[ 1881.038530] show_stack+0x14/0x20
[ 1881.038540] sched_show_task+0x134/0x170
@zavorka
zavorka / boot.log
Created October 8, 2018 23:05
Dual output with drm/sun4i
[ 12.531518] [drm:drm_atomic_state_init] Allocated atomic state 0000000058667588
[ 12.531534] [drm:drm_atomic_get_plane_state] Added [PLANE:28:plane-0] 000000000a75a601 state to 0000000058667588
[ 12.531543] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:28:plane-0] state 000000000a75a601
[ 12.531555] [drm:drm_mode_object_get] OBJ ID: 51 (3)
[ 12.531563] [drm:drm_atomic_get_plane_state] Added [PLANE:30:plane-1] 000000002dde0322 state to 0000000058667588
[ 12.531574] [drm:drm_mode_object_get] OBJ ID: 50 (1)
[ 12.531582] [drm:drm_atomic_get_crtc_state] Added [CRTC:36:crtc-0] 000000009056ea53 state to 0000000058667588
[ 12.531593] [drm:drm_atomic_get_plane_state] Added [PLANE:32:plane-2] 0000000083aee681 state to 0000000058667588
[ 12.531600] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:32:plane-2] state 0000000083aee681
[ 12.531617] [drm:drm_atomic_get_plane_state] Added [PLANE:34:plane-3] 000000003b155ed7 state to 0000000058667588
@zavorka
zavorka / ==> 2k_and_dsi <==
Created October 12, 2018 18:55
excerpts from /sys/kernel/debug/clk/clk_summary
enable prepare protect duty
clock count count count rate accuracy phase cycle
---------------------------------------------------------------------------------------------
pll-video0 2 2 2 297000000 0 0 50000
dsi-dphy 1 1 1 148500000 0 0 50000
pll-mipi 1 1 1 297000000 0 0 50000
tcon0 1 1 1 297000000 0 0 50000
tcon-pixel-clock 1 1 1 27000000 0 0 50000
pll-video0-2x 0 0 0 594000000 0 0 50000
pll-video1 3 3 1 204000000 0 0 50000