FooDeas / raspberrypi-ua-netinst

RaspberryPi (minimal) unattended netinstaller
ISC License
220 stars 45 forks source link

Composite video support #136

Closed thijstriemstra closed 1 year ago

thijstriemstra commented 6 years ago

Adds settings:

fixes #133

thijstriemstra commented 6 years ago

I now also use a custom mode (hdmi_cvt=<width> <height> <framerate> <aspect> <margins> <interlace> <rb>) as described on https://www.raspberrypi.org/documentation/configuration/config-txt/video.md

FooDeas commented 6 years ago

Could you amend the docs?

thijstriemstra commented 6 years ago

Yep. But these changes look ok? Haven't tested yet.

thijstriemstra commented 6 years ago

Documented the options.

FooDeas commented 6 years ago

I did some changes and pushed them. I'd be happy if you could do some simple tests.

thijstriemstra commented 6 years ago

@FooDeas I just tested and got a syntax error :( I also managed to reproduce this syntax error locally, would be cool if we had some travis/git pre-commit that checks for syntax errors:

$ bash -n scripts/opt/raspberrypi-ua-netinst/install.sh 
scripts/opt/raspberrypi-ua-netinst/install.sh: line 759: syntax error near unexpected token `fi'
scripts/opt/raspberrypi-ua-netinst/install.sh: line 759: `      if ! config_check "/boot/config.txt" "overscan_left" "${hdmi_overscan_left}"; config_set "/boot/config.txt" "overscan_left" "${hdmi_overscan_left}" >> /boot/config.txt; preinstall_reboot=1; fi'

Fixed the errors in https://github.com/FooDeas/raspberrypi-ua-netinst/pull/136/commits/5127564c55928f19f76a1ab1870b73b3b883cb9e

thijstriemstra commented 6 years ago

Test failed on RPI Zero (first version). Used the following settings:

preset=server
release=stretch
firmware_packages=1
packages=git,unzip,nano,libffi-dev,libi2c-dev,i2c-tools,libbz2-dev,pciutils,libsqlite3-dev,libncurses-dev,usbutils,libusb-dev,libyaml-dev,libts-dev,xz-utils,raspberrypi-sys-mods,bluez
usersysgroups=lpadmin,lp,dialout,input,audio,mail,spi,i2c
hostname=HOST_NAME
userperms_admin=1
root_ssh_pwlogin=0
ssh_pwlogin=0
user_ssh_pubkey=mykey_rsa.pub
timezone=Europe/Amsterdam
locales="en_US.UTF-8,nl_NL.UTF-8"
system_default_locale="en_US.UTF-8"
gpu_mem=512
spi_enable=1
i2c_enable=1
i2c_baudrate=400000
sound_enable=1
sound_usb_enable=1
sound_usb_first=1
userperms_sound=1
camera_enable=1
camera_disable_led=1
usergpio=1
usergpu=1
mirror_cache=CACHE_IP:3142
console_blank=0
quiet_boot=1
disable_raspberries=1
disable_splash=1
cleanup=1
cleanup_logfiles=0

boot_volume_label=foo
username=bar
userpw=foo

ifname=wlan0
wlan_country=NL
wlan_ssid=xxxx
wlan_psk=xxx

hdmi_type=tv
hdmi_disable_overscan=1
console_framebuffer_width=320
console_framebuffer_height=240
hdmi_overscan_left=16
hdmi_overscan_right=16
hdmi_display_rotate=2
hdmi_force_hotplug=0
hdmi_ignore_hotplug=1

And it produced the following config.txt:

[all]
initramfs raspberrypi-ua-netinst/raspberrypi-ua-netinst.cpio.gz
gpu_mem=16
[pi3]
enable_uart=1
hdmi_ignore_edid=0xa5000080
hdmi_drive=2
hdmi_group=1
hdmi_mode=16
disable_overscan=1
overscan_left=16
overscan_right=16
display_rotate=2
framebuffer_width=320
framebuffer_height=240
hdmi_ignore_hotplug=1

So I'm wondering why this wasn't excluded (because I don't want these settings):

hdmi_ignore_edid=0xa5000080
hdmi_drive=2
hdmi_group=1
hdmi_mode=16
thijstriemstra commented 6 years ago

ping @FooDeas, any idea?

FooDeas commented 6 years ago

That's because hdmi_type is set. Setting the hdmi type was introduced to force the output to a specific mode.