Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate an ID for the NanoPi K2 SBC #3736

Closed
StephanStS opened this issue Aug 25, 2020 · 13 comments · Fixed by #3742
Closed

Generate an ID for the NanoPi K2 SBC #3736

StephanStS opened this issue Aug 25, 2020 · 13 comments · Fixed by #3742
Labels
Image request 💾 Solution available 🥂 Definite solution has been done
Milestone

Comments

@StephanStS
Copy link
Collaborator

StephanStS commented Aug 25, 2020

Creating a feature request

Is your feature request related to a problem? Please describe:

An DietPi image for the NanoPi K2 shall be generated.

Describe the solution you'd like:

An ID for the NanoPi K2 is needed which can be used during the DietPi-PREP script.

Additional context

With this new ID I will generate the DietPi image.

Actually, the K2 image was successfully generated with "Generic device".

 ─────────────────────────────────────────────────────
 DietPi CPU Info
 Use dietpi-config to change CPU / performance options
 ─────────────────────────────────────────────────────
 Architecture |     aarch64
 Temperature  |     29'C : 84'F (Who put me in the freezer!)
 Governor     |     ondemand
 Throttle up  |     50% CPU usage

                 Current Freq    Min Freq   Max Freq
 CPU0         |      2016 MHz      100 MHz    2016 MHz
 CPU1         |      2016 MHz      100 MHz    2016 MHz
 CPU2         |      2016 MHz      100 MHz    2016 MHz
 CPU3         |      2016 MHz      100 MHz    2016 MHz

hwinfo cpu info (only one of the four kernels shown):

01: None 00.0: 10103 CPU
  [Created at cpu.343]
  Unique ID: rdCR.j8NaKXDZtZ6
  Hardware Class: cpu
  Arch: AArch64
  Vendor: "ARM Limited"
  Model: 0.4.0 ""
  Features: fp,asimd,evtstrm,crc32,cpuid
  BogoMips: 48.00
  Config Status: cfg=new, avail=yes, need=no, active=unknown

hwinfo memory:

01: None 00.0: 10102 Main Memory
  [Created at memory.74]
  Unique ID: rdCR.CxwsZFjVASF
  Hardware Class: memory
  Model: "Main Memory"
  Memory Range: 0x00000000-0x76e6bfff (rw)
  Memory Size: 1 GB + 896 MB
  Config Status: cfg=new, avail=yes, need=no, active=unknown

DietPi benchmark:

Benchmarks completed:
- CPU Performance : Duration = 12.51 seconds (lower is faster)
- CPU Temp        : Idle = 29'c | Full load = 42'c
- RootFS          : Write = 23 MiB/s | Read = 40 MiB/s
- RAM             : Write = 407 MiB/s | Read = 863 MiB/s
@MichaIng MichaIng added this to the v6.32 milestone Aug 25, 2020
@MichaIng
Copy link
Owner

Many thanks for bringing this up. NanoPi R2S is missing as well even that I have one here now. Same chip as NEO3, even the image should work, but I'll add a new ID for both of them tomorrow.

One important topic:

systemctl status haveged

Does this work on K2 or same issues as on NEO3?

@StephanStS
Copy link
Collaborator Author

@MichaIng: The haveged also fails:

