<?xml version='1.0' encoding='utf-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'>
<title>geekboy</title>
<link href='http://geekboy.fr' />
<link href='http://geekboy.fr/feed/' rel='self' />
<id>tag:geekboy.fr,2011-08-28:/</id>
<updated>2011-08-28T17:56:03+02:00</updated>
<author>
<name>maxime</name>
<email>maxime@f00.fr</email>
</author>
<entry>
<title>PDF in Tabs</title>
<link rel='alternate' type='text/html' href='http://geekboy.fr/pdf-in-tabs'/>
<id>tag:geekboy.fr,2011-08-07:/pdf-in-tabs</id>
<updated>2011-08-28T17:52:57+02:00</updated>
<content type='html'>
<![CDATA[<div id='post' class='item entry'>
<div class='itemtext'>


<p>I read a lot of PDF documents during the day, be it at work or at home.</p>

<p>For me, it comes as a shock that almost no viewer (to the exception of Adobe
        Reader) is able to open mulitple files with tabs !</p>

<p>So I looked at Evince and began wondering why nobody asked for that and then.. I
found <a href="http://brainstorm.ubuntu.com/item/15899/">that</a>.<br>
This discouraged me a little bit to see such narrow minded opinions.</p>

<p>But anyway, I've never done any GUI application, time to start, neh ?</p>

<p>That's why, I hacked <a href="https://github.com/maximeh/tabe">tabe</a>.
But while coding this, I discovered the tasks was way bigger than I imagined
and soon realized I had not that much time to give to that project.</p>

<p>I did what I should have done before coding tabe : <strong>a good ol' Google search</strong>.</p>

<p>After a few minutes, found the &quot;hack&quot; I was looking for and a few seconds later, I had tabs with all the feature you may ask for.</p>

<p>This miraculous solution is based on <strong>MozPlugger</strong>, the beauty is that it support
many browser.
You may install it as such : (Ubuntu/Debian)</p>

<pre><code>$ sudo apt-get install mozplugger
</code></pre>

<p>And you're done with the latests Ubuntu, for the others :</p>

<pre><code>$ vim $HOME/.mozilla/mozpluggerrc
</code></pre>

<p>And input this :</p>

<pre><code>application/pdf: pdf: PDF file
application/x-pdf: pdf: PDF file
text/pdf: pdf: PDF file
text/x-pdf: pdf: PDF file
application/x-postscript: ps: PostScript file
application/postscript: ps: PostScript file
    repeat noisy swallow(evince) fill: evince &quot;$file&quot;
</code></pre>

<p>If you happen to use Chromium, you
should read <a href="http://hyperlogos.org/blog/drink/embedding-evince-Chrome">this</a> to complete your installation.</p>

<p>Restart your browser and you're done.</p>

<p>And if you wish to remove the toolbar from evince, edit <em>~/.gnome2/evince/evince_toolbar.xml</em> to look like this:</p>

<pre><code>&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;toolbars version=&quot;1.0&quot;&gt;
&lt;/toolbars&gt;
</code></pre>

<p>I let you configure your window manager to open PDFs with your browser.</p>


</div>
</div>
]]>
</content>
</entry>

<entry>
<title>Dilbert</title>
<link rel='alternate' type='text/html' href='http://geekboy.fr/dilbert'/>
<id>tag:geekboy.fr,2011-07-14:/dilbert</id>
<updated>2011-08-28T17:52:57+02:00</updated>
<content type='html'>
<![CDATA[<div id='post' class='item entry'>
<div class='itemtext'>


<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/07/dilbert.gif" alt="Dilbert" height="287" border="0" width="640">
So true....</p>


</div>
</div>
]]>
</content>
</entry>

