Re: RPi 4b Wifi Device

2024-04-21 Thread Michael Cheponis
I run an RPi 4B/8G with external USB SSD drive; I do this because my uSD
cards were getting worn out after about a year of use; I've had no such
problems with my Samsung 870 EVO nor Samsung SSD T7.

I use the built-in GigE adaptor on the RPi 4B, because it's convenient as I
have wired ethernet most places.   So I can't help with WiFi.

I have been running an RPi 3 from a Lexar 64B Thumb Drive since June 2019 -
no problem there, either.

-Mike


-Mike


On Sat, Apr 20, 2024 at 2:04 PM Thomas D. Dean 
wrote:

> On 4/20/24 13:16, Michael van Elst wrote:
> > tomd...@wavecable.com ("Thomas D. Dean") writes:
> >
> >> # wpa_cli status
> >> Selected interface 'bwfm0'
> >> 21:58:44.815: bssid=60:38:e0:db:a9:7a
> >> freq=0
> >> ssid=tddhome
> >> id=0
> >> mode=station
> >> pairwise_cipher=TKIP
> >> group_cipher=TKIP
> >> key_mgmt=WPA-PSK
> >> wpa_state=GROUP_HANDSHAKE
> >> ip_address=169.254.135.120
> >> address=e4:5f:01:da:eb:46
> >
> >> I don't understand where the inet 169.254.135.120 comes from. The router
> >> pool is 192.168.1.xxx.
> >
> > 169.254.x.x is a "link local" address. dhcpcd falls back to such an
> > address, if it doesn't get an answer from a dhcp server. Apparently
> > wpa_supplicant cannot connect to the network.
> >
> >> wpa_state=GROUP_HANDSHAKE
> >
> > says that it still tries to associate. When it's done this would
> > change to COMPLETED.
> >
>
> I have two RPi 4b's. One with NetBSD 10 on an SD card and the other with
> RPi OS on a USB flash drive. (I can not get NetBSD to boot from a flash
> drive)
>
> As far as I can tell the network configurations are the same for WIFI on
> both. I see comments on the web about NetBSD 10 problems with the bwfm
> device.
>
> I need WIFI. So, I go back to RPi OS.
>
> Thanks for all the replies.
>
> Tom Dean
>


Re: RC6 (and later)

2024-03-16 Thread Michael Cheponis
I am not on the Release Team or involved except as a user --- however, I
greatly approve of _RC6 release, AND the additional time it will take for
people to beat on it before it becomes the 10.0 release.

We have more hardware to properly work on now (just for starters, all RPi
up to 4 at least), etc, and many new chips for old arches (e.g. N200 for
amd64) so when you look at the growing complexity, it makes sense to keep
testing by as large a group as possible before 'release'.

After all, when it comes right down to it, the Release is just a Number.
 Who cares what the number is -- it is the set of Stable Features that are
of interest.

I would encourage all to d/l _RC6 and bang on it, like I'm doing.

Thanks,
Mike


On Fri, Mar 15, 2024 at 7:30 AM Rose  wrote:

> Because, that's too god damned many...
>
> RELEASE NOW
>
> On Fri, Mar 15, 2024 at 9:19 AM Vitaly Shevtsov 
> wrote:
>
> > Because they can. Why not?
> >
> > On Fri, Mar 15, 2024 at 3:17 PM Todd Gruhn  wrote:
> > >
> > > There is now NetBSD-10.0RC6 -- I don't  ever recall seeing RC5 or later


'forgot' password ? Couldn't generate salt

2024-02-29 Thread Michael Cheponis
I did a sysupgrade to amd64 to _RC5  (from _RC3), but it seems to have
reset my passwords.  The accounts are there, just the passwords have been
changed.

Tried logging in single-user as described in
https://www.netbsd.org/docs/guide/en/chap-boot.html

# passwd root
...
Couldn't generate salt.
Unable to change auth token: Error in service module
#



And of course, the password is not changed, and I still can't log in.

I'm probably doing something dumb.  Thanks for any help/pointers.

-Mike


Re: NetBSD and ECC RAM?

2024-02-18 Thread Michael Cheponis
I've been running ECC in the Windows box for years, it seems like a 'no
brainer' for servers. Servers usually run for years, and Stuff Happens over
the years [1].