root@DietPi:~# systemctl status haveged
● haveged.service - Entropy daemon using the HAVEGE algorithm
   Loaded: loaded (/lib/systemd/system/haveged.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-08-25 21:02:09 CEST; 2h 22min ago
     Docs: man:haveged(8)
           http://www.issihosts.com/haveged/
  Process: 1422 ExecStart=/usr/sbin/haveged --Foreground --verbose=1 $DAEMON_ARGS (code=exited, status=1/FAILURE)
 Main PID: 1422 (code=exited, status=1/FAILURE)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
root@DietPi:~# systemctl start haveged
root@DietPi:~# systemctl status haveged
● haveged.service - Entropy daemon using the HAVEGE algorithm
   Loaded: loaded (/lib/systemd/system/haveged.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-08-25 23:25:01 CEST; 3s ago
     Docs: man:haveged(8)
           http://www.issihosts.com/haveged/
  Process: 10498 ExecStart=/usr/sbin/haveged --Foreground --verbose=1 $DAEMON_ARGS (code=exited, status=1/FAILURE)
 Main PID: 10498 (code=exited, status=1/FAILURE)

Aug 25 23:25:01 DietPi systemd[1]: Started Entropy daemon using the HAVEGE algorithm.
Aug 25 23:25:01 DietPi haveged[10498]: haveged: Couldn't initialize HAVEGE rng 5
Aug 25 23:25:01 DietPi haveged[10498]: haveged starting up
Aug 25 23:25:01 DietPi systemd[1]: haveged.service: Main process exited, code=exited, status=1/FAILURE
Aug 25 23:25:01 DietPi systemd[1]: haveged.service: Failed with result 'exit-code'.

@MichaIng
Copy link
Owner

MichaIng commented Aug 26, 2020

What does this report in your case? I'll also try on by NEO3 later:

cat /sys/devices/system/cpu/cpu[0-9]/cache/index[0-9]/size

EDIT: NEO3 does not even have these files present.

@MichaIng
Copy link
Owner

MichaIng commented Aug 26, 2020

I think I found it: jirka-h/haveged#7
This fix has been added with v1.9.5: jirka-h/haveged@f219358
Debian Buster ships haveged 1.9.1: https://packages.debian.org/buster/haveged
Bullseye ships v1.9.8, hence should contain the fix: https://packages.debian.org/bullseye/haveged
Since it does not yet have any additional Bullseye-only dependencies, besides the haveged binary package and new libhavege2 library, we could relatively simply install it on Buster systems. This is probably better than hardcoding the 16 KiB cache size, in case any kernel/firmware upgrade by Armbian enables/fixes the cache size sysfs entry.

To test:

cd /tmp
wget http://ftp.de.debian.org/debian/pool/main/h/haveged/libhavege2_1.9.8-4_arm64.deb
wget http://ftp.de.debian.org/debian/pool/main/h/haveged/haveged_1.9.8-4_arm64.deb
apt install ./libhavege2_1.9.8-4_arm64.deb ./haveged_1.9.8-4_arm64.deb
rm ./libhavege2_1.9.8-4_arm64.deb ./haveged_1.9.8-4_arm64.deb
apt autopurge

I'll just try it on my NEO3.
🈯 Jep that was it! I'll store those packages on our server, to be installed during DietPi-PREP on Buster ARM systems as well as during update to DietPi v6.32.

Applied during DietPi-Update: 03ceafb

@StephanStS
Copy link
Collaborator Author

@MichaIng: On my K2 after doing the lines given above:

root@DietPi:/tmp# systemctl status haveged
● haveged.service - Entropy Daemon based on the HAVEGE algorithm
   Loaded: loaded (/lib/systemd/system/haveged.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-08-26 15:29:49 CEST; 21s ago
     Docs: man:haveged(8)
           http://www.issihosts.com/haveged/
 Main PID: 2073 (haveged)
    Tasks: 1 (limit: 1960)
   Memory: 5.2M
   CGroup: /system.slice/haveged.service
           └─2073 /usr/sbin/haveged --Foreground --verbose=1 -w 1024

Aug 26 15:29:49 DietPi systemd[1]: Started Entropy Daemon based on the HAVEGE algorithm.
Aug 26 15:29:49 DietPi haveged[2073]: haveged: listening socket at 3
Aug 26 15:29:49 DietPi systemd[1]: /lib/systemd/system/haveged.service:19: Unknown lvalue 'ProtectHostname' in section 'Service', ignoring
Aug 26 15:29:49 DietPi systemd[1]: /lib/systemd/system/haveged.service:20: Unknown lvalue 'ProtectKernelLogs' in section 'Service', ignoring
Aug 26 15:29:49 DietPi haveged[2073]: haveged: ver: 1.9.8; arch: generic; vend: ; build: (gcc 9.2.1 CTV); collect: 128K
Aug 26 15:29:49 DietPi haveged[2073]: haveged: cpu: (VC); data: 16K (D V); inst: 16K (D V); idx: 11/40; sz: 15456/64452
Aug 26 15:29:49 DietPi haveged[2073]: haveged: tot tests(BA8): A:1/1 B:1/1 continuous tests(B):  last entropy estimate 8.00326
Aug 26 15:29:49 DietPi haveged[2073]: haveged: fills: 0, generated: 0

@MichaIng
Copy link
Owner

Jep, so data: 16K (D V); inst: 16K shows that reverting to 16 KiB default works now. Yeah the Bullseye systemd unit contains two entries which are not yet supported on Buster systemd version, but that is okay, could be fixed by upgrading to backports, but doesn't hurt, compared to a non-functional entropy daemon.

@Joulinar
Copy link
Collaborator

Joulinar commented Aug 27, 2020

I know it's wrong place but at least it fits for creating a new device ID. There is a request on the forum to support N2+ which is a development of the N2 board. The N2 image is working but somehow CPU values are not detected correctly.

https://dietpi.com/phpbb/viewtopic.php?f=9&t=8015

https://www.hardkernel.com/shop/odroid-n2-with-4gbyte-ram-2/

@MichaIng
Copy link
Owner

Jep saw that, going to answer now.

@MichaIng
Copy link
Owner

Okay done + I added Amlogic S905 detection with G_HW_CPUID=7 as this is the same SoC as Odroid C2 which allows potential driver (especially GPU) cross use, lets see.

@StephanStS
Copy link
Collaborator Author

Image was generated and is ready for download.

@StephanStS
Copy link
Collaborator Author

Due to the positive image generation with the new K2 ID, this issue can be closed.

The only thing I have to monitor is, that in https://dietpi.com/survey/#benchmark the ID 54 (NanoPi K2) and 55 (NanoPi R2s) will occur in the first column of the table.

@MichaIng
Copy link
Owner

The only thing I have to monitor is, that in https://dietpi.com/survey/#benchmark the ID 54 (NanoPi K2) and 55 (NanoPi R2s) will occur in the first column of the table.

Ah, I'll upload the current version of the script to our server, so in at max one hour you'll see the SBC names 😄. Reminds me to upload a benchmark of my NEO3 as well.

@StephanStS
Copy link
Collaborator Author

Ok, IDs 54 and 55 now show the SBC. Nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Image request 💾 Solution available 🥂 Definite solution has been done
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants