Initial Commit
- initial default booting image
This commit is contained in:
115
package/cpuload/0001-Changed-error-calls-to-perror.patch
Normal file
115
package/cpuload/0001-Changed-error-calls-to-perror.patch
Normal file
@@ -0,0 +1,115 @@
|
||||
From ffd61eaa72acf123dea0c80ed3774656289ab49f Mon Sep 17 00:00:00 2001
|
||||
From: roiec <roiec@D-H-ROIEC-LX-WW1.com>
|
||||
Date: Wed, 5 Jan 2022 17:12:05 +0200
|
||||
Subject: [PATCH] Changed 'error' calls to 'perror'
|
||||
|
||||
Upstream: https://github.com/kelvincheung/cpuload/pull/1
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
.gitignore | 60 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
src/graph_cpu_load.c | 4 +--
|
||||
src/read_cpu_stat.c | 2 +-
|
||||
3 files changed, 63 insertions(+), 3 deletions(-)
|
||||
create mode 100644 .gitignore
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
new file mode 100644
|
||||
index 0000000..c2ae907
|
||||
--- /dev/null
|
||||
+++ b/.gitignore
|
||||
@@ -0,0 +1,60 @@
|
||||
+# Prerequisites
|
||||
+*.d
|
||||
+
|
||||
+# Object files
|
||||
+*.o
|
||||
+*.ko
|
||||
+*.obj
|
||||
+*.elf
|
||||
+
|
||||
+# Linker output
|
||||
+*.ilk
|
||||
+*.map
|
||||
+*.exp
|
||||
+
|
||||
+# Precompiled Headers
|
||||
+*.gch
|
||||
+*.pch
|
||||
+
|
||||
+# Libraries
|
||||
+*.lib
|
||||
+*.a
|
||||
+*.la
|
||||
+*.lo
|
||||
+
|
||||
+# Shared objects (inc. Windows DLLs)
|
||||
+*.dll
|
||||
+*.so
|
||||
+*.so.*
|
||||
+*.dylib
|
||||
+
|
||||
+# Executables
|
||||
+*.exe
|
||||
+*.out
|
||||
+*.app
|
||||
+*.i*86
|
||||
+*.x86_64
|
||||
+*.hex
|
||||
+
|
||||
+# Debug files
|
||||
+*.dSYM/
|
||||
+*.su
|
||||
+*.idb
|
||||
+*.pdb
|
||||
+
|
||||
+# Kernel Module Compile Results
|
||||
+*.mod*
|
||||
+*.cmd
|
||||
+.tmp_versions/
|
||||
+modules.order
|
||||
+Module.symvers
|
||||
+Mkfile.old
|
||||
+dkms.conf
|
||||
+
|
||||
+#images
|
||||
+*.tgz
|
||||
+*.img
|
||||
+
|
||||
+
|
||||
+#build
|
||||
+configure
|
||||
diff --git a/src/graph_cpu_load.c b/src/graph_cpu_load.c
|
||||
index e4b7785..525d9ed 100644
|
||||
--- a/src/graph_cpu_load.c
|
||||
+++ b/src/graph_cpu_load.c
|
||||
@@ -132,7 +132,7 @@ void graph_new_line(char *str, unsigned long color)
|
||||
graph_last_x = graph_last_y = -1;
|
||||
|
||||
if (graph_data_index >= MAX_GRAPH_DATA - 2)
|
||||
- error("Too many graph data.");
|
||||
+ perror("Too many graph data.");
|
||||
|
||||
graph_data[graph_data_index++] = DATUM_COLOR;
|
||||
graph_data[graph_data_index++] = color;
|
||||
@@ -145,7 +145,7 @@ void graph_new_line(char *str, unsigned long color)
|
||||
void graph_add_point(int size, int amount)
|
||||
{
|
||||
if (graph_data_index >= MAX_GRAPH_DATA - 4)
|
||||
- error("Too many graph data.");
|
||||
+ perror("Too many graph data.");
|
||||
|
||||
graph_data[graph_data_index++] = DATUM_SIZE;
|
||||
graph_data[graph_data_index++] = size;
|
||||
diff --git a/src/read_cpu_stat.c b/src/read_cpu_stat.c
|
||||
index 3d014be..ff51d7f 100644
|
||||
--- a/src/read_cpu_stat.c
|
||||
+++ b/src/read_cpu_stat.c
|
||||
@@ -46,7 +46,7 @@ ProcessList *cpudata_new(void)
|
||||
fclose(file);
|
||||
|
||||
if (cpu > cpus -1) {
|
||||
- error("too many cpus");
|
||||
+ perror("too many cpus");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
9
package/cpuload/Config.in
Normal file
9
package/cpuload/Config.in
Normal file
@@ -0,0 +1,9 @@
|
||||
config BR2_PACKAGE_CPULOAD
|
||||
bool "cpuload"
|
||||
help
|
||||
cpuload is a simple tool to obtain intuitive vision of CPU
|
||||
load (including total, user, system, irq and softirq) within a
|
||||
certain time, which is especially useful for embedded system
|
||||
without GUI.
|
||||
|
||||
https://github.com/kelvincheung/cpuload
|
||||
3
package/cpuload/cpuload.hash
Normal file
3
package/cpuload/cpuload.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 1d61f4776dc3e2746343d68b2ea2faf138e54666b630a6060df4f3945badbcae cpuload-0.3.tar.gz
|
||||
sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING
|
||||
12
package/cpuload/cpuload.mk
Normal file
12
package/cpuload/cpuload.mk
Normal file
@@ -0,0 +1,12 @@
|
||||
################################################################################
|
||||
#
|
||||
# cpuload
|
||||
#
|
||||
################################################################################
|
||||
|
||||
CPULOAD_VERSION = 0.3
|
||||
CPULOAD_SITE = $(call github,kelvincheung,cpuload,v$(CPULOAD_VERSION))
|
||||
CPULOAD_LICENSE = GPL-2.0
|
||||
CPULOAD_LICENSE_FILES = COPYING
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user