MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.68k stars 492 forks source link

Image | Odroid C4 #3500

Closed MichaIng closed 3 years ago

MichaIng commented 4 years ago

Image up for testing: https://dietpi.com/downloads/images/DietPi_OdroidC4-ARMv8-Buster.7z

Linux version: 4.9.218 Debian version: 10/Buster DietPi version: 6.30.0-6.31.0 dev branch, will be updated to stable once v6.31 has been released! Credits: Pre-image by Meveric: https://forum.odroid.com/viewtopic.php?t=38729

Please help us to estimate the stability state and give us a short report here if boot and first run setup went fine or if you faced any issue.


Creating an image request

Formal device information

Is the SBC officially supported by the Debian installer?

If not, is a reliable 3rd party Debian image available for this SBC?

If not, are there install instructions for Debian available?

Vote for this image on FeatHub: https://feathub.com/MichaIng/DietPi/+159

Further info

MichaIng commented 4 years ago

Meveric created a first image: https://oph.mdrjr.net/meveric/images/Buster/

MichaIng commented 4 years ago

Initial support has been added: https://github.com/MichaIng/DietPi/commit/5996c9d5a9ab8c34dbd0509a27f5e8958cc90d6e

MDAR commented 4 years ago

I would like to try the C4 with the view to moving from the C2.

If I can do anything to help, please let me know.

FYI, I have the following hardware that I can test on the devices.

MichaIng commented 4 years ago

@MDAR I'll create a first image soon, would be great if you could test some hardware on it as well, especially since we could add the setup/install steps for those to dietpi-config then as well.

MDAR commented 4 years ago

@MDAR I'll create a first image soon, would be great if you could test some hardware on it as well, especially since we could add the setup/install steps for those to dietpi-config then as well.

@MichaIng No problem at all.

Please let me know when you are ready and what you would like me to test.

It would be great to offer multi LAN configuration or dual HDMI & LCD display options, but we can look at that later.

MichaIng commented 4 years ago

Image up for testing: https://dietpi.com/downloads/images/DietPi_OdroidC4-ARMv8-Buster.7z

Linux version: 4.9.218 Debian version: 10/Buster DietPi version: 6.30.0-6.31.0 dev branch, will be updated to stable once v6.31 has been released! Credits: Pre-image by Meveric: https://forum.odroid.com/viewtopic.php?t=38729

Please help us to estimate the stability state and give us a short report here if boot and first run setup went fine or if you faced any issue.


Related forum topic: https://dietpi.com/phpbb/viewtopic.php?t=7708

MichaIng commented 4 years ago

New image up, hopefully this boots 😉: https://dietpi.com/downloads/images/testing/DietPi_OdroidC4-ARMv8-Buster.7z

cretudorin commented 4 years ago

New image up, hopefully this boots wink: https://dietpi.com/downloads/images/testing/DietPi_OdroidC4-ARMv8-Buster.7z

Tested with multiple sdcards, it doesn't boot

MichaIng commented 4 years ago

Many thanks for testing. Then I'm afraid someone with the device needs to create the image as there seems to be some important package config step skipped when doing this on VM within container. What I found was missing gzipped kernel image creation and missing u-boot flash, which I did manually, respectively by removing the device checks from the package scripts. A pain those exist which makes automated image creation much more complicated...

Steps to do so:

  1. Download Meverics current C4 image: https://oph.mdrjr.net/meveric/images/Buster/Debian-Buster64-1.0~RC1-20200505-C4.img.xz
    • Login: root:odroid
  2. Update all packages and reboot to assure that it is not an issue with the latest version: apt update; apt full-upgrade; reboot
  3. Run dev version of DietPi-PREP:
    bash -c "$(curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/dev/PREP_SYSTEM_FOR_DIETPI.sh)"
    • Choose as well dev branch, required to allow Odroid C4 device detection by DietPi.
  4. Edit /boot/dietpi.txt manually and change DEV_GITBRANCH=dev to DEV_GITBRANCH=master to have the system migrated to stable branch once v6.31 is released.
  5. poweroff
  6. Plug SDcard into another DietPi system and run DietPi-Imager there:
    bash -c "$(curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/dev/.meta/dietpi-imager)"
    • Choose "Drive" as source and select the plugged SDcard.
    • The root partition is always the last one 😉.
    • Choose DietPi_OdroidC4-ARMv8-Buster for image name.
  7. When done you should have an 7zip archive, ready to share.
  8. Assure that the SDcard (still) boots fine by plugging it back into the Odroid C4.
cretudorin commented 4 years ago

Flashed the Meverics image, but it's no longer booting after apt full-upgrade

Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.9.218+.postrm line 291. dpkg: warning: old linux-image-4.9.218+ package post-removal script subprocess returned error exit status 1 dpkg: trying script from the new package instead ...

