OLIMEX / DIY-LAPTOP

Do It Yourself Open Source Hardware and Software Modular Hacker's Friendly Laptop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dual display

khumarahn opened this issue · comments

Hi, I am trying to make the HDMI work. Can't understand some things.

  • What is the difference between the two .dtb files for hdmi and without hdmi?

  • What does

		[[ -e /boot/a64/a64-olinuxino-hdmi.dtb ]] && \
		cp -f /opt/teres/hdmi/a64-olinuxino.dtb /boot/a64/a64-olinuxino.dtb

in change-display do? Are these lines correct? Which exactly files should be in /boot/a64?

  • Do I need to change anything in the u-boot?
  • I can't boot with /opt/teres/hdmi/a64-olinuxino.dtb

EDIT: I was able to boot, not sure what the reason. But the system freezes shortly after boot. Using the old a64-olinuxino.dtb fixes this.

First post corrected, it had the quote from an outdated commit.

  • to load modules at boot, it is easier to use a dedicated config file, e.g. /etc/modules-load.d/teres-hdmi.conf; this is easier and cleaner than editing /etc/modules

Thanks! Is there a place to download new blobs for uboot and boot0?

ok, thanks. Unlike most of teres software, u-boot is annoying to build because the build script is ubuntu specific, and it relies on the ancient gcc-4.7. I don't have ubuntu installed. But I will install it soon.

looking at


the new uEnv.txt is very different from before. There is no root= setting any more, which is used in initrd.

I can't make the laptop boot from an sd card with the new uboot and uEnv.txt and other files in /boot. I see a dark screen with nothing. Boot log: https://pastebin.com/TJwbBEkN

Cleaner boot log: https://pastebin.com/M87YXY2z

I built the "simple image" following instructions in the rel3 branch, and compared the first 20 MiB to my image. They are only different in the first 512 bytes, the MBR, which is expected. The simple image also does not boot from the sd card.

Hi Alexey, please try binary release from https://github.com/OLIMEX/DIY-LAPTOP/releases/tag/rel3-1
you can flash it to your sd card with:
dd if=boot0_teres.bin conv=notrunc bs=1k seek=8 count=32 oflag=direct of=/dev/sdx
dd if=u-boot.bin conv=notrunc bs=1k seek=19096 of=/dev/sdx

Please test and let me know about result. Also can you tell me what OS and gcc version you use to build u-boot.
~Best

Hi, your u-boot made the difference, it boots now. I was compiling u-boot in an ubuntu chroot:

# lsb_release -a
LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:        14.04
Codename:       trusty
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)

Also I have gcc-4.7-arm-linux-gnueabihf installed.

I tried building u-boot in a different linux, but the build scripts are very inflexible and adapting them was taking too much time. So I gave up and used debootstrap to get a chroot of an old ubuntu. Then I followed the instructions in the readme.

What is the logic for determining the root partition now? Do the scripts in initrd still make sense?

I managed to build a working u-boot. Not sure what was wrong the first time.

I suppose I should have hdmi working now, but I don't have a mini hdmi adapter to test.

To add to all my questions above, what could be the reason hdmi does not work with xrandr?

I received a mini-hdmi adapter. But can't make hdmi work. System log shows:

Dec 13 21:42:36 teres kernel: [HDMI WRN] file:drivers/video/sunxi/disp2/hdmi/hdmi_bsp_sun50iw1p1.c,line:600:    ddc read timeout, byte cnt = 128
Dec 13 21:42:36 teres kernel: [HDMI WRN] file:drivers/video/sunxi/disp2/hdmi/hdmi_bsp_sun50iw1p1.c,line:600:    ddc read timeout, byte cnt = 127
Dec 13 21:42:36 teres kernel: [HDMI WRN] file:drivers/video/sunxi/disp2/hdmi/hdmi_bsp_sun50iw1p1.c,line:600:    ddc read timeout, byte cnt = 126
Dec 13 21:42:37 teres kernel: [HDMI WRN] file:drivers/video/sunxi/disp2/hdmi/hdmi_bsp_sun50iw1p1.c,line:600:    ddc read timeout, byte cnt = 125
Dec 13 21:42:37 teres kernel: [HDMI WRN] file:drivers/video/sunxi/disp2/hdmi/hdmi_bsp_sun50iw1p1.c,line:600:    ddc read timeout, byte cnt = 124
Dec 13 21:42:37 teres kernel: [HDMI WRN] file:drivers/video/sunxi/disp2/hdmi/hdmi_bsp_sun50iw1p1.c,line:600:    ddc read timeout, byte cnt = 123
...
Dec 13 21:42:38 teres kernel: [HDMI WRN] file:drivers/video/sunxi/disp2/hdmi/hdmi_bsp_sun50iw1p1.c,line:600:    ddc read timeout, byte cnt = 3
Dec 13 21:42:38 teres kernel: [HDMI WRN] file:drivers/video/sunxi/disp2/hdmi/hdmi_bsp_sun50iw1p1.c,line:600:    ddc read timeout, byte cnt = 2
Dec 13 21:42:38 teres kernel: [HDMI WRN] file:drivers/video/sunxi/disp2/hdmi/hdmi_bsp_sun50iw1p1.c,line:600:    ddc read timeout, byte cnt = 1
Dec 13 21:42:38 teres kernel: HDMI set ptbl: 16 2 0 96 7 5 4 1 4 0 0 128 24 88 44 56 45 1 1 
Dec 13 21:42:38 teres kernel: hdmi_clk_enable_prepare()L181
Dec 13 21:42:38 teres kernel: HDMI set ptbl: 16 2 0 96 7 5 4 1 4 0 0 128 24 88 44 56 45 1 1 
Dec 13 21:42:39 teres kernel: hdmi_clk_disable_prepare()L196

I used hdmi through the mini-hdmi to hdmi adapter and then an hdmi to dvi adapter, because I do not have an hdmi monitor.

My config for xorg.conf is basically that of the rel3 branch, only I added to xorg.conf

    Option    "ShadowFB" "false"

In the kernel, I made no related changes (I change things like cpu and io governors, f2fs, etc.)

Hi Alexei,
i see this behavior with some adapters, they do not send valid DDC data, i am working on this