<entry>
<title>Start your K64</title>
<link rel='alternate' type='text/html' href='http://geekboy.fr/start-your-64bit'/>
<id>tag:geekboy.fr,2011-05-01:/start-your-64bit</id>
<updated>2011-08-28T17:52:57+02:00</updated>
<content type='html'>
<![CDATA[<div id='post' class='item entry'>
<div class='itemtext'>


<p><small>(K64 is short for Kernel-64bits.)</small></p>

<p>Last week end, I added some RAM stick into my laptop and so I wanted to make it
run in 64bits to enjoy all the benefits from the added memory.</p>

<p>But, dear Apple had decided that my Macbook was not Pro enough to run a 64Bits
kernel... I don't agree with that.</p>

<p>After a quick search through my dear friend Google, I found that I had to hack
the boot.efi file of my MacBook.
So without further addue, here is how to make your Macbook5,1 boot a kernel in
64 Bits. It might work with other Mac type, try it at your own risk and please
report if it works for you !.</p>

<!--more-->

<h2>Requirements</h2>

<p>You will need to know : </p>

<ul>
<li>The model of your product</li>
<li>If your EFI is 64bits capable</li>
</ul>

<p>To know the model of your product, follow this simple steps :</p>

<ul>
<li>Click the "Apple" menu in the top right corner of your computer
screen.</li>

<li>Select "About This Mac."</li>

<li>Click the "More Info" button to open the System Profiler. Alternatively,
    you can also access the System Profiler through the "Utilities" folder in
    your "Applications" folder.</li>

    <li>Select "Hardware" from the column on the left. Your model name and
    identifier will appear in the right column with other important information
    about your Mac, such as the processor name and speed, memory and serial
    number. An example of a model name is "MacBook Pro," with an example model
    identifier "MacBook Pro 3.1." The serial number is a unique series of
    letters and numbers.</li>
    </ul>

<p>You must also check that your EFI is 64bit capable, to do so, invoke :
<pre><code>ioreg -l -p IODeviceTree | grep firmware-abi</pre></code> It will return either
&quot;EFI32&quot; or &quot;EFI64&quot;.</p>

<p>Now either you do it the hard way, using <a
href="http://www.suavetech.com/0xed/0xed.html">0xED</a> or you just download <a
href="http://geekboy.fr/repository/64_boot_mac_sl/boot64.efi">this file</a> and
move on to the Installation section.</p>

<h2>Hacking</h2>

<p>Here is the raw patch : (don't use this, its just to show you what we are gonna
        do)
<pre><code>diff --git a/boot.txt b/boot64.txt
index b2115ac..36ec29a 100644
--- a/boot.txt
+++ b/boot64.txt
@@ -10350,11 +10350,11 @@
 00286d0: 5842 0200 0000 0000 0400 0000 0100 0000  XB..............
 00286e0: 0200 0000 0000 0000 0000 0000 0000 0000  ................
 00286f0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
-0028700: 6042 0200 0000 0000 0000 0000 0000 0000  `B..............
-0028710: 0000 0000 0000 0000 0000 0000 0000 0000  ................
+0028700: 6042 0200 0000 0000 0400 0000 0100 0000  `B..............
+0028710: 0200 0000 0000 0000 0000 0000 0000 0000  ................
 0028720: 0000 0000 0000 0000 0000 0000 0000 0000  ................
-0028730: 6842 0200 0000 0000 0000 0000 0000 0000  hB..............
-0028740: 0000 0000 0000 0000 0000 0000 0000 0000  ................
+0028730: 6842 0200 0000 0000 0400 0000 0100 0000  hB..............
+0028740: 0200 0000 0000 0000 0000 0000 0000 0000  ................
 0028750: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 0028760: 7342 0200 0000 0000 0400 0000 0100 0000  sB..............
 0028770: 0100 0000 0000 0000 0000 0000 0000 0000  ................
</pre></code></p>

<p>Now to do it manually, here is a little screenshot of 0xED with the final result
open.  <img style="margin: 0px 5px 5px 0px; float: left;"
src="public-img/2011/05/editinghex.png" alt="0xED" height="443" border="0"
width="590"></p>

<p>To get there, follow theses simple steps :</p>

<ul>
<li>Open boot.efi</li>
<li>Put 0xED in Overwrite mode (see the red arrow)</li>
<li>1 - Type the offset you want to go to</li>
<li>2 - Modify the hexadecimal value (don't insert)</li>
</ul>

<p>You need to modify the following : (The old value are always 00)</p>

<pre><code>Offsets - New Value
028708  -   04
02870c  -   01
028710  -   02
028738  -   04
02873c  -   01
028740  -   02
</code></pre>

<p>When you have done all the above modification. Save your file to your desktop
with an alternate name, like boot64.efi</p>

<h2>Installation</h2>

<p>Once you downloaded the 64bit EFI or your hacked version, you need to do a few
things for your Mac to boot with it.
<pre><code>$ sudo cp boot64.efi /System/Library/CoreServices/
$ cd /System/Library/CoreServices/
$ sudo chown root:wheel boot64.efi
$ sudo chflags uchg boot64.efi
$ sudo bless --folder /System/Library/CoreServices \ 
             --file /System/Library/CoreServices/boot64.efi
</pre></code></p>

<p>Edit /Library/Preferences/SystemConfiguration/com.apple.Boot.plist and add
arch=x86_64 to the value of the Kernel Flags key. By default, this value is an
empty string.</p>

<p><pre><code>$ cat /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
...
&lt;dict&gt;
    &lt;key&gt;Kernel&lt;/key&gt;
    &lt;string&gt;mach_kernel&lt;/string&gt;
    &lt;key&gt;Kernel Flags&lt;/key&gt;
    &lt;string&gt;arch=x86_64&lt;/string&gt;
&lt;/dict&gt;
...
</pre></code></p>

<p>If you do render your system unbootable, you can simply run bless again to
restore volume bootability as it was before. That is, you can tell bless to use
the original boot.efi. Of course, to do that, you'll need to either boot from a
different volume (a system install disc would be fine), or be able to access and
write to the unbootable volume from another computer.</p>

<p><pre><code>$ sudo bless --folder /Volumes/Cerise/System/Library/CoreServices \
             --file /Volumes/Cerise/System/Library/CoreServices/boot.efi
</pre></code>
<b>Note</b> :<em>Replace Cerise by the name of your Mac's Hard Drive</em></p>

<h2>How do I Tell ?</h2>

<p>Open up System Profiler, click Software and you should see:</p>

<p>64-bit Kernel and Extensions:   Yes</p>

<p>Enjoy !</p>


</div>
</div>
]]>
</content>
</entry>

<entry>
<title>The Moon</title>
<link rel='alternate' type='text/html' href='http://geekboy.fr/the-moon'/>
<id>tag:geekboy.fr,2011-04-09:/the-moon</id>
<updated>2011-08-28T17:52:57+02:00</updated>
<content type='html'>
<![CDATA[<div id='post' class='item entry'>
<div class='itemtext'>


<p>It's one of thoses dream you have when you're a kid and they only came true when
you have your own house and the money to afford it yourself.<br>
Well, yesterday, I (we !) saw the moon !<br>
And I don't mean with my eye through a window but with a brand new telescope on
my balcony.</p>

<p>It was pure magic. The little astro nerd inside me keep jumping up and down
since then :).</p>

<p>Here a little video : </p>

<iframe src="http://player.vimeo.com/video/22161117?byline=0&amp;portrait=0"
width="585" height="388" frameborder="0"></iframe>

<p>(sorry for the poor quality. but it should give you an idea of what you may be
 able to see with the right equipement.)</p>

<p>Next step : Mars or other planet :D. I can't wait !!</p>


</div>
</div>
]]>
</content>
</entry>