Full log here

Also remembered I have usb to UART Log here

and for the original DietPi image DietPi_OdroidC4-ARMv8-Buster.7z, the logs are not very useful, DietPi image logs

MichaIng commented 4 years ago

Ah yes I remember this /var/lib/dpkg/info/linux-image-4.9.218+.postrm where a bug is inside.

/etc/kernel/postrm.d/clean_uInitrd contains a faulty last line. To fix the uninstall replace

[ -f /boot/uInitrd-$version ] && rm /boot/uInitrd-$version

with

[ ! -f /boot/uInitrd-$version ] || rm /boot/uInitrd-$version

Interestingly the new version does not contain this file anymore at all.

This this is/was a postrm script, the old kernel files were removed already while the new ones have not been created yet. So you rebooted without any kernel in place.

I have the following idea:

cretudorin commented 4 years ago

I've followed you instructions and successfully created a working image.

There were two issues:

For this one, just skipped the installation of u-boot

I've done it manually with dietpi-drive_manager and then the minimal installation was successful.

Here is the image

MichaIng commented 4 years ago

Interesting, in my case APT just succeeded with the "old" u-boot package staying installed. However it seems to be wrong anyway. But I'll leave it inside DietPi-PREP since I guess Meveric will add it to the repo by times.

it didn't do an automatic disk resize.

Yeah somehow dietpi-fs_partition_resize.service is not enabled on the image, same as dietpi-firstboot 🤔. Did you somehow boot it one time after DietPi-PREP has finished?

cretudorin commented 4 years ago

Yes, I did, had some issues with the sdcards. On the first one fsck failed even though everything seemed to be fine. So should I try again without booting after DietPi-PREP ?

MichaIng commented 4 years ago

I'll create one. I also want to verify that it indeed was just the faulty u-boot image. I recognised that my image had a broken superblock as well and 7zip (from Windows) is not able to open the root partition. Yours opens fine instead. I guess u-boot was too large or I did something wrong when flashing it, breaking parts of the partition table or such, not sure.

cretudorin commented 4 years ago

Well, I'm really confused right now. For some reason I had to flash the same image 3 times because the first 2 times didn't work. I've encountered this issue also with CoreElec so maybe there is also some hardware glitch. Also it finally worked after disconnecting everything from it (HDMI, Ethernet, wifi stick, UART)

I don't know yet what's the problem but it's unstable

MDAR commented 4 years ago

It looks like you chaps are putting in some serious effort.

I'm sorry I've been too busy to join in.

I'll try to find some time tomorrow to give it a try.

@MichaIng Thanks for the tip regarding creating an image, I'll try that as soon as I can.

MichaIng commented 4 years ago

Btw guys, hold on for now. Meveric seems to be busy with the kernel package as well currently. I just wanted to create the new image and the kernel package has been gone while a new linux-libc-dev package appeared in the repo. New kernel packages are ready!

For reference I asked for clarification about the u-boot package: https://forum.odroid.com/viewtopic.php?p=296240#p296240

And about the kernel, were looking for the linux-image-arm64-odroid-c4 package:

MichaIng commented 4 years ago

Updated image with new kernel package and identified two reasons why the old did not boot:

  1. The installed u-boot package is only a placeholder for what will be released for C4 explicitly at a later date and must not be flashed.
  2. I gzipped the kernel manually as this was skipped when booting on VM. However I now saw that the C4 kernel comes already in gzipped version and must only be copied.

Hence the new image should finally boot.

MDAR commented 3 years ago

Hi

I've just recieved and powered up my lovely new C4.

Just one small question, is there a way to activate the HDMI output for the standard terminal?