Most of the computing industry has been hell-bent on performance, yielding
impressive gains (albeit with occasional setbacks:
https://cachewarpattack.com/ )

But I'd prefer a reliable, unhackable, trustable compute fabric.  ECC is
part of the 'reliable' part.

I would also like to see per /dev entry ACLs.  I would like to see better
security than owner-group-everbody permissions.  I would like to see almost
no normal system operations requiring root privs - and I would like to see
root privs made much more narrow and fine-grained in scope - only large
enough to do the specific job (e.g. change file permission, with a separate
capability to change file ownership; etc).

I'm certainly no computer security guru, or have any valid opinions except
as a luser.

Still --- I would like to see some performance gains "wasted" in order to
gain better reliable, unhackable, trustable systems.


Thanks for tolerating my mini-soapbox.
-Mike

[1] I recently had a NetBSD server's computer start to have random crashes
until I tried to boot it one more time, and it wouldn't come up at all.
 Then after cleaning everything, making sure disks were OK, and trying
again with no luck did I stare at the MB and saw  the electrolytic
caps' tops bulging out!   My rule: Never trust HW completely.  It will
fail.  Eventually.


On Fri, Feb 16, 2024 at 7:09 AM Hauke Fath (SPG) 
wrote:

> On 2024-02-16 01:14, Michael van Elst wrote:
> > We should have EDAC drivers that should at least report events,
> > but so far there is nothing...
>
> Sounds like a SoC project?
>
> Cheerio,
> Hauke
>
>
> (FreeBSD appears to be no better off:
> <
> https://forums.freebsd.org/threads/how-to-find-out-if-ecc-is-enabled.72839/
> >)
>
> --
>   The ASCII Ribbon CampaignHauke Fath
> () No HTML/RTF in email Institut für Nachrichtentechnik
> /\ No Word docs in email TU Darmstadt
>   Respect for open standards  Ruf +49-6151-16-21344
>


./build.sh -O ../obj tools producing error

2023-07-24 Thread Michael Cheponis
Hi, fresh download; /usr/src nonexistent, /usr/obj nonexistent


# cd /usr
# cvs checkout -A -P src
# cd src
# ./build.sh -O ../obj tools

gives me:

<< stuff  >>
cc -o nbmake arch.o buf.o compat.o cond.o dir.o for.o hash.o job.o lst.o
main.o make.o make_malloc.o meta.o metachar.o parse.o str.o suff.o targ.o
trace.o util.o var.o
ld: job.o: in function `JobPassSig_suspend':
job.c:(.text+0xd04): undefined reference to `__sigaction_siginfo'
job.c:(.text+0xd04): relocation truncated to fit: R_AARCH64_CALL26 against
undefined symbol `__sigaction_siginfo'
ld: job.c:(.text+0xd38): undefined reference to `__sigaction_siginfo'
job.c:(.text+0xd38): relocation truncated to fit: R_AARCH64_CALL26 against
undefined symbol `__sigaction_siginfo'
ld: util.o: in function `bmake_signal':
util.c:(.text+0x2c): undefined reference to `__sigaction_siginfo'
util.c:(.text+0x2c): relocation truncated to fit: R_AARCH64_CALL26 against
undefined symbol `__sigaction_siginfo'

ERROR: Build of nbmake failed


$ uname -a
NetBSD arm64 10.99.4 NetBSD 10.99.4 (MIKE64) #0: Wed May 24 16:54:43 UTC
2023  mac@arm64:/usr/obj/sys/arch/evbarm/compile/MIKE64 evbarm

(MIKE64's only diff from GENERIC is "options HZ=1000")


Thanks for any clues as to what bonehead thing I may be doing (or not
doing...)


Mike


Transparent Page Placement

2023-06-14 Thread Michael Cheponis
TPP apparently improves 'hot' data locality with a low-overhead algorithm
that has been implemented in mainstream Linux.

https://cse.engin.umich.edu/stories/new-technique-for-memory-page-placement-integrated-into-linux-kernel


Re: How to use the 'ls' -M flag?

2023-05-28 Thread Michael Cheponis
Using RVP's recipes -- success!

Thank you very much, and d'oh, of course it makes sense that the default
C/POSIX locale is "" -- the most 'reasonable' default.

p.s. yes, I used  "ls -lM"  not just the -M flag.   You need -l otherwise
-M by itself is a no-op.


On Fri, May 26, 2023 at 11:50 PM RVP  wrote:

> On Fri, 26 May 2023, Michael Cheponis wrote:
>
> > I'm having no success trying to get ls to print file sizes, using the -M
> > flag.
> >
>
> The `thousands separator' char. is locale-specific. In the default C/POSIX
> locale, it is "":
>
> $ locale -c thousands_sep
> LC_NUMERIC
> $ LC_NUMERIC=C locale -c thousands_sep
> thousands_sep=""
> $ LC_NUMERIC=en_US.UTF-8 locale -k thousands_sep
> thousands_sep=","
> $ LC_NUMERIC=en_US.UTF-8 ls -lM /netbsd.GENERIC
> -rwxr-xr-x  1 root  wheel  29,529,152 May 24 13:09 /netbsd.GENERIC
> $
>
> Set some locale in ~/.profile (or ~/.xinitrc, ~/.xsession, ...). Eg.:
>
> export LANG=en_GB.UTF-8
> export LC_CTYPE=$LANG
> export LC_ALL=""
>
> -RVP
>


How to use the 'ls' -M flag?

2023-05-27 Thread Michael Cheponis
I'm having no success trying to get ls to print file sizes, using the -M
flag.


 -MModifies the -l and -s options, causing the sizes or block counts
 reported to be separated with commas (or a locale appropriate
 separator) resulting in a more readable output.  Overrides -h;
 does not override -k.







* $ ls -lM *.c-rw-r--r--  1 root  wheel5535 Aug  7  2003
cmp.c-rw-r--r--  1 root  wheel   18251 May 26 21:21 ls.c-rw-r--r--  1 root
 wheel1839 Sep  5  2016 main.c-rw-r--r--  1 root  wheel   13806 May 26
21:52 print.c-rw-r--r--  1 root  wheel5090 Aug 29  2011 util.c*

I would expect to see something like this:



*-rw-r--r--  1 root  wheel5,535 Aug  7  2003 cmp.c-rw-r--r--  1 root
 wheel   18,251 May 26 21:21 ls.c*

etc.

Thanks for any hints.

-Mike


Re: libc license

2023-02-10 Thread Michael Cheponis
I believe the font size of the printed documentation is not specified...

I liked what Perry Metzger said about BSD vs 'other' licenses: "Instead of
worrying that people are going to steal my code, with BSD, I *know* they
will!"



On Fri, Feb 10, 2023 at 10:55 AM r0ller  wrote:

> Hi All,
>
> Thanks for the clarification!
>
> Best regards,
> r0ller
>
> PS: If only the libc could be redistributed with 0BSD license, it would
> have a big impact on the embedded use cases.
>
> On 2023. 02. 10. 16:07, Greg Troxel wrote:
> > Julian Coleman  writes:
> >
> >> If you want to redistribute libc, you need to provide some way to
> display
> >> the licences for every libc source file as part of the documentation for
> >> the embedded device.
> >
> > I think it is acceptable to ship the device with a paper license.  There
> > is no requirement that the device itself has to do the display.
> > This license was written back in the days when you'd get a tape and a
> > document explaining it.
> >
>


Re: Is this normal floppy behavior?

2023-01-05 Thread Michael Cheponis
>   It could also be that some program is still running which has a file in
> /a open. That would also explain why the space is still shown as
> allocated.

No other files were open; it was preceded by an "*rm -rf /a/**" cmd.

But even after doing that, umounting it, and re-mounting it,  I find:











*# pwd/root# umount /a# mount_msdos /dev/sd2a /a# df -h /aFilesystem
  Size   Used  Avail %Cap Mounted on/dev/sd2a  1.4M
 31K   1.4M   2% /a# ls -la /a total 1drwxr-xr-x   1 root  wheel  7168
Jan  1  1980 ./drwxr-xr-x  32 root  wheel  1024 Dec 29 02:38 ../*
Hmmm, somehow 31K are still used.   Used for what?   Now, I know that on
some filesystems, there is some 'hidden' disk space, which only root can
access.

Back in windows, 32,256 bytes (63 sectors) are seen to be 'used' - but
there are no files.

Is NetBSD 'reserving' some sectors for some reason?   (As I say, normally
after formatting, windows only marks sectors 'used' that are bad; and this
particular diskette has 2 bad sectors (1,024 bytes)).  Reformatting on
Windows gives the 1,024 'used' bytes, and 1,456,640 'available' bytes, a
capacity of 1,457,664 bytes.   Now, the entire disk is 2880 sectors of 512
bytes each, hence 1,474,560 bytes; so the Directory uses 1,474,560 -
1,457,664 =16,896 bytes, or 33 sectors.

Back on NetBSD, I get this oddness:




*# mount_msdos /dev/sd2a /a  mount_msdos: /dev/sd2a on /a: Operation not
supported by device# mount_msdos /dev/sd2a /a  *
*#*

OK, no big deal, but not sure why -- after a successful umount previously
and ejection of the diskette -- that the error message is generated upon a
new mount.


*# df -h /a*







*Filesystem Size   Used  Avail %Cap Mounted on/dev/sd2a
 1.4M   1.0K   1.4M   0% /aarm64# ls -la /a total 1drwxr-xr-x
1 root  wheel  7168 Jan  1  1980 ./drwxr-xr-x  32 root  wheel  1024 Dec 29
02:38 ../drwxr-xr-x   1 root  wheel   512 Jan  5 14:19 System Volume
Information/#  ls -la /a/System\ Volume\ Information *

*total 1-rwxr-xr-x  1 root  wheel  76 Jan  5 14:19 IndexerVolumeGuid**

This all looks reasonable, except perhaps the 1.0K 'Used' field.   (1K is
bad blocks; and the IndexerVolumeGuid is only 76 bytes, which would consume
1 sector of 512 bytes, therefore the 'Used' should presumably be "1,5K" ?)

*# df -G /a *





*/a (/dev/sd2a   ): 512 block size  512 frag size
2847 total blocks   2845 free blocks2845 available 0
total files 224 free files 1810 filesys id msdos fstype
  0x1000 flag255 filename length 0 owner
  0 syncwrites0 asyncwrites*
There are 2880 total sectors, and the directory uses 33 sectors, meaning
the max# of available sectors is 2847, as is reported.  2 sectors are bad,
hence 2845 actual free blocks.

But:  Where is *System Volume Information/**IndexerVolumeGuid *stored?

Writing the biggest possible file (given there are 2 bad sectors):






*# dd if=/dev/urandom of=big bs=1456640 count=1 1+0 records in1+0 records
out1456640 bytes transferred in 0.063 secs (23121269 bytes/sec)# time cp
big /a cp -pi big /a  0.00s user 0.01s system 0% cpu 14.627 total*

Clearly, the writes are buffered, as it takes about a minute to write all
cylinders.












*# df -G /a /a (/dev/sd2a   ): 512 block size  512 frag
size  2847 total blocks  0 free blocks   0 available
 0 total files 224 free files 1810 filesys id msdos
fstype   0x1000 flag255 filename length 0
owner 4 syncwrites6 asyncwrites# ls -la
/adrwxr-xr-x   1 root  wheel 7168 Jan  1  1980 ./drwxr-xr-x  32 root
 wheel 1024 Dec 29 02:38 ../drwxr-xr-x   1 root  wheel  512 Jan  5
14:19 System Volume Information/-rwxr-xr-x   1 root  wheel  1456640 Jan  5
22:37 big**

So *System Volume Information/**IndexerVolumeGuid *is stored 'someplace
special', it would seem.

And now, this is the the part I really don't understand:













*# rm -rf /a/*zsh: sure you want to delete all the files in /a [yn]?
yarm64# ls -la /atotal 1drwxr-xr-x   1 root  wheel  7168 Jan  1  1980
./drwxr-xr-x  32 root  wheel  1024 Dec 29 02:38 ../arm64# df -G /a
/a (/dev/sd2a   ): 512 block size  512 frag size  2847
total blocks899 free blocks 899 available 0 total
files 224 free files 1810 filesys id msdos fstype
0x1000 flag255 filename length 0 owner
7 syncwrites   12 asyncwrites*
-Mike


On Thu, Jan 5, 2023 at 2:07 PM  wrote:

> > On 1/5/23 21:32, Michael Cheponis wrote:
> >> fascinatingly, now, when I try to "umount" the filesystem:
> >>
> >> *# umount /a
> >> umount: /a: Device busy*
> >
> > Fascinating, from what you wrote you might still "be" in /a
>

Re: Is this normal floppy behavior?

2023-01-05 Thread Michael Cheponis
>> *# umount /a
>> umount: /a: Device busy*

> Fascinating, from what you wrote you might still "be" in /a

Whoops!   Trying to minimize arguments, locations, attempts.

Now, of course, wouldn't be nice if 'umount' said something like "hey
dude!  you're in the directory you're trying to umount."

Naturally, I 'should' know that "Device busy" means "hey dude! you're in
the directory you're trying to umount."

gosh.   ;-)




On Thu, Jan 5, 2023 at 1:33 PM Christian Groessler 
wrote:

> On 1/5/23 21:32, Michael Cheponis wrote:
> > fascinatingly, now, when I try to "umount" the filesystem:
> >
> > *# umount /a
> > umount: /a: Device busy*
>
> Fascinating, from what you wrote you might still "be" in /a
>
> regards,
> chris
>


Re: Is this normal floppy behavior?

2023-01-05 Thread Michael Cheponis
> Did you type sync and wait?

Not originally; but I just tried it, and doing "sync" and waiting 2 hours
produces no difference.

*# sync*
*# echo wait 2 hours*
*wait 2 hours*


*# df -h /a Filesystem Size   Used  Avail %Cap Mounted
on/dev/sd2a  1.4M   529K   895K  37% /a*

Some of the 529K is bad sectors  (like 1,024 bytes); but why is 529K
"used" when there are no files there:


*# pwd *




*/aarm64# ls -la  total 1drwxr-xr-x   1 root  wheel  7168 Jan  1  1980
./drwxr-xr-x  32 root  wheel  1024 Dec 29 02:38 ../*

fascinatingly, now, when I try to "umount" the filesystem:


*# umount /a  umount: /a: Device busy*


This behavior seems incorrect.

On Thu, Jan 5, 2023 at 5:26 AM Greg Troxel  wrote:

> Michael Cheponis  writes:
>
> > There are a bunch of files on the floppy when mounted; I delete them all;
> > but then, there is a large amount of 'used' space!   unmounting +
> > remounting 'fixes' this problem.
>
> Did you type sync and wait?
>


Is this normal floppy behavior?

2023-01-04 Thread Michael Cheponis
There are a bunch of files on the floppy when mounted; I delete them all;
but then, there is a large amount of 'used' space!   unmounting +
remounting 'fixes' this problem.

*# mount_msdos /dev/sd2a /a*













































*# ls -l /atotal 2drwxr-xr-x  1 root  wheel512 Jan  4 13:11 System
Volume Information/-rwxr-xr-x  1 root  wheel  65536 Jan  4 21:21
six.0*-rwxr-xr-x  1 root  wheel  65536 Jan  4 21:21 six.1*-rwxr-xr-x  1
root  wheel  65536 Jan  4 21:21 six.10*-rwxr-xr-x  1 root  wheel  65536 Jan
 4 21:21 six.11*-rwxr-xr-x  1 root  wheel  65536 Jan  4 21:21
six.12*-rwxr-xr-x  1 root  wheel  65536 Jan  4 21:21 six.13*-rwxr-xr-x  1
root  wheel  65536 Jan  4 21:22 six.14*-rwxr-xr-x  1 root  wheel  65536 Jan
 4 21:22 six.15*-rwxr-xr-x  1 root  wheel  65536 Jan  4 21:22
six.16*-rwxr-xr-x  1 root  wheel  65536 Jan  4 21:22 six.17*-rwxr-xr-x  1
root  wheel  65536 Jan  4 21:22 six.18*-rwxr-xr-x  1 root  wheel  65536 Jan
 4 21:22 six.19*-rwxr-xr-x  1 root  wheel  65536 Jan  4 21:21
six.2*-rwxr-xr-x  1 root  wheel  65536 Jan  4 21:22 six.20*-rwxr-xr-x  1
root  wheel  65536 Jan  4 21:22 six.21*-rwxr-xr-x  1 root  wheel  65536 Jan
 4 21:21 six.3*-rwxr-xr-x  1 root  wheel  65536 Jan  4 21:21
six.4*-rwxr-xr-x  1 root  wheel  65536 Jan  4 21:21 six.5*-rwxr-xr-x  1
root  wheel  65536 Jan  4 21:21 six.6*-rwxr-xr-x  1 root  wheel  65536 Jan
 4 21:21 six.7*-rwxr-xr-x  1 root  wheel  65536 Jan  4 21:21
six.8*-rwxr-xr-x  1 root  wheel  65536 Jan  4 21:21 six.9*-rwxr-xr-x  1
root  wheel275 Jan  4 21:22 six.bat*# df -h /aFilesystem Size
Used  Avail %Cap Mounted on/dev/sd2a  1.4M   1.4M
 14K  99% /a# rm -rf /a/*zsh: sure you want to delete all 24 files in /a
[yn]? y# ls -l /a# df -h /aFilesystem Size   Used  Avail
%Cap Mounted on/dev/sd2a  1.4M   517K   907K  36% /a#
umount /a# mount_msdos /dev/sd2a /a# ls -l /a# df -h /aFilesystem
Size   Used  Avail %Cap Mounted on/dev/sd2a  1.4M
 17K   1.4M   1% /a*


odd /dev/random behavior with dd ?

2023-01-04 Thread Michael Cheponis
Hi, 'dd' seems to behave different if the 'if' is /dev/random than if it is
anything else, e.g. /dev/zero:



























*# sh # dd if=/dev/zero of=zero.out bs=65536 count=11+0 records in1+0
records out65536 bytes transferred in 0.001 secs (65536000 bytes/sec)# ls
-l zero.out-rw-r--r--  1 root  wheel  65536 Jan  4 21:30 zero.out# dd
if=/dev/random of=random.out bs=65536 count=10+1 records in0+1 records
out32 bytes transferred in 0.001 secs (32000 bytes/sec)# ls -l
random.out-rw-r--r--  1 root  wheel  32 Jan  4 21:30 random.out# dd
if=/dev/random of=random.out.2 bs=65536 count=20480+2048 records in0+2048
records out65536 bytes transferred in 0.054 secs (1213629 bytes/sec)# ls -l
random.out.2-rw-r--r--  1 root  wheel  65536 Jan  4 21:31 random.out.2#
uname -aNetBSD arm64 9.99.102 NetBSD 9.99.102 (MIKE64) #0: Wed Oct 26
22:54:20 UTC 2022  mac@arm64:/usr/obj/sys/arch/evbarm/compile/MIKE64 evbarm*



Am I doing something stupid?

Thanks!
Mike


Re: 'cd' if HOME is unset

2022-12-26 Thread Michael Cheponis
Well, as a zsh user:

$ echo $HOME
/usr/mac
$ unset HOME
$ echo $HOME

$ zsh -c cd
$(no change in directory, no error msg)

also:

$ HOME=/usr/mac
$ echo $HOME
/usr/mac

$ (unset HOME; zsh -c cd)
$ (no error msg)


in all cases, directory does not change when HOME is not defined.


On Mon, Dec 26, 2022 at 9:47 AM Robert Elz  wrote:

> Date:Sun, 25 Dec 2022 15:33:57 -0800
> From:    Michael Cheponis 
> Message-ID:   5rw...@mail.gmail.com>
>
>   | Maybe it should print "$HOME is not set" in that case?
>
> Did you try it?
>
> It is easy...
>
> (unset HOME; sh -c cd)
>
> or use ksh (or some other shell) instead of sh to test it.
>
> Script started on Tue Dec 27 00:01:34 2022
> jacaranda$ (unset HOME; sh -c cd)
> cd: HOME not set
> jacaranda$ (unset HOME; ksh -c cd)
> ksh: cd: no home directory (HOME not set)
> jacaranda$ exit
>
> Script done on Tue Dec 27 00:03:06 2022
>
>
> Note HOME  not $HOME  is not set, $HOME is, if
> HOME is set, a pathname, or if HOME is not set, "",
> neither of which makes any sense to describe as 'not set'.
>
> kre
>


Re: 'cd' if HOME is unset

2022-12-26 Thread Michael Cheponis
Maybe it should print "$HOME is not set" in that case?


On Sun, Dec 25, 2022 at 2:52 PM Valery Ushakov  wrote:

> On Sat, Dec 24, 2022 at 22:32:22 -0500, Jan Schaumann wrote:
>
> > Robert Elz  wrote:
> > > Why bother?
> >
> > I happily admit that it's a rare edge case. I simply
> > find it surprising that 'cd' gives up if HOME is
> > unset.  Seems unintuitive to me.
>
> Some would say, "gives up", some would say it makes you aware you have
> a problem. :)
>
> DWIM is enticing, sure, but at some point it trasmutes into that
> JavaScript "WAT" talk moment.
>
> -uwe
>


More floppy oddities

2022-11-16 Thread Michael Cheponis
# scsictl sd1 format
/dev/rsd1: Check Condition on CDB: 1a 00 03 00 24 00
SENSE KEY: No Additional Sense
 ASC/ASCQ: No Additional Sense Information

I don't know what that means.

The console prints:
[ 2207.9560928] sd1(umass1:0:0): medium error, data = 00 00 00 00 30 01 00
00 00 00
[ 2207.9610935] sd1c: error reading fsbn 64 (sd1 bn 64; cn 1 tn 1 sn 10)


When trying 'fdformat'

fdformat -f /dev/rsd1a -t 1440
fdformat: Device `/dev/rsd1a' does not support floppy formatting:
Inappropriate ioctl for device

Console prints:
[ 2376.3318245] sd1(umass1:0:0): medium error, data = 00 00 00 00 30 01 00
00 00 00
[ 2376.3358251] sd1c: error reading fsbn 64 (sd1 bn 64; cn 1 tn 1 sn 10)

SAME THING!  And, with a different diskette this time.

Interesting that I'm addressing /dev/rsd1a but the error message is about
the 'whole disk' sd1c

sometimes, when I try fdformat, I get this console message
[ 2576.4662150] sd1(umass1:0:0): not ready, data = 00 00 00 00 3a 00 00 00
00 00

but then just repeating the command 'works', meaning, I get the
inappropriate ioctl for device + the same 2 console lines

These diskettes have been pre-formatted under Windows 11, they work fine on
that OS.  I have two different USB floppy drives, one is Teac, one is Sony;
both work fine in Windows.

I'm a bit bamboozled as to where to go from here.

Thank you, again,
Mike


Re: noob Question: How to format a floppy on a USB floppy disk drive (on RPi 4) ?

2022-11-16 Thread Michael Cheponis
Yes, the process for making a floppy useful to an OS is the same as any
other computer media.

The common "1.44" MB floppy is actually 2.0 MB (12 Mbits) worth of data.
However, a controller chip (usually an NEC 765 or equivalent) is used to
write certain patterns onto the diskette; for a standard 3.5" 1.44 floppy,
the 'formatter' writes 18 sectors per track, each sector is 512 bytes.
http://www.bitsavers.org/components/nec/_dataSheets/uPD765_App_Note_Mar79.pdf

These 'sectors' have extra info that the disk controller chip uses to
figure out where the actual data is; that is, each of those 18 sectors has
some info for synchronization, and also has the Sector Number.  Even though
there is an 'index' pulse once per revolution that tells you where to start
looking for data, the controller chip scans the magnetic
domains/transitions (encoded as Modified FM, aka MFM) and finds the proper
sector it was commanded to.   It then proceeds to read / write the data as
commanded on that sector.

The low-level format leaves the diskette with  18 sectors per track, and
there are a total of 80 tracks; there are also 2 read/write heads, one on
each side, so there are 36 tracks per 'cylinder'  (a cylinder holds all the
sectors can can be read/written without moving the disk drive head).

 36 sectors per cylinder x 80 cylinders = 2,880 sectors
Times 512 bytes per sector = 1,474,560 (formatted) bytes.

But yes, you're right, when you do

*# newfs_msdos -f 1440 /dev/rsd1a*

you get an MS-DOS filesystem, which is described here:
https://www.eit.lth.se/fileadmin/eit/courses/eitn50/Literature/fat12_description.pdf

And yes, sectors 0 through 32 are used up by the Filesystem (FAT1, FAT2,
and Root Dir); that means there are only 2880 - 33 = 2,847 sectors
(1,457,664 bytes) available for actual user data.
And, yes, one consequence is that since there are an odd # of sectors
available for user data, it is not possible to  have 2 *identical* files
that completely fills up a diskette -- thanks for spotting my error on this

Re: noob Question: How to format a floppy on a USB floppy disk drive (on RPi 4) ?

2022-11-15 Thread Michael Cheponis
Hmm, this is getting more interesting:

Nov 14 20:55:16 arm64 /netbsd: [ 1632636.5571825] umass1 at uhub2 port 1
configuration 1 interface 0
Nov 14 20:55:16 arm64 /netbsd: [ 1632636.5601839] umass1: TEACV0.0 (0x0644)
TEACV0.0 (0x), rev 1.10/2.00, addr 3
Nov 14 20:55:16 arm64 /netbsd: [ 1632636.5671868] umass1: using UFI over
CBI with CCI
Nov 14 20:55:16 arm64 /netbsd: [ 1632636.5681880] atapibus0 at umass1: 2
targets
Nov 14 20:55:16 arm64 /netbsd: [ 1632636.6382151] sd1 at atapibus0 drive 0:
 disk removable
Nov 14 20:55:17 arm64 /netbsd: [ 1632637.5163701] sd1: 1440 KB, 80 cyl, 2
head, 18 sec, 512 bytes/sect x 2880 sectors

tail -f /var/log/messages on one console, and:

# scsictl sd1 format
/dev/rsd1: Check Condition on CDB: 1a 00 03 00 24 00
SENSE KEY: No Additional Sense
 ASC/ASCQ: No Additional Sense Information

came out this time!   NO console messages.

Now, unplug, and re-plug the USB in:


Nov 15 23:42:22 arm64 /netbsd: [ 1728677.3990874] sd1(umass1:0:0): not
ready, data = 00 00 00 00 3a 00 00 00 00 00
Nov 15 23:42:22 arm64 /netbsd: [ 1729062.2630115] sd1: detached
Nov 15 23:42:22 arm64 /netbsd: [ 1729062.2630115] atapibus0: detached
Nov 15 23:42:22 arm64 /netbsd: [ 1729062.2670131] umass1: detached
Nov 15 23:42:22 arm64 /netbsd: [ 1729062.2700137] umass1: at uhub2 port 1
(addr 3) disconnected

Nov 15 23:42:29 arm64 /netbsd: [ 1729069.0440298] umass1 at uhub2 port 1
configuration 1 interface 0
Nov 15 23:42:29 arm64 /netbsd: [ 1729069.0480306] umass1: TEACV0.0 (0x0644)
TEACV0.0 (0x), rev 1.10/2.00, addr 3
Nov 15 23:42:29 arm64 /netbsd: [ 1729069.0550327] umass1: using UFI over
CBI with CCI
Nov 15 23:42:29 arm64 /netbsd: [ 1729069.0560337] atapibus0 at umass1: 2
targets
Nov 15 23:42:29 arm64 /netbsd: [ 1729069.1262885] sd1 at atapibus0 drive 0:
 disk removable
Nov 15 23:42:30 arm64 /netbsd: [ 1729069.9404460] sd1: 1440 KB, 80 cyl, 2
head, 18 sec, 512 bytes/sect x 2880 sectors


Try again:

# scsictl sd1 format
/dev/rsd1: Check Condition on CDB: 1a 00 03 00 24 00
SENSE KEY: No Additional Sense
 ASC/ASCQ: No Additional Sense Information

Same as before.  No messages is /var/log/messages



I see other unexpected behavior; when I copy to identical files that are
exactly 1/2 of 1.4 MB long
# ll f1 f2

-rw-r--r--  1 mac  wheel  737280 Nov 15 02:53 f1
-rw-r--r--  1 mac  wheel  737280 Nov 15 02:54 f2

Each of these is 1440 sectors (std 512-byte sectors); I know the diskette
is 'perfect' (no defects), yet when I write both of these files to the
mounted "/a" filesystem, only f1 gets fully written, and then it complains
there's not enough room for f2:

# cp f2 /a
cp: /a/f2: No space left on device
arm64# ll /a
total 2592
-rwxr-xr-x  1 root  wheel  737280 Nov 15 08:06 f1*
-rwxr-xr-x  1 root  wheel  589824 Nov 15 23:59 f2*

If I rm /a/f2 and then write it again, there is even less 'space':

# rm /a/f2
arm64# cp f2 /a
cp: /a/f2: No space left on device
arm64# ll /a
total 1568
-rwxr-xr-x  1 root  wheel  737280 Nov 15 08:06 f1*
-rwxr-xr-x  1 root  wheel   65536 Nov 16 00:00 f2*


Thanks, again for any pointers / suggestions.


On Mon, Nov 14, 2022 at 1:29 PM Michael van Elst  wrote:

> On Mon, Nov 14, 2022 at 09:33:07AM -0800, Michael Cheponis wrote:
> > *# scsictl sd1 format/dev/rsd1: device had unknown status 4*
>
> Is there any other message (on console) ?
>
> There are 3 cases that produce a 'status 4':
>
> - "have short sense" (printed only with SCSI debugging)
> - "passthrough: adapter inconsistency"
> - "unknown error category %d from adapter"
>
> Greetings,
> --
> Michael van Elst
> Internet: mlel...@serpens.de
> "A potential Snark may lurk in every tree."
>


Re: noob Question: How to format a floppy on a USB floppy disk drive (on RPi 4) ?

2022-11-14 Thread Michael Cheponis
*# scsictl sd1 format/dev/rsd1: device had unknown status 4*

The dd trick seems to work only if the diskette is pre-formatted.

great suggestions, thank you.  I'll keep whacking at this.

-Mike





On Mon, Nov 14, 2022 at 9:11 AM Michael van Elst  wrote:

> michael.chepo...@gmail.com (Michael Cheponis) writes:
>
> >I would think 'fdformat' would work, but...
>
> >*arm64# ./fdformat -f /dev/rsd1
> >*fdformat: Device `/dev/rsd1' does not support floppy formatting:
> >Inappropriate ioctl for device*
>
>
> Try 'scsictl sd1 format'.
>
>


noob Question: How to format a floppy on a USB floppy disk drive (on RPi 4) ?

2022-11-14 Thread Michael Cheponis
I would think 'fdformat' would work, but...

*[ 1063553.609981] umass1 at uhub2 port 3 configuration 1 interface 0*
*[ 1063553.612982] umass1: TEACV0.0 (0x0644) TEACV0.0 (0x), rev
1.10/2.00, addr 3*
*[ 1063553.620984] umass1: using UFI over CBI with CCI*
*[ 1063553.621985] atapibus0 at umass1: 2 targets*
*[ 1063553.692011] sd1 at atapibus0 drive 0:  disk
removable*
*[ 1063554.506165] sd1: 1440 KB, 80 cyl, 2 head, 18 sec, 512 bytes/sect x
2880 sectors*


*# disklabel sd1
 *
*# /dev/rsd1:*
*type: ATAPI*
*disk: USB UF000x*
*label: default label*
*flags: removable*
*bytes/sector: 512*
*sectors/track: 18*
*tracks/cylinder: 2*
*sectors/cylinder: 36*
*cylinders: 80*
*total sectors: 2880*
*rpm: 10240*
*interleave: 1*
*trackskew: 0*
*cylinderskew: 0*
*headswitch: 0   # microseconds*
*track-to-track seek: 0  # microseconds*
*drivedata: 0*


*3 partitions:*
*#sizeoffset fstype [fsize bsize cpg/sgs]*
* a:  2880 0 4.2BSD  0 0 0  # (Cyl.  0 -
  79)*
* c:  2880 0 unused  0 0# (Cyl.  0 -
  79)*
*disklabel: boot block size 0*
*disklabel: super block size 0*



*arm64# ./fdformat -f /dev/rsd1
*
*fdformat: Device `/dev/rsd1' does not support floppy formatting:
Inappropriate ioctl for device*
*arm64# ./fdformat -f /dev/rsd1a
   *
*fdformat: Device `/dev/rsd1a' does not support floppy formatting:
Inappropriate ioctl for device*
*arm64# ./fdformat -f /dev/rsd1c
   *
*fdformat: Device `/dev/rsd1c' does not support floppy formatting:
Inappropriate ioctl for device*
*arm64# ./fdformat -f /dev/rsd1e
   *
*fdformat: Cannot open /dev/rsd1e: Device not configured*

*NetBSD arm64 9.99.102 NetBSD 9.99.102 (MIKE64) #0: Wed Oct 26 22:54:20 UTC
2022  mac@arm64:/usr/obj/sys/arch/evbarm/compile/MIKE64 evbarm*  (same as
GENERIC64 but HZ=1000)



mtools expects there to be a low-level format available from the OS.

Thanks for any pointers here!


The other thing is: if I format on a different machine, when reading /
writing and some floppy HW error occurs, pretty much, the only way to
'clear' the error is to unplug the USB connector & plug it back in.  The
machine more or less 'hangs' if, e.g., a sector has gone bad.

I know these questions are from a different era of computing, but, gosh, I
do really like the backward compatibility of NetBSD.


Thanks again,
-Mike


Re: Bug in NetBSD grep ?

2022-08-17 Thread Michael Cheponis
On arm64 / RPi 4 9.99.96  this gives "00:00:" as expected.

I know this is quite ancient  (April '22 version of -current).


On Tue, Aug 16, 2022 at 1:41 PM Marc Baudoin  wrote:

> Hi,
>
> The following command-line:
>
> echo 00:00: | grep -E '^([0]{2}[:-]){2}$'
>
> doesn't print anything on NetBSD (9.3) but it prints 00:00: back
> (as it should, unless I made a mistake in my regular expression):
> - on NetBSD with GNU grep from pkgsrc
> - on FreeBSD with their standard grep (which claims to be
>   GNU-compatible)
> - on Linux (with GNU grep)
>
> Is there a problem with the grep command shipped with NetBSD?
>


A book seems to be missing here...

2022-08-10 Thread Michael Cheponis
Was looking at no-starch press, and saw these 2 books:
http://culver.net/NetBSD/no-starch.jpg

And I realized, you know, there seems to be a 'missing' book --- I see only
Absolute FreeBSD and Absolute OpenBSD.

Is there any status on a  "NetBSD Book"  ?   Or is this pretty much it:
http://www.netbsd.org/docs/guide/en/?   (Which is great!  just not Dead
Trees.)


Re: Release

2021-12-16 Thread Michael Cheponis
The last "Danger" smartphone -- some say still the very best smartphone for
its time -- used NetBSD under the hood.  It was really fast and responsive,
small, easy to fit onto the processor -- all from a buddy of mine who
worked at Danger in SW.  Danger did the App SW, which was also very good.
 But it was NetBSD under the hood.  My buddy showed an early prototype to
me at the time, and I was jealous.

I do not know if the mods needed to run NetBSD that platform ever made it
back into MAIN.  ('cause BSD license and all)

https://en.wikipedia.org/wiki/Danger_Hiptop


On Thu, Dec 16, 2021 at 1:04 AM Piper H  wrote:

> Is there a mobile OS based on BSD, besides OSX?
>
> On Thu, Dec 16, 2021 at 2:18 PM Miko Larsson  wrote:
>
>> When it's ready ;p
>>
>> --
>> ~~miko
>>
>> On 12/15/21, Todd Gruhn  wrote:
>> > When is the next official NetBSD release?
>> >
>>
>>
>> --
>> ~~miko
>>
>


Re: Running docker containers with podman (on NetBSD!)

2021-09-05 Thread Michael Cheponis
Perhaps not on-topic, but...  I put the "options HZ=1000" into my RPi
config (as Alistair suggests, it's GENERIC64 plus this one extra options
line) and now

*$ sysctl kern.clockrate*
*kern.clockrate: tick = 1000, tickadj = 4, hz = 1000, profhz = 1000, stathz
= 1000*

the whole "UI" feels more responsive.   "Buttery" even.  Yes, I know,
that's not much of a technical description.

-Mike



On Sun, Sep 5, 2021 at 12:03 AM Alistair Crooks  wrote:

>
>
> On Sat, Sep 4, 2021 at 14:04  wrote:
>
>> Hi all,
>>
>> I added a package to pkgsrc called Podman.
>> It's a tool for running OCI containers, and it has the same command line
>> behaviour as the docker command line argument.
>>
>> There are some selling points for it over docker, but the most important
>> for us is the fact it has a mode where it spawns a Linux VM to talk to
>> for you, so it runs on NetBSD!
>>
>> One caveat is that NetBSD somewhat struggles running virtualized Linux
>> by default. The virtualized ticks are just too slow, so it panics with:
>>   Kernel panic - not syncing: IO-APIC + timer doesn't work! Boot with
>>   apic=debug and send a report. Then try booting with the 'noapic' option.
>>
>> One way to work around it, convenient for this purpose, is to rebuild
>> your kernel with "options HZ=1000" added, then you don't need to edit
>> the command line arguments in the VM.
>>
>> Usage instructions:
>> Install pkgsrc/sysutils/podman from pkgsrc-current
>> Initialize and start a VM with:
>> podman machine init
>> podman machine start
>>
>> And then you can use it much like the docker command:
>> > podman run -it alpine sh -c "apk add file; file -L /bin/sh"
>> fetch
>> https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
>> fetch
>> https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
>> (1/2
>> )
>> Installing libmagic (5.40-r1)
>> (2/2) Installing file (5.40-r1)
>> Executing busybox-1.33.1-r3.trigger
>> OK: 13 MiB in 16 packages
>> /bin/sh: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV),
>> dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped
>
>
> This is awesome, thank you!
>
> Is there room for a separate PODMAN kernel config that just includes
> GENERIC and then sets the frequency?
>
>>
>>
>>


libm rounding accuracy?

2021-08-26 Thread Michael Cheponis
https://blog.sigplan.org/2021/08/26/high-performance-correctly-rounded-math-libraries-for-32-bit-floating-point-representations/

describes "RLibm" that correctly rounds 32-bit results for many
common math/trig functions, and compares their library to glibc and Intel.

It's interesting that the 32-bit gnu library has significant numbers of
rounding errors; and, when the same were tried with gnu 64-bit doubles,
there were *still* errors when considered as 32-bit floats (a few, but
still...).

How well do we do on this metric?

I do have one sort-of datapoint: I converted an orbital prediction program
that used doubles to using long doubles.  Ran long predictions for several
satellites, and found a difference of e.g. 1 microsecond when a body
reaches apogee for long double vs double; and only once.  I conclude for
this application, doubles are totally adequate.   And, although floating
point numerics can be complicated, it would seem we do 'pretty good' when
using doubles.

-Mike


Re: MPV results

2021-07-25 Thread Michael Cheponis
VLC on non-NetBSD machines sometimes operates this way (stuttering /
freezing) so much so that I now use AnyDVD on Windows, which seems to have
taken the VLC codebase and fixed lots of things.

By the way, an excellent intro to digital video is https://xiph.org/video/
Episode 1.

On Sun, Jul 25, 2021 at 10:09 AM Todd Gruhn  wrote:

> As much as I hate the command-line inteface of MPV -- I am quite
> convinced that it is superior to VLC, now...
>
> On Sun, Jul 25, 2021 at 11:26 AM Rhialto  wrote:
> >
> > On Sat 24 Jul 2021 at 22:15:45 -0400, Todd Gruhn wrote:
> > > I attached a copy of some errors I noticed. Some of them may have
> repeated
> > > 10,000x of more. I dont know if it means anything.
> >
> > My guess is that it is just a sloppily mastered dvd, which doesn't quite
> > conform to the specifications. Maybe the thought was to make it
> > unplayable on software players, but if so, the attempt failed, at least
> > for mpv.
> >
> > -Olaf.
> > --
> > ___ "Buying carbon credits is a bit like a serial killer paying someone
> else to
> > \X/  have kids to make his activity cost neutral." -The BOFH
> falu.nl@rhialto
> >
>


Re: Compiling NetBSD-HEAD kernel sources

2021-06-29 Thread Michael Cheponis
I, too, have started w/GENERIC and commented out h/w I don't have; these
days, I don't bother, because we have plenty of memory & disk (relatively
on modern machines).  AND, if you (can) stick w/GENERIC -- then you can
compare against the Official Release if there are problems.

Another reason I don't often mess w/GENERIC config is: the whole 'config'
mechanism seems kinda brittle.  I often break a config by doing things that
seem obvious to me, but don't work.

My advice: Stick with GENERIC, if you can; and add in / uncomment lines for
the extra support you need.


On Tue, Jun 29, 2021 at 4:05 AM Todd Gruhn  wrote:

> I have never tried writing my own NetBSD config. I always
> started with GENERIC, then commented out any hardware
> that is not on my system.
>
> On Tue, Jun 29, 2021 at 12:50 AM Martin Husemann 
> wrote:
> >
> > On Mon, Jun 28, 2021 at 08:48:31PM -0400, Todd Gruhn wrote:
> > > Oh, we
> >
> > I write my own kernel configs as differences to GENERIC (or something
> > already based on it (arch dependend)).
> >
> > Like:
> >
> > ---8<---
> > include "arch/sparc64/conf/MODULAR"
> > no spkr* at audio?
> > no config netbsd
> > config  netbsd  root on "wedge:sb2k5root" type ?
> > no sbus
> > no wd* at atabus?
> > wd0 at atabus4 drive 0 flags 0x0f00 # disable UDMA on our SD card
> thingy
> > wd* at atabus? drive ? flags 0
> > options  DEBUG
> > options  LOCKDEBUG
> > --->8---
> >
> >
> > This is not guaranteed to be future-proof, but very easy to adapt to
> later
> > changes.
> >
> > Martin
>


Re: possible new feature: unrm ?

2020-07-01 Thread Michael Cheponis
Malcom H sent this msg directly to me, but I do think it's useful on this
tread:

filesystems which support creation of checkpoints and/or snapshots are
probably the appropriate way to solve that issue - zfs is one that comes to
mind, although istr there is a "fssnap" feature in ffs in NetBSD but I
haven't used it in ages ...

done at the filesystem level with zfs you do indeed get directory trees,
permissions, ACLs and everything back, because with zfs' copy-on-write
model you are looking at files which reference exactly the same blocks they
had when the snapshot was taken

creative ways to manage generation of snapshots on a system will let you
walk previous versions of your filesystem at any arbitrary time that you
create them - albeit with some penalty for keeping track of the differences
between the filesystem state as it was then and how it is now ...

Regards,
Malcolm


I like the idea that every file is treated as if the FS were one, giant,
VCS...

On Wed, Jul 1, 2020 at 9:35 AM Hauke Fath  wrote:

> On 2020-07-01 18:25, Michael Cheponis wrote:
> > I agree that backups are necessary, but who hasn't had a corrupted
> backup?
> > And it's much less convenient.  With disks so big these days, a 'shadow
> > filesystem' seems most logical to me.
>
> There are scripts which will create and remove a set of snapshots on
> zfs, which would be pretty much what you have in mind.
>
> Traditional Unix filesystems don't support this well, I am afraid.
>
> Cheerio,
> Hauke
>
>
> --
>   The ASCII Ribbon CampaignHauke Fath
> () No HTML/RTF in email Institut für Nachrichtentechnik
> /\ No Word docs in email TU Darmstadt
>   Respect for open standards  Ruf +49-6151-16-21344
>


Re: possible new feature: unrm ?

2020-07-01 Thread Michael Cheponis
Yes, it's possible to move to ~/.Trash or something -- but now you need to
write ever-increasingly-complicated scripts to e.g. unrm a directory tree.

I agree that backups are necessary, but who hasn't had a corrupted backup?
And it's much less convenient.  With disks so big these days, a 'shadow
filesystem' seems most logical to me.

Heck, if you think about it, this is precisely what VCSs like git or
subversion do -- they give you 'infinite undelete'.  I'm just saying, gee,
isn't that a grand idea --- shouldn't we do that for ALL files, by default?


On Wed, Jul 1, 2020 at 2:42 AM Ottavio Caruso <
ottavio2006-usenet2...@yahoo.com> wrote:

> On Wed, 1 Jul 2020 at 01:18, Michael Cheponis
>  wrote:
> >
> > Have you ever done this:
> >
> > $ rm good-stuff
> > $ echo oh noo\!
> >
> > because good-stuff is in the bitbucket of no return.
> >
> > unrm exists as a shell script:
> http://freshmeat.sourceforge.net/projects/unrm
> >
> > But, as the commenter says, it would be great to restore filenames and
> directories.
> >
> > TOPS-20 had this nifty feature where it would keep all versions of
> deleted files until one did an EXPUNGE.
> >
> > The idea would be to keep a 'duplicate' copy of the filesystem data for
> deleted files, as well -- a kind of shadow filesystem.
> >
> > If the filesystem was getting full, it could delete the oldest files in
> the 'shadow' to make room.
> >
> > So I'm proposing that "rm" move files to the shadow FS, and some other
> command or switch to rm to really remove them(e.g. temp files).
> >
> >
>
> I can't actually get to download that script. I used to have a script
> that moved the file to ~/Trash and then aliased that to rm. Or just:
>
> alias rm='rm -i'
>
> --
> Ottavio Caruso
>


possible new feature: unrm ?

2020-06-30 Thread Michael Cheponis
Have you ever done this:

$ rm good-stuff
$ echo oh noo\!

because good-stuff is in the bitbucket of no return.

unrm exists as a shell script:
http://freshmeat.sourceforge.net/projects/unrm

But, as the commenter says, it would be great to restore filenames and
directories.

TOPS-20 had this nifty feature where it would keep all versions of deleted
files until one did an EXPUNGE.

The idea would be to keep a 'duplicate' copy of the filesystem data for
deleted files, as well -- a kind of shadow filesystem.

If the filesystem was getting full, it could delete the oldest files in the
'shadow' to make room.

So I'm proposing that "rm" move files to the shadow FS, and some other
command or switch to rm to really remove them(e.g. temp files).


Re: cvs better than git?

2020-06-17 Thread Michael Cheponis
Where I work, we are forced into using git.  So, I've made peace using it.
Yes, it sucks.  Yes, it's glitter on ...something.  But there it is.  And I
personally use gitless, and find it's a clear model that works.

BSD is important partly because it is NOT part of the linux monoculture.  I
understand.

I guess the real question is: is something broken?  For pkgsrc-wip, for a
bunch of reasons, they decided on git.

If something's not broken otherwise, why change?   That's legitimate, too.

On Wed, Jun 17, 2020 at 12:03 PM Sad Clouds 
wrote:

> On Wed, 17 Jun 2020 09:11:04 -0700
> Michael Cheponis  wrote:
>
> > If you want a thirty-minutes summary presentation, watch "What’s
> > Wrong With Git?" from Git Merge 2017
> > <https://www.youtube.com/watch?v=31XZYMjg93o>.
> >
> > The end result of this work is Gitless,  a simple version control
> > system built on top of Git.
>
> OK I get it - you can't polish a turd, but you can roll it in glitter.
>


Re: cvs better than git?

2020-06-17 Thread Michael Cheponis
Two points:

1) As much as folks (like me, Johnny) don't like it:  git is THE most
widely-used rcs in the world, by far;  I consider it just a kind of
annotated tar file.