<entry>
<title>Luis Ocana</title>
<link rel='alternate' type='text/html' href='http://geekboy.fr/luis-ocana'/>
<id>tag:geekboy.fr,2011-04-04:/luis-ocana</id>
<updated>2011-08-28T17:52:57+02:00</updated>
<content type='html'>
<![CDATA[<div id='post' class='item entry'>
<div class='itemtext'>


<p>C'est mon nouveau pote pour les saisons a venir (on espere !). Je l'ai trouve
sur leboncoin pour un prix tres raisonnable et vendu par quelqu'un de tres
sympathiques qui connait son morceau au rayon velo.</p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63111907.jpg" alt="DSC_0154" height="396" border="0" width="590"></p>

<p>La description du site :
<em>
Ce joli et grand vélo rouge (taille 60) porte le nom d'un des plus fameux
coureurs franço-espagnol des années 70, rival d'Eddy Merckx, disparu en 1994.
Comme souvent, la retraite sportive impose une reconversion, et Luis avec
l'appui d'industriels Stéphanois, se lança dans la commercialisation de cycles.
La production, souvent honorable ne fut néanmoins jamais d'une qualité
exceptionnelle.</p>

<p>Notre vélo date du tout début des années 80, et a été construit en acier dans la
Loire, par la SIFEM (Société industrielle de fabrication d'équipement
        métalliques...Un poême). Souvent, des tubes Vitus étaient employés pour
construire les vélos Ocana. Pour le notre, ce n'est point le cas : Les tubes
&quot;précitubes&quot; proviennent d'une compagnie basée dans le Cher spécialisée dans les
alliages spéciaux et les aciers allégés. Le vélo porte toujours son sticker
d'origine nous indiquant qu'il a été acheté en région parisienne. La peinture
rouge métallisées est en bon état, de même que le cadre, simplement cogné sans
conséquence sur le hauban gauche. Malgré sa grande taille, le vélo est
relativement léger. La forme très compacte ravira les &quot;transformeurs&quot;: L'axe
carré et les pattes longues permettent de convertir facilement ce vélo en
fixie/pignon fixe.</p>

<p>Le jeu de roue Rigida (jantes et moyeux) sont comme neuf, et sans saut ni voile.
Le pneus Hutchinson (22x700) issus d'un ancien stock, ont été remontés récemment
et ne cumulent pas plus de 350 kilomètres.</p>

<p>La transmission est un classique de l'époque. Le Français Huret ayant été
racheté en 1980, les modèles avant et arrière sont des dérailleurs Sachs-Huret
ECO. Le fonctionnement est très doux, les dix vitesses sont étagées de manière
progressive et logique. Le pédalier Stronglight propose deux plateaux de la même
marque de 48 et 40 dents. Les pignons vont de 13 à 25 dents.</p>

<p>Leviers de freins et étriers CLB sont en parfait état. Les cocottes en
caoutchouc présentent une belle épaisseur et sont donc particulièrement
confortables.</p>

<p>Le cintre très arrondi ressemble beaucoup aux guidons créés pour le cyclisme sur
piste. Il est produit par ATAX, tout comme la potence (en 100mm). Enfin, la
selle en peau grise est en bon état. Sans doute d'origine italienne, elle ne
faisait pas partie de la dotation d'origine, mais le Club a souhaité offrir au
vélo de Luis, un repose-fesses digne de son prestigieux nom!
</em></p>

<p>Justes quelques photos pour vous montrer la chose dans la suite...</p>

<!--more-->

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63111971.jpg" alt="DSC_0156" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112004.jpg" alt="DSC_0155" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112018.jpg" alt="DSC_0169" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112031.jpg" alt="DSC_0157" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112076.jpg" alt="DSC_0158" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112093.jpg" alt="DSC_0159" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112102.jpg" alt="DSC_0160" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112111.jpg" alt="DSC_0161" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112121.jpg" alt="DSC_0162" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112129.jpg" alt="DSC_0163" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112141.jpg" alt="DSC_0164" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112150.jpg" alt="DSC_0165" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112156.jpg" alt="DSC_0166" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112164.jpg" alt="DSC_0167" height="396" border="0" width="590"> </p>

<p><img style="margin: 0px 5px 5px 0px; float: left;" src="public-img/2011/04/velo/63112171.jpg" alt="DSC_0168" height="396" border="0" width="590"></p>

<p>Sachant que la selle et les roues ne sont plus celle la, une photo degeu prise
dans le garage a velo du travail :</p>

<p><img style="margin: 0px 5px 5px 0px; float: left;"
src="public-img/2011/04/velo/63110793.png" alt="DSC_0193" height="443" border="0" width="590"></p>


</div>
</div>
]]>
</content>
</entry>

