Beaglebone & LVDS LCD

Hi,

I am trying to put the 10" LVDS LCD from Chalkboard to work with the beaglebone. I tried the instructions suggested by vendor ( http://www.chalk-elec.com/?p=1605 ), but so far it didn’t work for me… The LCD works only with Linux image downloaded from vendor site, the same used to test the LCD before shipping.

My aim is run an application over Matrix GUI, so I am using the Arago Linux from TI SDK. I am novice in Embedded Linux and I am following this guide: http://processors.wiki.ti.com/index.php/AMSDK_Linux_User%27s_Guide .

Do you know how to apply the patch “0001-da8xx-fb-add-Chalk-Electronics-LVDS-cape-and-10in-di.patch” over the kernel Linux (Arago or Angstrom)?

I’ve tried the step suggest by Robert C Nelson too (README.md) at https://github.com/jadonk/kernel/tree/3.7 .

Maybe everything is OK with kernel (uImage) compiled as suggested by Robert, but I don’t know if is missing something… like a different uEnv.txt and boot configurations etc.

I swapped the uImage that comes with the Angstrom by the compiled (generated with patched kernel for LCD) in the first partition of Angstrom SD card too but I can’t see the Gnome at LCD…

Is there a specific configuration for uEnv.txt? I added this lines:

mpurate=1000
defaultdisplay=dvi
dvimode=“1280x800MR-16@60 omapfb.vram=0:8M,1:4M,2:4M”
vram=16M
optargs=“consoleblank=0”

Could you help me?

Excuse me for disturb you,

My regards,

Alexandre

Hi,

I am trying to put the 10" LVDS LCD from Chalkboard to work with the
beaglebone. I tried the instructions suggested by vendor (
http://www.chalk-elec.com/?p=1605 ), but so far it didn't work for me...
The LCD works only with Linux image downloaded from vendor site, the same
used to test the LCD before shipping.

I haven't found the vendor image or source. The instructions on that page
were pretty confusing to me and they weren't helping to get support into
the primary release or mainline Linux kernel---which is why I created my
own patch for it.

My aim is run an application over Matrix GUI, so I am using the Arago
Linux from TI SDK. I am novice in Embedded Linux and I am following this
guide: http://processors.wiki.ti.com/index.php/AMSDK_Linux_User's_Guide.

Do you know how to apply the patch
"0001-da8xx-fb-add-Chalk-Electronics-LVDS-cape-and-10in-di.patch" over the
kernel Linux (Arago or Angstrom)?

I've tried the step suggest by Robert C Nelson too (README.md) at
https://github.com/jadonk/kernel/tree/3.7 .

That's exactly what I've done to get this panel working. The exact commands
I use to apply this patch I created are documented at
http://beagleboard.org/linux.

Maybe everything is OK with kernel (uImage) compiled as suggested by
Robert, but I don't know if is missing something... like a different
uEnv.txt and boot configurations etc.

Are you using the image with the dtb appended to the image?

I swapped the uImage that comes with the Angstrom by the compiled
(generated with patched kernel for LCD) in the first partition of Angstrom
SD card too but I can't see the Gnome at LCD...

The kernel is loaded from the second partition for recent u-boot images at
/boot.

Is there a specific configuration for uEnv.txt? I added this lines:

mpurate=1000
defaultdisplay=dvi
dvimode="1280x800MR-16@60 omapfb.vram=0:8M,1:4M,2:4M"
vram=16M
optargs="consoleblank=0"

* Get the latest SD card image from http://beagleboard.org/latest-images
* Copy your newly created kernel to /boot on the second partition (the ext4
partition where the rootfs is)
* Delete and replace the uImage symlink with a link the the kernel you
copied over

That should be good enough for it to work for you. The touch events are
working fine for me too.

I have noticed that the refresh rate is high due to a division remainder
issue (needed to lower the target frequency just a hair). When I get back
from CES, I plan to fix that.

Could you help me?

Excuse me for disturb you,

Hope this helps! Please reply and let us all know.

FWIW, I have the 10" LCD/touch panel from Chalkboard on a couple of BB xM's, and it is completely plug-and-play with Ubuntu (12.04 and 12.10) - touch worked and everything. All I had to do was add a kernel command line param to adjust the resolution.

Best of luck,
     Chris

Jason,

Following the step from http://beagleboard.org/linux I've got the new kernel
patched and compiled.

I downloaded the latest SD card image from
http://beagleboard.org/latest-images, extracted and copied it to 8GB empty
sd card with dd command:

sudo dd
if=Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.05-beaglebone-2012.11.22.img
of=/dev/sdb bs=1M

This command created a FAT16 partition for boot and a EXT4 for rootfs.
However, when I boot the beaglebone with this card I get these messages from
terminal:

U-Boot SPL 2011.09-00053-gb423c52 (Aug 10 2012 - 11:26:55)
Texas Instruments Revision detection unimplemented
No daughter card present
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img

U-Boot 2011.09-00053-gb423c52 (Aug 10 2012 - 11:26:55)

I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
No daughter card present
NAND: HW ECC Hamming Code selected
No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

Net: cpsw
Hit any key to stop autoboot: 0
SD/MMC found on device 0
reading uEnv.txt

33 bytes read
Loaded environment from uEnv.txt
Importing environment from mmc ...
Loading file "/boot/uImage" from mmc device 0:2 xxa2
3489560 bytes read
## Booting kernel from Legacy Image at 80007fc0 ...
   Image Name: Angstrom/3.2.34/beaglebone
   Image Type: ARM Linux Kernel Image (uncompressed)
   Data Size: 3489496 Bytes = 3.3 MiB
   Load Address: 80008000
   Entry Point: 80008000
   Verifying Checksum ... OK
   XIP Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Welcome to emergency mode. Use "systemctl default" or ^D to enter default
mode.

Give root password for system maintenance
(or type Control-D for normal startup):systemd-fsck[59]: Angstrom-Cloud9-:
Supe,
systemd-fsck[59]: now = Wed Apr 11 10:15:18 2012) is in the future.
systemd-fsck[59]: Angstrom-Cloud9-: UNEXPECTED INCONSISTENCY; RUN fsck
MANUALLY.
systemd-fsck[59]: (i.e., without -a or -p options)

