Re: Arm64 Tier 1 FreeBSD 13 Phones

2021-04-10 Thread Shawn Webb
On Sat, Apr 10, 2021 at 04:07:49AM -0400, grarpamp wrote:
> FreeBSD Phones...
> 
> https://en.wikipedia.org/wiki/Librem_5
> NXP i.MX 8M Quad core Cortex-A53, 64bit ARM
> 
> https://en.wikipedia.org/wiki/PinePhone
> Allwinner A64 ARM Quad core Cortex-A53
> 
> https://www.youtube.com/watch?v=c32-QOrI4cw
> https://www.youtube.com/watch?v=fCKMxzz9cjs
> https://www.youtube.com/watch?v=lVJo9faE1fM
> https://www.youtube.com/watch?v=NV0RnWorPpQ
> 
> Happy hacking :)

There's a company (called Potabi? Fivnex?) that claims to be
developing a FreeBSD-based phone on PinePhone hardware. They claim to
eventually be able to run Android apps on it. As it stands, I'm seeing
more marketing material than development efforts published by them.

If I were to hazard a guess, this "development" effort will fizzle
out. I'd like to see it come to fruition, but I'm pretty skeptical.

https://potabi.fivnex.co/development

Thanks,

-- 
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc


signature.asc
Description: PGP signature


Re: Arm64 Tier 1 FreeBSD 13 Phones

2021-04-10 Thread Ian Lepore
On Sat, 2021-04-10 at 04:07 -0400, grarpamp wrote:
> FreeBSD Phones...
> 
> https://en.wikipedia.org/wiki/Librem_5
> NXP i.MX 8M Quad core Cortex-A53, 64bit ARM
> 
> https://en.wikipedia.org/wiki/PinePhone
> Allwinner A64 ARM Quad core Cortex-A53
> 
> https://www.youtube.com/watch?v=c32-QOrI4cw
> https://www.youtube.com/watch?v=fCKMxzz9cjs
> https://www.youtube.com/watch?v=lVJo9faE1fM
> https://www.youtube.com/watch?v=NV0RnWorPpQ
> 
> Happy hacking :)
> 

Dream on.  FreeBSD lacks the power-management infrastructure to run on
battery-operated devices.  The amount of work required to get there
from here is almost unimaginable, and there are no big companies
funding that kind of work (which is how linux got all that code).

-- Ian


___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: systat -swap to display large swap space users

2021-04-10 Thread Yoshihiro Ota
Hi,

How about these now?
These include extra improvements to other parts of systat.

These patches create new files.
If you already applies previosly, please check and clean up new files.

Regards,
Hiro

On Sun, 4 Apr 2021 10:21:59 +
tech-lists  wrote:

> Hi,
> 
> On Fri, Apr 02, 2021 at 08:12:14PM -0400, Yoshihiro Ota wrote:
> >Hi,
> >
> >We do not seem to have a nice way to see current swap space usage per 
> >process.
> >I updated systat to use libprocstat to obtain such infomation and display
> >along with swap devise/file stats.
> 
> Unfotunately your patch gets rejected on recent stable/13 and main/14
> 
> -- 
> J.
diff --git a/usr.bin/systat/Makefile b/usr.bin/systat/Makefile
index ca3f7ed72ce..bfbe1336d29 100644
--- a/usr.bin/systat/Makefile
+++ b/usr.bin/systat/Makefile
@@ -5,7 +5,7 @@
 
 PROG=	systat
 SRCS=	cmds.c cmdtab.c devs.c fetch.c iostat.c keyboard.c main.c sysput.c \
-	netcmds.c netstat.c pigs.c swap.c icmp.c \
+	netcmds.c netstat.c pigs.c proc.c swap.c icmp.c \
 	mode.c ip.c sctp.c tcp.c zarc.c \
 	vmstat.c convtbl.c ifcmds.c ifstat.c
 
@@ -16,6 +16,6 @@ CFLAGS+= -DINET6
 
 WARNS?=	1
 
-LIBADD=	ncursesw m devstat kvm util
+LIBADD=	ncursesw m devstat kvm util procstat
 
 .include 
diff --git a/usr.bin/systat/devs.c b/usr.bin/systat/devs.c
index b293796c2c7..87d04f989ea 100644
--- a/usr.bin/systat/devs.c
+++ b/usr.bin/systat/devs.c
@@ -426,12 +426,6 @@ dsshow2(int diskcol, int diskrow, int dn, int lc, struct statinfo *now, struct s
 	putlongdouble(device_busy, diskrow + 4, lc, 5, 0, 0);
 }
 
