Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add Devuan ASCII #125

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<img src="/logo/380x400.png" alt="Pieman">
</p>

Pieman is a script for creating custom OS images for single-board computers such as Raspberry Pi. The images are based on [Alpine](https://alpinelinux.org) and Debian-based distributions such as [Devuan](https://devuan.org), [Raspbian](https://www.raspberrypi.org/downloads/raspbian/) and [Ubuntu](https://ubuntu.com). The authors of Pieman were inspired by the project named [rpi23-gen-image](https://github.com/drtyhlpr/rpi23-gen-image). The main reason why it was decided to create a new project instead of improving the existing one is that rpi23-gen-image is intended for creating images only for Raspberry Pi 2 and 3 based on Debian GNU/Linux. Unfortunately, it doesn't have a way to be extended to support different operating systems and single-board computers. Improving the situation would require significant efforts to rework the codebase of the project.
Pieman is a script for creating custom OS images for single-board computers such as Raspberry Pi. The images are based on [Alpine](https://alpinelinux.org) and Debian-based distributions such as [Devuan](https://devuan.org), [Raspbian](https://www.raspberrypi.org/downloads/raspbian/), [Ubuntu](https://ubuntu.com) and [Kali Linux](https://www.kali.org/). The authors of Pieman were inspired by the project named [rpi23-gen-image](https://github.com/drtyhlpr/rpi23-gen-image). The main reason why it was decided to create a new project instead of improving the existing one is that rpi23-gen-image is intended for creating images only for Raspberry Pi 2 and 3 based on Debian GNU/Linux. Unfortunately, it doesn't have a way to be extended to support different operating systems and single-board computers. Improving the situation would require significant efforts to rework the codebase of the project.

## Table of Contents

Expand Down Expand Up @@ -53,6 +53,17 @@ Pieman is a script for creating custom OS images for single-board computers such
* bzip2
* xz

* To enable [Das U-Boot](https://github.com/u-boot/u-boot):
* bison
* flex
* make
* mkimage

To install Das U-Boot dependences on Debian or Ubuntu run:
```
$ sudo apt-get install bison flex make u-boot-tools
```

### Supported platforms

Theoretically, Pieman can be run on any GNU/Linux, however, it was very carefully tested only on:
Expand Down Expand Up @@ -157,19 +168,25 @@ The built image will be located in the `build` directory. By the way, you can sp

## Documentation

| | Alpine 3.7 | Devuan 1 «Jessie» | Raspbian 9 «Stretch» | Ubuntu 16.04 «Xenial Xerus» | Ubuntu 18.04 «Bionic Beaver» |
|---------------------------------------------------------------------------------------------|:--------------:|:---------------------:|:---------------------:|:---------------------------:|:----------------------------:|
| Raspberry Pi [Model B and B+](https://www.raspberrypi.org/products/raspberry-pi-1-model-b/) | | | 32bit | | |
| Raspberry Pi [2 Model B](https://www.raspberrypi.org/products/raspberry-pi-2-model-b/) | 32bit | 32bit | 32bit | 32bit | 32bit |
| Raspberry Pi [3 Model B](https://www.raspberrypi.org/products/raspberry-pi-3-model-b/) | 32bit | 32bit | 32bit | | 32bit, 64bit |
| Raspberry Pi [Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/) | | | 32bit | | |
| |Raspberry Pi [Model B and B+](https://www.raspberrypi.org/products/raspberry-pi-1-model-b/) | Raspberry Pi [2 Model B](https://www.raspberrypi.org/products/raspberry-pi-2-model-b/) | Raspberry Pi [3 Model B](https://www.raspberrypi.org/products/raspberry-pi-3-model-b/) |Raspberry Pi [Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/)|
|---------------------------------|:--------------:|:---------------------:|:---------------------:|:---------------------------:|
| Alpine 3.7 | | 32bit | 32bit | |
| Devuan 1 «Jessie» | | 32bit | 32bit | |
| Devuan 2.0.0 ASCII | | 32bit | 64bit | |
| Kali Linux rolling | | | 32bit | |
| Raspbian 9 «Stretch» | 32bit | 32bit | 32bit | 32bit |
| Ubuntu 16.04 «Xenial Xerus» | | 32bit | | |
| Ubuntu 18.04 «Bionic Beaver» | | 32bit | 32bit, 64bit | |

The operating system of the target image is specified via the `OS` environment variable. The next table maps full names of the supported operating systems to their short name intended for using as values of `OS`.

| Full name | Short name |
|----------------------------------------------------------------------------------------------------------------------|------------------------|
| Alpine [3.7](https://alpinelinux.org/posts/Alpine-3.7.0-released.html) (32-bit) | alpine-3.7-armhf |
| Devuan 1 «[Jessie](https://lists.dyne.org/lurker/message/20170525.180739.f86cd310.en.html#devuan-announce)» (32-bit) | devuan-jessie-armhf |
| Devuan 2.0.0 [ASCII](https://devuan.org/os/debian-fork/ascii-stable-announce-060818) (32-bit) | devuan-ascii-armhf |
| Devuan 2.0.0 [ASCII](https://devuan.org/os/debian-fork/ascii-stable-announce-060818) (64-bit) | devuan-ascii-arm64 |
| Kali Linux rolling (32-bit) | kali-rolling-armhf
| Raspbian 9 «[Stretch](https://raspberrypi.org/blog/raspbian-stretch/)» (32-bit) | raspbian-stretch-armhf |
| Ubuntu 16.04 «[Xenial Xerus](https://wiki.ubuntu.com/XenialXerus/ReleaseNotes)» (32-bit) | ubuntu-xenial-armhf |
| Ubuntu 18.04 «[Bionic Beaver](https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes)» (32-bit) | ubuntu-bionic-armhf |
Expand Down
14 changes: 14 additions & 0 deletions bootstrap/14-boot-partition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ for f in ${boot}; do
if [ ! -z `echo ${f} | egrep "^https://|^http://|^ftp://"` ]; then
info "downloading ${f} to ${BOOT}"
wget -q -O ${BOOT}/`basename ${f}` ${f}
elif [[ ${f:0:1} == "^" ]]; then
# Split the name of the target file or directory into two parts:
# original name and copy name.
IFS=':' read -ra FILE_NAMES <<< "${PIEMAN_DIR}/${f:1}"

info "copying ${FILE_NAMES[0]} to ${BOOT}"

if [ -z ${FILE_NAMES[1]} ]; then
# If the name of the copy is not specified, use the original one.
cp -r ${FILE_NAMES[0]} ${BOOT}
else
info "`basename ${FILE_NAMES[0]}` was renamed into ${FILE_NAMES[1]}"
cp -r ${FILE_NAMES[0]} ${BOOT}/${FILE_NAMES[1]}
fi
elif [[ ${f:0:1} == "/" ]]; then
# Split the name of the target file or directory into two parts:
# original name and copy name.
Expand Down
67 changes: 67 additions & 0 deletions devices/rpi-2-b/devuan-ascii-armhf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
Devuan is a systemd-free fork of Debian GNU/Linux which is developed by [Veteran Unix Admins](https://vua.tidyhq.com/). `rpi-2-b/devuan-ascii-armhf` allows building custom 32-bit Devuan [ASCII](https://devuan.org/os/debian-fork/ascii-stable-announce-060818) images for [Raspberry Pi 2 B](https://raspberrypi.org/products/raspberry-pi-2-model-b/).

## What's in the distribution?

<table>
<tr>
<td>Package</td>
<td>Version</td>
</tr>
<tr>
<td colspan="2"><b>Essential components</b></td>
</tr>
<tr>
<td>Linux kernel</td>
<td>4.9</td>
</tr>
<tr>
<td>glibc</td>
<td>2.24</td>
</tr>
<tr>
<td>GCC</td>
<td>6.3.0</td>
</tr>
<tr>
<td>SysVinit</td>
<td>2.88</td>
</tr>
<tr>
<td colspan="2"><b>Development tools</b></td>
</tr>
<tr>
<td>Go</td>
<td>1.7</td>
</tr>
<tr>
<td>PHP</td>
<td>7.0</td>
</tr>
<tr>
<td>Python</td>
<td>3.5.3</td>
</tr>
<tr>
<td>Ruby</td>
<td>2.3.3</td>
</tr>
<tr>
<td colspan="2"><b>Server software</b></td>
</tr>
<tr>
<td>Apache HTTP Server</td>
<td>2.4.25</td>
</tr>
<tr>
<td>Nginx</td>
<td>1.10.3</td>
</tr>
<tr>
<td>PostgreSQL</td>
<td>9.4</td>
</tr>
<tr>
<td>MySQL</td>
<td>5.5.99</td>
</tr>
</table>
62 changes: 62 additions & 0 deletions devices/rpi-2-b/devuan-ascii-armhf/config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

hdmi_drive=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
22 changes: 22 additions & 0 deletions devices/rpi-2-b/devuan-ascii-armhf/pieman.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Maintainer: Polina Popova <[email protected]>

devuan-ascii-armhf:
repos:
- http://auto.mirror.devuan.org/merged
boot:
- config.txt
- /usr/lib/linux-image-4.9.0-*-armmp/bcm2836-rpi-2-b.dtb
- /boot/vmlinuz-4.9.0-*-armmp:zImage
- ^toolset/u-boot/u-boot.bin:kernel7.img
- ^toolset/u-boot/boot.scr
- https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin
- https://github.com/raspberrypi/firmware/raw/master/boot/fixup.dat
- https://github.com/raspberrypi/firmware/raw/master/boot/fixup_cd.dat
- https://github.com/raspberrypi/firmware/raw/master/boot/fixup_x.dat
- https://github.com/raspberrypi/firmware/raw/master/boot/start.elf
- https://github.com/raspberrypi/firmware/raw/master/boot/start_cd.elf
- https://github.com/raspberrypi/firmware/raw/master/boot/start_x.elf
base:
- gnupg
kernel:
package: linux-image-armmp
67 changes: 67 additions & 0 deletions devices/rpi-3-b/devuan-ascii-arm64/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
Devuan is a systemd-free fork of Debian GNU/Linux which is developed by [Veteran Unix Admins](https://vua.tidyhq.com/). `rpi-3-b/devuan-ascii-arm64` allows building custom 64-bit Devuan [ASCII](https://devuan.org/os/debian-fork/ascii-stable-announce-060818) images for [Raspberry Pi 3 B](https://www.raspberrypi.org/products/raspberry-pi-3-model-b/).

## What's in the distribution?

<table>
<tr>
<td>Package</td>
<td>Version</td>
</tr>
<tr>
<td colspan="2"><b>Essential components</b></td>
</tr>
<tr>
<td>Linux kernel</td>
<td>4.9</td>
</tr>
<tr>
<td>glibc</td>
<td>2.24</td>
</tr>
<tr>
<td>GCC</td>
<td>6.3.0</td>
</tr>
<tr>
<td>SysVinit</td>
<td>2.88</td>
</tr>
<tr>
<td colspan="2"><b>Development tools</b></td>
</tr>
<tr>
<td>Go</td>
<td>1.7</td>
</tr>
<tr>
<td>PHP</td>
<td>7.0</td>
</tr>
<tr>
<td>Python</td>
<td>3.5.3</td>
</tr>
<tr>
<td>Ruby</td>
<td>2.3.3</td>
</tr>
<tr>
<td colspan="2"><b>Server software</b></td>
</tr>
<tr>
<td>Apache HTTP Server</td>
<td>2.4.25</td>
</tr>
<tr>
<td>Nginx</td>
<td>1.10.3</td>
</tr>
<tr>
<td>PostgreSQL</td>
<td>9.2</td>
</tr>
<tr>
<td>MySQL</td>
<td>5.5.99</td>
</tr>
</table>
62 changes: 62 additions & 0 deletions devices/rpi-3-b/devuan-ascii-arm64/config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

hdmi_drive=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
22 changes: 22 additions & 0 deletions devices/rpi-3-b/devuan-ascii-arm64/pieman.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Maintainer: Polina Popova <[email protected]>

devuan-ascii-arm64:
repos:
- http://auto.mirror.devuan.org/merged
boot:
- config.txt
- /usr/lib/linux-image-4.9.0-*-arm64/broadcom/bcm2837-rpi-3-b.dtb
- /boot/vmlinuz-4.9.0-*-arm64:zImage
- ^toolset/u-boot/u-boot.bin:kernel8.img
- ^toolset/u-boot/boot.scr
- https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin
- https://github.com/raspberrypi/firmware/raw/master/boot/fixup.dat
- https://github.com/raspberrypi/firmware/raw/master/boot/fixup_cd.dat
- https://github.com/raspberrypi/firmware/raw/master/boot/fixup_x.dat
- https://github.com/raspberrypi/firmware/raw/master/boot/start.elf
- https://github.com/raspberrypi/firmware/raw/master/boot/start_cd.elf
- https://github.com/raspberrypi/firmware/raw/master/boot/start_x.elf
base:
- gnupg
kernel:
package: linux-image-arm64
4 changes: 4 additions & 0 deletions devices/rpi-3-b/kali-rolling-armhf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Kali Linux is a security-focused Debian-based distribution with pre-installed tools for penetration testing.
It is maintained by Offensive Security Ltd. `rpi-3-b/kali-rolling-armhf` allows building custom 32-bit Kali Linux images for [Raspberry Pi 3 B](https://www.raspberrypi.org/products/raspberry-pi-3-model-b/).
## What's in the distribution?
Kali Linux has the rolling release cycle.
Loading