<entry>
<title>8 ans...Seriously ?</title>
<link rel='alternate' type='text/html' href='http://geekboy.fr/8-ans'/>
<id>tag:geekboy.fr,2011-03-25:/8-ans</id>
<updated>2011-08-28T17:52:56+02:00</updated>
<content type='html'>
<![CDATA[<div id='post' class='item entry'>
<div class='itemtext'>


<p>Deja.. Ca fait 8 ans que ce &quot;blog&quot; existe. Je n'ai jamais vraiment su ce que
c'etait au final que ce petit bout de page internet. Un blog ? Un wiki geek ? Un
melange des deux ?
Au final, je mets un peu ce que je trouve interessant/cool et quand j'y pense et
que je peux prendre le temps d'ecrire.</p>

<p>J'ai eu un gros passage a vide vis a vis de l'ecriture mais depuis que j'ai
refait le blog, j'ai de nouveau envie.</p>

<p>Aucune garantie cependant, ayant enormement de projet a cote, je commence a
manquer un peu de temps pour certaines activites. La vie est une question de
priorite comme dirait Magnum.</p>

<p>Quand j'y repense, 8 ans, ca fait un peu figure de dinosaure du net, non ?
Toujours pas eteint cela dit ! Pas grand chose a dire tout ces billets, si ce
n'est que c'est toujours drole de relire des choses datant de 2003 malgre un
style...deplorable :).</p>

<p>Bref, au lieu de sortir des platitudes, je vais m'arreter la et partir en
week-end :). </p>