systemd-fsck[97]: Angstrom-Cloud9-: Superblock last mount time (Mon Jan 14
13:3,
systemd-fsck[97]: now = Wed Apr 11 10:15:41 2012) is in the future.
systemd-fsck[97]: Angstrom-Cloud9-: UNEXPECTED INCONSISTENCY; RUN fsck
MANUAWel.

Give root password for system maintenance
(or type Control-D for normal startup): (here I typed "root")
Entering System Maintenance Mode

root@beaglebone:~# fsck
fsck from util-linux 2.21
root@beaglebone:~#

After this I executed the reboot command, but the problem persists... So I
pressed CTRL+D several times until boot finished and in the next boot the
Angstrom started normally.

I've never seen this behavior. It makes me think something was wrong
with the copy, such as a bad SD card.

I renamed the original uImage to old.uImage and I copied the new uImage
(compiled) from /kernel/kernel/arch/arm/boot to /boot directory in rootfs
partition of Angstrom sd card, but I not found the symlink to uImage with a
link to kernel... (* Delete and replace the uImage symlink with a link the
the kernel you copied over)

Do you know the name of this file?

Yes, you need to delete and replace the uImage symlink with a link to
your newly built kernel. The name of the kernel that is built is:

~/kernel/kernel/arch/arm/boot/uImage-dtb.am335x-bone

That is where you need the symlink to point.

Do you have a bootlog with the new kernel?

There was progress... :slight_smile:

Using another sd card (4G sd card), I repeated the steps and now the
Angstrom copied with dd command boots without problems. So maybe there is a
problem with the 8G sd card...

I made the new link (called uImage) to the new file compressed kernel
(uImage-dtb.am335x-bone) and now the display works. :slight_smile: It was not necessary
to pass any configuration for display in uEnv.txt in this case.

I also discovered that the touchscreen does not work with the USB cable that
came with it. Neither with Windows nor Ubuntu (when connected to PC to
test).The Angstrom kernel can not enumerate the usb device with original
cable. So, to test, I used the Beaglebone USB cable to connect the
touchscreen to PC running Ubuntu. Doing it this way, the touchscreen works.
Thus, I can't trust in the USB cable that comes with touchscreen. It is a
thinner cable (more thinner than USB Beaglebone cable). Maybe it don't match
with USB specifications...

Despite of it works with PC running Ubuntu using Beaglebone USB cable, with
Angstrom the touchscreen doesn't works. I can't figure out why it doesn't
work in Angstrom yet.

Is there any configuration file for touchscreen?

Is it necessary enabling any special driver or module for touchscreen before
compile the kernel?

Yes, I turned on the driver and made it a module in the patch:

https://github.com/beagleboard/kernel/commit/ade06090f88cb4fd5c4fa370c8f11f8100eb003b

