Skip to content

Commit

Permalink
add examples to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Nov 21, 2023
1 parent 49d5db2 commit 046f3e7
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,96 @@

Manages features specific to [raspberrypi](https://www.raspberrypi.org/) and
related fruit flavored hardware.

## /boot/cmdline.txt

### puppet

```puppet
class { 'pi::cmdline':
reboot => false, # reboots are problematic for acceptance testing
parameters => {
'coherent_pool=1M' => {},
'bcm2708_fb.fbwidth=0' => {},
'bcm2708_fb.fbswap=1' => {},
},
}
pi::cmdline::parameter { '8250.nr_uarts=0': }
pi::cmdline::parameter { 'coherent_pool=1M': }
pi::cmdline::parameter { 'snd_bcm2835.enable_headphones=0': }
```

### hiera

```yaml
pi::cmdline::reboot: false
pi::cmdline::parameters:
coherent_pool=1M: {}
bcm2708_fb.fbwidth=0: {}
bcm2708_fb.fbswap=1: {}
8250.nr_uarts=0: {}
coherent_pool=1M: {}
snd_bcm2835.enable_headphones=0: {}
```
## /boot/config.txt
### puppet
```puppet
class { 'pi::config':
reboot => false, # reboots are problematic for acceptance testing
fragments => {
'dtoverlay=pps-gpio,gpiopin=4' => {
'order' => 99,
},
'dtparam=i2c_arm=on' => {
'order' => 1,
},
'dtparam=spi=on' => {},
'serial port' => {
# lint:ignore:strict_indent
'content' => @("CONTENT"),
enable_uart=1
init_uart_baud=9600
| CONTENT
# lint:endignore
},
},
}

pi::config::fragment { 'disable_overscan=1': }
pi::config::fragment { 'dtparam=audio=on':
order => 1,
}
pi::config::fragment { 'hdmi_mode=1':
order => 99,
}
pi::config::fragment { 'foo':
content => "hdmi_safe=1\n",
}
```

### hiera

```yaml
pi::config::reboot: false
pi::config::fragments:
dtoverlay=pps-gpio,gpiopin=4':
order: 99
dtparam=i2c_arm=on:
order: 1
dtparam=spi=on: {}
'serial port':
content: |
enable_uart=1
init_uart_baud=9600
disable_overscan=1: {}
dtparam=audio=on:
order: 1
hdmi_mode=1:
order: 99
foo:
content: "hdmi_safe=1\n"
```

0 comments on commit 046f3e7

Please sign in to comment.