<p>A bientot les copaing !</p>


</div>
</div>
]]>
</content>
</entry>

<entry>
<title>Path make-kpkg for uImage support</title>
<link rel='alternate' type='text/html' href='http://geekboy.fr/make-kpkg-support-for-uimage'/>
<id>tag:geekboy.fr,2011-03-21:/make-kpkg-support-for-uimage</id>
<updated>2011-08-28T17:52:56+02:00</updated>
<content type='html'>
<![CDATA[<div id='post' class='item entry'>
<div class='itemtext'>


<p>If you happen to work/tinker with Linux embeded devices, you must know that
uImage is the U-Boot image format.
And, maybe, you will need to compile your kernel, using your toolchain and cross
compilation tools of choices, you have successfully compiled your kernel.
Congrats ! (If you don't know how to get here, search on Google, you'll find
        tons of tutorials.)</p>

<p>Now, if you happen to have a Debian on your devices, you would like to build a
cool .deb package with your kernel. </p>

<p>This way, you could install it with a simple :
<pre><code>dpkg -i mykernel.deb</pre></code></p>

<p>Luckily for you, this is easily done using make-kpkg, a tool from the
kernel-packages. But.. is it ?
Not actually as there is no support for uImage format :/.</p>

<p>So here is <a
href="http://geekboy.fr/repository/0001_make-kpkg_support-uimage.diff">a little
patch</a> (it was sent to Manoj Srivasta, but he did not answered yet !)</p>

<p>This patch was originally written by &quot;Luc&quot; on <a
href="http://lacie-nas.org">#lacie-nas</a>. He did all the hard work !). 
I just rewrote a few parts and add some glitter here and there.</p>

<p>Well, with this, you should be able to compile your own uImage kernel now !</p>

<p>If you don't want to patch make-kpkg, yon can install this <a
href="http://geekboy.fr/repository/kernel-package_12.036_all.deb">.deb</a>
package, I made from my Ubuntu, I did not test it with Debian but I think it
<em>SHOULD</em> work.</p>

<p>Happy hacking !</p>


</div>
</div>
]]>
</content>
</entry>

<entry>
<title>How I switched and why.</title>
<link rel='alternate' type='text/html' href='http://geekboy.fr/how-i-switched-and-why'/>
<id>tag:geekboy.fr,2011-03-11:/how-i-switched-and-why</id>
<updated>2011-08-28T17:52:56+02:00</updated>
<content type='html'>
<![CDATA[<div id='post' class='item entry'>
<div class='itemtext'>


<p>As promised yesterday, here is why, and <em>how</em> I changed from
WordPress.<br /></p>

<h2>Why change ?</h2>

<p>It's a valid question, WordPress is an excellent platform and there isn't much
to add to it.</p>

<p>But I was feeling very tired of updating it every two weeks or so because of a
security update.  It made me remember my days with Windows and their so-called
security fixes!</p>

<p>Also, it was heavy. Heavy on the server, heavy on the browser. I mean... we are
in 2011, we have big and powerful machines and it is still deadly slow. To
load...a f****** blog?!?  In what dimension please?</p>

<p>I installed cache plugins, rules to avoid harassing the server too much, even
fine-tuned the MySQL server. Maxime Petazzoni (who is kindly hosting me)
regularly had 10+k files created in <tt>/tmp</tt> from one of these plugins.
And I don't even get that many hits!  It was all non sense. I am not at the
services of WordPress, it's the other way around!</p>

<p>WP is suffering from the Microsoft syndrome: too many users to make happy, too
much legacy to bear with it. It just becomes bloated and wide open to
attacks as many hackers are looking for them.</p>

<p>And so my quest began for a simple blog, that would handle my posts <em>in
plain text</em> and would generate static files so it would be quick. I was
even ready to give up on the comments!  Such a disappointment... everything I
found was in Ruby! RUBY FOR GOD SAKE!  If you don't get it, it's like doing a
new lightweight kernel focused on performance, and writing it in Java, or doing
a new 3DS Max in Flash.  It's pure madness to me... I really liked what I saw
when I read about Jekyll until I found out the requirements.  To me, Ruby is
just another excuse to hide everything behind a layer of magic and this leading
to that, your computer shop can sell you another 4Gb of RAM. I don't even think
it's great to start programming... anyway.</p>

<p>So I realised I had to code the engine I wanted to be happy with it. I wanted
to make it in C at first, then thought it would take me more time that I can
spare on such a project and would also be a pain in the ass to compile and run
on any other hosting.  So I went with the good ol' PHP.</p>

<p>I tried to make everything as fast and as smooth as I could. Bear in mind, I
made it for me and maybe some power users, it's not really tailored for any end
users (if you can use it, I'm really glad though).</p>

<h2>How to migrate from WordPress?</h2>

<p>I just needed to take the content of my posts and write it in files with the
correct naming convention.  Believe it or not, what took me a LOT of time to
figure out, was the RewriteRule set for Apache. I'm a lazy geek and do not like
to bloat my code with something already done by brilliant people.</p>

<p>I digress...</p>

<p>A simple &quot;mixing&quot; software was able to do that for me. I then looked for a
solution for the comments, that's when I found about the new version of Disqus
which is REALLY good! I used a previous version on a little Tumblr blog when I
was in South Korea, it was not that good, buggy and lost some data :/.</p>

<p>But no, it was a breeze to import the comments from WP. I just needed to geek
out a little script to create a CSV file mapping the old URLs and the new ones.
Once it was done, all the rest is magic :).</p>

<p>So right now, you are served static HTML with a just a sip of Javascript. I
essentially went back from web 2.0 to web 0.9 :) The best part is that I have
exactly the same functions I used in WP but now it's quick and I can easily
hack anything I want.</p>

<p>If you have any questions or opinion on the code of Volatile, send me an email
or better, post a comment.  I will happily reply!</p>


</div>
</div>
]]>
</content>
</entry>