@@ -2836,8 +2836,8 @@ CONFIG_HID_LENOVO_TPKBD=m
# CONFIG_HID_MAGICMOUSE is not set
# CONFIG_HID_MICROSOFT is not set
# CONFIG_HID_MONTEREY is not set
-# CONFIG_HID_MULTITOUCH is not set
-# CONFIG_HID_NTRIG is not set
+CONFIG_HID_MULTITOUCH=y
+CONFIG_HID_NTRIG=m
# CONFIG_HID_ORTEK is not set
# CONFIG_HID_PANTHERLORD is not set
# CONFIG_HID_PETALYNX is not set

I'm not sure how you didn't get this if you followed my build
instructions and used configs/beaglebone as your configuration.

I compared the behavior of Ubuntu kernel and Angstrom kernel before and
after of I plug the touchscreen.
As the lsmod output for Ubuntu has several lines, I put it in a file. The
output1 file refers to before I plug touchscreen and the output2 file
after... so I inspected the difference between these files.

For Ubuntu:

alexandre@vostro220:~$ lsmod > output1
alexandre@vostro220:~$ lsmod > output2
alexandre@vostro220:~$ diff output1 output2
1a2,3

joydev 17693 0
hid_ntrig 19011 0

37,38c39,40
< usbhid 47238 0
< hid 99636 1 usbhid
---

usbhid 47238 1 hid_ntrig
hid 99636 2 hid_ntrig,usbhid

alexandre@vostro220:~$ ls
/lib/modules/3.2.0-36-generic/kernel/drivers/hid/usbhid
usbhid.ko usbkbd.ko usbmouse.ko
alexandre@vostro220:~$

As you can see, the Ubuntu loads the module usbhid.ko locate at
/lib/modules... when the touchscreen is plugged. In the other hand, the
Angstrom doesn't load any module.

For Angstrom:

root@beaglebone:~# lsmod (before I plug)
Module Size Used by
root@beaglebone:~# lsmod (after I plug)
Module Size Used by
root@beaglebone:~# ls /lib/modules/3.2.34/kernel/drivers/
block gpu input misc nfc rtc ssb usb w1
bluetooth hwmon md mtd parport scsi staging video
char i2c media net power spi uio virtio
root@beaglebone:~#

There isn't the subdirectory usbhid inside of the drivers directory. If
Angstrom uses the same module (usbhid.ko), is it elsewhere?

As the drivers was compiled as module I think I should find this module
(usbhid.ko) that was compiled with patched kernel and copy it to the
Angstrom sd card because only the kernel (uImage-dtb.am335x-bone) was copied
until now. Am I wrong? If I am right, where do I put the module? Must it be
in the same path found in Ubuntu (.../drivers/hid/usbhid/)? Is there a
better way to do this?

The module goes under /lib/modules/... You should tar up what gets put
into the directory specified when you do 'modules_install'. You need
to copy over all of the modules that you created.

mega noob question, where can I get the sdk to compile Robert C Nelson kernel?

Just grab the github repository:

https://github.com/RobertCNelson/linux-dev

...and run ./build_kernel.sh

If you have a local copy of the official Linux kernel git or appropriate
build tools you can save some space (create a system.sh script from the
example provided to tell the scripts where to find your local copies),
otherwise everything you need will be downloaded for you auto-magically.

thanks :slight_smile:

I followed steps on https://github.com/jadonk/kernel/tree/3.7 but when I boot my beaglebone I get an extrange error:

reading uEnv.txt
320 bytes read in 3 ms (103.5 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc …
Running uenvcmd …
** File not found uImage **
20094 bytes read in 37 ms (530.3 KiB/s)
Wrong Image Format for bootm command
ERROR: can’t get kernel image!

regardless those errors it still boots but my screen doesn’t display anything.

what could I be doing wrong?

u-boot is looking for "uImage" vs "zImage" just an old u-boot/uEnv.txt...
search the list on how to create a uImage from zImage, only been talked
about for ever.. PS 3.7 was hardly ever used, suprised it even boots.

Regards,

I have an uImage, I just replaced the one in /boot/ with the new I compiled following the steps by jadonk. I also replaced am335x-bone.dtb in the same directory.

My uEnv.txt looks like:

devtree=/boot/am335x-bone.dtb
dtboot=run mmcargs; ext2load mmc ${mmcdev}:2 ${kloadaddr} ${bootfile} ; ext2load mmc ${mmcdev}:2 ${fdtaddr} ${devtree} ; bootm ${kloadaddr} - ${fdtaddr}
uenvcmd=run dtboot
optargs=consoleblank=0

I added to uEnv.txt

bootfile=/boot/uImage

and the error is gone :slight_smile:

but no display yet :frowning: , I also tried with 3.8 and it’s the same. It boots ok, but no display.