p-MakingAnOSHWLaptop.html (22274B)
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>MakingAnOSHWLaptop</title>
- <meta charset="utf-8">
- <style> * { font-family: arial, sans-serif;
- font-size: 13px;
- line-height: 17px; }ul.indent { list-style-type: none; }ol { list-style-type: none; padding-left:0;}body > ol { counter-reset: first second third fourth fifth sixth seventh eigth ninth tenth eleventh twelth thirteenth fourteenth fifteenth sixteenth; }ol > li:before {content: counter(first) ". " ;counter-increment: first;}ol > ol > li:before {content: counter(first) "." counter(second) ". " ;counter-increment: second;}ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) ". ";counter-increment: third;}ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) ". ";counter-increment: fourth;}ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) ". ";counter-increment: fifth;}ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) ". ";counter-increment: sixth;}ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) ". ";counter-increment: seventh;}ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) ". ";counter-increment: eigth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) ". ";counter-increment: ninth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) ". ";counter-increment: tenth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) "." counter(eleventh) ". ";counter-increment: eleventh;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) "." counter(eleventh) "." counter(twelth) ". ";counter-increment: twelth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) "." counter(eleventh) "." counter(twelth) "." counter(thirteenth) ". ";counter-increment: thirteenth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) "." counter(eleventh) "." counter(twelth) "." counter(thirteenth) "." counter(fourteenth) ". ";counter-increment: fourteenth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) "." counter(eleventh) "." counter(twelth) "." counter(thirteenth) "." counter(fourteenth) "." counter(fifteenth) ". ";counter-increment: fifteenth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) "." counter(eleventh) "." counter(twelth) "." counter(thirteenth) "." counter(fourteenth) "." counter(fifteenth) "." counter(sixthteenth) ". ";counter-increment: sixthteenth;}ol{ text-indent: 0px; }ol > ol{ text-indent: 10px; }ol > ol > ol{ text-indent: 20px; }ol > ol > ol > ol{ text-indent: 30px; }ol > ol > ol > ol > ol{ text-indent: 40px; }ol > ol > ol > ol > ol > ol{ text-indent: 50px; }ol > ol > ol > ol > ol > ol > ol{ text-indent: 60px; }ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 70px; }ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 80px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 90px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 100px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 110px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol { text-indent: 120px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 130px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 140px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 150px; }sub{vertical-align:sub;font-size:smaller}sub{vertical-align:sup;font-size:smaller}h1{font-size: 2.0em;line-height: 120%;} h2{font-size: 1.5em;line-height: 120%;} h3{font-size: 1.17em;line-height: 120%;} h4{line-height: 120%;} h5{font-size: 0.83em;line-height: 120%;} h6{font-size: 0.75em;line-height: 120%;} code{font-family: monospace;}</style>
- </head>
- <body><strong><u>Warning</u></strong>: Being fully Open-Hardware is a pain, even more than fully Open-Source/Free Software, imagine that I can't use USB-stick because they aren’t free/open xD<br>(I'm not like what RMS wants free-software guys to be, which I'm not if it's open well I can at least verify if it's not spying me or something and having a bit of blobs outside the main compoments is okay for me). Oh and stallman.org, fsf.org and gnu.org are non-free so duh open wins.<br><strong>TL;DR</strong> be extremist on open(<strong>then</strong> free) hardware, software <strong>and</strong> mind.<br><br> <h1>Software</h1> <h2>Bugs/issues</h2><ul class="bullet"><li>HDMI stops send signals after some time and can’t reactivate it (maybe my screen is stupid)</li></ul><br> <h2>Links</h2> <h3>Sources</h3><ul class="bullet"><li>U-Boot: <a href="http://git.denx.de/u-boot.git">http://git.denx.de/u-boot.git</a></li><ul class="bullet"><li>sunxi: <a href="https://github.com/linux-sunxi/u-boot-sunxi.git">https://github.com/linux-sunxi/u-boot-sunxi.git</a></li></ul><li>Kernel:</li><ul class="bullet"><li>sunxi: <a href="https://github.com/linux-sunxi/linux-sunxi.git">https://github.com/linux-sunxi/linux-sunxi.git</a></li><li>4.1 stable: <a href="https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/?h=linux-4.1.y">https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/?h=linux-4.1.y</a></li><li>mainline: <a href="https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git">https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git</a></li></ul></ul><br> <h3>Documentation</h3><ul class="bullet"><li>Sata(to get more performance): <a href="https://linux-sunxi.org/SATA">https://linux-sunxi.org/SATA</a></li></ul><br> <h4>Olimex</h4><ul class="bullet"><li>Build instruction, scripts and more: <a href="https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A20/A20-build">https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A20/A20-build</a></li><li>C program for MOD-RTC: <a href="https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A20/A20-OLinuXino-Micro%20with%20MOD-RTC">https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A20/A20-OLinuXino-Micro%20with%20MOD-RTC</a></li></ul><br> <h4>Tizen</h4><ul class="bullet"><li><a href="https://wiki.tizen.org/wiki/Sunxi">https://wiki.tizen.org/wiki/Sunxi</a></li></ul><br> <h2>Todo</h2><ul class="bullet"><li>hack the EEPROM used for mac storage (signing the NAND could be usefull).</li><li>Build a working linux(gentoo for example)</li></ul><br> <h2>Building</h2> <h3>You need</h3><ul class="bullet"><li>Brain, with linux knowledge (Your machine probably doesn’t have one, use your own)</li><li>An A20-OLinuXino (or other board with an allwinner CPU, I use LIME2-4G)</li><li>(recommended) Serial/UART adapter</li></ul><br> <h3>MOD-RTC</h3> <code>$ mkdir MOD-RTC</code> <code>$ wget https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A20/A20-OLinuXino-Micro%20with%20MOD-RTC/RTC.c \</code><a href="https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A20/A20-OLinuXino-Micro%20with%20MOD-RTC/i2c.c">https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A20/A20-OLinuXino-Micro%20with%20MOD-RTC/i2c.c</a> \<br><a href="https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A20/A20-OLinuXino-Micro%20with%20MOD-RTC/i2c.h">https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A20/A20-OLinuXino-Micro%20with%20MOD-RTC/i2c.h</a><br> <code>$ cc *.c</code> <code># cp a.out /bin/rtc_olimex</code>To add synchro at boot (multiuser):<br><ul class="indent"><li># echo '/bin/rtc_olimex -s 2' >> /etc/rc.local</li></ul>NB: Maybe I'll modify the code and just put it in /etc/init.d →apparently there is config available in gentoo(sorry that distro rocks for hacking ;3) for it<br><br> <h2>sunxi u-boot & kernel</h2>I use gentoo so I only have to make u-boot, kernel, put armv7a /armhf stage3. I mainly follow olimex A20-build(found upper).<br> <code>$ export ARCH=arm</code> <code>$ export CROSS_COMPILE=arm-linux-gnueabihf-</code> <h3>u-boot</h3> <code>$ git clone -b sunxi https://github.com/linux-sunxi/u-boot-sunxi.git</code> <code>$ cd u-boot-sunxi/</code>If you have a lime2 board like me:<br><ul class="indent"><li>$ make A20-OLinuXino_Lime2_config</li><li><br></li></ul> <code>$ make</code>(Add -j6 if you have a 4 cores, -j3 if dual)<br>note: u-boot.bin for flash is u-boot-sunxi-with-spl.bin<br> <h3>kernel</h3> <code>$ export INSTALL_MOD_PATH=out</code> <code>$ git clone https://github.com/linux-sunxi/linux-sunxi</code> <code>$ cd linux-sunxi/</code> <code>$ wget https://raw.githubusercontent.com/OLIMEX/OLINUXINO/master/SOFTWARE/A20/A20-build/spi-sun7i.c -O drivers/spi/spi-sun7i.c</code> <code>$ wget https://raw.githubusercontent.com/OLIMEX/OLINUXINO/master/SOFTWARE/A20/A20-build/SPI.patch</code> <code>$ patch -p0 < SPI.patch</code> <code>$ wget https://raw.githubusercontent.com/OLIMEX/OLINUXINO/master/SOFTWARE/A20/A20-build/a20_olimex_defconfig -O arch/arm/configs/a20_olimex_defconfig</code> <code>$ make a20_olimex_defconfig</code>If you want to configure it more:<br> $ make menuconfig<br> <br> <code>$ make uImage modules</code> <code>$ make modules_install</code>(use make -j6 if you have a 4 cores, make -j3 if dual)<br>“The uImage file is located in arch/arm/boot/<br>The kernel modules are located in out/lib/modules/$kernel_version” — olimex<br><br> <h2>Mainline/stable u-boot & kernel</h2>“(this needs to be written)” — netstat’s man page<br><br> <h2>gentoo rootfs</h2> <h3>Partitions</h3> <code>Insert your storage device and use “dmesg” or “lsblk” to have the /dev/sd* or /dev/mmcblk* it will be noted as /dev/sdX and enter as \n</code> <code># fdisk /dev/sdX</code>If you have partitions on it, you can delete them with “d” and then partition number.<br>Create the /boot (I recommend using 16M or greater): n\n p\n 1\n \n +16M\n<br>Put the bootable flag(apparently not mandatory): a<br>Create the / (I generaly use everything or about 4~>16G if I got a big device): n\n p\n 2\n \n \n<br>Use p to print partitions for verifications and then w to write<br> <code># mkfs.vfat /dev/sdX1</code>(gentoo package for it : dosfstools)<br> <code># mkfs.ext4 /dev/sdX2</code> <h3>Time to flash !</h3>NB: use sdX not sdX1 or sdX2 as it's before partions (which is probably why there is a 2048 space before them)<br> <code># dd if=u-boot.bin of=/dev/sdX bs=1024 seek=8</code> <code># mkdir /mnt/sd</code> <code># mount /dev/sdX2 /mnt/sd</code>Put basic rootfs(/mnt/sd/boot is needed) I take gentoo’s stage3 for armv7hf<br> <code># mount /dev/sdX1 /mnt/sd/boot</code> <code># cp linux-sunxi/arch/arm/boot/uImage /mnt/sd/boot/</code>(in /mnt/sd/boot)<br> <code>If you have LIME2:</code><ul class="indent"><li># wget <a href="https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A20/A20-build/scripts_a20_Lime2_34_90_camera_rel_2/script.bin">https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A20/A20-build/scripts_a20_Lime2_34_90_camera_rel_2/script.bin</a> (so not really from scratch)</li><li><br></li></ul>(in linux-sunxi git repository)<br> <code># rm -rf /mnt/sd/lib/modules</code> <code># cp -rfv out/lib/modules /mnt/sd/lib/</code> <code># cp -rfv out/lib/firmware /mnt/sd/lib/</code> <code># sync</code> <code># umount /mnt/sd/boot</code> <code># umount /mnt/sd</code>… And strangely it doesn’t boot (w/ sunxi u-boot & kernel) :’( Here is the last lines I see in my terminal(Serial)<br> <code><6>Waiting for root device /dev/mmcblk0p2...</code> <code>[ 4.571115] Waiting for root device /dev/mmcblk0p2...</code> <code><6>[mmc-msg] sdc0 se ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B</code> <code>[ 4.586967] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timhng LEGACY(SDR12) dt B</code> <code><3>[mmc-err] smc 0 err, cmd 5, RTO</code> <code>[ 4.60715] [mmc-err] smc 0 err, cmd 5, RTO</code> <code><3>[mmc-err] smc 0 err, cmd 5, RTO</code> <code>[ 4.610023] [mmc-err] smc 0 err, cmd 5, RTO</code> <code>[ 4.618331] [mmc-err] s[, * ɱ cmd 5, RTO</code> <code><3>[mmc-err] In data read operation</code> <code>[ 5.102871] [mmc-err] In data read operation</code> <code><6>[mmc-msg] found data error, need to send stop command</code> <code>[ 5.112183] [mmc-msg] found data error, need to send stop command</code> <code><3>[mmc-err] sdc 0 send stop command failed</code> <code>[ 5.122976] [mmc-err] sdc 0 send stop command failed</code> <code><6>[mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B</code> <code>[ 5.141301] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B</code> <code><6>mc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B</code> <code>[ 5.161093] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B</code> <code><3>[mmc-err] smc 0 err, cmd 41, RTO</code> <code>[ 5.175919] [mmc-err] smc 0 err, cmd 41, RTO</code> <code><3>[mmc-err] smc 0 err, cmd 6, RCE</code> <code>[ 5.202707] [mmc-err] smc 0 err, cmd 6, RCE</code> <code><3>[mmc-err] smc 0, nothing to complete, ri 0000002c, mi 00000000</code> <code>[ 5.212789] [mmc-err] smc 0, nothing to complete, ri 0000002c, mi 00000000</code> <code><3>[mmc-err] In data read operation</code> <code>[ 5.222874] [mmc-err] In data read operation</code> <code><6>[mmc-msg] found data error, need to send stop command</code> <code>[ 5.232173] [m[ k u data error, need to send stop command</code> <code><3>[mmc-err] sdc 0 send stop command failed</code> <code>[ 5.242956] [mmc-err] sdc 0 send stop command failed</code> <code><3>mmc0: mmc_sd_init_card() failure (err = -110)</code> <code>[ 5.252279] mmc0: mmc_sd_init_card() failure (err = -110)</code> <code><3>mmc0: error -110 whilst initialising SD card</code> <code>[ 5.261947] mmc0: error -110 whilst initialising SD card</code> <code><6>[mmc-msg] sdc0 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B</code> <code>[ 5.275626] [mmc-msg] sdc0 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B</code> <code><4>mmc0: card claims to support voltages below the defined range. These will be ignored.</code> <code>[ 5.292843] mmc0: card claims to support voltages below the defined range. These will be ignored.</code> <code><4>mmc0: host doesn't support card's voltages</code> <code>[ 5.306334] mmc0: host doesn't support card's voltages</code> <code><3>mmc0: error -22 whilst initialising MMC card</code> <code>[ 5.315723] mmc0: error -22 whilst initialising MMC card</code> <code><6>[mmc-msg] sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B</code> <code>[ 5.329032] [mmc-msg] sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B</code> <code><6>[mmc-msg] sdc0 power off</code> <code>[ 5.340608] [mmc-msg] sdc0 power off</code> <code><6>[mmc-msg] sdc0 power off</code><br> <h1>Hardware</h1> <h2>Olimex</h2><ul class="bullet"><li>A20-OLinuXino-LIME2-4G</li><li>A20-OLinuXino-LIME2-UEXT</li><li>SATA-CABLE-SET (data cable is ~1 cm too short, used an old one)</li><li>MOD-RTC</li><li>MOD-SDMMC (provides a CA-IDC-10-15CM)</li><li>PWR-CABLE</li><li>CABLE-40-40-10CM</li><li>CA-IDC-10-15CM (used for UEXT)</li><li>BA-LIPO-3.7V/6600mAh-W-CA [×2] one last about ~5h with everything at full (mainly compilation stuff) and my power-hungry HDD</li><li>USB-SERIAL-F (very usefull for u-boot and having a shell)</li><li>UEXTx5 (not in use for now)</li></ul>beeing bought :<br><ul class="bullet"><li>LCD-OLinuXino-15.6FHD (beeing bought)</li><li>CABLE-40-40-10CM</li><li>JW-200x10-FM</li></ul> <h2>Storage</h2><ul class="bullet"><li>microSD(non-free, mainly the controler) for booting test OS or dirty OS(android)</li><li>NAND for /boot and debian rootfs used as recovery</li><li>power-hungry HDD(non-free)</li></ul><br>I’m considering using a MMC/eMMC as a replacement to my HDD (MMC[1] is apparently free/open, eMMC apparently have DRM like *SD)<br>*SD are apparently non-open/free[2] (and see bunnie’s work on microSD[3])<br>links:<br><ol class="number"><li><a href="https://en.wikipedia.org/wiki/MultiMediaCard">https://en.wikipedia.org/wiki/MultiMediaCard</a></li><li><a href="https://en.wikipedia.org/wiki/Secure_Digital#Openness_of_specification">https://en.wikipedia.org/wiki/Secure_Digital#Openness_of_specification</a></li><li><a href="http://www.bunniestudios.com/blog/?p=3554">http://www.bunniestudios.com/blog/?p=3554</a> — On Hacking MicroSD Cards</li></ol>Seems like having an open storage is impossible but I’m still looking for it. ;3<br><br>Pinout VGA (if you want to reuse a old connector from dead PC) <a href="https://en.wikipedia.org/wiki/VGA_connector">https://en.wikipedia.org/wiki/VGA_connector</a><br><br> <h1>MISC </h1>GnuSocial updates(RSS+atom is available): <a href="https://loadaverage.org/tag/makinganoshwlaptop">https://loadaverage.org/tag/makinganoshwlaptop</a><br><br><a href="https://dockr.eurogiciel.fr/blogs/embedded/tizen-arm-images-to-renesas/">https://dockr.eurogiciel.fr/blogs/embedded/tizen-arm-images-to-renesas/</a><br> <code></code> <code>root@micro:/boot# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr</code><br> <h2>Big Thanks</h2>To Olimex Ltd. & #olimex/freenode, RzR, leon-anavi, javier__, #Tizen/freenode, novena, debian, gentoo, linux, u-boot, wikipedia, and possibly more ;3<br></body>
- </html>