2) git complexity (and user confusion) comes about due to the lack of
conceptual integrity of the design / command structure.  I believe it is
this problem which annoys most.

To work on this problem, MIT researchers published two papers:

   - Purposes, Concepts, Misfits, and a Redesign of Git
   
   S. P. De Rosso and D. Jackson. In *Proceedings of the 2016 ACM SIGPLAN
   International Conference on Object-Oriented Programming, Systems,
   Languages, and Applications (OOPSLA 2016)*
   - What's Wrong with Git? A Conceptual Design Analysis
   
   S. Perez De Rosso and D. Jackson. In *Proceedings of the 2013 ACM
   International Symposium on New Ideas, New Paradigms, and Reflections on
   Programming & Software (Onward! 2013)*

If you want a thirty-minutes summary presentation, watch "What’s Wrong With
Git?" from Git Merge 2017 .

The end result of this work is Gitless,  a simple version control system
built on top of Git.

https://gitless.com/

Perhaps, if there were a commitment to stick with gitless, the confusion
and pain that git sometimes creates could be eliminated.



On Wed, Jun 17, 2020 at 6:35 AM mayur...@kathe.in  wrote:

> On Wednesday, June 17, 2020 05:58 PM IST, Johnny Billquist <
> b...@update.uu.se> wrote:
>
> > On 2020-06-17 14:24, Mayuresh wrote:
> > > On Wed, Jun 17, 2020 at 02:07:46PM +0200, Johnny Billquist wrote:
> > >> I could go on about my objects, and the possible risks and issues,
> but I
> > >> think if this rant isn't enough to start you thinking, I doubt any
> more text
> > >> from me will change anything.
> > >
> > > Risk management is important. Given we do that, utilizing such
> services to
> > > our benefit isn't so bad - for example as a mirror rather than primary
> > > storage.
> > >
> > > I mean I'd not completely hold myself back from using such services,
> if I
> > > can benefit from them, as long as I am not being critically dependent
> on
> > > them.
> >
> > What is the benefit then? Now I'm being curious...
> >
> > I mean, if we would be having the primary repository our self, and just
> > have them be a mirror. Just a simple way of adding resources? Is the
> > load of people checking the code out that big? How much can we save
> > there then? Or what other benefits do you see?
>
> do you think high-quality, performant hardware and high-volume, quality
> network connectivity turns out to be as low-cost as "free" (service from
> github)?
> i second that idea of having a budget git repository on hardware owned by
> "the netbsd foundation" which is mirrored by github and takes care of all
> the load of all developers checking in/out their code.
> the project could save big-time on costs, have a safe primary repository
> of all the code, while reaping all the benefits of a large corporation
> offering free high-performance services to be at the developer-facing end

