[OS] DietPi | Minimal image, highly extensible

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

[OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

Image

DietPi is an extremely lightweight Debian-based OS. It is highly optimised for minimal CPU and RAM resource usage, ensuring your Odroid always runs at its maximum potential.

Use dietpi-software to quick and easy install Ready to Run & Optimised applications for your system. DietPi will do all the necessary configurations, including starting the services.

DietPi is compatible with Odroid XU3/XU4/MC1/HC1/HC2, Odroid C1, Odroid C2, Odroid C4/HC4 and Odroid N2.

Our Odroid images are based on Meveric's Odroid repository and his great work on providing kernel and GPU driver packages, as well as media and gaming software. Check our his images and repository here in the forum or browse our mirror: https://dietpi.com/meveric/

Website: https://dietpi.com/
Download images: https://dietpi.com/#download
Documentation: https://dietpi.com/docs/
Blog: https://dietpi.com/blog/
Forum: https://dietpi.com/phpbb/
GitHub repository: https://github.com/MichaIng/DietPi

DietPi is a free and open-source project. We are be happy if you consider to contribute or donate: https://dietpi.com/contribute.html
Consider to share your donation between DietPi and Meveric.
Last edited by MichaIng on Fri Oct 22, 2021 6:20 am, edited 7 times in total.

harddroid
Posts: 86
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2+
Has thanked: 56 times
Been thanked: 29 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by harddroid »

Can you tell me what is working on the gpu on the n2?
Please be careful with 18V on your odroid n2: viewtopic.php?f=181&t=40692&p=309707#p309707

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

The GPU can do a lot, but what is limiting usability is that it has not X11 support. So X-based application have no hardware acceleration, but still, 1440p videos seem to work fine with Firefox (a bid faster than Chromium). Kodi, DRM/KMS/GBM rendering will be fine.

You should be able to find more examples about what is working how well over in Meverics thread: viewtopic.php?f=179&t=35658
These users thanked the author MichaIng for the post:
harddroid (Wed Oct 14, 2020 10:58 pm)

User avatar
tobetter
Posts: 8462
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 492 times
Been thanked: 1341 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by tobetter »

@MichaIng, is there the DietPi image for ODROID-N2Plus? I've tested image DietPi_OdroidN2-ARMv8-Buster.7z on N2Plus and it does not boot or very unstable. Since N2Plus uses a different SoC revision, it uses the different device tree file meson64_odroidn2_plus.dtb from Hardkernel's 4.9 branch but this file is missing from the image. Please correct me if I am wrong or let me know if there is another OS image.

Code: Select all

--- boot.ini       2021-03-10 11:58:36.000000000 +0900
+++ boot.ini    2021-03-10 12:03:41.295139967 +0900
@@ -110,9 +110,9 @@
 setenv initrd_loadaddr "0x3700000"
 
 # Load kernel, dtb and initrd
-fatload mmc ${devno}:1 ${k_addr} Image.gz
-fatload mmc ${devno}:1 ${dtb_loadaddr} meson64_odroidn2.dtb
-fatload mmc ${devno}:1 ${initrd_loadaddr} uInitrd
+load mmc ${devno}:1 ${k_addr} Image.gz
+load mmc ${devno}:1 ${dtb_loadaddr} meson64_odroid${variant}.dtb
+load mmc ${devno}:1 ${initrd_loadaddr} uInitrd
 fdt addr ${dtb_loadaddr}
 # unzip the kernel
 unzip ${k_addr} ${loadaddr}
These users thanked the author tobetter for the post:
MichaIng (Wed Mar 10, 2021 8:47 pm)

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

I can confirm this as I've installed this dietpi image to a new N2+ and it reboots out of the blue, during dietpi installation, during software installation during copying of files from on drive to the other.
These users thanked the author manilx for the post:
MichaIng (Wed Mar 10, 2021 8:47 pm)
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

Many thanks for the heads up. The new kernel package with the additional device tree is installed already on first boot, but the boot.ini does not load it, hence needs to be updated with the ${variant}. fatload is btw correct since we have a FAT /boot file system.
manilx wrote:
Wed Mar 10, 2021 6:53 pm
I can confirm this as I've installed this dietpi image to a new N2+ and it reboots out of the blue, during dietpi installation, during software installation during copying of files from on drive to the other.
Could you try this out:

Code: Select all

sed -i 's/meson64_odroidn2.dtb/meson64_odroid\${variant}.dtb/' /boot/boot.ini
or change meson64_odroidn2.dtb to meson64_odroid${variant}.dtb manually in /boot/boot.ini. /boot/meson64_odroidn2_plus.dtb should be present already, if the first run installs went through at least. Otherwise apt full-upgrade would do it, if stability permits.

I'll update the image ASAP.

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

After running the command

Code: Select all

sed -i 's/meson64_odroidn2.dtb/meson64_odroid\${variant}.dtb/' /boot/boot.ini
my /boot/boot.ini looks like this:
Is this OK now?

Code: Select all

ODROIDN2-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
#    "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 "1080p60hz"

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

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

# HPD enable/disable option
setenv disablehpd "false"

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

# max cpu frequency for big core, A73 in MHz unit
# setenv max_freq_a73 "2004"  # 2.004 GHz
# setenv max_freq_a73 "1992"  # 1.992 GHz
# setenv max_freq_a73 "1908"  # 1.908 GHz
setenv max_freq_a73 "1800"  # 1.8 GHz, default value
# setenv max_freq_a73 "1704"  # 1.704 GHz
 
# max cpu frequency for little core, A53 in MHz unit
# setenv max_freq_a53 "1992"  # 1.992 GHz
setenv max_freq_a53 "1896"  # 1.896 GHz, default value
# setenv max_freq_a53 "1704"  # 1.704 GHz


# max cpu-cores
# Note:
# CPU's 0 and 1 are the A53 (small cores)
# CPU's 2 to 5 are the A73 (big cores)
# Lowering this value disables only the bigger cores (the last cores).
# setenv maxcpus "4"
# setenv maxcpus "5"
setenv maxcpus "6"

### Normal HDMI Monitors
if test "${display_autodetect}" = "true"; then hdmitx edid; fi
if test "${hdmimode}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; 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_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} disablehpd=${disablehpd} ${hid_quirks} ${cmode} overscan=${overscan} cvbscable=${cvbscable}"



# 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_odroid${variant}.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}
Last edited by manilx on Wed Mar 10, 2021 9:07 pm, edited 2 times in total.
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

Yes, that is correct. Failsafe: Assure that /boot/meson64_odroidn2_plus.dtb is present.

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

can't find anything like that in the boot.ini (meson64_odroidn2.dtb).
/boot/meson64_odroidn2_plus.dtb is present

EDIT: found it fatload mmc ${devno}:1 ${dtb_loadaddr} meson64_odroid${variant}.dtb
Last edited by manilx on Wed Mar 10, 2021 9:07 pm, edited 2 times in total.
Manfred Ell

User avatar
tobetter
Posts: 8462
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 492 times
Been thanked: 1341 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by tobetter »

MichaIng wrote:
Wed Mar 10, 2021 8:58 pm
Yes, that is correct. Failsafe: Assure that /boot/meson64_odroidn2_plus.dtb is present.
I think "meson64_odroidn2_plus.dtb" is missing in the FAT partition in the Buster image or is the somewhere elese? I've not checked other directory. :) By the way, "load" commands in the boot script will work for FAT/EXT2/3/4 while "fatload" will work for only FAT partition.

EDIT: sorry, meson64_odroidn2_plus.dtb is present...something different what I've tried today. :lol:

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

Image
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

tobetter wrote:
Wed Mar 10, 2021 9:02 pm
I think "meson64_odroidn2_plus.dtb" is missing in the FAT partition in the Buster image or is the somewhere elese? I've not checked other directory. :) By the way, "load" commands in the boot script will work for FAT/EXT2/3/4 while "fatload" will work for only FAT partition.
It's missing on the image, but when booting it, as long as it succeeds once and doesn't crash too early ;), it auto-upgrades all packages, including the kernel, which then pulls the N2+ device tree. Thanks for the hint about load vs fatload: I thought so, however since our image ships as a full drive image with FAT /boot partition, I think it's okay to be explicit here. But just in case users are tinkering with it, merging the partitions manually or migrating from FAT to ext4 (to allow symlinks + POSIX permissions or such), load might be the better default indeed. I'll think about it.

