<commit_before>debian-mini-rpi
===============

Script to build a minimal Debian sd card image.

## Features:
* Supports building Wheezy or Jessie (default) images (specify using the DIST variable)
* Supports building RPi or RPi2 (default) images (specify using the DIST_ARCH variable)
* SSH login: pi/pi
* Host name: raspberrypi-MACADDRESS (e.g. raspberrypi-1a2b3c4d5e6f)
* SSH host keys are generated and saved permanently on first boot
* Automatic mounting of USB storage devices using usbmount
* Automatic resize on first boot (It will auto reboot once on first boot)

## Prerequisites:
On a x86 based Debian system, make sure the following packages are installed:
```
sudo apt-get install build-essential wget git lzop u-boot-tools binfmt-support \
                     qemu qemu-user-static multistrap parted dosfstools
```

## Options
The build process has a few options you can set.
* **DIST**: debian distribution [wheezy, jessie (default), etc]
* **DIST_ARCH**: image architecture [armel (rpi), armhf (rpi2, default)]
* **IMAGE_MB**: Size of the image, 32MB is for the fat boot, which is included in this option (640 default, thus 608MB for the root partition)

## Example: Build an RPi2 Jessie image:
Just use the make utility to build e.g. an debian-jessie-rpi2.img.  Be sure to run this with sudo, as root privileges are required to mount the image.
```
sudo make DIST=jessie DIST_ARCH=armhf IMAGE_MB=1024
```

This will install the firmware, compile the kernel, bootstrap Debian and create a 1024MB img file, which then can be transferred to a sd card (e.g. using dd):<commit_msg>Shoudl always clean before a build<commit_after>debian-mini-rpi
===============

Script to build a minimal Debian sd card image.

## Features:
* Supports building Wheezy or Jessie (default) images (specify using the DIST variable)
* Supports building RPi or RPi2 (default) images (specify using the DIST_ARCH variable)
* SSH login: pi/pi
* Host name: raspberrypi-MACADDRESS (e.g. raspberrypi-1a2b3c4d5e6f)
* SSH host keys are generated and saved permanently on first boot
* Automatic mounting of USB storage devices using usbmount
* Automatic resize on first boot (It will auto reboot once on first boot)

## Prerequisites:
On a x86 based Debian system, make sure the following packages are installed:
```
sudo apt-get install build-essential wget git lzop u-boot-tools binfmt-support \
                     qemu qemu-user-static multistrap parted dosfstools
```

## Options
The build process has a few options you can set.
* **DIST**: debian distribution [wheezy, jessie (default), etc]
* **DIST_ARCH**: image architecture [armel (rpi), armhf (rpi2, default)]
* **IMAGE_MB**: Size of the image, 32MB is for the fat boot, which is included in this option (640 default, thus 608MB for the root partition)

## Example: Build an RPi2 Jessie image:
Just use the make utility to build e.g. an debian-jessie-rpi2.img.  Be sure to run this with sudo, as root privileges are required to mount the image.
```
sudo make distclean && sudo make DIST=jessie DIST_ARCH=armhf IMAGE_MB=1024
```

This will install the firmware, compile the kernel, bootstrap Debian and create a 1024MB img file, which then can be transferred to a sd card (e.g. using dd):
{'fraction_non_alphanumeric': 0.08601485148514851, 'fraction_numerical': 0.017326732673267328, 'mean_word_length': 4.442760942760943, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '277493', 'n_tokens_mistral': 1032, 'n_tokens_neox': 924, 'n_words': 445}