Showing posts with label netbsd. Show all posts
Showing posts with label netbsd. Show all posts

Wednesday, May 18, 2022

NetBSD stuff

 mk.conf:

MAKE_JOBS=      4
DEPENDS_TARGET= bin-install

 ---

VBoxManage setextradata "NetBSD-92amd" CustomVideoMode1 1920x1080x32

 vesa list

vesa 0x160

---

 

Friday, February 26, 2021

Finding my way

 My last entry was a bunch of compile times with no context.

This post will give the context -hopefully!

First, I want to show why I think I may be on the right track:

iso-image ===> etc
make iso-image started at:  Fri Feb 26 12:57:59 AKST 2021
make iso-image finished at: Fri Feb 26 12:58:01 AKST 2021
===> Successful make iso-image
===> build.sh ended:      Fri Feb 26 12:58:01 AKST 2021
===> Summary of results:
         build.sh command:    ./build.sh -X /home/random/netbsd9/usr/xsrc -x -m sparc -j 5 -U -u -O /home/random/netbsd9/usr/obj -R /home/random/netbsd9/rel/rel-sparc -T /home/random/netbsd9/tooldir/tooldir-sparc release iso-image
         build.sh started:    Fri Feb 26 12:35:41 AKST 2021
         NetBSD version:      9.1_STABLE
         MACHINE:             sparc
         MACHINE_ARCH:        sparc
         Build platform:      Linux 4.19.0-14-amd64 x86_64
         HOST_SH:             /usr/bin/sh
         MAKECONF file:       /etc/mk.conf (File not found)
         TOOLDIR path:        /home/random/netbsd9/tooldir/tooldir-sparc
         DESTDIR path:        /home/random/netbsd9/usr/obj/destdir.sparc
         RELEASEDIR path:     /home/random/netbsd9/rel/rel-sparc
         Updated makewrapper: /home/random/netbsd9/tooldir/tooldir-sparc/bin/nbmake-sparc
         Successful make release
         Successful make iso-image
         build.sh ended:      Fri Feb 26 12:58:01 AKST 2021
===> . 

At this point, it seems as if I'm able to compile sparc/32 ...including X...in 23 minutes. That started at 12:35 and ended at 12:58. 

I haven't tested the iso to confirm that there's X on it, however. 

