|
@@ -35,12 +35,18 @@ sudo docker run --privileged -i -t -v $(pwd)/olinux/:/olinux/ debian/olinux sh .
|
|
|
|
|
|
## Setup SD card device
|
|
|
|
|
|
+Find your device card (with dmesg for instance) and put it in a variable.
|
|
|
+
|
|
|
+
|
|
|
```shell
|
|
|
mmc=/dev/sdc
|
|
|
```
|
|
|
|
|
|
## Partitioning
|
|
|
|
|
|
+Make 2 partitions; one for boot files (kernel, file with custom boot args...),
|
|
|
+and another for root fs.
|
|
|
+
|
|
|
```shell
|
|
|
parted -s ${mmc} mklabel msdos
|
|
|
parted -a optimal ${mmc} mkpart primary fat32 1 16MiB
|
|
@@ -51,20 +57,23 @@ mkfs.ext4 ${mmc}2
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
-
|
|
|
### Boot partition
|
|
|
|
|
|
+Make SD card bootable, add kernel your previously builded and file with
|
|
|
+motherboard paramaters.
|
|
|
+
|
|
|
```shell
|
|
|
mkdir -p /media/usb
|
|
|
dd if=olinux/sunxi/u-boot-sunxi/u-boot-sunxi-with-spl.bin of=${mmc} bs=1024 seek=8
|
|
|
mount ${mmc}1 /media/usb/
|
|
|
-cp olinux/sunxi/script.bin /media/usb/
|
|
|
cp olinux/sunxi/linux-sunxi/arch/arm/boot/uImage /media/usb/
|
|
|
+cp olinux/sunxi/script.bin /media/usb/
|
|
|
```
|
|
|
|
|
|
If you want to do a server without graphical session, you can disable allocated
|
|
|
-ram for graphical card. To do that copy uEnv.txt; This file add custom kernel
|
|
|
-parameters to save 32MB of ram.
|
|
|
+ram for the graphical card. To do that copy uEnv.txt file; This file add custom
|
|
|
+kernel parameters to save 32MB of ram. If you want to use the graphical card;
|
|
|
+don't copy uEnv.txt file.
|
|
|
|
|
|
```shell
|
|
|
cp olinux/sunxi/uEnv.txt /media/usb/
|
|
@@ -73,6 +82,9 @@ umount /media/usb
|
|
|
|
|
|
### Root partition
|
|
|
|
|
|
+Copy the rootfs you previously builded with debootstrap, and add firmware and
|
|
|
+modules build with sunxi kernel.
|
|
|
+
|
|
|
```shell
|
|
|
mount ${mmc}2 /media/usb/
|
|
|
cp -r olinux/debootstrap/* /media/usb/
|
|
@@ -86,6 +98,8 @@ sync
|
|
|
umount /media/usb
|
|
|
```
|
|
|
|
|
|
+That's it !
|
|
|
+
|
|
|
# TODO
|
|
|
|
|
|
- change _Install on a SD card_ to a script ?
|
|
@@ -97,7 +111,8 @@ umount /media/usb
|
|
|
- Because it's quick and easy; tutorial [here](http://www.aossama.com/build-debian-docker-image-from-scratch/)
|
|
|
- Because you shoudn't trust regitry images; demonstration [here](https://joeyh.name/blog/entry/docker_run_debian/)
|
|
|
|
|
|
-# External links
|
|
|
+## External links
|
|
|
+
|
|
|
- [how-to-create-bare-minimum-debian-wheezy-rootfs-from-scratch](http://olimex.wordpress.com/2014/07/21/how-to-create-bare-minimum-debian-wheezy-rootfs-from-scratch/)
|
|
|
- [building-a-pure-debian-armhf-rootfs](http://blog.night-shade.org.uk/2013/12/building-a-pure-debian-armhf-rootfs/)
|
|
|
- [Run-ARM-Binaries-in-Your-Docker-Container-Using-Boot2Docker](http://www.hnwatcher.com/r/1526487/Run-ARM-Binaries-in-Your-Docker-Container-Using-Boot2Docker)
|