<entry>
<title>Volatile</title>
<link rel='alternate' type='text/html' href='http://geekboy.fr/volatile'/>
<id>tag:geekboy.fr,2011-03-09:/volatile</id>
<updated>2011-08-28T17:52:56+02:00</updated>
<content type='html'>
<![CDATA[<div id='post' class='item entry'>
<div class='itemtext'>


<p>OHAI !<br />
This is my very first posts with my very own blog engine !<br />
I called it Volatile, in reference to the Volatile keyword in C.</p>

<p>No more &quot;Wordpress 3.X is available !&quot; and no more plugin to update.</p>

<p>The whole concept is about html pages and plain text file. Old school web.</p>

<p>But as I'm a little tired, I will write a big post tomorrow with every
technical<br />
details I can think of and also how I made the swap from WordPress to
Volatile.<br /></p>

<p>If you have any comments, feel free to drop them :)</p>


</div>
</div>
]]>
</content>
</entry>

<entry>
<title>Installing Debian Squeeze (ARM) with QEMU on a Mac</title>
<link rel='alternate' type='text/html' href='http://geekboy.fr/installing-debian-squeeze-arm-with-qemu-on-a-mac'/>
<id>tag:geekboy.fr,2010-12-10:/installing-debian-squeeze-arm-with-qemu-on-a-mac</id>
<updated>2011-08-28T17:52:56+02:00</updated>
<content type='html'>
<![CDATA[<div id='post' class='item entry'>
<div class='itemtext'>


<p>Yesterday, I needed to compile MPD for ARM (git version,  story for another article).
Since it's way more easy to get dependencies satisfied through apt-get rather than building them by hand, I went for the native compiling option instead of a cross-compile tool-chain.
Which I find very unattractive when compiling complex software with lots and lots of dependencies, tool-chain are much more suited for a &quot;one&quot; job like kernel (IMHO).</p>

<p>BUT ! I don't want to pollute my ARM machine with all the dev stuff that I don't need this it's not a machine where I want to compile anything (not much storage for the OS).</p>

<p>So I went for the QEMU solution, QEMU let you create a VirtualMachine of an OS with a virtualized ARM arch.
Thanks to the post of <a href="http://franciscobenitezleon.wordpress.com/2010/02/05/installing-debian-lenny-on-virtualized-arm-arch-with-qemu-on-ubuntu-karmic-koala/">Francisco Benitez Leon</a>, I was able to do it painlessly.
Just a few hints that Francisco omitted in his article, that's why I'm writing this one, well it's a big copy/paste with modifications all over the place.</p>

<p>Since, I'm on a Mac, I'm pretty f**** with qemu-system-arm so went with a VirtualMachine of Ubuntu with QEMU inside it (Inception, remember ?).</p>

<p>So it's going that way :</p>

<ul>
    <li>Install a VM of a Linux OS, don't care what it is, adapt the following command to yours if you don't have apt-get.</li>
    <li>Start it</li>
</ul>

<h2>How to install QEMU ?</h2>

<p>Simple :
<pre><code>$ sudo apt-get install qemu qemu-kvm-extras qemu-arm-static</pre></code></p>

<h2>How to install Debian ARM with QEMU ?</h2>

<p>Download the ARMEL kernel image and installer (initrd image) from this repo :
The actual Debian Squeeze kernel on the official repo are bugged, the network card
will not work with QEMU (only with QEMU as it seems).</p>

<p>So get theses one instead :</p>

<p><pre><code>$ wget <a href="http://people.debian.org/~joeyh/d-i/armel/images/daily/versatile/netboot/initrd.gz">http://people.debian.org/~joeyh/d-i/armel/images/daily/versatile/netboot/initrd.gz</a>
$ wget <a href="http://people.debian.org/~joeyh/d-i/armel/images/daily/versatile/netboot/vmlinuz-2.6.32-5-versatile">http://people.debian.org/~joeyh/d-i/armel/images/daily/versatile/netboot/vmlinuz-2.6.32-5-versatile</a>
</pre></code></p>

<p>Create a disk image but use the raw format so you could mount it on your system after the installation process has finished.
I recommend you much more than just 1G, I went with 5G to be able to build things in the future.</p>

<p><pre><code>$ qemu-img create -f raw hda.img 1G</pre></code></p>

<p><strong>Start QEMU :</strong>
<pre><code>$ qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.26-2-versatile -hda hda.img -initrd initrd.gz -append &quot;root=/dev/ram&quot; -m 256</pre></code></p>

<p>And follow the usual Debian installation instructions and get some coffee, it's slow as hell.</p>

<p>At the end of the installation process you will get a message pointing that Grub hasn’t been installed but don’t worry because QEMU is capable of loading the kernel and initrd images so the machine could boot up.
After the installation has ended you will need another initrd to run the machine, remember that the one previously used contains the Debian installer.
You can get that from the installed distro.</p>

<p>So, mount the created disk on your system (that’s why you needed to create it in raw format) and copy the image from the boot directory.</p>

<p><pre><code>$ sudo mkdir -p /mnt/arm_qemu
$ sudo mount -o loop,offset=32256 hda.img /mnt/arm_qemu
$ sudo cp /mnt/arm_qemu/boot/initrd.img-2.6.26-2-versatile .
$ sudo umount /mnt/arm_qemu
</pre></code></p>

<p><span style="color: #ff0000;"><strong>Important note :</strong></span> On the mount line, you have an offset option, be careful, this one is for a 1G image.
What is this offset ?
You must keep in your mind that hda.img is not a simple partition but a whole drive with a MBR, padding and may be other stuff. So, you can't mount from the bytes 0 until the end of the file.</p>

<h2>How to compute this offset for you ?</h2>

<p>Read your image with fdisk :</p>

<p><pre><code>$ fdisk -ul hda.img</pre></code></p>

<p>You will obtain this :
<pre><code>Disk hda.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x000a51ec
Device Boot      Start         End      Blocks   Id  System
hda.img1   *        2048    15988735     7993344   83  Linux
hda.img2        15990782    16775167      392193    5  Extended
hda.img5        15990784    16775167      392192   82  Linux swap / Solaris
</pre></code></p>

<p>I want to mount the extended partition, that's where / is for me.
So my offset would be : 2048 * 512
2048 : This number is the number of sector where my partition start, but mount will want bytes.
512 : It's the size of one sector. It's given by fdisk, look at the third line.</p>

<p>So in this cases I would do :
<pre><code>$ sudo mount -o loop,offset=$((2048 * 512)) hda.img /mnt/qemu_arm</pre></code></p>

<h2>Start you new Debian</h2>

<p>Once you've done everything, run your machine with :
<pre><code>$ qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.img-2.6.32-5-versatile -hda hda.img -append &quot;root=/dev/sda1&quot;</pre></code></p>


</div>
</div>
]]>
</content>
</entry>

</feed>