Even if that has messed up (and I've no reason to think it has) I'm still in the right direction. What I'm referring to is using some of the more advanced(ish) features of buildsh. I have set up a per-arch tools dir and built the tools for several architectures. The quick compile time of sparc32 shows that it's paying off. 

I have a shell script that still has some flaws, but will show you the general idea of what I'm trying to do:

$ cat ../makeit.sh
#!/bin/bash
export TTDR=$HOME/netbsd9/tooldir/tooldir-
export RREL=$HOME/netbsd9/rel/rel-
export OOBJ=$HOME/netbsd9/usr/obj
 for x in i386 sparc64
do
mkdir $RREL$x
./build.sh -X ~/netbsd9/usr/xsrc/ -x -m $x -j 5 -U -u -O $OOBJ -R $RREL$x -T $TTDR$x release iso-image

done

I'm setting up the directories, then the enviromental variables and having mixed results. As I was typing this up, my i386 compile crashed -and now I'm trying with arch-specific obj dirs -a change not reflected in the snippet above.

I also need to research how/what buildsh does with DESTDIR and how to set it, too.

Saturday, February 6, 2021

Note to future self, feb 2021

This blog post details a personal workflow experiment. This is for my own use only -if you found this entry because of google, whatever you should be aware that none of this is recommended. It's shit I'm trying for myself.

At least it compiles!

I was able to build CDE on NetBSD 9.1 by following the instructions and then running:

LANG=C make -k World


Friday, February 5, 2021

Four Seventeen...

 ===> build.sh ended:      Fri Feb  5 03:36:39 AKST 2021
===> Summary of results:
         build.sh command:    ./build.sh -j 5 -u -x -X /usr/xsrc release sets sourcesets iso-image-source
         build.sh started:    Thu Feb  4 23:19:31 AKST 2021
         NetBSD version:      9.99.77
         MACHINE:             amd64
         MACHINE_ARCH:        x86_64
         Build platform:      NetBSD 9.99.77 amd64
         HOST_SH:             /bin/sh
         MAKECONF file:       /etc/mk.conf
         TOOLDIR path:        /usr/src/obj/tooldir.NetBSD-9.99.77-amd64
         DESTDIR path:        /usr/src/obj/destdir.amd64
         RELEASEDIR path:     /usr/src/obj/releasedir
         Updated makewrapper: /usr/src/obj/tooldir.NetBSD-9.99.77-amd64/bin/nbmake-amd64
         Successful make release
         Building sets from pre-populated /usr/src/obj/destdir.amd64
         Built sets to /usr/src/obj/releasedir/amd64/binary/sets
         Successful make sourcesets
         Successful make iso-image-source
         build.sh ended:      Fri Feb  5 03:36:39 AKST 2021
===> .
beasty2021$

Sunday, December 27, 2020

ooof. 4 hours and 42 minutes to build 9.99.77!

 mkdir -p -m 0755 /usr/src/obj/releasedir/images

/usr/src/obj/tooldir.NetBSD-9.99.77-amd64/bin/x86_64--netbsd-install -r -p -c -m 444 NetBSD-9.99.77-amd64.iso /usr/src/obj/releasedir/images

iso-image ===> etc

make iso-image-source started at:  Sun Dec 27 07:55:04 AKST 2020

make iso-image-source finished at: Sun Dec 27 07:56:11 AKST 2020

===> Successful make iso-image-source

===> build.sh ended:      Sun Dec 27 07:56:11 AKST 2020

===> Summary of results:

         build.sh command:    ./build.sh -j 4 -u -x -X /usr/xsrc release sets sourcesets iso-image-source

         build.sh started:    Sun Dec 27 03:14:41 AKST 2020

         NetBSD version:      9.99.77

         MACHINE:             amd64

         MACHINE_ARCH:        x86_64

         Build platform:      NetBSD 9.99.77 amd64

         HOST_SH:             /bin/sh

         No $TOOLDIR/bin/nbmake, needs building.

         Bootstrapping nbmake

         MAKECONF file:       /etc/mk.conf

         TOOLDIR path:        /usr/src/obj/tooldir.NetBSD-9.99.77-amd64

         DESTDIR path:        /usr/src/obj/destdir.amd64

         RELEASEDIR path:     /usr/src/obj/releasedir

         Created /usr/src/obj/tooldir.NetBSD-9.99.77-amd64/bin/nbmake

         Updated makewrapper: /usr/src/obj/tooldir.NetBSD-9.99.77-amd64/bin/nbmake-amd64

         Successful make release

         Building sets from pre-populated /usr/src/obj/destdir.amd64

         Built sets to /usr/src/obj/releasedir/amd64/binary/sets

         Successful make sourcesets

         Successful make iso-image-source

         build.sh ended:      Sun Dec 27 07:56:11 AKST 2020

===> .

Command line:  ./build.sh -j 4 -u -x -X /usr/xsrc release sets sourcesets iso-image-source

Virtualbox, 4 cpus, Execution cap 95%, 10248mb of ram

----

Results from 11 Jan 2021:

----

make iso-image-source finished at: Mon Jan 11 03:33:14 AKST 2021

===> Successful make iso-image-source

===> build.sh ended:      Mon Jan 11 03:33:14 AKST 2021

===> Summary of results:

         build.sh command:    ./build.sh -j 4 -u -x -X /usr/xsrc release sets sourcesets iso-image-source

         build.sh started:    Sun Jan 10 23:54:07 AKST 2021

         NetBSD version:      9.99.77

         MACHINE:             amd64

         MACHINE_ARCH:        x86_64

         Build platform:      NetBSD 9.99.77 amd64

         HOST_SH:             /bin/sh

         No $TOOLDIR/bin/nbmake, needs building.

         Bootstrapping nbmake

         MAKECONF file:       /etc/mk.conf

         TOOLDIR path:        /usr/src/obj/tooldir.NetBSD-9.99.77-amd64

         DESTDIR path:        /usr/src/obj/destdir.amd64

         RELEASEDIR path:     /usr/src/obj/releasedir

         Created /usr/src/obj/tooldir.NetBSD-9.99.77-amd64/bin/nbmake

         Updated makewrapper: /usr/src/obj/tooldir.NetBSD-9.99.77-amd64/bin/nbmake-amd64

         Successful make release

         Building sets from pre-populated /usr/src/obj/destdir.amd64

         Built sets to /usr/src/obj/releasedir/amd64/binary/sets

         Successful make sourcesets

         Successful make iso-image-source

         build.sh ended:      Mon Jan 11 03:33:14 AKST 2021

===> .




Thursday, November 23, 2017

Long time, no nix!

Actually, that's not exactly true. I've been playing with the usual things and not really treading any new ground to speak of.

I've been playing off-and-on with NetBSD 8 in a virtualbox VM since May.

It's gotten a lot better (from my point of view). It's almost nearly useable as a replacement for Mint 18 ...almost. The performance isn't really there.

...and it wouldn't be, since there are no guest additions.

There are two tricks I've learned that makes life in VB a lot better for NetBSD 8:

1)SetExtras;
From the hosts' commandline:

VBoxManage setextradata $VMNAME CustomVideoMode1 1920x1080x16 

