HTTP Server for uCLinux

You may need a web server on your no-MMU embedded system in order to allow remote configuration or possibly provide external access to some files. Usually, you’ll need a lightweight webserver (e.g. not Apache) with the required features and in case of no-mmu system, source that can accommodates uClinux limitations such as no fork support. You’ll also take into account the programming language or the server: e.g. C/C++. Java, Ruby, Perl… If your system does not support Java or Perl for example, that may not be the best solution to add one of those only for the web server and it also depends on the resources (Flash/RAM) available. There are plenty of C/C++ lightweight http servers such as thttpd or lighttpd, however those are using fork in their code. One open source http server that is lightweight and uses vfork (instead of fork) is mathopd. At the time of writing, […]

Digital Signage: Implementing a smooth scrolling text

Many digital signage hardware feature scroll text. However, in many cases the scrolling text is either not smooth, sometimes teared or very slow. It may depends on the performance of the hardware used but also on the implementation of the software. Once easy way to implemented scrolling text is just to redraw the text again and again at different position. However, this is very slow and yields poor results unless maybe you have a Truetype accelerator or similar hardware font accelerator. The next step is then to convert the text into pixmaps. This can either be done in the digital signage manager software (Windows PC/MAC or Linux based) or the digital signage player. Doing so in the latter makes it much more flexible. So you may create 2 pixmaps whose width and length match the region to be displayed, you write the text on those 2 pixmaps, then simply move […]

Enabling swap in embedded systems

If your embedded system running Linux does not have enough memory, you can enable swap to get more memory. However if your platform does not have MMU (Memory Management Unit) as is the case for Sigma Designs EM8620 series, it won’t support swap, so forget it. If your platform does have MMU, as is the case for many newer platforms such as Sigma Designs SMP8630, SMP8640 and SMP8650 series, you can enable swap support. First you’ll have to make sure swap support is enabled in your kernel:

and swapon/swapoff is enabled in busybox. So for example if you have an IDE harddisk with the second partition configured as swap. (Use fdisk to create a partition and mkswap /dev/hda2 to initialize the partition), you can enable the swap as follows:

If you get out-of-memory killer kernel error, you can change the “swapiness” to avoid oom-killer to kick in.

[…]

How to do a framebuffer screenshot

I’ll explain how to do framebuffer screenshots on 16-bit and 32-bit framebuffer. For 16-bit this is fully based on http://docs.blackfin.uclinux.org/doku.php?id=framebuffer Capturing screenshots Whatever the bit-depth of your framebuffer, the first step is to capture the frambuffer raw data on the board:

Now the you need to take the raw image, and convert it to a standard image format. This step depends on what type of display is there Converting 16-bit Framebuffer screenshot (RGB565) into png To convert the raw rgb data extracted from /dev/fb0, use iraw2png perl script

To do the conversion, type the following command in the host:

where 640 and 480 are respectively the width and height of your framebuffer. This has been tried on a 16-bit framebuffer on EM8620 series. Converting 32-bit Framebuffer screenshot (ARGB, RGBA, BGRA…) into png The solution proposed here is not as neat as the blackfin’s solution for 16-bit framebuffer, […]

uClinux kernel panic: Stack overflow

If you’re using ucLinux, you may get kernel panic errors coming out of nowhere. There may be several reasons (buffer overflow, out of memory..), but the most common is stack overflow for the process or one of the threads. To increase the stack size of a flat binary you’ll need to adjust the LDFLAGS as follows:

This will set the stack size to 64KB. To change the stack size of a thread (e.g. 32KB below), you’ll need to set the stack size attribute:

How to detect which thread suffers from stack overflow? First, you can check your code for recursive function calls and local variables (especially arrays) both of which will be added at runtime to the stack to estimate what should be the stack size. So if you have large arrays you may use a pointer + a call to malloc instead. If this can not fix […]

Digital Signage Features – A Quick Guide to Select Your Digital Signage Solution

There are a lot of different digital signage solutions around and it may be difficult to find which one is right for you since there can be quite a few different features and options. So I’ll do my best to explain the main features to guide your choice if you are planning to purchase a digital signage solution (embedded signage player, content management software and server). I’ll focus this post on the digital signage player, but bear in mind the content manager software is equally very important. [ad#Google Adsense – Wide Banner] Hardware features Video outputs: composite, component (YPbPr), VGA, DVI, HDMI, LVDS The capability to output simultaneously to different video outputs maybe an advantage if your plan is to use one player to output to several monitors. Video resolution: Standard Definition (e.g. NTSC) vs. High Definition (e.g. 1080p) This is a simple choice based on costs and whether you […]

Digital Signage Players in Hong Kong and China

I’ll show a few digital signage applications based on Sigma Designs EM8620 and SMP8630 series that are currently used in Hong Kong and China. Bus Digital Signage SinoCDN is a Hong Kong company providing broadband media delivery solutions. SinoCDN  currently provides a digital signage solution for Hong Kong – China cross boarder buses called IPAD. Their solution is based on EM8623L Sigma Designs and allows content update thru Wifi at the border between China / Hong Kong. If you’ve ever been at the Hong Kong / China border (Lok Ma Chau) and seen some Wifi access points whose names starts with sinocdn, they are used for this purpose. Digital Signage & POS (Point-of-Sale) Heng Yu Technologies is another Hong Kong company specialized in the manufacturing of “customized input and display technology for the industrial markets” They provide point of sales and advertizing platform based on several Sigma Designs platforms, including […]

Optimizing hard disk and compact flash performance in Linux Embedded Systems

Compact flash are often used in Digital Signage applications and hard-disks used in both signage application and IP set-top-box to play high definition videos. However, sometimes the performance of those devices and the performance limitations of embedded systems may make the task difficult especially for higher bit-rate videos. Choosing the right file system Once of the easiest way to improve performance is to select an appropriate file system. The best performance is achieved by ext-2, followed by ext-3, fat 32 and ntfs on the embedded system I worked with at least (e.g. Sigma Designs EM8620 and  SMP8630 series).  Basically, if your CF card/HDD is not supposed to be taken out of your device, then ext-2 is the obvious choice. However, if your user for whatever reasons need to take the devie out and connect it to a Windows PC FAT 32 or NTFS might be a better choice, although it […]