Skip to content

Instantly share code, notes, and snippets.

View notro's full-sized avatar

Noralf Trønnes notro

View GitHub Profile
@notro
notro / fbtft-bus.s
Created March 3, 2014 15:09
Result of: ARCH=arm CROSS_COMPILE=/home/pi/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi- make drivers/video/fbtft/fbtft-bus.s
.arch armv6
.fpu softvfp
.eabi_attribute 20, 1 @ Tag_ABI_FP_denormal
.eabi_attribute 21, 1 @ Tag_ABI_FP_exceptions
.eabi_attribute 23, 3 @ Tag_ABI_FP_number_model
.eabi_attribute 24, 1 @ Tag_ABI_align8_needed
.eabi_attribute 25, 1 @ Tag_ABI_align8_preserved
.eabi_attribute 26, 2 @ Tag_ABI_enum_size
.eabi_attribute 30, 2 @ Tag_ABI_optimization_goals
.eabi_attribute 34, 1 @ Tag_CPU_unaligned_access
@notro
notro / gist:11066457
Created April 18, 2014 22:04
rvm install 1.9.3
$ rvm uninstall 1.9.3
$ rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: debian/6/x86_64/ruby-1.9.3-p545.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Installing Ruby from source to: /home/1/t/tronnes/.rvm/rubies/ruby-1.9.3-p545, this may take a while depending on your cpu(s)...
ruby-1.9.3-p545 - #downloading ruby-1.9.3-p545, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9802k 100 9802k 0 0 7332k 0 0:00:01 0:00:01 --:--:-- 14.9M
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 802720e..115cb21 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -43,6 +43,8 @@ dtb-$(CONFIG_ARCH_AT91) += sama5d35ek.dtb
dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
+dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b.dtb
+dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b-test.dtb
@notro
notro / gist:9829e3ecea3da1d91d5e
Created June 10, 2014 22:18
bootlog: Experimental Device Tree support using raspberrypi/linux and bcmrpi_defconfig
$ dmesg
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.12.21++ (pi@raspi2) (gcc version 4.7.1 20120402 (prerelease) (crosstool-NG 1.15.2) ) #1 PREEMPT Tue Jun 10 21:36:28 CEST 2014
[ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine: BCM2708, model: Raspberry Pi Model B
[ 0.000000] cma: CMA: reserved 8 MiB at 1b000000
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
struct clk __init *bcm2708_clk_register(const char *name, unsigned long fixed_rate)
{
struct clk *clk;
clk = clk_register_fixed_rate(NULL, name, NULL, CLK_IS_ROOT,
fixed_rate);
if (IS_ERR(clk))
pr_err("%s not registered\n", name);
return clk;
config.txt:
device_tree=bcm2708-rpi-b.dtb
device_tree_address=0x100
kernel_address=0x8000
disable_commandline_tags=1
kernel=zImage
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 1.848466] pinctrl core: add 2 pinmux maps
[ 1.852686] pinctrl core: add 6 pinmux maps
[ 1.856956] pinctrl-bcm2708 20200000.gpio: found group selector 17 for gpio17
[ 1.864141] pinctrl-bcm2708 20200000.gpio: found group selector 18 for gpio18
[ 1.871350] pinctrl-bcm2708 20200000.gpio: found group selector 27 for gpio27
[ 1.878560] pinctrl-bcm2708 20200000.gpio: found group selector 22 for gpio22
[ 1.885732] pinctrl-bcm2708 20200000.gpio: found group selector 23 for gpio23
[ 1.892935] pinctrl-bcm2708 20200000.gpio: found group selector 24 for gpio24
[ 1.900140] pinctrl-bcm2708 20200000.gpio: found group selector 25 for gpio25
[ 1.907343] pinctrl-bcm2708 20200000.gpio: request pin 17 (gpio17) for 20200000.gpio
diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts
index e319c8e..30107fb 100644
--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts
@@ -5,4 +5,36 @@
/ {
compatible = "brcm,bcm2708";
model = "Raspberry Pi";
+
+ aliases {
@notro
notro / downgrade_qemu
Created July 23, 2014 14:43
Output from some of the commands when using https://github.com/notro/fbtft-spindle/wiki (the files are listed in alphabetical order, not execution order)
pi@raspi2:~/images/fbtft-spindle/spindle$ schroot -c spindle
(spindle)pi@raspi2:~/images/fbtft-spindle/spindle$ sudo ./downgrade_qemu
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
@notro
notro / gist:ac74667c1b0936665361
Created August 18, 2014 15:12
rpi-source testing. rpi-source can be used from 3.10.37
pi@raspberrypi:~$ cat /proc/version
Linux version 3.12.22+ (dc4@dc4-arm-01) (gcc version 4.7.2 20120731 (prerelease) (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08) ) #691 PREEMPT Wed Jun 18 18:29:58 BST 2014
pi@raspberrypi:~$ rpi-source
ERROR:
gcc version check: mismatch between gcc (4.6.3) and /proc/version (4.7.2)
Skip this check with --skip-gcc
Help: https://github.com/notro/rpi-source/wiki
pi@raspberrypi:~$ rpi-source --skip-gcc