(I'm adding a desktop to the device so I can address and issue with QLCplus, but after that it would be nice to remove the desktop and go back to a termnal.

(FYI, the 7inch odroid HDMI touch screen is working well with Mate desktop, but no sound from it's speakers)

MichaIng commented 3 years ago

It should be enabled by default, i.e. getty@tty1.service is enabled, which means on tty1 you get a login prompt and as long as there is nothing else attached tty1 should be mapped to the HDMI screen.

A touchscreen with speakers? Check /boot/boot.ini if you see some HDMI/DVI switch setting to toggle HDMI sound output. Check dietpi-config > Audio Options or aplay -l if the HDMI sound device is listed.

MDAR commented 3 years ago

A touchscreen with speaker?

Sure, why not 😉

https://www.odroid.co.uk/odroid-accessories/odroid-displays/odroid-vu7-plus

With these https://www.odroid.co.uk/odroid-accessories/odroid-sound?product_id=936

(or a pair of headphones in the 3.5mm socket)

Check dietpi-config > Audio Options or aplay -l if the HDMI sound device is listed.

Yup... There is an option there for ODROIDHDMI

But still no noise from the beast.. (I tried YouTube, assuing that FireFox would give me some noise of some kind)

It should be enabled by default

There might have been a power issue, so I'll try all this again when I'm done with compiling QLCplus for the Arm7_64

MDAR commented 3 years ago

It should be enabled by default, i.e. getty@tty1.service is enabled, which means on tty1 you get a login prompt and as long as there is nothing else attached tty1 should be mapped to the HDMI screen.

A touchscreen with speakers? Check /boot/boot.ini if you see some HDMI/DVI switch setting to toggle HDMI sound output. Check dietpi-config > Audio Options or aplay -l if the HDMI sound device is listed.

Arrr...

Looks like you have set VU7 support disabled to true by default, I'll change that to false and reboot

MDAR commented 3 years ago

Here's a curious one for you

I've removed MATE desktop and rebooted (Althogh I did forget to change the default login) and it gives me a fully operational MATE desktop when it powers up.

BUT the MATE desktop software isn't shown in the Uninstall list anymore...


I've tweaked the boot.ini file and rebooted, but still no HDMI for the TTY1 output.

Just a blank screen.

I'll try running Chromium, just to see if that gets sent to the HDMI output


Its made a lier of me, the TTY1 is now on the HDMI, but no Chromium. just a load of normal boot up text

MichaIng commented 3 years ago

I've removed MATE desktop and rebooted (Althogh I did forget to change the default login) and it gives me a fully operational MATE desktop when it powers up.

Lol indeed, seems we changed mate-desktop-environment-extra to mate-desktop-environment-core on install but forgot to as well change this on uninstall. So the following should purge MATE:

apt-mark auto mate-desktop-environment-core
apt autopurge

Fixed with: https://github.com/MichaIng/DietPi/commit/832fc3cdce0f2d77dcacd05d417342740b957926

Looks like you have set VU7 support disabled to true by default

Ah sorry, that boot.ini does not come from us, we that what we get from the Meveric image. I did not yet find time to create an own one. Although disabling VU7 by default matches our XU4 boot.ini: https://github.com/MichaIng/DietPi/blob/master/boot_xu4.ini#L27-L28

TTY1 is now on the HDMI, but no Chromium. just a load of normal boot up text

You mean kiosk mode, right? Since enabling it in dietpi-autostart (when installed) leads to autologin and xinit start, you should see at least an error message if anything fails.

MDAR commented 3 years ago

So the following should purge MATE:

Yep, that's cleared it.

Ah sorry, that boot.ini does not come from us

Right ho.... Tell me what I can do to help ....

Since enabling it in dietpi-autostart (when installed) leads to autologin and xinit start

I'm not sure what I've done, but I now have a fully operational terminal via the HDMI.

Would be useful to you if I paste the boot.ini contents? (as I have them)

ODROIDC4-UBOOT-CONFIG

# Default Console Device Setting
setenv condev "console=ttyS0,115200n8"   # on both

# Auto Detection of Monitor settings based on your Screen information
setenv display_autodetect "true"

# HDMI Mode
# Resolution Configuration
#    Symbol             | Resolution
# ----------------------+-------------
#    "480x272p60hz"     | 480x272 Progressive 60Hz
#    "480x320p60hz"     | 480x320 Progressive 60Hz
#    "480p60hz"         | 720x480 Progressive 60Hz
#    "576p50hz"         | 720x576 Progressive 50Hz
#    "720p60hz"         | 1280x720 Progressive 60Hz
#    "720p50hz"         | 1280x720 Progressive 50Hz
#    "1080p60hz"        | 1920x1080 Progressive 60Hz
#    "1080p50hz"        | 1920x1080 Progressive 50Hz
#    "1080p30hz"        | 1920x1080 Progressive 30Hz
#    "1080p24hz"        | 1920x1080 Progressive 24Hz
#    "1080i60hz"        | 1920x1080 Interlaced 60Hz
#    "1080i50hz"        | 1920x1080 Interlaced 50Hz
#    "2160p60hz"        | 3840x2160 Progressive 60Hz
#    "2160p50hz"        | 3840x2160 Progressive 50Hz
#    "2160p30hz"        | 3840x2160 Progressive 30Hz
#    "2160p25hz"        | 3840x2160 Progressive 25Hz
#    "2160p24hz"        | 3840x2160 Progressive 24Hz
#    "smpte24hz"        | 3840x2160 Progressive 24Hz SMPTE
#    "2160p60hz420"     | 3840x2160 Progressive 60Hz YCbCr 4:2:0
#    "2160p50hz420"     | 3840x2160 Progressive 50Hz YCbCr 4:2:0
#    "640x480p60hz"     | 640x480 Progressive 60Hz
#    "800x480p60hz"     | 800x480 Progressive 60Hz
#    "800x600p60hz"     | 800x600 Progressive 60Hz
#    "1024x600p60hz"    | 1024x600 Progressive 60Hz OdroidHDMI screen
#    "1024x768p60hz"    | 1024x768 Progressive 60Hz
#    "1280x800p60hz"    | 1280x800 Progressive 60Hz
#    "1280x1024p60hz"   | 1280x1024 Progressive 60Hz
#    "1360x768p60hz"    | 1360x768 Progressive 60Hz
#    "1440x900p60hz"    | 1440x900 Progressive 60Hz
#    "1600x900p60hz"    | 1600x900 Progressive 60Hz
#    "1600x1200p60hz"   | 1600x1200 Progressive 60Hz
#    "1680x1050p60hz"   | 1680x1050 Progressive 60Hz
#    "1920x1200p60hz"   | 1920x1200 Progressive 60Hz
#    "2560x1080p60hz"   | 2560x1080 Progressive 60Hz
#    "2560x1440p60hz"   | 2560x1440 Progressive 60Hz
#    "2560x1600p60hz"   | 2560x1600 Progressive 60Hz
#    "3440x1440p60hz"   | 3440x1440 Progressive 60Hz
setenv hdmimode "1024x600p60hz"

# Monitor output
# Controls if HDMI PHY should output anything to the monitor
setenv monitor_onoff "true" # true or false

# Overscan percentage
# This value scales down the actual screen size by the percentage below
# valid range is 80 to 100
setenv overscan "100"

# SDR/HDR Configuration
# This forces SDR or HDR modes
# valid options are: sdr hdr auto
setenv sdrmode "auto" 

### voutmode : hdmi or dvi
setenv voutmode "hdmi"
# setenv voutmode "dvi"

# HPD enable/disable option
setenv disablehpd "false"

# Enable/Disable CEC
setenv cec "false"

# Hardkernel ODROID-VU7 support
# By default VU7 support is disabled
# setenv disable_vu7 "true"
 setenv disable_vu7 "false"

# max cpu frequency for little core, A55 in MHz unit
# setenv max_freq_a55 "2016"  # 2.016 Ghz
setenv max_freq_a55 "1908"    # 1.908 GHz, default value
# setenv max_freq_a55 "1800"  # 1.8 Ghz
# setenv max_freq_a55 "1704"  # 1.704 GHz

# max cpu-cores
setenv maxcpus "4"

### Normal HDMI Monitors
if test "${display_autodetect}" = "true"; then hdmitx edid; fi
if test "${hdmimode}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi
if test "${cec}" = "true"; then setenv cec_enable "hdmitx=cec3f"; fi

# VU7 Settings
if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi

# Boot Args
setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a55=${max_freq_a55} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} ${hid_quirks} monitor_onoff=${monitor_onoff} logo=osd0,loaded ${cec_enable} sdrmode=${sdrmode}"

# Set load addresses
setenv dtb_loadaddr "0x1000000"
setenv k_addr "0x1100000"
setenv loadaddr "0x1B00000"
setenv initrd_loadaddr "0x3700000"

# Load kernel, dtb and initrd
fatload mmc ${devno}:1 ${k_addr} Image.gz
fatload mmc ${devno}:1 ${dtb_loadaddr} meson64_odroidc4.dtb
fatload mmc ${devno}:1 ${initrd_loadaddr} uInitrd
fdt addr ${dtb_loadaddr}
# unzip the kernel
unzip ${k_addr} ${loadaddr}

# boot
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
MichaIng commented 3 years ago

I'm not sure what I've done, but I now have a fully operational terminal via the HDMI.

Great to hear.

Would be useful to you if I paste the boot.ini contents? (as I have them)

Of course I can check in in our image as well, but not bad to have it laid out here. Actually the defaults are IMO quite reasonable. I'd probably only style it a bid different, similar as with XU4 one. Earlier or later it would be great to make the settings available via dietpi-config 🤔.

MDAR commented 3 years ago

Thanks for you hard work @MichaIng

I've found some odd things in the chromium-autostart.sh file and I've taken the liberty of adding a Sleep option, to account for the time it take for a local webserver to boot up (In this case an instance of openHAB2)

This is what my C4 files look like now

Chromium-Autostart.sh (including the debugging echo comands)

#!/bin/bash
# Autostart run script for Kiosk mode, based on @AYapejian https://github.com/MichaIng/DietPi/issues/1737#issue-318697621
# - Please see /root/.chromium-browser.init (and /etc/chromium.d/custom_flags) for additional egl/gl init options

# Command line switches https://peter.sh/experiments/chromium-command-line-switches/
# --test-type gets rid of some of the chromium warnings that you may or may not care about in kiosk on a LAN
# --pull-to-refresh=1
# --ash-host-window-bounds="400,300"

# Resolution to use for kiosk mode, should ideally match current system resolution
RES_X=$(sed -n '/^[[:blank:]]*SOFTWARE_CHROMIUM_RES_X=/{s/^[^=]*=//p;q}' /boot/dietpi.txt)
RES_Y=$(sed -n '/^[[:blank:]]*SOFTWARE_CHROMIUM_RES_Y=/{s/^[^=]*=//p;q}' /boot/dietpi.txt)
DELAY=$(sed -n '/^[[:blank:]]*SOFTWARE_CHROMIUM_DELAY=/{s/^[^=]*=//p;q}' /boot/dietpi.txt)

 CHROMIUM_OPTS="--kiosk --test-type --window-size=$RES_X,$RES_Y --start-fullscreen --start-maximized --window-position=0,0"
# CHROMIUM_OPTS="--kiosk --test-type --window-size=$RES_X,$RES_Y --start-fullscreen --start-maximized --window-position=0,0"

# echo $CHROMIUM_OPTS

# If you want tablet mode, uncomment the next line.
# CHROMIUM_OPTS=$CHROMIUM_OPTS+" --force-tablet-mode --tablet-ui --no-sandbox --noerrordialogs"
# echo $CHROMIUM_OPTS

# Add URL for first run:
URL=$(sed -n '/^[[:blank:]]*SOFTWARE_CHROMIUM_AUTOSTART_URL=/{s/^[^=]*=//p;q}' /boot/dietpi.txt)
CHROMIUM_OPTS=$CHROMIUM_OPTS+" --homepage $URL"

# CHROMIUM_OPTS=$CHROMIUM_OPTS+" --app $URL"

# echo $CHROMIUM_OPTS

# Find absolute filepath location of Chromium binary.
FP_CHROMIUM=$(command -v chromium)
#if [[ ! $FP_CHROMIUM ]]; then

# Assume RPi
#FP_CHROMIUM="$(command -v chromium-browser)"

#fi
# echo $FP_CHROMIUM

echo Will atempt to run xinit with $FP_CHROMIUM and these options $CHROMIUM_OPTS

echo Waiting  $DELAY

sleep $DELAY # wait for server / machine to start up

xinit $FP_CHROMIUM $CHROMIUM_OPTS

And here's the slightly alterned dietpi.txt file for completness

# IMPORTANT:
# - This is intended for advanced users, unless you know what you are doing, do not edit this file. Please use the DietPi programs instead.
# - Do not remove uncommented lines, as the items are scraped by DietPi programs, on demand.

#------------------------------------------------------------------------------------------------------
# D I E T - P I
# DietPi-Automation settings, applied on first boot of DietPi only, ONCE!
#------------------------------------------------------------------------------------------------------
##### Language/Regional Options #####
# Locale: eg: "en_GB.UTF-8" / "de_DE.UTF-8" | One entry and UTF-8 ONLY!
AUTO_SETUP_LOCALE=C.UTF-8

# Keyboard Layout eg: "gb" / "us" / "de" / "fr"
AUTO_SETUP_KEYBOARD_LAYOUT=gb

# Timezone eg: "Europe/London" / "America/New_York" | Full list (TZ*): https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
AUTO_SETUP_TIMEZONE=Europe/London

##### Networking Options #####
# Enable Ethernet or WiFi adapter: 1=enable | 0=disable
# - If both Ethernet and WiFi are enabled, WiFi will take priority and Ethernet will be disabled.
# - If using WiFi, please edit dietpi-wifi.txt to pre-enter credentials.
AUTO_SETUP_NET_ETHERNET_ENABLED=1
AUTO_SETUP_NET_WIFI_ENABLED=0

# Force ethernet speeds: 0=automatic speed | 10 = 10Mbit | 100 = 100Mbit etc
# - This is mainly aimed at Pine A64 which may have an HW issue that causes unstable 1Gbit link.
AUTO_SETUP_NET_ETH_FORCE_SPEED=0

# WiFi country code: 2 uppercase character value (e.g. GB US DE JP): https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
AUTO_SETUP_NET_WIFI_COUNTRY_CODE=GB

# Enter your Static Network details below, if applicable.
AUTO_SETUP_NET_USESTATIC=0
AUTO_SETUP_NET_STATIC_IP=192.168.0.100
AUTO_SETUP_NET_STATIC_MASK=255.255.255.0
AUTO_SETUP_NET_STATIC_GATEWAY=192.168.0.1
AUTO_SETUP_NET_STATIC_DNS=9.9.9.9

# Hostname
AUTO_SETUP_NET_HOSTNAME=DietPi

##### Misc Options #####
# Swapfile size to generate: 0=disable | 1=auto (2GB-RAM = size) | 2+=manual (MB)
AUTO_SETUP_SWAPFILE_SIZE=0
# Swapfile location
AUTO_SETUP_SWAPFILE_LOCATION=/var/swap

# Disable HDMI output (and GPU/VPU where supported) for supported devices: RPi, Odroid C1, Odroid C2
AUTO_SETUP_HEADLESS=0

# Unmask (enable) systemd-logind service, which is masked by default on DietPi
AUTO_UNMASK_LOGIND=0

# Custom Script (pre-networking and pre-DietPi install)
# - Allows you to automatically execute a custom script before network is up on first boot.
# - Copy your script to /boot/Automation_Custom_PreScript.sh and it will be executed automatically.
# - Executed script log: /var/tmp/dietpi/logs/dietpi-automation_custom_prescript.log

# Custom Script (post-networking and post-DietPi install)
# - Allows you to automatically execute a custom script at the end of DietPi install.
# - Option 0 = Copy your script to /boot/Automation_Custom_Script.sh and it will be executed automatically.
# - Option 1 = Host your script online, then use e.g. AUTO_SETUP_CUSTOM_SCRIPT_EXEC=https://myweb.com/myscript.sh and it will be downloaded and executed automatically.
# - Executed script log: /var/tmp/dietpi/logs/dietpi-automation_custom_script.log
AUTO_SETUP_CUSTOM_SCRIPT_EXEC=0

##### Software Options #####
# SSH Server Selection: 0=none/custom | -1=Dropbear | -2=OpenSSH
AUTO_SETUP_SSH_SERVER_INDEX=-1

# File Server Selection: 0=none/custom | -1=ProFTP | -2=Samba
AUTO_SETUP_FILE_SERVER_INDEX=0

# Logging Mode Selection: 0=none/custom | -1=RAMlog 1h clear | -2=RAMlog 1h save clear | -3=rsyslog + logrotate
AUTO_SETUP_LOGGING_INDEX=-1
# RAMlog max tmpfs size (MB). 50MB should be fine for single use. 200MB+ for heavy webserver and access log etc.
AUTO_SETUP_RAMLOG_MAXSIZE=50

# Webserver Preference Selection: 0=Apache2 | -1=Nginx | -2=Lighttpd
# - This will be ignored if you have manually selected any webserver stack.
AUTO_SETUP_WEB_SERVER_INDEX=-2

# DietPi-Autostart: 0=Console | 7=Console autologin | 1=Kodi | 2=Desktop autologin | 16=Desktop | 3=RetroPie | 4=OpenTyrian | 5=DietPi-Cloudshell | 6=Amiberry fast boot | 8=Amiberry standard boot | 9=DDX-Rebirth | 10=CAVA Spectrum | 11=Chromium kiosk | 14=Custom autostart service
# - This will be effective on 2nd boot, after firstrun update and installs have been done.
# - Related software titles must be installed either on firstrun installs or via AUTO_SETUP_AUTOMATED=1 + AUTO_SETUP_INSTALL_SOFTWARE_ID (see below).
AUTO_SETUP_AUTOSTART_TARGET_INDEX=0
# Autologin user name
# - This user must exist before firstrun installs, otherwise it will be reverted to root.
# - Applies to all autostart options but: 0, 6, 14 and 16
AUTO_SETUP_AUTOSTART_LOGIN_USER=root

##### Non-interactive Firstrun Setup #####
# On first login, run update, initial setup and software installs without any user input
# - Setting this to "1" is required for below settings to take effect
# - It is HIGHLY recommended to also set CONFIG_BOOT_WAIT_FOR_NETWORK=2, to force infinite wait for network connection during boot and prevent connection timeout errors.
AUTO_SETUP_AUTOMATED=0

# Global Password to be applied for the system
# - Affects user "root" and "dietpi" login passwords, and, all software installed by dietpi-software, that requires a login password
# - WARN: Passwords with any of the following characters are not supported: \"$
AUTO_SETUP_GLOBAL_PASSWORD=Password has been encrypted and secured on rootFS

# Software to automatically install
# - List of available software IDs: https://github.com/MichaIng/DietPi/wiki/DietPi-Software-list
# - Add as many entries as you wish, one each line.
# - DietPi will automatically install all pre-reqs (e.g. ALSA/X11 for desktops etc)
# - E.g. the following (without the leading "#") will install the LXDE desktop automatically on first boot:
#AUTO_SETUP_INSTALL_SOFTWARE_ID=23

#------------------------------------------------------------------------------------------------------
# D I E T - P I
# Misc DietPi program settings
#------------------------------------------------------------------------------------------------------
# DietPi-Survey: 1=opt in | 0=opt out | -1=ask on first call
# - https://dietpi.com/phpbb/viewtopic.php?p=34#p34
SURVEY_OPTED_IN=1

#------------------------------------------------------------------------------------------------------
# D I E T - P I
# DietPi-Config settings
#------------------------------------------------------------------------------------------------------
# CPU Governor: powersave | conservative | ondemand | performance
CONFIG_CPU_GOVERNOR=interactive
# Ondemand Sampling Rate | Min value: 10000 microseconds (10ms)
CONFIG_CPU_ONDEMAND_SAMPLE_RATE=25000
# Ondemand Sampling Down Factor: Samling Rate * Down Factor / 1000 = ms (40 = 1000ms when sampling rate is 25000)
CONFIG_CPU_ONDEMAND_SAMPLE_DOWNFACTOR=40
# Throttle Up Percentage: Percentage of average CPU usage during samling rate at which CPU will be throttled up/down
CONFIG_CPU_USAGE_THROTTLE_UP=50

# CPU Frequency Limits: Disabled=disabled
# - Intel CPUs use a percentage value (%) from 0-100, eg: 55
# - All other devices must use a specific MHz value, eg: 1600
# - Has no effect on RPi, please set "arm_freq" and "arm_freq_min" in config.txt instead.
CONFIG_CPU_MAX_FREQ=Disabled
CONFIG_CPU_MIN_FREQ=Disabled

# Disable Intel-based turbo/boost stepping. This flag should not be required, setting <100% MAX frequency should disable Turbo on Intel CPUs.
CONFIG_CPU_DISABLE_TURBO=0

# System-wide proxy settings
# - Do not modify, you must use dietpi-config > "Network Options: Adapters" to apply
CONFIG_PROXY_ADDRESS=MyProxyServer.com
CONFIG_PROXY_PORT=8080
CONFIG_PROXY_USERNAME=
CONFIG_PROXY_PASSWORD=

# Delay boot until network is established: 0=disabled | 1=10 second wait max (default) | 2=infinite wait
CONFIG_BOOT_WAIT_FOR_NETWORK=1

# Connection timeout in seconds, before G_CHECK_URL assumes the URL is dead. Increase if you have a "flaky" connection or slow DNS resolver.
# - Set this to "0" to allow unlimited time, however this is not recommended to avoid unlimited hanging background scripts, e.g. daily DietPi update check.
# - A negative or non-integer value will result in the default of 10 seconds.
CONFIG_G_CHECK_URL_TIMEOUT=10
# Connection attempts with above timeout each, before G_CHECK_URL is giving up and prompts an error.
# - Any value below "1" or a non-integer value will result in the default of 2 attempts.
CONFIG_G_CHECK_URL_ATTEMPTS=2
# General connection and DNS testing
# - IP to ping when checking network connectivity. Default: 9.9.9.9 (Quad9 DNS IP)
CONFIG_CHECK_CONNECTION_IP=9.9.9.9
# - Domain to ping when checking DNS resolver. Default: dns9.quad9.net (Quad9 DNS domain)
CONFIG_CHECK_DNS_DOMAIN=dns9.quad9.net

# DietPi checks for updates: Allows DietPi to check for updates on a daily basis and boot using a less 1 KiB file download.
CONFIG_CHECK_DIETPI_UPDATES=1

# Network time sync: 0=disabled | 1=boot only | 2=boot + daily | 3=boot + hourly | 4=Daemon + Drift
CONFIG_NTP_MODE=2

# Serial Console: Set to 0 if you do not require serial console.
CONFIG_SERIAL_CONSOLE_ENABLE=0

# Soundcard
CONFIG_SOUNDCARD=hw:0,0

# LCD Panel addon
# - Do not modify, you must use dietpi-config to configure/set options
CONFIG_LCDPANEL=none

# IPv6
CONFIG_ENABLE_IPV6=1

# Prefer IPv4 with APT and wget, NB: This has no effect if IPv6 is disabled anyway!
CONFIG_PREFER_IPV4=1

# APT mirrors which are applied to /etc/apt/sources.list | Values here will also be applied during 1st run setup
# - Raspbian: https://www.raspbian.org/RaspbianMirrors
CONFIG_APT_RASPBIAN_MIRROR=http://raspbian.raspberrypi.org/raspbian
# - Debian: https://www.debian.org/mirror/official#list
CONFIG_APT_DEBIAN_MIRROR=https://deb.debian.org/debian/

# NTP mirror, applied to /etc/ntp.conf
# - For a full list, please see: https://www.ntppool.org/zone/@
# - Please remove the initial integer and full stop from the value (removing "0."), eg: debian.pool.ntp.org
CONFIG_NTP_MIRROR=debian.pool.ntp.org

#------------------------------------------------------------------------------------------------------
# D I E T - P I
# DietPi-Software settings
#------------------------------------------------------------------------------------------------------
# Enter your EmonCMS.org write API key here. It will be applied automatically during EmonPi/Hub install.
# - Eg: SOFTWARE_EMONHUB_APIKEY=b4dfmk2o203mmxx93a
SOFTWARE_EMONHUB_APIKEY=

# VNC Server
SOFTWARE_VNCSERVER_WIDTH=1280
SOFTWARE_VNCSERVER_HEIGHT=720
SOFTWARE_VNCSERVER_DEPTH=16
SOFTWARE_VNCSERVER_DISPLAY_INDEX=1
SOFTWARE_VNCSERVER_SHARE_DESKTOP=0

# ownCloud/Nextcloud
# - Optional username for admin account, the default is 'admin', applied during install
SOFTWARE_OWNCLOUD_NEXTCLOUD_USERNAME=admin
# - Optional data directory, default is "/mnt/dietpi_userdata/owncloud_data" respectively "/mnt/dietpi_userdata/nextcloud_data", applied during install
#   NB: This option is for advanced users. For full compatibility, please keep this options defaults, and, use dietpi-drive_manager to move the DietPi user data location.
SOFTWARE_OWNCLOUD_DATADIR=/mnt/dietpi_userdata/owncloud_data
SOFTWARE_NEXTCLOUD_DATADIR=/mnt/dietpi_userdata/nextcloud_data

# WiFi Hotspot
SOFTWARE_WIFI_HOTSPOT_SSID=DietPi-HotSpot
# - Key requires a minimum of 8 characters
SOFTWARE_WIFI_HOTSPOT_KEY=dietpihotspot
SOFTWARE_WIFI_HOTSPOT_CHANNEL=3

# X.org
# - DPI 96(default) 120(+25%) 144(+50%) 168(+75%) 192(+100%)
SOFTWARE_XORG_DPI=96

# Chromium
SOFTWARE_CHROMIUM_DELAY=30s
SOFTWARE_CHROMIUM_RES_X=1024
SOFTWARE_CHROMIUM_RES_Y=600
SOFTWARE_CHROMIUM_AUTOSTART_URL=http://127.0.0.1:8080

# Home Assistant
# - Optional Python build dependencies and modules, possibly required for certain HA components
#   Space separated list (no quotation!), will be installed together with Home Assistant automatically, if present
SOFTWARE_HOMEASSISTANT_APT_DEPS=
#   Add Python modules with version string at best, e.g.: firstModule==1.2.3 secondModule==4.5.6
SOFTWARE_HOMEASSISTANT_PIP_DEPS=

#------------------------------------------------------------------------------------------------------
# D I E T - P I
# Dev settings
#------------------------------------------------------------------------------------------------------
DEV_GITBRANCH=dev
DEV_GITOWNER=MichaIng

#------------------------------------------------------------------------------------------------------
# D I E T - P I
# Settings, automatically added by dietpi-update
#------------------------------------------------------------------------------------------------------
AUTO_SETUP_ACCEPT_LICENSE=0
MDAR commented 3 years ago

Would you like a copy of the working image? (Complete with openHAB and Node-RED)

MDAR commented 3 years ago

Curiously... this error keeps apprearing when running Chromium in kiosk mode

ERROR:object_proxy.cc(632)] Failed to call method: org.freedesktop.NetworkManager.GetDevices: object_path= /org/freedesktop/NetworkManager: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.NetworkManager was not provided by any .service files
libpng warning: iCCP: known incorrect sRGB profile

Hold on... I think that's related to the landing page I had set, because now that I've navigated away from it, the error has stopped

MDAR commented 3 years ago

(FYI, the 7inch odroid HDMI touch screen is working well with Mate desktop, but no sound from it's speakers)

FYI

Appears to be sound from the 3.5mm headphone socket or speaker now. 😃

Again, not sure what I've done to get it going.

Maybe I just had to wait, as I haven't adjusted anthing to do with sound

MichaIng commented 3 years ago

org.freedesktop.NetworkManager.GetDevices

Whatever its trying here, NetworkManager is not installed on DietPi, plain ifupdown /etc/network/interfaces is used to setup the network interfaces. A webserver is not required to for Chromium and network interfaces are assured to be available as long as network time sync is enabled (which delays service starts + autologin), else you should simply see some regular "website not reachable" page in Chromium and not an error on startup 🤔. However, glad it's sorted.

MDAR commented 3 years ago

However, glad it's sorted.

It was something to do with the openHAB2 landing page, once I navigated away from that the error messages stopped coming up in the terminal.

Expect ones about the RGB profiles, but it doesn't seem to be affecting the performance, so I'll ignore them.