User avatar
tobetter
Posts: 8462
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 492 times
Been thanked: 1341 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by tobetter »

MichaIng wrote:
Wed Mar 10, 2021 9:13 pm
tobetter wrote:
Wed Mar 10, 2021 9:02 pm
I think "meson64_odroidn2_plus.dtb" is missing in the FAT partition in the Buster image or is the somewhere elese? I've not checked other directory. :) By the way, "load" commands in the boot script will work for FAT/EXT2/3/4 while "fatload" will work for only FAT partition.
It's missing on the image, but when booting it, as long as it succeeded once and didn't crash too early ;), it auto-upgrades all packages, including the kernel, which then pulls the N2+ device tree. Thanks for the hint about load vs fatload: I thought so, however since our image ships as a full drive image with FAT /boot partition, I think it's okay to be explicit here. But just in case users are tinkering with it, merging the partitions manually or migrating from FAT to ext4 (to allow symlinks + POSIX permissions or such), load might be indeed the better default indeed. I'll think about it.
That makes sense, maybe it was failed to update the newer package when I tested this morning so I was not able to find out the dtb file for N2Plus.

Small request, if you have a chance to update boot.ini, please add one line like this to present your OS for the Petitboot users.

Code: Select all

setenv bootlabel "Android Pie (64Bit)"

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