The "x16" is important. Your instinct will be to choose a color depth of 24, but it won't work. 16 will.

2)Use a custom xorg.conf in the guest:

I'm still working on this (is there a way to make Xorg see more ram? There's gotta be!), but this is what I have to date:
Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
    ModulePath   "/usr/X11R7/lib/modules"
    FontPath     "/usr/X11R7/lib/X11/fonts/misc/"
    FontPath     "/usr/X11R7/lib/X11/fonts/TTF/"
    FontPath     "/usr/X11R7/lib/X11/fonts/Type1/"
    FontPath     "/usr/X11R7/lib/X11/fonts/75dpi/"
    FontPath     "/usr/X11R7/lib/X11/fonts/100dpi/"
EndSection

Section "Module"
    Load  "dri"
    Load  "dri2"
    Load  "glx"
    Load  "shadow"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option        "Protocol" "wsmouse"
    Option        "Device" "/dev/wsmouse"
    Option        "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
    HorizSync    31-80
    VertRefresh  30-100
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: : integer, : float, : "True"/"False",
        ### : "String", : " Hz/kHz/MHz",
        ### : "%"
        ### [arg]: arg optional
        #Option     "ShadowFB"               # []
        #Option     "DefaultRefresh"         # []
        #Option     "ModeSetClearScreen"     # []
    Identifier  "Card0"
    Driver      "vesa"
    BusID       "PCI:0:2:0"
EndSection

Section "Screen"
    DefaultDepth 16
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
#    SubSection "Display"
#        Viewport   0 0
#        Depth     24
#        Modes     "1920x1080"
#    EndSubSection
EndSection
I've also found that setting RAM between 4G and 6G is needed for larger apps (CLang, GCC) to finish compiling.




I've managed to compile xfce4 and MATE; Mate works well enough to use as a desktop.

Most applications I've tried so far work, with some exceptions:
1)Firefox "nightly" randomly crashes.
2)Codeblocks stalls and never completely starts
3)htop doesn't seem to report free RAM correctly
4)closing apps sometimes crashes MATE
5)vlc player doesn't handle videos as well as gnome-mplayer (it's unwatchable).

Again, it's very much a case of "so near and yet so far". All said and done though, after three days of compiling everything (source, pkgsrc) I have a reasonably functional desktop with most of the comforts of home.

NetBSD 8 is still in beta, of course -and it shows. But I'm having better luck with it and pkgsrc (under virtualbox) than I have with NetBSD 7.x, so I'm optimistic this will be a keeper once it's done!

Wednesday, March 8, 2017

Back to Virtual NetBSD


I was mistaken in my last post about Openindiana. It appears to compile, but never reaches the point where the final packages are made. It's probably a problem with my sunstudio setup -I don't feel like chasing it down when there's alternatives to play with.

I'm very fond of NetBSD -have been for fifteen or so years now.

Sadly, for nine and a half years I haven't been able to get it to work with real hardware. At first it didn't like my sata drives (in a computer now long-since gone), these days it doesn't like my wifi or my wireless mouse.

...thank God for virtualization, huh?

make release started at:  Wed Mar  8 00:49:50 AKST 2017
make release finished at: Wed Mar  8 02:16:35 AKST 2017
===> Successful make release
===> build.sh ended:      Wed Mar  8 02:16:35 AKST 2017
===> Summary of results:
         build.sh command:    ./build.sh -x -j 6 -r release
         build.sh started:    Wed Mar  8 00:49:44 AKST 2017
         NetBSD version:      7.1_RC2
         MACHINE:             amd64
         MACHINE_ARCH:        x86_64
         Build platform:      NetBSD 7.1_RC2 amd64
         HOST_SH:             /bin/sh
         No $TOOLDIR/bin/nbmake, needs building.
         Bootstrapping nbmake
         MAKECONF file:       /etc/mk.conf
         TOOLDIR path:        /usr/src/obj/tooldir.NetBSD-7.1_RC2-amd64
         DESTDIR path:        /usr/src/obj/destdir.amd64
         RELEASEDIR path:     /usr/src/obj/releasedir
         Removing /usr/src/obj/tooldir.NetBSD-7.1_RC2-amd64
         Removing /usr/src/obj/destdir.amd64
         Created /usr/src/obj/tooldir.NetBSD-7.1_RC2-amd64/bin/nbmake
         Updated makewrapper: /usr/src/obj/tooldir.NetBSD-7.1_RC2-amd64/bin/nbmake-amd64
         Successful make release
         build.sh ended:      Wed Mar  8 02:16:35 AKST 2017
===> .
 tldr; it only takes an hour and a half to rebuild NetBSD on my i5. Not too shabby.

The next task is to build firefox, fluxbox and some other packages that make life under NetBSD easier.

