Warning: 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
(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.
TL;DR be extremist on open(then free) hardware, software and mind.
Software
Bugs/issues
- HDMI stops send signals after some time and can’t reactivate it (maybe my screen is stupid)
Links
Sources
Documentation
Olimex
Tizen
Todo
- hack the EEPROM used for mac storage (signing the NAND could be usefull).
- Build a working linux(gentoo for example)
Building
You need
- Brain, with linux knowledge (Your machine probably doesn’t have one, use your own)
- An A20-OLinuXino (or other board with an allwinner CPU, I use LIME2-4G)
- (recommended) Serial/UART adapter
MOD-RTC
$ mkdir MOD-RTC
$ wget https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A20/A20-OLinuXino-Micro%20with%20MOD-RTC/RTC.c \
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.h
$ cc *.c
# cp a.out /bin/rtc_olimex
To add synchro at boot (multiuser):
- # echo '/bin/rtc_olimex -s 2' >> /etc/rc.local
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
sunxi u-boot & kernel
I use gentoo so I only have to make u-boot, kernel, put armv7a /armhf stage3. I mainly follow olimex A20-build(found upper).
$ export ARCH=arm
$ export CROSS_COMPILE=arm-linux-gnueabihf-
u-boot
$ git clone -b sunxi https://github.com/linux-sunxi/u-boot-sunxi.git
$ cd u-boot-sunxi/
If you have a lime2 board like me:
- $ make A20-OLinuXino_Lime2_config
$ make
(Add -j6 if you have a 4 cores, -j3 if dual)
note: u-boot.bin for flash is u-boot-sunxi-with-spl.bin
kernel
$ export INSTALL_MOD_PATH=out
$ git clone https://github.com/linux-sunxi/linux-sunxi
$ cd linux-sunxi/
$ wget https://raw.githubusercontent.com/OLIMEX/OLINUXINO/master/SOFTWARE/A20/A20-build/spi-sun7i.c -O drivers/spi/spi-sun7i.c
$ wget https://raw.githubusercontent.com/OLIMEX/OLINUXINO/master/SOFTWARE/A20/A20-build/SPI.patch
$ patch -p0 < SPI.patch
$ wget https://raw.githubusercontent.com/OLIMEX/OLINUXINO/master/SOFTWARE/A20/A20-build/a20_olimex_defconfig -O arch/arm/configs/a20_olimex_defconfig
$ make a20_olimex_defconfig
If you want to configure it more:
$ make menuconfig
$ make uImage modules
$ make modules_install
(use make -j6 if you have a 4 cores, make -j3 if dual)
“The uImage file is located in arch/arm/boot/
The kernel modules are located in out/lib/modules/$kernel_version” — olimex
Mainline/stable u-boot & kernel
“(this needs to be written)” — netstat’s man page
gentoo rootfs
Partitions
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
# fdisk /dev/sdX
If you have partitions on it, you can delete them with “d” and then partition number.
Create the /boot (I recommend using 16M or greater): n\n p\n 1\n \n +16M\n
Put the bootable flag(apparently not mandatory): a
Create the / (I generaly use everything or about 4~>16G if I got a big device): n\n p\n 2\n \n \n
Use p to print partitions for verifications and then w to write
# mkfs.vfat /dev/sdX1
(gentoo package for it : dosfstools)
# mkfs.ext4 /dev/sdX2
Time to flash !
NB: use sdX not sdX1 or sdX2 as it's before partions (which is probably why there is a 2048 space before them)
# dd if=u-boot.bin of=/dev/sdX bs=1024 seek=8
# mkdir /mnt/sd
# mount /dev/sdX2 /mnt/sd
Put basic rootfs(/mnt/sd/boot is needed) I take gentoo’s stage3 for armv7hf
# mount /dev/sdX1 /mnt/sd/boot
# cp linux-sunxi/arch/arm/boot/uImage /mnt/sd/boot/
(in /mnt/sd/boot)
If you have LIME2:
(in linux-sunxi git repository)
# rm -rf /mnt/sd/lib/modules
# cp -rfv out/lib/modules /mnt/sd/lib/
# cp -rfv out/lib/firmware /mnt/sd/lib/
# sync
# umount /mnt/sd/boot
# umount /mnt/sd
… And strangely it doesn’t boot (w/ sunxi u-boot & kernel) :’( Here is the last lines I see in my terminal(Serial)
<6>Waiting for root device /dev/mmcblk0p2...
[ 4.571115] Waiting for root device /dev/mmcblk0p2...
<6>[mmc-msg] sdc0 se ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 4.586967] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timhng LEGACY(SDR12) dt B
<3>[mmc-err] smc 0 err, cmd 5, RTO
[ 4.60715] [mmc-err] smc 0 err, cmd 5, RTO
<3>[mmc-err] smc 0 err, cmd 5, RTO
[ 4.610023] [mmc-err] smc 0 err, cmd 5, RTO
[ 4.618331] [mmc-err] s[, * ɱ cmd 5, RTO
<3>[mmc-err] In data read operation
[ 5.102871] [mmc-err] In data read operation
<6>[mmc-msg] found data error, need to send stop command
[ 5.112183] [mmc-msg] found data error, need to send stop command
<3>[mmc-err] sdc 0 send stop command failed
[ 5.122976] [mmc-err] sdc 0 send stop command failed
<6>[mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 5.141301] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
<6>mc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 5.161093] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
<3>[mmc-err] smc 0 err, cmd 41, RTO
[ 5.175919] [mmc-err] smc 0 err, cmd 41, RTO
<3>[mmc-err] smc 0 err, cmd 6, RCE
[ 5.202707] [mmc-err] smc 0 err, cmd 6, RCE
<3>[mmc-err] smc 0, nothing to complete, ri 0000002c, mi 00000000
[ 5.212789] [mmc-err] smc 0, nothing to complete, ri 0000002c, mi 00000000
<3>[mmc-err] In data read operation
[ 5.222874] [mmc-err] In data read operation
<6>[mmc-msg] found data error, need to send stop command
[ 5.232173] [m[ k u data error, need to send stop command
<3>[mmc-err] sdc 0 send stop command failed
[ 5.242956] [mmc-err] sdc 0 send stop command failed
<3>mmc0: mmc_sd_init_card() failure (err = -110)
[ 5.252279] mmc0: mmc_sd_init_card() failure (err = -110)
<3>mmc0: error -110 whilst initialising SD card
[ 5.261947] mmc0: error -110 whilst initialising SD card
<6>[mmc-msg] sdc0 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 5.275626] [mmc-msg] sdc0 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
<4>mmc0: card claims to support voltages below the defined range. These will be ignored.
[ 5.292843] mmc0: card claims to support voltages below the defined range. These will be ignored.
<4>mmc0: host doesn't support card's voltages
[ 5.306334] mmc0: host doesn't support card's voltages
<3>mmc0: error -22 whilst initialising MMC card
[ 5.315723] mmc0: error -22 whilst initialising MMC card
<6>[mmc-msg] sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 5.329032] [mmc-msg] sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
<6>[mmc-msg] sdc0 power off
[ 5.340608] [mmc-msg] sdc0 power off
<6>[mmc-msg] sdc0 power off
Hardware
Olimex
- A20-OLinuXino-LIME2-4G
- A20-OLinuXino-LIME2-UEXT
- SATA-CABLE-SET (data cable is ~1 cm too short, used an old one)
- MOD-RTC
- MOD-SDMMC (provides a CA-IDC-10-15CM)
- PWR-CABLE
- CABLE-40-40-10CM
- CA-IDC-10-15CM (used for UEXT)
- BA-LIPO-3.7V/6600mAh-W-CA [×2] one last about ~5h with everything at full (mainly compilation stuff) and my power-hungry HDD
- USB-SERIAL-F (very usefull for u-boot and having a shell)
- UEXTx5 (not in use for now)
beeing bought :
- LCD-OLinuXino-15.6FHD (beeing bought)
- CABLE-40-40-10CM
- JW-200x10-FM
Storage
- microSD(non-free, mainly the controler) for booting test OS or dirty OS(android)
- NAND for /boot and debian rootfs used as recovery
- power-hungry HDD(non-free)
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)
*SD are apparently non-open/free[2] (and see bunnie’s work on microSD[3])
links:
- https://en.wikipedia.org/wiki/MultiMediaCard
- https://en.wikipedia.org/wiki/Secure_Digital#Openness_of_specification
- http://www.bunniestudios.com/blog/?p=3554 — On Hacking MicroSD Cards
Seems like having an open storage is impossible but I’m still looking for it. ;3
Pinout VGA (if you want to reuse a old connector from dead PC) https://en.wikipedia.org/wiki/VGA_connector
MISC
GnuSocial updates(RSS+atom is available): https://loadaverage.org/tag/makinganoshwlaptop
https://dockr.eurogiciel.fr/blogs/embedded/tizen-arm-images-to-renesas/
root@micro:/boot# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
Big Thanks
To Olimex Ltd. & #olimex/freenode, RzR, leon-anavi, javier__, #Tizen/freenode, novena, debian, gentoo, linux, u-boot, wikipedia, and possibly more ;3