I just got aware of the SPI bootloader on Odroid C4/HC4. Usually I would have recommended to purge petitboot so that U-Boot from the FAT partition is loaded in the first place. But that breaks multi-boot of course. In the other case petitboot was not able to boot the DietPi image first, but only after pb-update. Does the bootlabel solve this as it instructs petitboot to add it to the OS selection menu?

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

Added the following to my boot.ini:

Code: Select all

#present OS for the Petitboot users
setenv bootlabel "DietPie (64Bit)"
The boot menu is shown and it boots automatically into dietpi. It takes quite a while for the usb-ssd to be recognized.
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

Image has been updated, including latest DietPi and package versions, Odroid N2+ device tree and boot.ini the loads it correctly + sets the bootlabel to "DietPi (64-bit)". Would be awesome if you could give it a try: https://dietpi.com/downloads/images/Die ... -Buster.7z
These users thanked the author MichaIng for the post:
manilx (Thu Mar 11, 2021 12:55 am)

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

MichaIng wrote:
Wed Mar 10, 2021 10:54 pm
Image has been updated, including latest DietPi and package versions, Odroid N2+ device tree and boot.ini the loads it correctly + sets the bootlabel to "DietPi (64-bit)". Would be awesome if you could give it a try: https://dietpi.com/downloads/images/Die ... -Buster.7z
Will burn onto SD and try out now.
These users thanked the author manilx for the post:
MichaIng (Wed Mar 10, 2021 11:00 pm)
Manfred Ell

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

There is another setting which needs to be changed for the N2+ the default/supported frequencies:
https://wiki.odroid.com/odroid-n2/hardware/overclocking

The values in boot.ini are for the N2
Manfred Ell

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

Installed the new image to a SD card. After booting I installed all needed software. Went without problems (were I before had multiple reboots in the middle of installation).
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

Thanks for the hint. I'll re-arrange the frequencies part to show all available ones for both models, have the setting commented by default and added to cmdline only if set, like so:

Code: Select all

# Max CPU frequency for big A73 cores in MHz
# - Valid values on Odroid N2: 500, 667, 1000, 1200, 1398, 1512, 1608, 1704, 1800 (default), 1908, 2004
# - Valid values on Odroid N2+: 500, 667, 1000, 1200, 1398, 1512, 1608, 1704, 1800, 1908, 2016, 2100, 2208 (default), 2304, 2400
#setenv max_freq_a73 "2004"
 