Re: too many inodes?

2020-04-27 Thread Michael Cheponis
There is some progress.  The trick is the -N flag to newfs, which shows
plenty of super-block backups:
S# newfs -N -O 2 dk0
/dev/rdk0: 9537535.0MB (19532871680 sectors) block size 16384, fragment
size 2048
using 51572 cylinder groups of 184.94MB, 11836 blks, 22976 inodes.
super-block backups (for fsck_ffs -b #) at:
160, 378912, 757664, 1136416, 1515168, 1893920, 2272672, 2651424, 3030176,
3408928, 3787680, 4166432, 4545184, 4923936, 5302688, 5681440, 6060192,
6438944, 6817696, ...


But even here, for each super-block listed, I got this result (of course,
the number was 160,378912, etc on the other attempts)

# fsck_ffs -y -b 160 /dev/rdk0

 ~
Alternate super block location: 160
** /dev/rdk0
BAD SUPER BLOCK: MAGIC NUMBER WRONG
# fsck_ffs -y -b 160 /dev/dk0

~
Alternate super block location: 160
** /dev/rdk0
BAD SUPER BLOCK: MAGIC NUMBER WRONG
#

Feels...hosed

On Mon, Apr 27, 2020 at 12:17 PM Christos Zoulas 
wrote:

> In article <
> caoax04pbwg4p2cq31v0gz7mpza7bc-jrvc2fusdojl-wgof...@mail.gmail.com>,
> Michael Cheponis   wrote:
> >-=-=-=-=-=-
> >
> >I plugged in a 10TB USB disk, was working fine, then today it got weird.
> >
> >
> >
> >*# ls
> >/t>▒x4S▒▒XWе▒3▒▒Hj▒▒l▒▒gw,▒=▒&▒X▒▒צA▒▒▒B▒w  l: Invalid argument*
> >
> >*# umount -f /t*
> >
> >
> >
> >
> >
> >*# fsck -f -tffs /dev/dk0** /dev/rdk0** File system is already clean**
> Last
> >Mounted on /t** Phase 1 - Check Blocks and Sizestoo many inodes
> >18446744073214959280*
> >
> >Is the data gone that I've been loading onto it for the past several
> weeks?
>
> Try using an alternative superblock.
>
> christos
>
>


too many inodes?

2020-04-26 Thread Michael Cheponis
I plugged in a 10TB USB disk, was working fine, then today it got weird.



*# ls /t>▒x4S▒▒XWе▒3▒▒Hj▒▒l▒▒gw,▒=▒&▒X▒▒צA▒▒▒B▒w  l: Invalid argument*

*# umount -f /t*





*# fsck -f -tffs /dev/dk0** /dev/rdk0** File system is already clean** Last
Mounted on /t** Phase 1 - Check Blocks and Sizestoo many inodes
18446744073214959280*

Is the data gone that I've been loading onto it for the past several weeks?


Re: Hard Real-Time?

2020-04-19 Thread Michael Cheponis
> Unix can't do hard real time, he is still correct

I'm not sure I have been clear: I modified 4.3BSD to do Hard Real Time.
https://youtu.be/Bd5iEke6UlE shows you all the machines that operated with
my mods to 4.3BSD.

And, I'd like to modify NetBSD to also be Hard Real Time.  Ultimately, it's
just  "Can you guarantee that you task switch to my robot task within
 time?"

For Running, Hopping, and Jumping robots in the video,  was <
100 usec.  Given that the method I chose worked on a 1 MIPS uniprocessor,
I'm hopeful that a 1.2 GHz quad-processor machine running at over 2000 MIPS
will be able to do the same.  Maybe even a little better.

Thanks again,
Mike


p.s. For a little more detail, a KW11-P programmable clock interrupted at 1
KHz.  https://usermanual.wiki/Document/DEC11HPWBDKW11POct72.1688176585.pdf
This clock conveniently had a register counting up at 100 kHz that could be
read any time.  It was synchronized to the 1 kHz interrupts (every 100
counts gives the interrupt).  When the interrupt was taken, the interrupt
routine immediately read this register to get the *actual* time it had
received control; And the difference between that register and a 'perfect'
multiple of 100 counts meant the code was some number of 'counts' later
than desired.  So if you read 14307, that meant that you got to that 1st
instruction 7 x 10 usec = 70 usec later.  This is how I know what the
maximum delay was.

The other thing, for fun, had the simplest interrupt handler, which just
did a return from interrupt.  Interrupt was triggered by a change on an
external pin.  I ran a signal generator into this pin and cranked up the
knob until the vax crashed.  I believe this was around 12 kHz.   What was
fun was turning up the sig gen frequency, and watching the machine get
slower, and slower, and slooower - because of course it was spending more
and more time fielding the ever-more-frequent interrupts.

On Sun, Apr 19, 2020 at 8:42 PM Johnny Billquist  wrote:

> Just wanted to point out that indeed, none of the "other" Unixes do hard
> real time, and neither do NetBSD.
> Unix was not designed with real time in mind, much less hard real time.
> It is usually good enough for soft real time, and that sounds like what
> you are looking for here as well. If you just have fast enough hardware,
> you usually will get responses within a very short time. But again, that
> is not what defines hard real time.
>
> If you get into a discussion with someone else, and that someone else
> says Unix can't do hard real time, he is still correct, no matter how
> much you fiddled around with your RPi.
>
>Johnny
>
> On 2020-04-20 03:58, Michael Cheponis wrote:
> > Thanks to all who contributed here, I'm learning a lot.
> >
> > As to what is 'real time' -- as you can probably tell by watching the
> > video at the URL, the robots were dynamically stable - they had to react
> > within a millisecond (Read sensors; do all control; storage of data for
> > post-run analysis, run all the low-level joint servos (12 of them on the
> > 4-legged machine) -- and because we did not have sensors for everything,
> > some had to be synthesized (e.g. if you have a position sensor, and you
> > take regular samples, you can approximate velocity).  This requirement
> > means that you need low 'jitter' from when the pin goes high (it was
> > usually controlled by a clock) to when you can read the raw sensors -
> > obviously, that was done first to minimize this jitter.  So to me, 'real
> > time' means response within some specific number of microseconds.
> >
> > At one point, Greg, I built a Z8002 + Weitek floating point chip to sit
> > between the vax and the 4-legged robot.  This indeed helped because now
> > the low-level control (servoing) was done by this Z8002+Weitek, and the
> > 'planning' was done in the vax.   It was about 4x faster than the vax
> > could servo; the joint motion was very smooth, because there was also
> > less jitter (it wasn't running unix).
> >
> > We ended up not using it after all that effort because (1) The ability
> > to have 'everything' on one machine was a Big Win.  and (2) Now you had
> > two different software stacks, which increases the overall complexity.
> > The biggest 'win' having it all on one machine was for data collection
> > and analysis: the kernel driver locked down a lot of memory, and wrote
> > dozens of sensors and computed  values into a big circular buffer.  When
> > the robot failed (which was 90% of the time), we push another button,
> > generating an NMI, which would freeze the circular buffer.   Recall,
> > this driver was activated by simply issuing an ioctl() to activate the
> > driver.  When the time-sharing part had control again, the data were
> &

Re: Hard Real-Time?

2020-04-19 Thread Michael Cheponis
Thanks to all who contributed here, I'm learning a lot.

As to what is 'real time' -- as you can probably tell by watching the video
at the URL, the robots were dynamically stable - they had to react within a
millisecond (Read sensors; do all control; storage of data for post-run
analysis, run all the low-level joint servos (12 of them on the 4-legged
machine) -- and because we did not have sensors for everything, some had to
be synthesized (e.g. if you have a position sensor, and you take regular
samples, you can approximate velocity).  This requirement means that you
need low 'jitter' from when the pin goes high (it was usually controlled by
a clock) to when you can read the raw sensors - obviously, that was done
first to minimize this jitter.  So to me, 'real time' means response within
some specific number of microseconds.

At one point, Greg, I built a Z8002 + Weitek floating point chip to sit
between the vax and the 4-legged robot.  This indeed helped because now the
low-level control (servoing) was done by this Z8002+Weitek, and the
'planning' was done in the vax.   It was about 4x faster than the vax could
servo; the joint motion was very smooth, because there was also less jitter
(it wasn't running unix).

We ended up not using it after all that effort because (1) The ability to
have 'everything' on one machine was a Big Win.  and (2) Now you had two
different software stacks, which increases the overall complexity.  The
biggest 'win' having it all on one machine was for data collection and
analysis: the kernel driver locked down a lot of memory, and wrote dozens
of sensors and computed  values into a big circular buffer.  When the robot
failed (which was 90% of the time), we push another button, generating an
NMI, which would freeze the circular buffer.   Recall, this driver was
activated by simply issuing an ioctl() to activate the driver.  When the
time-sharing part had control again, the data were copied out of kernel
space into user space with another ioctl().  And of course the software to
drive the graphics display was also on the vax, so literally a few seconds
after the robot crapped out, we were looking at data from the run.

I think the lesson is: never discount the communications issues when
distributing computation.  They add system complexity and often delay.

With the RPi4 NetBSD support coming along nicely, I'd expect to use this.
It might be nice to be able to 'dedicate' a core to servicing the
interrupt, leaving the other 3 to continue regular operation.  Multi-core I
would hope would make things that much easer for this problem.

I'll look at gpioirq(4) and gpiopps(4) - sounds promising.  I'm happy to
hear the Global Interrupt Enable is used for only short times; and yes I
bet a high IPL will work.



There is another motive, which is to show how it's possible to run a modern
unix with a Real-Time process, specifically for robot control.  The other
*nix OSs out there don't do Hard Real Time, the best I've seen is a
microkernel below a regular kernel (not rump).   Again, this makes things
complicated.

I'll work on it and maybe it'll all 'just work'.

Thanks everybody,
Mike


On Sun, Apr 19, 2020 at 9:19 AM Sad Clouds 
wrote:

> On Sun, 19 Apr 2020 15:27:16 +0200
> Johnny Billquist  wrote:
>
> > Essentially, a hard real time system guarantees that it never takes
> > longer than some specified time for something to happen. And as far
> > as I know, NetBSD cannot give such guarantees. Various combinations
> > of events and situations can lock out interrupts for some time, and
> > there is no guaranteed upper bound to that time.
>
> Yes you're right, "hard real time" is more about not missing deadlines,
> rather than how fast something can be executed. Also the consequences of
> missing deadlines can be quite catastrophic, i.e. air bags not
> activating in time during a collision.
>
> The original poster mentioned something about controlling a robot with
> a raspberry pi. If the robot is not doing anything safety critical,
> then "soft real time" is probably something that NetBSD could provide.
>


Hard Real-Time?

2020-04-15 Thread Michael Cheponis
Is there already a way to do "hard real time" on NetBSD?

To me, "hard real time" means from an external pin going 'high' to the 1st
instruction of my driver executing is on the order of (up to) 10 usec.

Many eons ago, I did this on BSD4.3 VAX 785 and achieved <  about 100 usec
jitter.  It was a Royal Pain to do, since so many places in the kernel
turned off interrupts as it massaged various data structures.  The pain was
to find every one of those and break them down to absolutely minimize the
time interrupts were turned off.

But it worked:  Here it is controlling various hopping machines:
https://www.youtube.com/watch?v=mG_ZKXo6Rlg=youtu.be=34  I'm
sitting controlling the thing; the umbilical goes back to a UNIBUS
interface in the VAX.  Timesharing only slowed down; it did not stop during
operation.

I'm especially interested in getting the RPi to operate 'hard real time' on
NetBSD.  I mainly want to use the RPi to control a robot -- low  level as
well has higher-level planning/control.


Thanks for any pointers,
Mike


Re: tutorial on how to use iic on raspberry pi?

2020-02-12 Thread Michael Cheponis
Not too long ago, in order to get -current to boot, a new .dtb needs to be
used.

# cat config.txt
# Boot options, see
https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md
#
device_tree=bcm2710-rpi-3-b-plus.dtb
kernel_address=0x0140
#
# UART settings, see
https://www.raspberrypi.org/documentation/configuration/uart.md
#upstream_kernel=1
#uart_2ndstage=1
#
enable_uart=1
force_turbo=0

dtc -I dtb -O dts bcm2710-rpi-3-b-plus.dtb does produce similar output as
you mention.

Nonetheless,
# i2cscan iic0
i2cscan: couldn't open iic0: Device not configured

same for iic1 and iic2


(by they way, why is it i2c in some cases, and iic in others?)

# l -l /dev/iic*
crw---  1 root  wheel  201, 0 Jun 16  2019 /dev/iic0
crw---  1 root  wheel  201, 1 Jun 16  2019 /dev/iic1
crw---  1 root  wheel  201, 2 Jun 16  2019 /dev/iic2

So, for some reason, i2cscan is not finding any i2c bus.

On Wed, Feb 12, 2020 at 1:41 PM Michael van Elst  wrote:

> michael.chepo...@gmail.com (Michael Cheponis) writes:
>
> -rwxr-xr-x  1 root  wheel  22630 Jun 16  2019 bcm2837-rpi-3-b-plus.dtb*
>
> > Raspberry Pi 3 Model B Plus Rev 1.3 - so I'm not sure which of the
> >highlighted dtb files is used.
>
> That one would have i2c enabled. You can disassemble the dtb files with
> e.g.
>
> dtc -I dtb -O dts bcm2837-rpi-3-b-plus.dtb
>
> and get something including:
>
> i2c@7e205000 {
> compatible = "brcm,bcm2835-i2c";
> reg = <0x7e205000 0x1000>;
> interrupts = <0x02 0x15>;
> clocks = <0x04 0x14>;
> #address-cells = <0x01>;
> #size-cells = <0x00>;
> status = "okay";
> pinctrl-names = "default";
> pinctrl-0 = <0x0e>;
> clock-frequency = <0x186a0>;
> linux,phandle = <0x47>;
> phandle = <0x47>;
> };
>
> i2c@7e804000 {
> compatible = "brcm,bcm2835-i2c";
> reg = <0x7e804000 0x1000>;
> interrupts = <0x02 0x15>;
> clocks = <0x04 0x14>;
> #address-cells = <0x01>;
> #size-cells = <0x00>;
> status = "okay";
> pinctrl-names = "default";
> pinctrl-0 = <0x16>;
> clock-frequency = <0x186a0>;
> linux,phandle = <0x4f>;
> phandle = <0x4f>;
> };
>
> i2c@7e805000 {
> compatible = "brcm,bcm2835-i2c";
> reg = <0x7e805000 0x1000>;
> interrupts = <0x02 0x15>;
> clocks = <0x04 0x14>;
> #address-cells = <0x01>;
> #size-cells = <0x00>;
> status = "okay";
> linux,phandle = <0x17>;
> phandle = <0x17>;
> };
>
> --
> --
> Michael van Elst
> Internet: mlel...@serpens.de
> "A potential Snark may lurk in every tree."
>


Re: tutorial on how to use iic on raspberry pi?

2020-02-12 Thread Michael Cheponis
What combination of RPI model, kernel (and dtb files) you try to use ?

I'm using -current  *NetBSD 9.99.46 (GENERIC) *figuring it probably has the
latest & greatest.

Raspberry Pi 3 Model B Plus Rev 1.3 - so I'm not sure which of the
highlighted dtb files is used.

*# cd /boot*






*# ls -l *dtb  -rwxr-xr-x  1 root  wheel  27054 Dec 22 12:30
bcm2710-rpi-3-b-plus.dtb*-rwxr-xr-x  1 root  wheel  21522 Jun 16  2019
bcm2836-rpi-2-b.dtb*-rwxr-xr-x  1 root  wheel  21713 Jun 16  2019
bcm2837-rpi-3-a-plus.dtb*-rwxr-xr-x  1 root  wheel  22630 Jun 16  2019
bcm2837-rpi-3-b-plus.dtb*-rwxr-xr-x  1 root  wheel  22194 Jun 16  2019
bcm2837-rpi-3-b.dtb*-rwxr-xr-x  1 root  wheel  21651 Jun 16  2019
bcm2837-rpi-cm3-io3.dtb**

 Raspberry Pi 3 Model B Plus Rev 1.3 - so I'm not sure which of the
highlighted dtb files is used.

I've attached the 'strings' output of those two dtb files.  They both seem
to have i2c* entries.

Thanks for all help.



On Wed, Feb 12, 2020 at 12:01 AM Michael van Elst 
wrote:

> michael.chepo...@gmail.com (Michael Cheponis) writes:
>
> >Hi all, I want to hook up a sensor using iic on an RPi.  Is there a
> >tutorial somewhere on how to do this?  Do I have to compile a specific
> >config to enable iic because GENERIC doesn't?
>
> netbsd-9 has it defined in GENERIC and the dtb files we deliver have
> configured the i2c ports.
>
> netbsd-8 doesn't have a GENERIC kernel, you use the RPI kernel which
> also defines the iic interfaces.
>
> What combination of RPI model, kernel (and dtb files) you try to use ?
>
> --
> --
> Michael van Elst
> Internet: mlel...@serpens.de
> "A potential Snark may lurk in every tree."
>
raspberrypi,3-model-b-plus
brcm,bcm2837
Raspberry Pi 3 Model B+
aliases
=/soc/serial@7e215040
E/soc/serial@7e201000
M/soc/audio
S/soc/aux@7e215000
W/soc/sound
]/soc
a/soc/dma@7e007000
e/soc/interrupt-controller@7e00b200
j/soc/watchdog@7e10
s/soc/rng@7e104000
z/soc/mailbox@7e00b880
/soc/gpio@7e20
/soc/serial@7e201000
/soc/mmc@7e202000
/soc/mmc@7e202000
/soc/i2s@7e203000
/soc/spi@7e204000
/soc/i2c@7e205000
/soc/serial@7e215040
/soc/spi@7e215080
/soc/spi@7e2150c0
/soc/mmc@7e30
/soc/mmcnr@7e30
/soc/i2c@7e804000
/soc/i2c@7e805000
/soc/usb@7e98
/leds
/soc/fb
/soc/thermal@7e212000
/soc/axiperf
/soc/usb@7e98/usb-port@1/usb-port@1/ethernet@1
chosen
coherent_pool=1M 8250.nr_uarts=1
thermal-zones
cpu-thermal
cooling-maps
simple-bus
txp@7e004000
brcm,bcm2835-txp
cdisabled
dma@7e007000
brcm,bcm2835-dma
jdma0
dma1
dma2
dma3
dma4
dma5
dma6
dma7
dma8
dma9
dma10
dma11
dma12
dma13
dma14
dma-shared-all
watchdog@7e10
brcm,bcm2835-pm
brcm,bcm2835-pm-wdt
peri_image
h264
cprman@7e101000
brcm,bcm2835-cprman
rng@7e104000
brcm,bcm2835-rng
mailbox@7e00b880
brcm,bcm2835-mbox
gpio@7e20
brcm,bcm2835-gpio
Kdefault
dpi_gpio0
emmc_gpio22
emmc_gpio34
emmc_gpio48
gpclk0_gpio4
gpclk1_gpio5
gpclk1_gpio42
gpclk1_gpio44
gpclk2_gpio6
gpclk2_gpio43
i2c0_gpio0
i2c0_gpio28
i2c0_gpio44
i2c1_gpio2
i2c1_gpio44
jtag_gpio22
pcm_gpio18
pcm_gpio28
pwm0_gpio12
pwm0_gpio18
pwm0_gpio40
pwm1_gpio13
pwm1_gpio19
pwm1_gpio41
pwm1_gpio45
sdhost_gpio48
spi0_gpio7
spi0_gpio35
spi1_gpio16
spi2_gpio40
uart0_gpio14
uart0_ctsrts_gpio16
uart0_ctsrts_gpio30
uart0_gpio32
uart0_gpio36
uart0_ctsrts_gpio38
uart1_gpio14
uart1_ctsrts_gpio16
uart1_gpio32
uart1_ctsrts_gpio30
uart1_gpio40
uart1_ctsrts_gpio42
i2c_slave_gpio18
jtag_gpio4
dpi_18bit_gpio0
gpioout
alt0
spi0_pins
spi0_cs_pins
i2c0
i2c1
sdio_pins
bt_pins
uart0_pins
uart1_pins
audio_pins
serial@7e201000
brcm,bcm2835-pl011
arm,pl011
arm,primecell
uartclk
apb_pclk
Kdefault
cokay
mmc@7e202000
brcm,bcm2835-sdhost
T~  
rx-tx
cokay
Kdefault
i2s@7e203000
brcm,bcm2835-i2s
T~ 0
cdisabled
Kdefault
spi@7e204000
brcm,bcm2835-spi
T~ @
cdisabled
Kdefault
spidev@0
spidev
spidev@1
spidev
i2c@7e205000
brcm,bcm2835-i2c
T~ P
cdisabled
Kdefault
pixelvalve@7e206000
brcm,bcm2835-pixelvalve0
T~ `
cdisabled
pixelvalve@7e207000
brcm,bcm2835-pixelvalve1
T~ p
cdisabled
dpi@7e208000
brcm,bcm2835-dpi
core
pixel
cdisabled
dsi@7e209000
brcm,bcm2835-dsi0
escape
pixel
'dsi0_byte
dsi0_ddr2
dsi0_ddr
aux@7e215000
brcm,bcm2835-aux
T~!P
serial@7e215040
brcm,bcm2835-aux-uart
T~!P@
cokay
Kdefault
spi@7e215080
brcm,bcm2835-aux-spi
T~!P
cdisabled
spi@7e2150c0
brcm,bcm2835-aux-spi
T~!P
cdisabled
pwm@7e20c000
brcm,bcm2835-pwm
cdisabled
hvs@7e40
brcm,bcm2835-hvs
cdisabled
dsi@7e70
brcm,bcm2835-dsi1
escape
pixel
'dsi1_byte
dsi1_ddr2
dsi1_ddr
cdisabled
csi@7e80
brcm,bcm2835-unicam
cdisabled
csi@7e801000
brcm,bcm2835-unicam
cdisabled
port
endpoint
i2c@7e804000
brcm,bcm2835-i2c
cdisabled
Kdefault
i2c@7e805000
brcm,bcm2835-i2c
cdisabled
vec@7e806000
brcm,bcm2835-vec
cdisabled
pixelvalve@7e807000
brcm,bcm2835-pixelvalve2
cdisabled
hdmi@7e902000
brcm,bcm2835-hdmi
pixel
hdmi
audio-rx
cdisabled
usb@7e98
brcm,bcm2708-usb
usb2-phy
jusb
soft
usb-port@1
usb424,2514

tutorial on how to use iic on raspberry pi?

2020-02-11 Thread Michael Cheponis
Hi all, I want to hook up a sensor using iic on an RPi.  Is there a
tutorial somewhere on how to do this?  Do I have to compile a specific
config to enable iic because GENERIC doesn't?

I tried this:






*# i2cscan iic0


   i2cscan: couldn't open iic0: Device not configured# i2cscan iic1


 i2cscan: couldn't open
iic1: Device not configured# i2cscan iic2


   i2cscan: couldn't open iic2: Device not
configured*

*#** uname -a*
*NetBSD S.Culver.Net  9.99.46 NetBSD 9.99.46 (GENERIC)
#0: Tue Feb 11 00:57:11 UTC 2020 *



Thanks for any pointers.


Re: netbsd-8 build distribution error

2018-10-22 Thread Michael Cheponis
Hi, it's great this is fixed.

But, I do wonder: How is even possible to have something called "NetBSD
mumble STABLE  ..." not compile?  Because, you know, not compiling is kinda
Not Stable.

It would seem to me some automatic check isn't working -- the one that
guarantees buildability?

On Sun, Oct 21, 2018 at 1:10 PM Gua Chung Lim 
wrote:

> * Gua Chung Lim (gua.chung...@gmail.com) wrote:
> > There is no 'ifv_psz' member in struct ifvlan.
> > Let me try fixing it.
> Definitely correct,
> Try this patch...
>
> --- /usr/src/sys/net/if_vlan.c  2018-10-22 02:46:54.409390068 +0700
> +++ if_vlan.c   2018-10-22 02:46:30.235596617 +0700
> @@ -161,7 +161,7 @@
>  * instead of direct dereference
>  */
> kmutex_t ifv_lock;  /* writer lock for ifv_mib */
> -
> +   pserialize_t ifv_psz;
> LIST_HEAD(__vlan_mchead, vlan_mc_entry) ifv_mc_listhead;
> LIST_ENTRY(ifvlan) ifv_list;
> struct pslist_entry ifv_hash;
>
> Now build distribution fine, and I carry on with successfully build kernel.
>
> % uname -a
> NetBSD sirius 8.0_STABLE NetBSD 8.0_STABLE (GENERIC) #4: Mon Oct 22
> 02:50:55 +07 2018  root@sirius:/usr/obj/sys/arch/amd64/compile/GENERIC
> amd64
>
> Cheers!!
>
> --
> Gua Chung Lim
>
> "UNIX is basically a simple operating system,
> but you have to be a genius to understand the simplicity."
> -- Dennis M. Ritchie
>


Re: Simple way to securely access remote machine that's behind a NAT?

2018-09-29 Thread Michael Cheponis
Thanks everybody for help.  I really liked the .onion setup idea, but I
ended up using openvpn.  The documentation is very good, and the relevant
page for me was:
https://openvpn.net/index.php/open-source/documentation/miscellaneous/78-static-key-mini-howto.html

What is fantastic about openvpn is it can be used without knowing much, and
it 'does the right thing' and at the same time, allows apparently infinite
flexibility for more sophisticated setups.

The simple method described at that URL does require a single secret key be
shared between client and server.  I had to add "--cipher AES-256-CBC" on
both ends, as the default seemed to complain otherwise.

The additional 4 lines of config to do keep-alive works really well, too
(described at that URL).


Thanks again, awesome NetBSD community!

-Mike








On Tue, Sep 25, 2018 at 8:49 AM David Young  wrote:

> On Tue, Sep 25, 2018 at 03:04:56PM +0545, Brook Milligan wrote:
> > Just curious, could one also use either gre or gif to create a tunnel or
> does NAT mess that up?
>
> I added UDP encapsulation to gre(4) in NetBSD specifically to pierce NAT
> firewalls, however, I don't know if Linux also has a UDP encapsulation
> for GRE.
>
> Dave
>
> --
> David Young
> dyo...@pobox.comUrbana, IL(217) 721-9981
>


Simple way to securely access remote machine that's behind a NAT?

2018-09-25 Thread Michael Cheponis
Hi,

I have a (linux raspberry pi) that's remotely located and NATted in such a
way that I cannot control that part of the infrastructure, although  do
have complete control of the machine otherwise (e.g. access to root).

What I'd like to do is access it from my local NetBSD system (which does
have a  'real' IPv4 address), something like this:


1) Start some 'daemon' on the remote linux box that attempts a connection
to ...
2) .. my local NetBSD box.

And

3) some local NetBSD program that allows me to get a shell prompt of the
remote linux machine here on my NetBSD machine via the connection set up in
(1) and (2).


Clearly, if that remote machine had a Real IP Address, I could simply ssh
into it.

I've looked at VNC and it seems complicated for what I need.


Is there an 'easy' way to do this?   I'm ready to write some code otherwise.


Thank you all, and i apologize for such a novice question.

-Mike