21 Aug 2015 / Uncategorized
Install Icecast from source code:
Download and install http://downloads.xiph.org/releases/icecast/icecast-2.3.2.tar.gz
if you are doing it, you aren’t a simple GNU/Linux user and you know install it without guide.
Install Icevast with apt-get package management
apt-get install icecast-server
service icecast-server stop
Download MP3-Info, MP3-Icecast and MP3-Icecast-Simple Perl modules
wget http://search.cpan.org/CPAN/authors/id/D/DA/DANIEL/MP3-Info-1.24.tar.gz http://search.cpan.org/CPAN/authors/id/A/AL/ALLENDAY/MP3-Icecast-0.02.tar.gz http://search.cpan.org/CPAN/authors/id/G/GR/GREGORY/MP3-Icecast-Simple-0.2.tar.gz
Install each package
sudo make install
Create file streaming.pl and use this code:
$icy = MP3::Icecast::Simple->new(
description => “Station”,
server => ‘127.0.0.1:8000’,
password => ‘password’,
local_port => 1234, # port for stream
bitrate => 96 # bit rate for stream
$icy->play(“/Mp3/”); # directory where is locate your mp3 that you want stream
Now you can listen via http://youripadd:1234
Use XMMS, mplayer, Winamp, or something like that
11 May 2011 / GNU/Linux
Darjeeling is a Virtual Machine (VM) for Micro Controller Units (MCU). It can execute a large subset of the Java language on 8- and 16-bit platforms, such as Atmega128 or MSP430.
Features and limitations
We designed the VM from the ground up for extremely limited devices. Where other JVMs often require at least several hundreds kB of RAM, Darjeeling can run meaningful programs in as little as 2kB. In order to achieve this we dropped several features from the Java language.
* Precise, compacting garbage collection
* A 16-bit instruction set to reduce stack space consumption
* Threads with ad-hoc stack space allocation (linked stack) and synchronisation
* A simple method for calling with native C code from Java
* Uses a static linking model to reduce code footprint
* Does not support reflection
* Does not support 64-bit and floating point types
* No support for multi-dimensional arrays
* Does not call static class initialisers in lazy order
* Supports a limited subset of the Java class library
There’s just a “issue” for better configuration of Asterisk PBX/DAHDI with OpenVox A400P card under Slackware GNU/Linux 13.1 and here we’re going to see how to fix it.
Lets go… Obviously, we need to install first (this isn’t a topic of installation):
For setup the card OpenVox A400P we need to disable these modules (we need use wctdm module of DAHDI):
So well, we just add these next lines into /etc/modprobe.d/blacklist.conf and next boot there won’t be more conflicts between these modules.
And that’s all, now we can configure/start the Asterisk IP PBX.
13 Oct 2010 / Embedded
FatFs is a generic FAT file system module for small embedded systems. The FatFs is written in compliance with ANSI C and completely separated from the disk I/O layer. Therefore it is independent of hardware architecture. It can be incorporated into low cost microcontrollers, such as AVR, 8051, PIC, ARM, Z80, 68k and etc.
* Windows compatible FAT file system.
* Platform independent. Easy to port.
* Very small footprint for code and work area.
* Various configuration options:
o Multiple volumes (physical drives and partitions).
o Multiple ANSI/OEM code pages including DBCS.
o Long file name support in ANSI/OEM or Unicode.
o RTOS support.
o Multiple sector size support.
o Read-only, minimized API, I/O buffer and etc…
13 Oct 2010 / Real Time OS
Prex is an open source, royalty-free, real-time operating system for embedded systems. It is designed and implemented for resource-constrained systems that require predictable timing behavior. The highly portable code of Prex is written in 100% ANSI C based on traditional microkernel architecture.
Prex Design The Prex microkernel provides only fundamental features for task, thread, memory, IPC, exception, and synchronization. The other basic OS functions – process, file system, application loading, and networking, are provided by the user mode servers. In addition, Prex provides a POSIX emulation layer in order to utilize existing *NIX applications. This design allows the system to perform both of the native real-time task and the generic POSIX process simultaneously without degrading real-time performance. It also helps platform designers to construct OS by choosing suitable system servers for their target requisition.
Prex is royalty-free software released under Revised BSD License.
Prex has the following features:
* Task & Thread Control: preemptive priority scheduling with 256 priority levels
* Memory Management: memory protection, virtual address mapping, shared memory, MMU or MMU-less configuration
* IPC: object name space, synchronous message passing between threads
* Exception: fault trapping, framework for POSIX signal emulation
* Synchronization: semaphores, condition variables, and mutexes with priority inheritance
* Timers: sleep timers, one-shot or periodic timers
* Interrupt: nested interrupt service routines, and prioritized interrupt service threads
* Device I/O: minimum synchronous I/O interface, DPC (Deferred Procedure Call)
* Security: task capability, pathname-based access control, I/O access permission.
* Real-time: low interrupt latency, high resolution timers and scheduling priority control
* Power Management: power policy, idle thread, DVS (Dynamic Voltage Scaling)
* Debugging Facility: event logging, kernel dump, GDB remote debug
* File Systems: multi-threaded, VFS framework, buffer cache, ramfs, fatfs, arfs, etc.
* POSIX Emulation: pid, fork, exec, file I/O, signal, pipe, tty, pthread, etc.
* Libc: C library fully optimized to generate a small executable file
* CmdBox: a small binary that includes tiny versions of many UNIX utilities.
* Networking: (plan) TCP/IP stack, BSD socket interface
13 Oct 2010 / Operating Systems
Rather sooner than later, HelenOS will become a complete and usable modern operating system, offering room for experimenting and research. HelenOS uses its own microkernel written from scratch and supports SMP, multitasking and multithreading on both 32-bit and 64-bit, little-endian and big-endian processor architectures, among which are AMD64/EM64T (x86-64), ARM, IA-32, IA-64 (Itanium), 32-bit MIPS, 32-bit PowerPC and SPARC V9. Thanks to the relatively high number of supported architectures and suitable design, HelenOS is very portable. On top of the microkernel, HelenOS provides services such as file systems, networking, device drivers and user interface. Most of these services are composed of multiple independent server processes, which makes HelenOS one of the most modular operating systems.
As of now, HelenOS is being developed mostly by faculty members, and former and contemporary students of Faculty of Mathematics and Physics at Charles University in Prague. Nonetheless, the project is open for everyone, so we also have developers with different backgrounds from various places around the world. The source code is open and available under the BSD license. Some third party components, and components based on GPL software, are licensed under GPL.
This experience happened when I was changing my home directory to other place/partition, you know there isn’t more free space xD
The inconvenient for me went when I tried to execute a bash script, and I only got to see:
/bin/sh: bad interpreter: Permission denied
And I asked me: WTF? I checked first the script, then the permissions but all were ok, so again I asked me: WTF? so I looked the PATH variable and it was ok… and it was the moment when I decided to ask to san google xD
And I found the solution!!, the partition was mounted with noexec option and that’s why I couldn’t execute my bash script.
So the lesson for me was: If you want to execute something, don’t forget use exec option when mount the partition
Have a nice execution!!
21 Sep 2010 / GNU/Linux
Some times for some reason it’s necessary to change a home directory of a user and the correct form is using the command usermod:
usermod -d /new/home username
For more info about what other things we could do with this command look the man page.
20 Sep 2010 / Embedded
This is a little mini-howto of how to run PaRTiKle RTOS using QEMU emulating x86 architecture
First we need to make the image partikle.img that will content the .prtk file:
dd if=/dev/zero of=partikle.img bs=1M count=130
Once we made the img, is time to make the loop association with the image and make the partition:
losetup -f --show partikle.img
enter (default settings)
enter (default settings)
Because we need to map the partition tables as device, for easy access, we need to use kpartx:
kpartx -a /dev/loop0
Now we mount the partition and copy the .prtk and files that grub needs for install it:
mount /dev/mapper/loop0p1 tmp
cp hello_world.prtk tmp/
mkdir -p tmp/boot/grub
cp /usr/lib/grub/i386-pc/stage[1,2] tmp/boot/grub
cp /usr/lib/grub/i386-pc/reiserfs_stage1_5 tmp/boot/grub/
For install grub into image, we need to map hd0 to partikle.img and then install grub:
echo "(hd0) partikle.img" > map
Once installed grub it’s time to create cfg file for grub editing tmp/boot/grub/menu.lst and put this:
After all, run sync command and you’re right for run QEMU like we know to run
If you want to make fast work helped by the commands used time ago, maybe you fond useful this tip:
ctrl + r
06 Sep 2010 / Embedded
RTAI – the RealTime Application Interface for Linux – which lets you write applications with strict timing constraints for your favourite operating system. Like Linux itself this software is a community effort. If you are interested in what it does just join our mailing list and help our team!
RTAI supports several architectures:
* x86 (with and without FPU and TSC)
* ARM (StrongARM; ARM7: clps711x-family, Cirrus Logic EP7xxx, CS89712, PXA25x)
* m68k (supporting both MMU and NOMMU cpus)
The RTAI distribution includes RTAI-Lab, a tool chain to convert block diagrams into RTAI executables and to monitor their operation on various targets.
Druid is an open source unified communications platform, built around technology such as Asterisk, IMAP, XMPP. Druid gives your organization access to the best available IP communications platform that bringing together voicemail, VOIP, mobile phone, faxes and instant messaging.
02 Aug 2010 / Hardware
Open USB FXS is a project that aims to deliver and offer to the community an open-hardware/open-software FXS board. The target mass-scale manufacturing cost would be in the order of $10.00, this low-cost being a critical overall design factor. The board will communicate to a host using USB. It is expected that the board will be possible to utilize by VoIP software such as Asterisk, when appropriate device drivers are built.
The board is built around two chips: a Silabs 3210, that implements all telephony functions, and a PIC (a 18F2550 for the time) that interfaces between the 3210 and the USB and implements the board’s routine tasks, like passing around PCM I/O data. All the intelligence lies on the PC side, which drives the board by setting registers on the 3210 and performs audio I/O.