# Max CPU frequency for small A53 cores in MHz
# - Valid values on Odroid N2: 100, 250, 500, 667, 1000, 1200, 1398, 1512, 1608, 1704, 1896 (default), 1992
# - Valid values on Odroid N2+: 500, 667, 1000, 1200, 1398, 1512, 1608, 1704, 1800, 1908 (default), 2016
#setenv max_freq_a53 "1992"
...
# Apply CPU frequencies if assigned
if test "${max_freq_a73}"; then setenv a73_freq "max_freq_a73=${max_freq_a73}"; fi
if test "${max_freq_a53}"; then setenv a53_freq "max_freq_a53=${max_freq_a53}"; fi
...
setenv bootargs "... ${a73_freq] ${a53_freq}"
Or we skip that "if test" part and in case apply empty values to the cmdline, which would not hurt as they are reverted to defaults anyway, if not valid? But I like to be explicit, where possible ;).

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

Can you provide all the text I need to paste into boot.ini please.
Or the complete new boot.ini

I'm really not big into linux :(
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

Here you go: https://github.com/MichaIng/DietPi/blob/dev/boot_n2.ini
Image repacked accordingly + I enabled the serial getty (login console) on ttyS0 by default which was missing.
Last edited by MichaIng on Thu Mar 11, 2021 1:16 am, edited 1 time in total.
These users thanked the author MichaIng for the post (total 2):
manilx (Thu Mar 11, 2021 7:45 am) • odroid (Thu Mar 11, 2021 9:49 am)

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

Thank you!!
Manfred Ell

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

Unfortunately I still get the occasional reboot under heavy (usb) load (copying plex database 20GB from one ssd to the OS ssd).....
Less so than before but still out of the blue.
Manfred Ell

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

I finally received the MMC. Cloned my SD to it (running yesterdays dietpi image) switched to direct boot from it and have all running now.
Hope it'll be stable from now on.
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

*Pressing thumbs*

I ported a few other boot options from Meverics awesome boot and config scripts, notably CEC and Wake-on-LAN support + support for the optional device tree overlays found in /boot/overlays/odroidn2/ to enable further hardware features like UART, I2C, SPI and support for the Hardkernel TFTs: https://github.com/MichaIng/DietPi/comm ... 55a8d7ccce
Full file: https://raw.githubusercontent.com/Micha ... oot_n2.ini

I'll further sort and document all options and clearer separate them into an upper part, that can be safely edited by users, and a lower part which assures that all chosen options are applied correctly and does the kernel, device tree and initramfs loading and boot. Next step is to integrate all into dietpi-config. That would be for all Odroids we support, excluding only C1 where the mainline kernel is used.
Last edited by MichaIng on Tue Mar 23, 2021 7:26 pm, edited 1 time in total.
These users thanked the author MichaIng for the post:
manilx (Fri Mar 12, 2021 5:44 pm)

User avatar
tobetter
Posts: 8462
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 492 times
Been thanked: 1341 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by tobetter »

MichaIng wrote:
Fri Mar 12, 2021 4:54 am
*Pressing thumbs*

I ported a few other boot options from Meverics awesome boot and config scripts, notably CEC and Wake-on-LAN support + support for the optional device tree overlays found in /boot/overlays/odroidn2/ to enable further hardware features like UART, I2C, SPI and support for the Hardkernel TFTs: https://github.com/MichaIng/DietPi/comm ... 55a8d7ccce
Full file: https://raw.githubusercontent.com/Micha ... oot_n2.ini

I'll further sort and document all options and clearer separate them into an upper part, that can be safely edited by users, and a lower part which assures that all chosen options are applied correctly and does the kernel, device tree and initramfs loading and boot. Next step is to integrate all into dietpi-config. That would be for all Odroids we support, excluding only C1 where the mainline kernel is used.
I am wondering how it is difficult to install DietPi on top of Linux kernel 5.x, is there a script or package that a user can install by oneself?

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

MichaIng wrote:
Fri Mar 12, 2021 4:54 am
*Pressing thumbs*

I ported a few other boot options from Meverics awesome boot and config scripts, notably CEC and Wake-on-LAN support + support for the optional device tree overlays found in /boot/overlays/odroidn2/ to enable further hardware features like UART, I2C, SPI and support for the Hardkernel TFTs: https://github.com/MichaIng/DietPi/comm ... 55a8d7ccce
Full file: https://raw.githubusercontent.com/Micha ... oot_n2.ini