-static void
-dsshow3(int diskcol, int diskrow, int dn, int lc, struct statinfo *now, struct statinfo *then)
-{
-	dsshow2(diskcol, diskrow, dn, lc, now, then);
-}
-
 void
 dsshow(int maxdrives, int diskcol, int diskrow, struct statinfo *now, struct statinfo *then)
 {
@@ -439,5 +433,5 @@ dsshow(int maxdrives, int diskcol, int diskrow, struct statinfo *now, struct sta
 
 	for (i = 0, lc = 0; i < num_devices && lc < maxdrives; i++)
 		if (dev_select[i].selected)
-			dsshow3(diskcol, diskrow, i, ++lc, now, then);
+			dsshow2(diskcol, diskrow, i, ++lc, now, then);
 }
diff --git a/usr.bin/systat/devs.h b/usr.bin/systat/devs.h
index cbedd844290..79a44a6c3f5 100644
--- a/usr.bin/systat/devs.h
+++ b/usr.bin/systat/devs.h
@@ -2,7 +2,7 @@
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  *
  * Copyright (c) 1998 David E. O'Brien
- *   2015 Yoshihiro Ota
+ *   2015, 2021 Yoshihiro Ota
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -34,6 +34,8 @@
 
 #include 
 
+#define DISKHIGHT 5
+
 int dsinit(int);
 void dsgetinfo(struct statinfo *);
 int dscmd(const char *, const char *, int, struct statinfo *);
diff --git a/usr.bin/systat/extern.h b/usr.bin/systat/extern.h
index 6e3117bece4..322065f7931 100644
--- a/usr.bin/systat/extern.h
+++ b/usr.bin/systat/extern.h
@@ -168,6 +168,7 @@ char	*sysctl_dynread(const char *, size_t *);
 void	 sysputpage(WINDOW* , int, int, int, uint64_t, int);
 void	 sysputspaces(WINDOW* , int, int, int);
 void	 sysputstrs(WINDOW* , int, int, int);
+void	 sysputXs(WINDOW* , int, int, int);
 void	 sysputuint64(WINDOW* , int, int, int, uint64_t, int);
 void	 sysputwuint64(WINDOW* , int, int, int, uint64_t, int);
 
diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c
index b5a19d381ad..b84351379f4 100644
--- a/usr.bin/systat/main.c
+++ b/usr.bin/systat/main.c
@@ -135,6 +135,21 @@ parse_cmd_args (int argc, char **argv)
 
 }
 
+static void
+resize(int signo __unused)
+{
+
+	endwin();
+	refresh();
+	clear();
+
+	CMDLINE = LINES - 1;
+	labels();
+	display();
+	status();
+}
+
+
 int
 main(int argc, char **argv)
 {
@@ -191,6 +206,7 @@ main(int argc, char **argv)
 	signal(SIGINT, die);
 	signal(SIGQUIT, die);
 	signal(SIGTERM, die);
+	signal(SIGWINCH, resize);
 
 	/*
 	 * Initialize display.  Load average appears in a one line
diff --git a/usr.bin/systat/pigs.c b/usr.bin/systat/pigs.c
index d9f3f8d4ad1..879f6548d86 100644
--- a/usr.bin/systat/pigs.c
+++ b/usr.bin/systat/pigs.c
@@ -56,13 +56,13 @@ __FBSDID("$FreeBSD$");
 #include "systat.h"
 #include "extern.h"
 
-int compar(const void *, const void *);
+static int compar(const void *, const void *);
 
 static int nproc;
 static struct p_times {
 	float pt_pctcpu;
 	struct kinfo_proc *pt_kp;
-} *pt;
+} *pt = NULL;
 
 static intfscale;
 static double  lccpu;
@@ -90,7 +90,7 @@ showpigs(void)
 	const char *uname, *pname;
 	char pidname[30];
 
-	if (pt == NULL)
+	if (nproc == 0)
 		return;
 
 	qsort(pt, nproc, sizeof (struct p_times), compar);
@@ -146,23 +146,20 @@ fetchpigs(void)
 	float ftime;
 	float *pctp;
 	struct kinfo_proc *kpp;
-	static int lastnproc = 0;
+	static int maxnproc = 0;
 
 	if ((kpp = kvm_getprocs(kd, KERN_PROC_ALL, 0, )) == NULL) {
 		error("%s", kvm_geterr(kd));
-		if (pt)
-			free(pt);
+		nproc = 0;
 		return;
 	}
-	if (nproc > lastnproc) {
-		free(pt);
-		if ((pt =
-		malloc(nproc * sizeof(struct p_times))) == NULL) {
+	if (nproc > 

Arm64 Tier 1 FreeBSD 13 Phones

2021-04-10 Thread grarpamp
FreeBSD Phones...

https://en.wikipedia.org/wiki/Librem_5
NXP i.MX 8M Quad core Cortex-A53, 64bit ARM

https://en.wikipedia.org/wiki/PinePhone
Allwinner A64 ARM Quad core Cortex-A53

https://www.youtube.com/watch?v=c32-QOrI4cw
https://www.youtube.com/watch?v=fCKMxzz9cjs
https://www.youtube.com/watch?v=lVJo9faE1fM
https://www.youtube.com/watch?v=NV0RnWorPpQ

Happy hacking :)
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"