I love the fact I can set this up to build on another computer and do things on my desktop while it runs. It's a lot better than doing everything all on one -it's almost decadent!

Tuesday, January 19, 2016

updating netbsd-7 with kvm

KVM commandline (on host):
 screen -S qemu06 /usr/local/bin/qemu-system-x86_64 -enable-kvm -cpu host -smp 4,cores=4,maxcpus=8 -m 2048 -net nic,model=e1000 -net tap,ifname=tap5,script=no -hda /home/random/qemu/x86/n7cde/cde.vdi -nographic
====
build command (inside VM):
time ./build.sh -x -r -j4 release iso-image

=====
make iso-image started at:  Tue Jan 19 18:56:17 AKST 2016
make iso-image finished at: Tue Jan 19 18:57:22 AKST 2016
===> Successful make iso-image
===> build.sh ended:      Tue Jan 19 18:57:22 AKST 2016
===> Summary of results:
         build.sh command:    ./build.sh -x -r -j4 release iso-image
         build.sh started:    Tue Jan 19 17:11:58 AKST 2016
         NetBSD version:      7.0.0_PATCH
         MACHINE:             amd64
         MACHINE_ARCH:        x86_64
         Build platform:      NetBSD 7.0 amd64
         HOST_SH:             /bin/sh
         No $TOOLDIR/bin/nbmake, needs building.
         Bootstrapping nbmake
         MAKECONF file:       /etc/mk.conf
         TOOLDIR path:        /usr/src/obj/tooldir.NetBSD-7.0-amd64
         DESTDIR path:        /usr/src/obj/destdir.amd64
         RELEASEDIR path:     /usr/src/obj/releasedir
         Removing /usr/src/obj/tooldir.NetBSD-7.0-amd64
         Removing /usr/src/obj/destdir.amd64
         Created /usr/src/obj/tooldir.NetBSD-7.0-amd64/bin/nbmake
         Updated makewrapper: /usr/src/obj/tooldir.NetBSD-7.0-amd64/bin/nbmake-amd64  
         Successful make release
         Successful make iso-image
         build.sh ended:      Tue Jan 19 18:57:22 AKST 2016
===> .
     6324.10 real     12894.15 user      4787.03 sys

Monday, September 14, 2015

Building NetBSD 7.0RC3 on KVM

Today I tested out building NetBSD 7 on a NetBSD 6 KVM virtual machine.

Here's the command line for starting the vm:
===
qemu-system-x86_64 -smp 4 -cpu host -enable-kvm -m 2048 -vga std -vnc :0 -drive file=$PWD/nbsd/wd01.img,index=0,media=disk,format=raw -net nic,model=e1000 -net user -redir tcp:5550::22 &
===
here's the post-build summary from build.sh:
===
         build.sh command:    ./build.sh -O /usr/obj -U -j 4 tools kernel=RND0 modules distribution sets
         build.sh started:    Mon Sep 14 16:58:05 AKDT 2015
         NetBSD version:      7.0_RC3
         MACHINE:             amd64
         MACHINE_ARCH:        x86_64
         Build platform:      NetBSD 6.1.5 amd64
         HOST_SH:             /bin/sh
         MAKECONF file:       /etc/mk.conf (File not found)
         TOOLDIR path:        /usr/obj/tooldir.NetBSD-6.1.5-amd64
         DESTDIR path:        /usr/obj/destdir.amd64
         RELEASEDIR path:     /usr/obj/releasedir
         Updated makewrapper: /usr/obj/tooldir.NetBSD-6.1.5-amd64/bin/nbmake-amd64
         Tools built to /usr/obj/tooldir.NetBSD-6.1.5-amd64
         Building kernel:     RND0
         Build directory:     /usr/obj/sys/arch/amd64/compile/RND0
         Kernels built from RND0:
          /usr/obj/sys/arch/amd64/compile/RND0/netbsd
         Building kernel modules for NetBSD/amd64 7.0_RC3
         Successful build of kernel modules for NetBSD/amd64 7.0_RC3
         Successful make distribution
         Building sets from pre-populated /usr/obj/destdir.amd64
         Built sets to /usr/obj/releasedir/amd64/binary/sets
         build.sh ended:      Mon Sep 14 18:08:47 AKDT 2015
===
Testing and installing it now -90 minutes isn't too shabby for a VM build. The host machine barely felt it, btw; no real noticeable performance hit.
===
I blitzed the install by following the instructions on the guide, but that doesn't matter that much -I found out what I wanted to know.

automating zfs mounts -a quick and very dirty script

 #!/bin/sh for x in obj xsrc src pkgsrc pkgsrc/distfiles pkgsrc/packages pkg         do zfs create ext/$x zfs set mountpoint=/usr/$x ext/$x ...