Open-Source Software and Hardware Laptop
Je regardais le novena(lui aussi libre), mais qui est trop puissant pour moi maintenant(peut-être pour plus tard). Et trop exotique(je veut pouvoir l’utiliser partout). Quelques pixels viennent avec du matos olimex au hackerspace(un LIME/LIME2 je pense). Et quand mon laptop(bulkeps) récup de 2003/2005 est devenu vraiment lent(469 MB de mémoire vive, presque pas de 3D au moins le FullHD fonctionnait o_O). J’ai donc penser à me faire mon propre laptop avec des pièces venant de olimex(gros merci ;3). J’ai commandé quelques pièces et vut un project de laptop sur le blog de olimex.
Si je devait le refaire, je prendrais des plans de boitier de laptop et l’adapterais à la carte, ça me ferais plus de place dedans et donc mieux disposer les pièces.
Pièces
- Boitier d’un autre laptop
- OLIMEX
- A20-OLinuXino-LIME2-4G
- A20-OLinuXino-LIME2-UEXT
- SATA-CABLE-SET (le cable de donnée est trop court de quelques cm pour moi, j’en ait pris un dans mon stock)
- MOD-RTC
- MOD-SDMMC (CA-IDC-10-15CM inclus)
- PWR-CABLE(utilisé pour faire un cable d’alim USB)
- CABLE-40-40-10CM [×2](A20-OLinuXino-LIME2-UEXT & LCD-OLinuXino-15.6FHD)
- CA-IDC-10-15CM (utilisé pour le MOD-RTC)
- BA-LIPO-3.7V/6600mAh-W-CA [×2] Une seule dure ~5h avec tout à fond (Compil’) et mon HDD gourmand
- USB-SERIAL-F (très utile pour u-boot et avoir un shell)
- UEXTx5 (pas encore utilisé)
- ancien connecteur VGA (J’ai désoudé celui de bulkeps, H_SYNC et V_SYNC devront être pris de LCD_CON ou bricolé)
Construction Matérielle
J’ai trouvé assez de place en hauteur à la sortie ventilo(la carte chauffe presque pas de toute façon) j’ai donc dégagé la sortie pour les connectiques, couteau pour la « grille », décapeur thermique(un sèche cheveux serait mieux) pour ramolir le plastique du capot/couvercle.
Construction Logicielle
⚠ This doesn’t works ⚠ I take a working one from armbian images, anyway, 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
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 : $ make A20-OLinuXino_Lime2_config
otherwise type $ make help
and hope to find your board in a _config target.
$ make
Tip: add -j6
if you have 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
“The uImage file is located in arch/arm/boot/— Olimex
The kernel modules are located in out/lib/modules/$kernel_version”
Mainline u-boot & kernel
“(this needs to be written)”— netstat(8)
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/sd×
and enter as ⮠(you may need to fix your font) for one-liners
# fdisk /dev/sd×
- 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⮠p⮠1⮠⮠+16M⮠
- 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⮠p⮠2⮠⮠⮠
- Verify everything is okay with
p
w
to write.
# mkfs.vfat /dev/sd×1
Gentoo package for it dosfstools
# mkfs.ext4 /dev/sd×2
Time to flash !
dd if=u-boot.bin of=/dev/sd× bs=1024 seek=8
Note: use sd× not sd×1 or sd×2 as it’s before then (which is probably why there is a 2048 space before them)
# mkdir /mnt/sd
# mount /dev/sd×2 /mnt/sd
Put basic rootfs(/mnt/sd/boot is needed) I take gentoo’s stage3 for armv7hf
# mount /dev/sdX1 /mnt/sd/boot
# cd /mnt/sd/boot
# cp linux-sunxi/arch/arm/boot/uImage .
# wget https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A20/A20-build/scripts_a20_Lime2_34_90_camera_rel_2/script.bin
# cd ~/linux-sunxi
# rm -fr /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
External links
- Etherpad (backup)
- GnuSocial :#MakingAnOSHWLaptop
- Sources
- U-boot
- Kernel
- Documentation
- https://linux-sunxi.org/SATA (to get more performance)
- Olimex
- Tizen