Skip to content

Commit

Permalink
memLayout() improvement Raspberry PI 5
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhildebrandt committed Jan 10, 2025
1 parent e6f4fd8 commit 153d584
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 30 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.

| Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.25.9 | 2025-01-10 | `memLayout()` improvement Raspberry PI 5 |
| 5.25.8 | 2025-01-09 | `graphics()` improved for Raspberry PI |
| 5.25.7 | 2025-01-09 | `baseboard()`, `memLayout()` improved for Raspberry PI |
| 5.25.6 | 2025-01-08 | `system()` raspberry PI detection improved |
Expand Down
21 changes: 0 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,6 @@

## The Systeminformation Project

```
.''.
.''. . *''* :_\/_:
:_\/_: _\(/_ .:.*_\/_* : /\ :
.''.: /\ : ./)\ ':'* /\ * : '..'.
:_\/_:'.:::. ' *''* * '.\'/.' _\(/_
: /\ : ::::: *_\/_* -= o =- /)\
'..' ':::' * /\ * .'/.\'. '
*..* :
*
* /.\ * * . *
. /..'\ . . * .
*/'.'\* . . . * *
* /.''.'\ * . . . *
. */.'.'.\*
.........".""""/'.''.'.\""."."........".".".......................
^^^[_]^^^*
```

I wish you all a Merry Christmas and a peaceful New Year 2025.

This is amazing. Started as a small project just for myself, it now has > 17,000
lines of code, > 650 versions published, up to 8 mio downloads per month, > 330
mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who
Expand Down
5 changes: 5 additions & 0 deletions docs/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ <h3>Full version history</h3>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.25.9</th>
<td>2024-01-10</td>
<td><span class="code">memLayout()</span> improvements Raspberry PI 5</td>
</tr>
<tr>
<th scope="row">5.25.8</th>
<td>2024-01-09</td>
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
3<div class="version">New Version: <span id="version">5.25.8</span></div>
3<div class="version">New Version: <span id="version">5.25.9</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">
Expand Down Expand Up @@ -204,15 +204,15 @@
</div>
<div class="row number-section">
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">18,440</div>
<div class="numbers">18,452</div>
<div class="title">Lines of code</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div id="downloads" class="numbers">...</div>
<div class="title">Downloads last month</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">793</div>
<div class="numbers">795</div>
<div class="title">Dependents</div>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions lib/memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,12 @@ function memLayout(callback) {
'0': 400,
'1': 450,
'2': 450,
'3': 3200
'3': 3200,
'4': 4267
};
result[0].type = 'LPDDR2';
result[0].type = version && version[2] && version[2] === '3' ? 'LPDDR4' : result[0].type;
result[0].type = version && version[2] && (version[2] === '3') ? 'LPDDR4' : result[0].type;
result[0].type = version && version[2] && (version[2] === '4') ? 'LPDDR4X' : result[0].type;
result[0].ecc = false;
result[0].clockSpeed = version && version[2] && clockSpeed[version[2]] || 400;
result[0].clockSpeed = version && version[4] && version[4] === 'd' ? 500 : result[0].clockSpeed;
Expand Down
10 changes: 6 additions & 4 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -1094,9 +1094,11 @@ function decodePiCpuinfo(lines) {
return result;
}

function getRpiGpu() {
let cpuinfo = null;
if (_rpi_cpuinfo !== null) {
function getRpiGpu(cpuinfo) {

if (_rpi_cpuinfo === null && cpuinfo !== undefined) {
_rpi_cpuinfo = cpuinfo;
} else if (cpuinfo === undefined && _rpi_cpuinfo !== null) {
cpuinfo = _rpi_cpuinfo;
} else {
try {
Expand All @@ -1109,7 +1111,7 @@ function getRpiGpu() {

const rpi = decodePiCpuinfo(cpuinfo);
if (rpi.type === '4B' || rpi.type === 'CM4' || rpi.type === 'CM4S' || rpi.type === '400') { return 'VideoCore VI'; }
if (rpi.type === '5') { return 'VideoCore VII'; }
if (rpi.type === '5' || rpi.type === '500') { return 'VideoCore VII'; }
return 'VideoCore IV';
}

Expand Down

0 comments on commit 153d584

Please sign in to comment.