I'll further sort and document all options and clearer separate them into an upper part, that can be safely edited by users, and a lower part which assures that all chosen options are applied correctly and does the kernel, device tree and initramfs loading and boot. Next step is to integrate all into dietpi-config. That would be for all Odroids we support, excluding only C1 where the mainline kernel is used.
Great, thanks!!
I'm sending this one back for replacment.... Will try once I get the new one.
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

@tobetter
https://github.com/MichaIng/DietPi/blob ... _DIETPI.sh
This turns a Debian system into DietPi. But in case of Odroids, one needs to select "Generic device", else it tries to install the kernel packages from Meveric's Odroid APT repository. I'm working on debootstrap-based script as well, but currently it targets Debian Bullseye with the generic Debian kernel.
These users thanked the author MichaIng for the post:
manilx (Fri Mar 12, 2021 10:54 pm)

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

MichaIng wrote:
Fri Mar 12, 2021 7:40 pm
@tobetter
https://github.com/MichaIng/DietPi/blob ... _DIETPI.sh
This turns a Debian system into DietPi. But in case of Odroids, one needs to select "Generic device", else it tries to install the kernel packages from Meveric's Odroid APT repository. I'm working on debootstrap-based script as well, but currently it targets Debian Bullseye with the generic Debian kernel.
Did this on a Vsphere VM, installed debian10 and then run the script. Without issues. Runnig pihole/unbound as DNS server at out company (obviously the first dns servers are windows server acting as domain controllers).
Recommended!!
These users thanked the author manilx for the post:
MichaIng (Fri Mar 12, 2021 8:13 pm)
Manfred Ell

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

tobetter wrote:
Fri Mar 12, 2021 1:18 pm
MichaIng wrote:
Fri Mar 12, 2021 4:54 am
*Pressing thumbs*

I ported a few other boot options from Meverics awesome boot and config scripts, notably CEC and Wake-on-LAN support + support for the optional device tree overlays found in /boot/overlays/odroidn2/ to enable further hardware features like UART, I2C, SPI and support for the Hardkernel TFTs: https://github.com/MichaIng/DietPi/comm ... 55a8d7ccce
Full file: https://raw.githubusercontent.com/Micha ... oot_n2.ini

I'll further sort and document all options and clearer separate them into an upper part, that can be safely edited by users, and a lower part which assures that all chosen options are applied correctly and does the kernel, device tree and initramfs loading and boot. Next step is to integrate all into dietpi-config. That would be for all Odroids we support, excluding only C1 where the mainline kernel is used.
[/quote...

I am wondering how it is difficult to install DietPi on top of Linux kernel 5.x, is there a script or package that a user can install by oneself?
If you try converting debian woth 5.x kernel to dietpi, please let me know how it goes. If OK I'll can do this on the replacement N2+ once I get it
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

The Odroid N2/N2+ will be setup with Linux 4.9 currently, at least when selecting "Odroid N2" as target device. But it's possible to select "Generic Device", with the current development version of the script, even "Generic Amlogic S922X", which will preserve the installed kernel and dtb packages. When you use a Debian Bullseye system, also the generic MESA GPU drivers will work quite well. To run the development version of the script:

Code: Select all

bash -c "$(curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/dev/PREP_SYSTEM_FOR_DIETPI.sh)"
These users thanked the author MichaIng for the post:
manilx (Mon Mar 15, 2021 6:06 am)

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

I will try exactly this once I get the new unit.

Wonder if this works with Armbian, which has been praised here.......
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

Yes it will work with Armbian as well. I forgot to mention that within the script, you need to select "dev" branch as well, else the current master/stable code is installed which does not know the "Generic Amlogic S922X" device yet. But probably we'll release it before you get the N2 :).
These users thanked the author MichaIng for the post:
manilx (Mon Mar 15, 2021 6:43 am)

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

MichaIng wrote:
Mon Mar 15, 2021 6:35 am
Yes it will work with Armbian as well. I forgot to mention that within the script, you need to select "dev" branch as well, else the current master/stable code is installed which does not know the "Generic Amlogic S922X" device yet. But probably we'll release it before you get the N2 :).
We have a plan ;)
Manfred Ell

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

Hi

received the replacement, flashed latest dietpi N2 to emmc and started. The unit is rebooting again all the time, I can't even configure dietpi......

