Update the SD card howto

This commit is contained in:
Moritz Schneider 2018-11-28 15:56:38 +01:00 committed by GitHub
parent bdc11db4d0
commit 91fa9db96d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,18 +5,18 @@ The bootloader requires a GPT partition table so you first have to create one wi
```bash
$ sudo fdisk -l # search for the corresponding disk label (e.g. /dev/sdb)
$ sudo sgdisk --clear --new=1:2048:67583 --new=2 --typecode=1:3000 --typecode=2:8300 /dev/sde # create a new gpt partition table and two partitions: 1st partition: 32mb (ONIE boot), second partition: rest (Linux root)
$ sudo sgdisk --clear --new=1:2048:67583 --new=2 --typecode=1:3000 --typecode=2:8300 /dev/sdb # create a new gpt partition table and two partitions: 1st partition: 32mb (ONIE boot), second partition: rest (Linux root)
```
Now you have to make the linux kernel with the [ariane-sdk](https://github.com/pulp-platform/ariane-sdk):
```bash
$ cd /path/to/ariane-sdk
$ make bbl_binary # make the linux kernel with the ariane-sdk repository
$ make bbl.bin # make the linux kernel with the ariane-sdk repository
```
Then the bbl+linux kernel image can get copied to the sd card with `dd`. __Careful:__ use the same disk label that you found before with `fdisk -l` but with a 1 in the end, e.g. `/dev/sdb` -> `/dev/sdb1`.
```bash
$ sudo dd if=bbl_binary of=/dev/sdb1 status=progress oflag=sync bs=1M
$ sudo dd if=bbl.bin of=/dev/sdb1 status=progress oflag=sync bs=1M
```
## Features
@ -30,4 +30,4 @@ $ sudo dd if=bbl_binary of=/dev/sdb1 status=progress oflag=sync bs=1M
- file systems (fat16/fat32)
- elf loader
- zeroing of the `.bss` section of the second stage boot loader
- zeroing of the `.bss` section of the second stage boot loader