<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Talk Computer &#187; linux</title>
	<atom:link href="http://www.talkcomputer.net/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.talkcomputer.net</link>
	<description>Tutorials, reviews, information, eveything for your technology needs!</description>
	<lastBuildDate>Thu, 02 Jul 2009 21:38:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Home Fedora Server Setup</title>
		<link>http://www.talkcomputer.net/2009/07/home-fedora-server-setup/</link>
		<comments>http://www.talkcomputer.net/2009/07/home-fedora-server-setup/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 17:00:00 +0000</pubDate>
		<dc:creator>Cedric</dc:creator>
				<category><![CDATA[Slider]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[added security]]></category>
		<category><![CDATA[administrative commands]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[cross platform]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux distribution]]></category>
		<category><![CDATA[public networks]]></category>
		<category><![CDATA[root user]]></category>
		<category><![CDATA[ssh login]]></category>
		<category><![CDATA[sysconfig]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.talkcomputer.net/?p=97</guid>
		<description><![CDATA[Did you ever wonder if you could remotely download, upload or control your Fedora (or any other Linux distribution) machine remotely? If the answer is yes, keep on reading because we will do just that!]]></description>
			<content:encoded><![CDATA[<p>Did you ever wonder if you could remotely download, upload or control your Fedora (or any other Linux distribution) machine remotely? If the answer is yes, keep on reading because we will do just that!</p>
<p>In this article, we will use a user called <em>User</em> on a machine called <em>machine</em>, simple enough?</p>
<h3>Adding User to sudoers</h3>
<p>For added security, we will avoid working with the root user. Therefore, we need a user capable of executing administrative commands. To do that, we&#8217;ll just add <em>User</em> to the sudoers</p>
<pre>[User@machine ~]$ su -
[Root@machine ~]# visudo</pre>
<p>Add the following line at the end of the file</p>
<pre>User ALL=(ALL) ALL<strong> </strong></pre>
<p>or to sudo without password prompt (not recommended)</p>
<pre>User ALL=(ALL) NOPASSWD: ALL</pre>
<p>That&#8217;s it, we can now use <em>sudo</em> to execute administrative commands!</p>
<h3>VNC Server</h3>
<p>For remote desktop access, we will use the VNC server for it&#8217;s cross platform abilities. Note: VNC connections are not encrypted so don&#8217;t use it on public networks.</p>
<pre>[User@machine ~]$ sudo yum install vnc-server vnc
[User@machine ~]$ sudo vi /etc/sysconfig/vncservers</pre>
<p>Edit the file so it contains:</p>
<pre>VNCSERVERS="1:User"
VNCSERVERARGS[1]="-geometry 1024x768 -depth 16"</pre>
<p>Set the vnc password for the user (this should be different than the password for the local/ssh login):</p>
<pre>[User@machine ~]$ vncpasswd</pre>
<p>Set the services:</p>
<pre>[User@machine ~]$ sudo service vncserver restart
[User@machine ~]$ sudo chkconfig vncserver on</pre>
<h3>FTP Server</h3>
<p>If you want to access your files remotely and transfer them to other machines, you&#8217;ll need to install an FTP server</p>
<pre><strong> </strong>[User@machine ~]$ sudo yum install vsftpd
[User@machine ~]$ sudo chkconfig vsftpd on
[User@machine ~]$ sudo vi /etc/vsftpd/vsftpd.conf</pre>
<p>change from</p>
<pre>anonymous_enable=YES</pre>
<p>to</p>
<pre>anonymous_enable=NO</pre>
<p>uncomment both lines bellow</p>
<pre>write_enable=YES
local_enable=YES</pre>
<p>Set the services:</p>
<pre>[User@machine ~]$ sudo service vsftpd restart</pre>
<h3>SSH</h3>
<p>Finally, to administer your server through the console remotely, you need ssh</p>
<pre>[User@machine ~]$ sudo yum install ssh-server
[User@machine ~]$ sudo service sshd start
[User@machine ~]$ sudo chkconfig sshd on</pre>
<p><strong> </strong></p>
<p>Lets secure the server:</p>
<pre>[User@machine ~]$ sudo vi /etc/ssh/sshd_config</pre>
<p><strong> </strong></p>
<p>Add the following lines at the end of the file:</p>
<pre>LoginGraceTime 30</pre>
<p>(or if you&#8217;re paranoid, use 15. This is the amount of time you have to login)</p>
<p><strong> </strong></p>
<pre>PermitRootLogin no
AllowUsers User</pre>
<p>Now restart the service and you are done</p>
<pre>[User@machine ~]$ sudo service sshd restart</pre>
<h3>End note</h3>
<p>Obviously, you&#8217;ll need to set up your server to let those services through. Keep in mind that VNC runs on port 590x where x is the number in the</p>
<pre>VNCSERVERS="1:User"</pre>
<p>line. Also, here&#8217;s a little bonus; how to encrypt your VNC sessions: just run (in the terminal):</p>
<pre>ssh -f -L 25901:127.0.0.1:5901 User@ip -p 22 sleep 10; vncviewer 127.0.0.1:25901:1</pre>
<p>Hope you liked the tutorial! Questions, as usual in the comments and I will do my best to answer them. Stay tuned, I have more tutorials coming in the next few weeks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.talkcomputer.net/2009/07/home-fedora-server-setup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Compiling for embedded processors (part 1)</title>
		<link>http://www.talkcomputer.net/2009/05/compiling-for-embedded-processors-part-1/</link>
		<comments>http://www.talkcomputer.net/2009/05/compiling-for-embedded-processors-part-1/#comments</comments>
		<pubDate>Wed, 27 May 2009 02:00:23 +0000</pubDate>
		<dc:creator>Cedric</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[compilers]]></category>
		<category><![CDATA[compiling]]></category>
		<category><![CDATA[development environment]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux distribution]]></category>
		<category><![CDATA[processor]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tarballs]]></category>
		<category><![CDATA[toolchain]]></category>

		<guid isPermaLink="false">http://www.talkcomputer.net/?p=35</guid>
		<description><![CDATA[In my current job, I came across some issues compiling for the Embedded ARM TS-7800. Because of certain library requirements and other limitations, compiling from the embedded device was not possible (although, in some cases it might). The only way to get around this issue is cross-compiling. Cross-compiling is compiling for a different architecture than [...]]]></description>
			<content:encoded><![CDATA[<p>In my current job, I came across some issues compiling for the <em>Embedded ARM TS-7800</em>. Because of certain library requirements and other limitations, compiling from the embedded device was not possible (although, in some cases it might). The only way to get around this issue is cross-compiling.</p>
<p>Cross-compiling is compiling for a different architecture than the one you are currently working on. If it&#8217;s your first time doing that kind of work, it can rapidly become frustrating since there is no &#8220;silver bullet&#8221; method. In this post, I will try to explain a method that should work for most embedded device provided that the manufacturer has a <em>toolchain</em> readily available.</p>
<p><strong>What you will need:</strong></p>
<ul>
<li>A computer with a Linux distribution (I used Fedora 7 [it's old but it worked] )</li>
<li>A compiler and the necessary libraries</li>
<li>The <em>toolchain</em> for the processor</li>
<li>Not necessary but will make you  life easier: a development environment (such as Eclipse)</li>
</ul>
<p>Let&#8217;s take a look at the 4 items previously listed. First, the Linux distribution; it&#8217;s not 100% required but it will make your life a lot easier since most <em>toolchains</em> (patience, we&#8217;ll get to what it is soon) are compiled for Linux.</p>
<p>The compiler that is most often used is GCC, a great compiler, free (<em>free as in speech</em> and <em>free as in beer</em>) and readily available of all (or almost) Linux distributions. You can get the Tarballs off their website at http://gcc.gnu.org/ or just use the package manager in you environment. I would suggest installing the required libraries for the code you are compiling at this point if it&#8217;s not already done.</p>
<p><em>Toolchains</em>, what are they? <em>Toolchains</em> are simply a set of compilers and libraries build to run on a certain architecture and compile for another. You will usually be able to get them from the manufacturer&#8217;s website or from the community. You will most likely find them packaged in Tarballs.</p>
<p>Finally, the development environment is useful because it let&#8217;s you consolidate and organize your code into neat folders and let&#8217;s you easily manage build options. With some addons, Eclipse will even let you sync a project directly from a SVN!</p>
<p><strong>Architecture, what&#8217;s that?</strong></p>
<p>Throughout this article, I will often refer to the ARM architecture and the x86 (also known as i386 or i486 or i686). The architecture simply refers to the CPU &#8220;design&#8221; and it&#8217;s a quick way of knowing what compiled code will work with which CPUs. The differences between each architecture and the reason for such differences is way beyond the scope of this article. Just keep in mind that when you select a compiler, an application or Linux distribution for you computer, you&#8217;ll probably be looking for the i386 (most Linux distributions will but different versions for i386 and i686, newer PCs run with i386) or the x86_64 (or x64) if you have a 64 bit processor. Note that i386 will work on 64 bit processor the the opposite is not true!</p>
<p><strong>Let&#8217;s get started</strong></p>
<p>First let&#8217;s assume that you have you environment set up, that you have some basic knowledge of Linux and that your code compiles on you current processor. Let&#8217;s also assume you&#8217;re not using some obscure libraries that you don&#8217;t have the source code for. Finally, I&#8217;ll assume that you have <em>ROOT</em> privileges on your system.</p>
<p>First step of the cross-compiling process is to locate the <em>toolchain</em> and download it to your home directory.</p>
<p>Next step is to extract it. If it&#8217;s a tarball, just execute the following command:</p>
<pre>tar -xzf crosstool.tar</pre>
<p>Once you have the content of the <em>toolchain</em> in a folder somewhere, we need to make it usable. This is where most people go their own ways. I found a very simple and effective way of using the <em>toolchain</em> and I&#8217;m sharing it because I think the other methods are more trouble than they are worth.</p>
<p>To get the <em>toolchain</em> working, let&#8217;s start by making a backup or our compilers. Execute the following commands in the console:</p>
<pre>cp /usr/bin/gcc /usr/bin/gcc.bak</pre>
<pre>cp /usr/bin/g++ /usr/bin/g++.bak</pre>
<p>Now that we have the backup done, we&#8217;ll remove the originals by running the following commands:</p>
<pre>rm /usr/bin/gcc

rm /usr/bin/g++</pre>
<p>And finally, we need a way of letting the OS think that we still have the compilers there, so we&#8217;ll add two symbolic links that will point to the <em>toolchain&#8217;s</em> compilers</p>
<pre>ln -s /path/to/crosstool/bin/crosstool-name-gcc /usr/bin/gcc      
ex: ln -s /home/test/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc /usr/bin/gcc

ln -s /path/to/crosstool/bin/crosstool-name-gpp /usr/bin/gpp               
ex: ln -s /home/test/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gpp /usr/bin/gpp</pre>
<p>Now that, we have some shinny new compilers, let&#8217;s test them with something simple. We&#8217;ll make a short &#8220;Hello World&#8221; program and compile it for your embedded device architecture. Type into a new file somewhere:</p>
<pre>#include &lt;stdio.h&gt;

int main(void) {

       printf("Hello World!\n");

       return 0;

}</pre>
<p>and save it as <em>hello.c.</em></p>
<p>To compile, you can simply type the following command (assuming that you are executing that command from the same folder that contains the file):</p>
<pre>gcc hello.c -o hello.arm</pre>
<p>You should look for errors here, if it succeeds, you should not get anything back and you will be able to see the file in your current folder.</p>
<p>Finally, to confirm that you have a working environment, we will look at the file properties by executing the command:</p>
<pre>file hello.arm</pre>
<p>if the output specifies the embedded device&#8217;s processor, you should be fine. It should look like:</p>
<pre>hello.arm: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.17, not stripped</pre>
<p>In part two of this tutorial, we will look at getting the original compilers back in and some advanced method for larger application compiling. Even though I am not an expert on the subjet, feel free to post your issues and questions and I will do my best to find and provide answers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.talkcomputer.net/2009/05/compiling-for-embedded-processors-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