EDIT: installed dietpi over armbian with 4.x kernel as described above. Went well and I could configure all and install the apps.

But while copying my 20gb plexserver data from usb attached ssd to emmc after a while I got another reboot before finishing.
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

There seem to be a general instability in combination with USB currently: https://github.com/MichaIng/DietPi/issues/4188
Good to know that the Armbian kernel is affected as well, so it is the Hardkernel sources: https://github.com/hardkernel/linux/issues/413

Does it reboot in your case as well with no USB device attached? Otherwise it could be related, especially since you faced the issue while copying data to/from USB.

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

MichaIng wrote:
Tue Mar 23, 2021 1:29 am
There seem to be a general instability in combination with USB currently: https://github.com/MichaIng/DietPi/issues/4188
Good to know that the Armbian kernel is affected as well, so it is the Hardkernel sources: https://github.com/hardkernel/linux/issues/413

Does it reboot in your case as well with no USB device attached? Otherwise it could be related, especially since you faced the issue while copying data to/from USB.
Using the dietpi image for N2 it rebooted while installing (at different stages) without any usb connected. Couldn't finish dietpi install.
Using armbian kernel 4 and installing generic dietpi script from dev branch and selecting generic device install ok but copying from usb rebooted.

Also tried installing Armbian kernel 4.x without anything else (dietpi) and all went well and I could copy the data without reboots. But then configuring all by hand is a pain. Got plex working but mounting smb share at boot always tried to mount before network was up (but I included noauto,x-systemd.automount,_netdev).

Without dietpi I'm really not liking it......

Now trying to install dietpi ontop of armbian kernel 5.....
Last edited by manilx on Tue Mar 23, 2021 2:26 am, edited 2 times in total.
Manfred Ell

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

didn't work. Stopped with this:

- Command: mount -o remount /tmp │
│ - Exit code: 32 │
│ - DietPi version: v7.1.0 (MichaIng/master) | HW_MODEL: 22 | HW_ARCH: 3 | DISTRO: 5 │
│ - Error log: │
│ mount: /etc/fstab: parse error at line 28 -- ignored │
│ mount: /etc/fstab: parse error at line 30 -- ignored │
│ mount: /tmp: mount point not mounted or bad option.
Manfred Ell

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

I have now installed the dietpi N2 image several times and tried to install it. N2+ reboots very soon in the install, never was able to set it up.
I also have now several times installed armbian 4.x and 5.x without dietpi. I can install plexerver and then copy my data to it without reboots. (the last problem I had was that the smb share automounts without issue but when I have plex configured and the data restored on the next reboot the share tried to load to soon, probably plexserver wants to access the share when it loads and then the share doesn't load because the network is not up...)
BUT armbian never rebooted in the middle of copies.

So the dietpi image has issues (and the script on top of armbian creates them also).

These are the results of my many many tests.


EDIT: I have been able to install dietpi (and install apps) ontop of armbian 5 (as explained above) using the "Generic Amlogic S922X".
EDIT2: I also have been able to copy all my plex database from usb without a reboot. Working now, we'll see how stable it is once I also do dietpi-backup to usb..
EDIT3: did various dietpi-backups to a couple of different usb-ssd's. Without a problem.

Seems like Armbian kernel 5 with dietpit-dev-script using "Generic Amlogic S922X" is the ticket for the time being.
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

The Armbian 4.x kernel worked fine as well? I'm not sure how close it is, or if it matches the Hardkernel kernel :?. But good that Armbian 5.x works fine. I'll keep an eye on reported issues and rebuild the image as fast as a new kernel is available. Also our boot.ini gets some fixes, although none of those would cause any sorts of instability.

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

MichaIng wrote:
Tue Mar 23, 2021 8:19 pm
The Armbian 4.x kernel worked fine as well? I'm not sure how close it is, or if it matches the Hardkernel kernel :?. But good that Armbian 5.x works fine. I'll keep an eye on reported issues and rebuild the image as fast as a new kernel is available. Also our boot.ini gets some fixes, although none of those would cause any sorts of instability.
No Armbian 4 kernel had issues with rebooting.

If there are fixes for the boot.ini (different from what I have now installed with the dev script) please let me know.
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

Here the fixes: https://github.com/MichaIng/DietPi/comm ... cR129-R151
The syntax to check whether a variable is empty or not is not as simple as in modern shells, so without this, setting the CPU frequency or a dtoverlay had no effect. But this only means that the defaults were applied, which is true as well if an invalid value would be applied, so it's not easy to cause any actual issue with wrong boot arguments ;).

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

OK. Will change existing boot.ini with this.

I can confirm that for now this installation is stable! You can create an img with this.
Please let me know by PM or here when there is a new img. Or change the description in the respective downloade section of dietpi site mentioning this.
Thx!
Manfred Ell

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

O boy.

pasted the content of the new boot.ini into mine (with tabs instead of spaces, don't know if this is a problem) and now the N2 doesn't boot anymore.....

EDIT: could fix it by restoring the backup I did (plugging it in a pie).
Last edited by manilx on Tue Mar 23, 2021 9:30 pm, edited 1 time in total.
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

Code: Select all

I can confirm that for now this installation is stable! You can create an img with this.
You mean the Armbian 5.x base image? Well that would be a complete change of the whole kernel/firmware/driver implementations, that I would only consider when the original one is unfixable broken, which it is not, as there are many Odroid N2 users running it without issues. There are roughly 1000 Odroid N2 systems running DietPi. Many software implementations and config features are relying on the hardware (especially GPU) features and specifically compiled Kodi and other GPU-accelerated applications. Armbian does not support all of this, and even if there were ways with current Mesa drivers (Debian Bullseye), it would mean a huge rework.

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

MichaIng wrote:
Tue Mar 23, 2021 9:26 pm

Code: Select all

I can confirm that for now this installation is stable! You can create an img with this.
You mean the Armbian 5.x base image? Well that would be a complete change of the whole kernel/firmware/driver implementations, that I would only consider when the original one is unfixable broken, which it is not, as there are many Odroid N2 users running it without issues. There are roughly 1000 Odroid N2 systems running DietPi. Many software implementations and config features are relying on the hardware (especially GPU) features and specifically compiled Kodi and other GPU-accelerated applications. Armbian does not support all of this, and even if there were ways with current Mesa drivers (Debian Bullseye), it would mean a huge rework.
This is a N2+, which is a bit different hw.... So if there are so many running this, why doesn't it run here??
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

now the N2 doesn't boot anymore.....
That's the reason: https://github.com/MichaIng/DietPi/comm ... 77a14ab744
Luckily we have a FAT partition :).

Whether tabs or spaces are used for indentation, or no indentation at all, does not matter :).

manilx
Posts: 101
Joined: Tue Mar 09, 2021 12:57 am
languages_spoken: english,german,portuguese
ODROIDs: N2+
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by manilx »

paested this now. Doesn't boot again 🙊
Manfred Ell

User avatar
MichaIng
Posts: 62
Joined: Wed Apr 10, 2019 4:44 am
languages_spoken: english german
Has thanked: 14 times
Been thanked: 19 times
Contact:

Re: [OS] DietPi | Minimal image, highly extensible

Post by MichaIng »

This is a N2+, which is a bit different hw....
That is true, and since we did not really support the N2+ before, there won't be many users. However, I know that there are users with the exact same kernel running the N2+, at least Meveric, the maintainer of the packages we use does, so it seems to be somehow related to the specific board, or revising :?. I'm currently reading through all boot arguments/options to understand and in case adjust them better, but I think that is not related.

Btw, it would be awesome if you could try to boot the board but exit the first run setup (ctrl+c) and run dmesg from the console to see kernel logs.

One thing I still find inconsistent in out boot.ini (as well in the default) is that kernel logs are configured to be done serial console ttyS0, while the related device tree overlay is not enabled. I wonder if this might cause issues. Could you try to comment the setenv condev "console=ttyS0,115200n8" line?

EDIT
manilx wrote:
Tue Mar 23, 2021 9:50 pm
paested this now. Doesn't boot again 🙊
Hmm, the syntax is now definitely correct. Please assure to copy from here and not from the HTML page: https://raw.githubusercontent.com/Micha ... oot_n2.ini

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 2 guests