My continuous journey into toolchains, in the first quarter of 2023
This is the seventh post in my toolchains adventures series. Please check the previous posts in the toolchains category for more context about this journey. There was no Q4 2022 report as there wasn’t really anything worthwhile to write about, only some usual Pkgsrc and OpenBSD toolchains related ports updates.
In Pkgsrc land, I updated binutils to the 2.40 version, mold to the 1.9.0, 1.10.0, 1.10.1, and 1.11.0 versions, patchelf to the 0.17.2 version, and finally pax-utils to the 1.3.6 and the 1.3.7 ones. I also updated the NetBSD system call table in GDB to add the eventfd(2) and timerfd(2) syscalls which were added back in 2021.
Regarding OpenBSD, I updated binutils to the 2.40 version and enabled the build of gas, for which I also pushed support for ARM upstream. While there, I added support upstream for the PT_OPENBSD_MUTABLE segment type to readelf. Lastly, I packaged and imported pax-utils into the ports collection.
In early February, I attended FOSDEM 2023 in Brussels and had the opportunity to attend some talks in the LLVM devroom as well as some toolchains related ones in the RISC-V and Binary Tools devrooms.
Lately, I’ve been exploring using alternative linkers in Pkgsrc. By default, the host system default linker will be used, which happens to be GNU ld on NetBSD and most Linux distributions.
Thanks to work done by [email protected] and the instructions he posted on the tech-pkg mailing list, it was already possible to use mold within Pkgsrc, by adding these directives in the etc/mk.conf configuration file:
LD= /usr/pkg/bin/mold
LDFLAGS+= -Wl,-L/usr/lib
CWRAPPERS_PREPEND.cc+= -B/usr/pkg/libexec/mold
CWRAPPERS_PREPEND.cxx+= -B/usr/pkg/libexec/mold
I wanted to also try using LLD (the LLVM linker), and modified the devel/lld package to add a symlink in ${PREFIX}/libexec so that it can be used in Pkgsrc.
While mold can be used as a linker when using both GCC and Clang, for LLD one must use Clang as a compiler, using the PKGSRC_COMPILER directive. The reason for this is that LLD does not support the -dc and -dp options.
The following directives must be added in the etc/mk.conf configuration file:
PKGSRC_COMPILER= clang
LD= /usr/pkg/bin/lld
LDFLAGS+= -Wl,-L/usr/lib
CWRAPPERS_PREPEND.cc+= -B/usr/pkg/libexec/lld
CWRAPPERS_PREPEND.cxx+= -B/usr/pkg/libexec/lld
Verifying that a binary was produced by mold or LLD can be done using readelf.
On the mold binary linked with mold itself:
readelf -p .comment mold
String dump of section '.comment':
[ 0] mold 1.10.1 (compatible with GNU ld)
[ 25] GCC: (NetBSD nb1 20220722) 10.4.0
[ 47] GCC: (nb1 20220722) 10.4.0
And on the lld binary linked with LLD itself:
readelf -p .comment lld
String dump of section '.comment':
[ 0] clang version 15.0.7
[ 16] Linker: LLD 15.0.7
[ 29] GCC: (NetBSD nb1 20220722) 10.4.0
As usual, I’ve also been busy reading different material, and adding new resources to toolchains.net.
That’s all for now, happy Spring 2023 everyone!
binutils and GDB commits:
2023-03-23 | 80251d4 | Add support to readelf for the PT_OPENBSD_MUTABLE segment type |
2023-03-17 | 152d9c4 | Update the NetBSD system call table to add eventfd(2) and timerfd(2) |
2023-01-20 | 2e17538 | Add OpenBSD ARM GAS support |
LLVM commits
2023-03-19 | 8510cf9 | [compiler-rt] Add missing #else clause to fix the build on NetBSD |
2023-03-16 | 245f26a | [docs] Document “PGO” (Profile-Guided Optimization) in the lexicon |
2023-03-15 | d8df871 | [compiler-rt] Point UndefinedBehaviorSanitizer link to its own page |
2023-02-10 | 5cec69b | [clang] Update Clang version from 16 to 17 in scan-build.1 |
Hello, I have NetBSD 9.3 running on a Blue and White G3. I cannot get X windows to function.
It's complaining about LVDS. And I don't think I'm even using LVDS (?) as I'm using a single external monitor, a V7 model. Card is ATI Rage 128 (stock vid card for this mac.) Here's the log file and xorg.conf from netbsd:
Section "ServerLayout"
Identifier "[X.org](https://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" Option "Protocol" "wskbd" Option "Device" "/dev/wskbd"
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"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "NoAccel" # [<bool>]
#Option "Dac6Bit" # [<bool>]
#Option "VGAAccess" # [<bool>]
#Option "ShowCache" # [<bool>]
#Option "SWcursor" # [<bool>]
#Option "VideoKey" # <i>
#Option "PanelWidth" # <i>
#Option "PanelHeight" # <i>
#Option "ProgramFPRegs" # [<bool>]
#Option "DMAForXv" # [<bool>]
#Option "ForcePCIMode" # [<bool>]
#Option "CCEPIOMode" # [<bool>]
#Option "CCENoSecurity" # [<bool>]
#Option "CCEusecTimeout" # <i>
#Option "AGPMode" # <i>
#Option "AGPSize" # <i>
#Option "RingSize" # <i>
#Option "BufferSize" # <i>
#Option "EnablePageFlip" # [<bool>]
#Option "AccelMethod" # <str>
#Option "RenderAccel" # [<bool>]
Identifier "Card0" Driver "r128" BusID "PCI:0:16:0"
EndSection
Section "Screen"
Identifier "Screen0" Device "Card0" Monitor "Monitor0" SubSection "Display" Viewport 0 0 Depth 1 EndSubSection SubSection "Display" Viewport 0 0 Depth 4 EndSubSection SubSection "Display" Viewport 0 0 Depth 8 EndSubSection SubSection "Display" Viewport 0 0 Depth 15 EndSubSection SubSection "Display" Viewport 0 0 Depth 16 EndSubSection SubSection "Display" Viewport 0 0 Depth 24 EndSubSection
EndSection
[ 73.578]
X.Org X Server 1.20.5
X Protocol Version 11, Revision 0
[ 73.581] Build Operating System: NetBSD/macppc 9.3 - The NetBSD Foundation, Inc.
[ 73.586] Current Operating System: NetBSD marion 9.3 NetBSD 9.3 (GENERIC) #0: Thu Aug 4 15:30:37 UTC 2022 [[email protected]](mailto:[email protected]):/usr/src/sys/arch/macppc/compile/GENERIC macppc
[ 73.587] Build Date: 03 March 2019 07:11:23AM
[ 73.587]
[ 73.590] Current version of pixman: 0.38.4
[ 73.593] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 73.594] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 73.599] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Mar 29 17:29:28 2023
[ 73.600] (II) Loader magic: 0x1ac321c
[ 73.600] (II) Module ABI versions:
[ 73.600] X.Org ANSI C Emulation: 0.4
[ 73.600] X.Org Video Driver: 24.0
[ 73.600] X.Org XInput driver : 24.1
[ 73.600] X.Org Server Extension : 10.0
[ 73.606] (WW) xf86EnableIO -1
[ 73.606] (II) xf86EnableIO: 0xffffffff
[ 73.606] (WW) Can't map IO space! (9)
[ 73.606] (--) PCI:*([email protected]:16:0) 1002:5245:b530:0408 rev 0, Mem @ 0x84000000/67108864, 0x80900000/16384, I/O @ 0x00002000/256, BIOS @ 0x????????/131072
[ 73.607] (==) Using default built-in configuration (21 lines)
[ 73.607] (==) --- Start of built-in configuration ---
[ 73.607] Section "Device"
[ 73.607] Identifier "Builtin Default ati Device 0"
[ 73.607] Driver "ati"
[ 73.607] EndSection
[ 73.607] Section "Screen"
[ 73.608] Identifier "Builtin Default ati Screen 0"
[ 73.608] Device "Builtin Default ati Device 0"
[ 73.608] EndSection
[ 73.608] Section "Device"
[ 73.608] Identifier "Builtin Default wsfb Device 0"
[ 73.608] Driver "wsfb"
[ 73.608] EndSection
[ 73.608] Section "Screen"
[ 73.608] Identifier "Builtin Default wsfb Screen 0"
[ 73.608] Device "Builtin Default wsfb Device 0"
[ 73.608] EndSection
[ 73.608] Section "ServerLayout"
[ 73.608] Identifier "Builtin Default Layout"
[ 73.608] Screen "Builtin Default ati Screen 0"
[ 73.608] Screen "Builtin Default wsfb Screen 0"
[ 73.608] EndSection
[ 73.608] (==) --- End of built-in configuration ---
[ 73.609] (==) ServerLayout "Builtin Default Layout"
[ 73.609] (**) |-->Screen "Builtin Default ati Screen 0" (0)
[ 73.609] (**) | |-->Monitor "<default monitor>"
[ 73.611] (**) | |-->Device "Builtin Default ati Device 0"
[ 73.612] (==) No monitor specified for screen "Builtin Default ati Screen 0".
Using a default monitor configuration.
[ 73.612] (**) |-->Screen "Builtin Default wsfb Screen 0" (1)
[ 73.612] (**) | |-->Monitor "<default monitor>"
[ 73.614] (**) | |-->Device "Builtin Default wsfb Device 0"
[ 73.614] (==) No monitor specified for screen "Builtin Default wsfb Screen 0".
Using a default monitor configuration.
[ 73.614] (==) Not automatically adding devices
[ 73.614] (==) Not automatically enabling devices
[ 73.614] (==) Not automatically adding GPU devices
[ 73.614] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 73.615] (==) FontPath set to:
/usr/X11R7/lib/X11/fonts/misc/, /usr/X11R7/lib/X11/fonts/TTF/, /usr/X11R7/lib/X11/fonts/Type1/, /usr/X11R7/lib/X11/fonts/75dpi/, /usr/X11R7/lib/X11/fonts/100dpi/
[ 73.615] (==) ModulePath set to "/usr/X11R7/lib/modules"
[ 73.615] (==) |-->Input Device "<default pointer>"
[ 73.615] (==) |-->Input Device "<default keyboard>"
[ 73.615] (==) The core pointer device wasn't specified explicitly in the layout.
Using the default mouse configuration.
[ 73.615] (==) The core keyboard device wasn't specified explicitly in the layout.
Using the default keyboard configuration.
[ 73.615] (II) LoadModule: "glx"
[ 73.618] (II) Loading /usr/X11R7/lib/modules/extensions/libglx.so
[ 73.620] (II) Module glx: vendor="X.Org Foundation"
[ 73.620] compiled for 1.20.5, module version = 1.0.0
[ 73.620] ABI class: X.Org Server Extension, version 10.0
[ 73.620] (II) LoadModule: "ati"
[ 73.621] (II) Loading /usr/X11R7/lib/modules/drivers/ati_drv.so
[ 73.622] (II) Module ati: vendor="X.Org Foundation"
[ 73.622] compiled for 1.20.5, module version = 6.14.6
[ 73.622] Module class: X.Org Video Driver
[ 73.622] ABI class: X.Org Video Driver, version 24.0
[ 73.623] (II) LoadModule: "r128"
[ 73.624] (II) Loading /usr/X11R7/lib/modules/drivers/r128_drv.so
[ 73.626] (II) Module r128: vendor="X.Org Foundation"
[ 73.626] compiled for 1.20.5, module version = 6.12.0
[ 73.626] Module class: X.Org Video Driver
[ 73.626] ABI class: X.Org Video Driver, version 24.0
[ 73.626] (II) LoadModule: "wsfb"
[ 73.628] (II) Loading /usr/X11R7/lib/modules/drivers/wsfb_drv.so
[ 73.629] (II) Module wsfb: vendor="X.Org Foundation"
[ 73.629] compiled for 1.20.5, module version = 0.4.0
[ 73.629] ABI class: X.Org Video Driver, version 24.0
[ 73.629] (II) LoadModule: "mouse"
[ 73.630] (II) Loading /usr/X11R7/lib/modules/drivers/mouse_drv.so
[ 73.631] (II) Module mouse: vendor="X.Org Foundation"
[ 73.631] compiled for 1.20.5, module version = 1.9.2
[ 73.631] Module class: X.Org XInput Driver
[ 73.631] ABI class: X.Org XInput driver, version 24.1
[ 73.631] (II) LoadModule: "kbd"
[ 73.632] (II) Loading /usr/X11R7/lib/modules/drivers/kbd_drv.so
[ 73.633] (II) Module kbd: vendor="X.Org Foundation"
[ 73.633] compiled for 1.20.5, module version = 1.9.0
[ 73.633] Module class: X.Org XInput Driver
[ 73.633] ABI class: X.Org XInput driver, version 24.1
[ 73.633] (II) R128: Driver for ATI Rage 128 chipsets:
ATI Rage 128 Mobility M3 LE (PCI), ATI Rage 128 Mobility M3 LF (AGP), ATI Rage 128 Mobility M4 MF (AGP), ATI Rage 128 Mobility M4 ML (AGP), ATI Rage 128 Pro GL PA (PCI/AGP), ATI Rage 128 Pro GL PB (PCI/AGP), ATI Rage 128 Pro GL PC (PCI/AGP), ATI Rage 128 Pro GL PD (PCI), ATI Rage 128 Pro GL PE (PCI/AGP), ATI Rage 128 Pro GL PF (AGP), ATI Rage 128 Pro VR PG (PCI/AGP), ATI Rage 128 Pro VR PH (PCI/AGP), ATI Rage 128 Pro VR PI (PCI/AGP), ATI Rage 128 Pro VR PJ (PCI/AGP), ATI Rage 128 Pro VR PK (PCI/AGP), ATI Rage 128 Pro VR PL (PCI/AGP), ATI Rage 128 Pro VR PM (PCI/AGP), ATI Rage 128 Pro VR PN (PCI/AGP), ATI Rage 128 Pro VR PO (PCI/AGP), ATI Rage 128 Pro VR PP (PCI), ATI Rage 128 Pro VR PQ (PCI/AGP), ATI Rage 128 Pro VR PR (PCI), ATI Rage 128 Pro VR PS (PCI/AGP), ATI Rage 128 Pro VR PT (PCI/AGP), ATI Rage 128 Pro VR PU (PCI/AGP), ATI Rage 128 Pro VR PV (PCI/AGP), ATI Rage 128 Pro VR PW (PCI/AGP), ATI Rage 128 Pro VR PX (PCI/AGP), ATI Rage 128 GL RE (PCI), ATI Rage 128 GL RF (AGP), ATI Rage 128 RG (AGP), ATI Rage 128 VR RK (PCI), ATI Rage 128 VR RL (AGP), ATI Rage 128 4X SE (PCI/AGP), ATI Rage 128 4X SF (PCI/AGP), ATI Rage 128 4X SG (PCI/AGP), ATI Rage 128 4X SH (PCI/AGP), ATI Rage 128 4X SK (PCI/AGP), ATI Rage 128 4X SL (PCI/AGP), ATI Rage 128 4X SM (AGP), ATI Rage 128 4X SN (PCI/AGP), ATI Rage 128 Pro ULTRA TF (AGP), ATI Rage 128 Pro ULTRA TL (AGP), ATI Rage 128 Pro ULTRA TR (AGP), ATI Rage 128 Pro ULTRA TS (AGP?), ATI Rage 128 Pro ULTRA TT (AGP?), ATI Rage 128 Pro ULTRA TU (AGP?)
[ 73.637] (II) wsfb: driver for wsdisplay framebuffer: wsfb
[ 73.637] (--) Using wscons driver on /dev/ttyE0 in pcvt compatibility mode (version 3.32)
[ 73.637] (--) using VT number 1
[ 73.637] (WW) xf86EnableIO 8
[ 73.637] (II) xf86EnableIO: 0xfc7d0000
[ 73.637] (WW) Falling back to old probe method for wsfb
[ 73.638] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 73.638] (II) R128(0): Creating default Display subsection in Screen section
"Builtin Default ati Screen 0" for depth/fbbpp 24/32
[ 73.638] (==) R128(0): Depth 24, (--) framebuffer bpp 32
[ 73.638] (==) R128(0): Default visual is TrueColor
[ 73.638] (==) R128(0): Using gamma correction (1.0, 1.0, 1.0)
[ 73.638] (II) R128(0): PCI bus 0 card 16 func 0
[ 73.638] (II) Alright, this is the console
[ 73.638] (II) R128(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[ 73.639] (II) R128(0): Acceleration of RENDER operations will be enabled upon successful loading of DRI and EXA.
[ 73.639] (II) R128(0): VGAAccess option set to FALSE, VGA module load skipped.
[ 73.639] (==) R128(0): RGB weight 888
[ 73.639] (II) R128(0): Using 8 bits per RGB (8 bit DAC)
[ 73.639] (--) R128(0): Chipset: "ATI Rage 128 GL RE (PCI)" (ChipID = 0x5245)
[ 73.639] (--) R128(0): Linear framebuffer at 0x84000000
[ 73.639] (--) R128(0): MMIO registers at 0x80900000
[ 73.640] (--) R128(0): VideoRAM: 16384 kByte (128-bit SDR SGRAM 1:1)
[ 73.640] (II) Loading sub module "ramdac"
[ 73.640] (II) LoadModule: "ramdac"
[ 73.640] (II) Module "ramdac" already built-in
[ 73.640] (II) Loading sub module "ddc"
[ 73.640] (II) LoadModule: "ddc"
[ 73.640] (II) Module "ddc" already built-in
[ 73.640] (II) Loading sub module "i2c"
[ 73.640] (II) LoadModule: "i2c"
[ 73.640] (II) Module "i2c" already built-in
[ 73.708] (II) R128(0): PLL parameters: rf=2950 rd=56 min=12500 max=25000; xclk=10001
[ 73.708] (II) R128(0): Found FP table, assuming FP connector.
[ 73.708] (II) R128(0): Output LVDS has no monitor section
[ 73.709] (II) got 128 bytes worth of EDID from wsdisplay
[ 73.709] (II) R128(0): EDID for output LVDS
[ 73.709] (II) R128(0): Manufacturer: PTS Model: 6a5 Serial#: 16843009
[ 73.709] (II) R128(0): Year: 2006 Week: 26
[ 73.709] (II) R128(0): EDID Version: 1.3
[ 73.709] (II) R128(0): Analog Display Input, Input Voltage Level: 0.700/0.300 V
[ 73.710] (II) R128(0): Sync: Separate
[ 73.710] (II) R128(0): Max Image Size [cm]: horiz.: 34 vert.: 27
[ 73.710] (II) R128(0): Gamma: 2.50
[ 73.710] (II) R128(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display
[ 73.710] (II) R128(0): First detailed timing is preferred mode
[ 73.710] (II) R128(0): redX: 0.630 redY: 0.330 greenX: 0.300 greenY: 0.600
[ 73.710] (II) R128(0): blueX: 0.148 blueY: 0.098 whiteX: 0.310 whiteY: 0.330
[ 73.710] (II) R128(0): Supported established timings:
[ 73.710] (II) R128(0): [email protected]
[ 73.710] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): [email protected]
[ 73.711] (II) R128(0): Manufacturer's mask: 0
[ 73.711] (II) R128(0): Supported standard timings:
[ 73.711] (II) R128(0): #0: hsize: 1280 vsize 1024 refresh: 60 vid: 32897
[ 73.712] (II) R128(0): Supported detailed timing:
[ 73.712] (II) R128(0): clock: 108.0 MHz Image Size: 337 x 270 mm
[ 73.712] (II) R128(0): h_active: 1280 h_sync: 1328 h_sync_end 1440 h_blank_end 1688 h_border: 0
[ 73.712] (II) R128(0): v_active: 1024 v_sync: 1025 v_sync_end 1028 v_blanking: 1066 v_border: 0
[ 73.712] (II) R128(0): Supported detailed timing:
[ 73.712] (II) R128(0): clock: 78.8 MHz Image Size: 337 x 270 mm
[ 73.712] (II) R128(0): h_active: 1024 h_sync: 1040 h_sync_end 1136 h_blank_end 1312 h_border: 0
[ 73.712] (II) R128(0): v_active: 768 v_sync: 769 v_sync_end 772 v_blanking: 800 v_border: 0
[ 73.712] (II) R128(0): Ranges: V min: 60 V max: 75 Hz, H min: 30 H max: 80 kHz, PixClock max 145 MHz
[ 73.712] (II) R128(0): Serial No: F9RU66139072U
[ 73.713] (II) R128(0): EDID (in hex):
[ 73.713] (II) R128(0): 00ffffffffffff004293a50601010101
[ 73.713] (II) R128(0): 1a10010308221b96ea6e06a1544c9926
[ 73.713] (II) R128(0): 194f54bfef0081800101010101010101
[ 73.713] (II) R128(0): 010101010101302a009851002a403070
[ 73.713] (II) R128(0): 1300510e1100001ec31e002041002030
[ 73.713] (II) R128(0): 10601300510e11000000000000fd003c
[ 73.713] (II) R128(0): 4b1e500e000a202020202020000000ff
[ 73.713] (II) R128(0): 00463952553636313339303732550049
[ 73.714] (II) Loading sub module "shadowfb"
[ 73.714] (II) LoadModule: "shadowfb"
[ 73.717] (II) Loading /usr/X11R7/lib/modules/libshadowfb.so
[ 73.717] (II) Module shadowfb: vendor="X.Org Foundation"
[ 73.717] compiled for 1.20.5, module version = 1.0.0
[ 73.718] ABI class: X.Org ANSI C Emulation, version 0.4
[ 73.718] (II) R128(0): Page flipping disabled
[ 73.718] (II) got 128 bytes worth of EDID from wsdisplay
[ 73.718] (II) R128(0): EDID for output LVDS
[ 73.718] (II) R128(0): Manufacturer: PTS Model: 6a5 Serial#: 16843009
[ 73.718] (II) R128(0): Year: 2006 Week: 26
[ 73.718] (II) R128(0): EDID Version: 1.3
[ 73.718] (II) R128(0): Analog Display Input, Input Voltage Level: 0.700/0.300 V
[ 73.718] (II) R128(0): Sync: Separate
[ 73.718] (II) R128(0): Max Image Size [cm]: horiz.: 34 vert.: 27
[ 73.718] (II) R128(0): Gamma: 2.50
[ 73.719] (II) R128(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display
[ 73.719] (II) R128(0): First detailed timing is preferred mode
[ 73.719] (II) R128(0): redX: 0.630 redY: 0.330 greenX: 0.300 greenY: 0.600
[ 73.719] (II) R128(0): blueX: 0.148 blueY: 0.098 whiteX: 0.310 whiteY: 0.330
[ 73.719] (II) R128(0): Supported established timings:
[ 73.719] (II) R128(0): [email protected]
[ 73.719] (II) R128(0): [email protected]
[ 73.719] (II) R128(0): [email protected]
[ 73.719] (II) R128(0): [email protected]
[ 73.719] (II) R128(0): [email protected]
[ 73.719] (II) R128(0): [email protected]
[ 73.719] (II) R128(0): [email protected]
[ 73.719] (II) R128(0): [email protected]
[ 73.720] (II) R128(0): [email protected]
[ 73.720] (II) R128(0): [email protected]
[ 73.720] (II) R128(0): [email protected]
[ 73.720] (II) R128(0): [email protected]
[ 73.720] (II) R128(0): [email protected]
[ 73.720] (II) R128(0): [email protected]
[ 73.720] (II) R128(0): Manufacturer's mask: 0
[ 73.720] (II) R128(0): Supported standard timings:
[ 73.720] (II) R128(0): #0: hsize: 1280 vsize 1024 refresh: 60 vid: 32897
[ 73.720] (II) R128(0): Supported detailed timing:
[ 73.720] (II) R128(0): clock: 108.0 MHz Image Size: 337 x 270 mm
[ 73.720] (II) R128(0): h_active: 1280 h_sync: 1328 h_sync_end 1440 h_blank_end 1688 h_border: 0
[ 73.720] (II) R128(0): v_active: 1024 v_sync: 1025 v_sync_end 1028 v_blanking: 1066 v_border: 0
[ 73.721] (II) R128(0): Supported detailed timing:
[ 73.721] (II) R128(0): clock: 78.8 MHz Image Size: 337 x 270 mm
[ 73.721] (II) R128(0): h_active: 1024 h_sync: 1040 h_sync_end 1136 h_blank_end 1312 h_border: 0
[ 73.721] (II) R128(0): v_active: 768 v_sync: 769 v_sync_end 772 v_blanking: 800 v_border: 0
[ 73.721] (II) R128(0): Ranges: V min: 60 V max: 75 Hz, H min: 30 H max: 80 kHz, PixClock max 145 MHz
[ 73.721] (II) R128(0): Serial No: F9RU66139072U
[ 73.721] (II) R128(0): EDID (in hex):
[ 73.721] (II) R128(0): 00ffffffffffff004293a50601010101
[ 73.721] (II) R128(0): 1a10010308221b96ea6e06a1544c9926
[ 73.721] (II) R128(0): 194f54bfef0081800101010101010101
[ 73.721] (II) R128(0): 010101010101302a009851002a403070
[ 73.722] (II) R128(0): 1300510e1100001ec31e002041002030
[ 73.722] (II) R128(0): 10601300510e11000000000000fd003c
[ 73.722] (II) R128(0): 4b1e500e000a202020202020000000ff
[ 73.722] (II) R128(0): 00463952553636313339303732550049
[ 73.722] (II) R128(0): EDID vendor "PTS", prod id 1701
[ 73.722] (II) R128(0): DDCModeFromDetailedTiming: 1024x768 Warning: We only handle separate sync.
[ 73.722] (II) R128(0): No remaining probed modes for output LVDS
[ 73.723] (II) R128(0): Output LVDS connected
[ 73.723] (WW) R128(0): Unable to find initial modes
[ 73.723] (EE) R128(0): Output LVDS enabled but has no modes
[ 73.723] (EE) R128(0): No valid modes.
[ 73.723] (II) UnloadModule: "r128"
[ 73.723] (II) UnloadSubModule: "shadowfb"
[ 73.723] (II) Unloading shadowfb
[ 73.724] (EE) Screen(s) found, but none have a usable configuration.
[ 73.724] (EE)
Fatal server error:
[ 73.724] (EE) no screens found(EE)
[ 73.724] (EE)
Please consult the The X.Org Foundation support
at [http://wiki.x.org](http://wiki.x.org)
for help.
[ 73.724] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 73.724] (EE)
[ 73.732] (EE) Server terminated with error (1). Closing log file.
Hi,
I've been using NetBSD 9.3 on an old Samsung Netbook and I now want to install it on my main PC.
The PC has an AMD RX600 GPU which is in the RDNA2 family.
I know this isn't officially supported by 9.3 so the display won't be as good as it could be.
I've been through chapters 32, 34 & 35 in the guide and I've searched this forum and read through the other threads about the amdgpu driver so I just want to clarify the options I have:
If it was you, which one would you go for. I would prefer the box to be as stable as possible.
Thanks in advance.
Steve
Hello , i have temporarily a quad core Intel Celeron J3160 but i can't run xorg on NetBSD
Maybe i should try daily builds ?
I tried again some years ago without any luck.
Disclaimer: yes I know this is ancient/insecure/etc. This is more out of curiosity to get this to work. Not going to deploy this in any way that matters.
Say I have 2 machines on the network - each running (or at least capable of running) a local X instance.
I'd like to be able to "choose" (i.e. the chooser window) wether I log in locally or to the remote box. I seem to remember older Solaris versions would do this automatically. They display the hostname, load, users logged etc. on the remote machine. This also seemed to work in a broadcast fashion where they would discover other hosts.
I have been gnashing my teeth with various guides/HOWTOs and editing /etc/xdm/* files for quite some time without success. I can't seent to get the right cocktail of settings in these files to achieve what I want.
Anyone still remember how to do this - or better yet has done it successfully in NetBSD land ?
Thanks.
Hello,
I know that NetBSD can have its FFS root residing on a software RAID1 using RAIDframe, and that root on ZFS is possible with the help of a separate FFS boot partition, but I'm wondering whether instead of a single partition it's also possible to use a ZFS mirror (or any other kind of ZFS RAID) as a root volume... I don't see why it wouldn't, but I couldn't find any mention of someone having ever tried it. Is anyone using such a setup?
Hello, I may be missing something obvious, but I'm struggling with getting started with NetBSD on the PReP platform. The version 9.2 installation installation instructions say that I need a 1.44 MB floppy (that's what I have, the version 9.3 omits the 1.44 MB size) and the next step is to boot the computer with the floppy. The floppy creation part is missing. The files in the installation/floppy directory are puzzlingly large for a 1.44MB floppy. So, how do you create the boot floppy? Thank you!
Hey everyone, I have been looking into transitioning my RPIs to NetBSD and I found a guide online here. However, the guide mentions running NetBSD-current. I am uneasy abount running an unstable branch and would much rather prefer to run 9.3. Is it possible to use that guide, but for 9.3 instead of current?
$ hp-setup -i HPD83AB7
Traceback (most recent call last):
File "/usr/pkg/bin/hp-setup", line 48, in <module>
from base import device, utils, tui, models, module, services, os_utils
File "/usr/pkg/share/hplip/base/device.py", line 42, in <module>
from . import status
File "/usr/pkg/share/hplip/base/status.py", line 33, in <module>
import cupsext
ImportError: /usr/pkg/lib/python3.9/site-packages/cupsext.so: Shared object "libunistring.so.2" not found
Memory fault (core dumped)
Does FreeBSD, NetBSD, or OpenBSD have an encryption feature like Linux's dm-crypt? And will it work for a system partition?
About a dozen of you emailed and posted on social media in response to my question about FreeBSD and NetBSD laptops, thanks!
Overwhelmingly the recommendation was the Framework, which I’ve looked at before but completely forgot. Their website doesn’t make it easy to find the display resolution, but other sites report it as 2256×1504, which is excellent.
The FreeBSD wiki has a page about it, and it’d be cool to do some testing on NetBSD to add to their wiki too.
It probably won’t be in the budget for a while, but I’m keen to try. Ping me if you have any experience with running BSD on this laptop, I’d love to hear about your experience.
By Ruben Schade in Sydney, 2023-03-14.
NetBSD neutron 9.3 NetBSD 9.3 (GENERIC) #0: Thu Aug 4 15:30:37 UTC 2022 [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC amd64 |
I love my tiny Japanese Panasonic Let’s Note RZ6 subnotebook, but the keyboard is just small enough that I can’t type with speed. It’s a perfect “on call” machine, but I’d love something I can write longform stuff on.
The problem is, Panasonic and Apple have spoiled me with their 2× HiDPI displays. I love how images look, the higher fidelity of fonts in documents, and the ability to crank text down to smaller sizes when tailing logs. People saying these are silly luxuries were writing into PC Magazine saying 8-bit colour was sufficient in the 1990s, and that you don’t need double-density floppy disks because in my day we used punch card libraries, dagnabit!
This would be my wish list:
My instinct is to buy a second-hand ThinkPad and be done with it, as is tradition in the BSD community. I’ll have to see if anything fits.
By Ruben Schade in Sydney, 2023-03-13.
I have noticed what appears to be a serious hole in NetBSD documentation, so I thought that I would try to fill in as much as I can. Most of this is courtesy of rvp. My notes are incomplete, but they still appear to be the most systematic attempt at a howto on the subject. Please note that the reason my notes are incomplete, is I have run into trouble, so please feel free to contribute to this post to fill in the holes (and of course to my original thread as well), should you feel the urge. The one major caveat to the following notes, is that I have never compiled anything larger than ee (my favorite editor)...
Compiling on NetBSD
Add a separate user just for compiling:
(#) useradd -m -G wsrc -s /bin/sh -c "System Builder" -g =uid bld
Unpack source files:
(#) for f in /home/user/Downloads/*.tgz
do tar -C/ -xpf $f && echo $f.
done
Prepare the work directories:
(#) rm -rf /usr/obj /usr/tools
(#) install -d -m 775 -o root -g wsrc /usr/obj /usr/tools
Login from default user, to “bld” user:
$ su -l bld
Prepare CVS (only once is necessary). Note that "update -A" flag is used for -HEAD sources and omitted for -RELEASE/-STABLE :
$ cat > $HOME/.cvsrc <<\EoF
update -A -dP
rdiff -pu
diff -pu
cvs -q
EoF
Create new kernel configuration file:
$ cd /usr/src
$ cp sys/arch/amd64/conf/GENERIC sys/arch/amd64/conf/MYKERNEL
Edit and change the MYKERNEL configuration file as needed (search for AMDGPU ?}:
$ ee sys/arch/amd64/conf/MYKERNEL
Build tools once, then kernel. Remember to change “-j” (job) flag according to specific computer values. The values below refer to a computer CPU with 2 cores and 2 threads (plus 50 percent):
$ cd /usr/src
$ ./build.sh -j6 -N1 -M /usr/obj -T /usr/tools -U tools
$ ./build.sh -j6 -N1 -M /usr/obj -T /usr/tools -U kernel=MYKERNEL
I have run the following on my Huawei computer without lock up. dmesg reports that there are 11 CPUs and 6 cores:
$ cd /usr/src
$ ./build.sh -j20 -N1 -M /usr/obj -T /usr/tools -U tools
This should logically work as well, without a processor lock up...
$ ./build.sh -j20 -N1 -M /usr/obj -T /usr/tools -U -u kernel=MYKERNEL
Save GENERIC kernel (only once per computer):
(#) mv /netbsd /netbsd.GENERIC
Install new kernel:
(#) install -m 555 /usr/obj/usr/src/sys/arch/amd64/compile/MYKERNEL/netbsd /netbsd.new
Symlink “netbsd” to “netbsd.new” (once)
(#) cd /
(#) ln -sv netbsd.new netbsd
“To go back to the old kernel, simply point the symlink back to netbsd.GENERIC. (Be mindful of this when doing an upgrade.)
To do a clean kernel rebuild, first do rm -rf /usr/obj/*. Leave /usr/tools alone--unless the compiler sources have changed: check the cvs update output for this.” (rvp)
The following is preliminary feedback on NetBSD 10 BETA amd64 running on my Huawei MateStation S. Dmesg is located here.
Audio
According to dmesg, my Behringer UMC202HD usb sound card was discovered, but when I run:
$ audiocfg list
0: [*] audio0 @ hdafg0: ATI R6xx HDMI
playback: 2ch, 48000Hz
record: unavailable
(P-) slinear_le 16/16, 2ch, { 32000, 44100, 48000 }
( ) ac3 16/16, 2ch, { 32000, 44100, 48000 }
(PR) slinear_le 16/16, 2ch, 48000-48000Hz
1: [ ] audio1 @ hdafg1: Realtek product 0256
playback: 2ch, 48000Hz
record: 2ch, 48000Hz
(PR) slinear_le 16/16, 2ch, { 44100, 48000, 96000, 192000 }
(PR) slinear_le 20/32, 2ch, { 44100, 48000, 96000, 192000 }
(PR) slinear_le 24/32, 2ch, { 44100, 48000, 96000, 192000 }
( ) ac3 16/16, 2ch, { 44100, 48000, 96000, 192000 }
The sound card isn't listed.
Display
Dmesg lists the CPU correctly:
AMD Ryzen 5 4600G with Radeon Graphics
however, I don't see anything more specific in dmesg or on the Huawei homepage. Currently, I am only able to get a resolution of 1024 x 768 (4:3).
Network
$ ifconfig
re0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
capabilities=0x3f80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx>
capabilities=0x3f80<UDP4CSUM_Rx,UDP4CSUM_Tx>
enabled=0
ec_capabilities=0x3<VLAN_MTU,VLAN_HWTAGGING>
ec_enabled=0
address: 14:de:39:c3:79:1c
media: Ethernet autoselect (1000baseT full-duplex)
status: active
inet6 fe80::16de:39ff:fec3:791c%re0/64 flags 0 scopeid 0x1
inet 192.168.1.221/24 broadcast 192.168.1.255 flags 0
lo0: flags=0x8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33624
status: active
inet6 ::1/128 flags 0x20<NODAD>
inet6 fe80::1%lo0/64 flags 0 scopeid 0x2
inet 127.0.0.1/8 flags 0
Unfortunately, wifi isn't working. I don't need wifi at this point, as this is a desktop box. The unfortunate aspect is in relation to this computer actually having a laptop motherboard in a desktop box (to my understanding). So if wifi can work on here, it should work on the Huawei comparable laptops as well.
If I can get both audio and display working properly, I will keep this system for more in depth testing. If not, then I probably won't...
I didn’t know what Moonlight and Sunshine are, but Moonlight at least is on NetBSD.
In today’s installment of things you already know, unless you don’t, you can use sockstat(1) on the BSDs to list open sockets.
From the manpage(1), you can issue this command to show IPv4 sockets listening on port 22 using protocol TCP:
$ sockstat -4 -l -P tcp -p 22
I can’t tell you how many times this has saved me during a late-night troubleshooting session, when a service claims to be up but isn’t.
By Ruben Schade in Sydney, 2023-02-14.
Last Tuesday I wrote that it was worth considering a FreeBSD or NetBSD desktop if you’re at all technical. I glossed over many of the engineering benefits for once, in favour of something more touchy feely:
It was fun to tinker and try something new, especially an OS with that history and lineage going back to the original AT&T UNIX. And now I have something that works great for me. There’s this pervasive attitude in IT and hustle culture nonsense that you should have to justify and monetise everything you do. Sometimes you need to give yourself permission to tinker.
Based on the email I’ve had, this was received poorly. Which sucks; even if you disagree with the merits of BSD, I was hoping the takeaway would be about fostering curiosity and fun with something you haven’t tried before.
Anyway, I thought it was worth expanding on. Derek Sivers has a concise post about why he uses OpenBSD, much of which also applies to my preferred BSD platforms. These two points are worth underscoring:
But if you’re experienced, like to “look under the hood”, and prefer software that does the minimum necessary, OpenBSD is for you.
The whole system is carefully planned and consistent, instead of a hodge-podge of bits and pieces.
This attitude is reflected everywhere, from documentation to hardware support. This is also what I’ve meant when saying NetBSD is beautiful.
Every now and then I open top(1) and ps(1) aux on my Mac and Fedora machines, and balk at the sheer volume of background processes. Resource use is desirable if it can be accounted for, is transparent, serves a functional purpose, and if I require it. Otherwise it’s bloat, like that feeling when I eat too much Korean cabbage salad.
Running a BSD desktop takes more manual work at the outset, but I feel in complete control. My work MacBook Air is light, fast, and runs the specific proprietary software I need, but I’m but a guest within its plush but increasingly broken confines.
(I also wonder if that’s why I’m so drawn to retrocomputing as well. There’s no hiding what these legacy machines are doing, even at a fundamental electronics level).
By Ruben Schade in Sydney, 2023-02-10.
FOSDEM took place last week-end, as an offline-first event again for the first time since 2020. It was located as usual at the university campus of the ULB in Brussels. It was packed with developers, users, passionate and professionals of Open Source software, and while NetBSD did not have a booth this year, its presence could be felt on Saturday morning at the BSD DevRoom thanks to the many developers who made it to the conference.
Together with Rodrigo Osorio of the FreeBSD project, I had the pleasure to help manage the DevRoom, have a front seat for the talks, and even start the session by introducing the BSD Driver Harmony initiative.
The staff and respective speakers are currently busy uploading slides and reviewing videos, so keep in mind to check again for new content in the coming few days and weeks if you missed anything or need to dig further into any event from this awesome conference!
Finally, I would like to thank the NetBSD Foundation for sponsoring me to manage the room and attend the GSoC meet-up.
I’ve moved on to NetBSD’s excellent pkgsrc tool for most of my macOS package needs, but I still use Homebrew to install graphical applications.
Today I attempted to upgrade a package, but in my half-asleep stupor I deleted the bundle from the Applications folder first. Derp. This lead to:
$ brew upgrade --cask 86box
==> Error: 86box: It seems the App source '/Applications/86Box/86Box.app' is not there.
Installing again didn’t work, for perhaps obvious reasons:
$ brew install --cask 86box
==> Warning: Cask '86box' is already installed.
Forcing a reinstall did the trick:
$ brew reinstall --cask 86box
==> Uninstalling Cask 86box
==> Purging files for version 3.11,4311 of Cask 86box
==> Installing Cask 86box
==> Moving App '86Box.app' to '/Applications/86Box/86Box.app'
🍺 86box was successfully installed!
By Ruben Schade in Sydney, 2023-02-08.
Is it possible to swap to the NetBSD kernel in FreeBSD?
As stated in the title, I would like to change the kernel of my Unix build from FreeBSD to NetBSD, as I prefer the philosophy of the rump kernel to that of a monolithic, but prefer the lexicography and semantics of FreeBSD's system applications. The current build is fresh, with only sudo, neovim and git installed. It is running in a VM, so I don't think any additional drivers are installed, if that is optional during the install process. (I've installed OS's so many times that it is practically subconscious for me) Sorry if this question seems a tab bit junior to you, I'm an idiot with limited SysAdmin skills. My question is this: is it possible to swap to the NetBSD kernel in FreeBSD? If so, I will build the kernel from source and swap it.
TL;DR The driver I need is in the Linux kernel. I would like to go about rewriting\porting it to NetBSD. I also would like to use some kernel module service so that I don't have to compile the entire kernel to test the driver.
New to BSD, coming from Linux. My laptop (Asus FX706LI) uses the MediaTek MT7921. Although I've never installed linux on this laptop, I know the driver is in Linux 5.12 and subsequent kernels. I am to the point that I'd like to try modifying the driver to work with BSD. I currently have NetBSD running on a QEMU virtual machine, and I'd like to find a service that will allow me to add kernel modules so I don't need to rebuild the kernel for every attempt. Any documentation and whatever you may consider useful is welcomed.
As mentioned in my “Customizing NetBSD boot banners” article, it’s really easy to customize NetBSD boot banners using the boot.cfg configuration file.
In a previous life, I used to draw ASCII art (mostly in the pre-2000 era) and more precisely a type of ASCII art referred as newschool ASCII in the artscene. By taking advantage of the extended character set (the 128 to 255 range) of the IBM PC’s code page 437, it was possible to achieve great detail and really smooth curves. Some examples can be found at the bottom of my online gallery.
Attempting to draw the NetBSD flag in ASCII and use it when booting in both NetBSD/i386 and NetBSD/amd64 in BIOS mode was thus too tempting, so here we go.
The NetBSD flag in full glory, loaded in TheDraw:
And here is a screenshot of the NetBSD x86 bootloader:
And this is how it could look like with colors and a customized VGA palette:
Unfortunately, the extended ASCII characters do not display correctly when booting in EFI mode, at least on the machine I tested on, but I suspect it will likely be the case on other implementations as well.
As specified in the Human Interface Infrastructure part (33.2.7.2 subsection) of the UEFI specification, UEFI requires platform support of a font containing the basic Latin character set. So extended ASCII support is not mandatory, and there is no guarantee that the characters would be the same between fonts used by different EFI firmwares anyway.
The boot.cfg configuration file can be downloaded here. Enjoy!
NetBSD continues using the FFS file-system by default while it’s offered ZFS support that has been slowly improving — in NetBSD-CURRENT is the ability to use ZFS as the root file-system if first booting to FFS, for example. There may be another modern file-system option soon with an effort underway to port DragonFlyBSD’s HAMMER2 over to NetBSD.
The GitHub repository has the code if you’re up for contributing.
I want to implement a hello world system call in NetBSD. I am following the NetBSD documentation where I am able to make add system call in src/sys/kern/syscalls.master list. But the documentation says you need to rebuild libc and reboot with a new kernel. I am not able to understand how to rebuild libc and then reboot. Can someone please help me how to rebuilt libc and reboot.
Also how shall I test my system call with the new kernel loaded.
The sixth Reproducible Builds Summit took place exactly two months ago in Venice, Italy. These three days of workshops were filled with a succession of interactive sessions, where everyone attending had the opportunity to present or learn about anything related to Build Reproducibility. This included the status of specific Open Source projects, techniques to locate, analyse, and understand issues, or also how to explain and communicate better around this topic.
Reproducible Builds are a set of software development practices that create an independently-verifiable path from source to binary code.
Anyone may inspect the source code of Free and Open Source Software for correctness or vulnerabilities. However, most software is distributed pre-compiled, with no method to confirm whether it actually corresponds to the source code published. This allows attacks in a number of different situations, from a malicious developer to network attacks, or the compromise of build infrastructure.
The purpose of Reproducible Builds is therefore to allow the verification that no vulnerabilities or backdoors have been introduced during the compilation process. By promising identical results for a given source, Build Reproducibility allows multiple third-parties to compare “correct” results, and to flag any deviations as suspect and worthy of scrutiny.
The base system of NetBSD can be built reproducibly since its 8.0 release! It can be enabled in mk.conf when building NetBSD for instance.
A first step has been implemented, when using GCC on NetBSD to build packages. Some important tools have been packaged, such as diffoscope. However, further aspects of build reproducibility are not covered in pkgsrc yet, and we welcome contributions to improve this situation! This would help bring this additional security mitigation to the NetBSD community as well as to other systems and users of pkgsrc.
If not already, you should definitely consider Build Reproducibility for your environment or software projects. It also applies to firmware, when sources are available. Thankfully NetBSD offers this ability for the base system already, but more work is required for packages.
As for myself, it was an honour and a pleasure to attend the Summit, keep in touch with the community, participate to the event, learn from everyone attending, and obviously to represent the NetBSD Foundation there. I am looking forward to the next Summit, which should take place in Hamburg from October 30th to November 2nd of 2023.
In the meantime, do not hesitate to get in touch, including to the NetBSD Foundation or to the pkgsrc community specifically, if you want to get involved with any aspect of Build Reproducibility or represent the NetBSD or pkgsrc projects for the Reproducible Builds community.
After nearly 3 whole years of development (work started on NetBSD 10 in late 2019), BETA snapshots have finally been published for interested users to test. More changes will be backported from the development branch over the next few months before we tag a final release, so the BETA images will keep getting updated.
While NetBSD 10.0 is expected to be a major milestone on performance, especially on multi-core systems, currently the BETA builds have some extra kernel diagnostics enabled that may reduce performance somewhat.
Among the features you can expect to find in NetBSD 10 are reworked cryptography, including compatibility with WireGuardⓇ, automatic swap encryption, new disk encryption methods, and CPU acceleration in the kernel. In hardware support, there are updated GPU drivers from Linux 5.6, support for more ARM hardware (including Rockchip RK356X, NXP i.MX 8M, Amlogic G12, Apple M1, and Raspberry Pi 4), support for new security features found in the latest ARM CPUs, and support for Realtek 2.5 gigabit and new Intel 10/25/40 gigabit ethernet adapters. compat_linux has been ported to AArch64 and DTrace has been ported to MIPS. For retrocomputing enthusiasts, there's improved multiprocessor support on Alpha, and more iMac G5 support. The Xen hypervisor support has received a major rework. There are various new userspace programs, including blkdiscard(8) to manually TRIM a disk, aiomixer(1) to control audio volume, realpath(1), and fsck_udf(8). And loads more...
There are many little details that might be relevant to admins when upgrading from NetBSD 9, so wait and read the final release announcement before you upgrade any production systems. Please note that networking setups using tap(4) as a bridge endpoint must be modified to use vether(4) instead, and compat_linux is no longer built into the kernel for security reasons (load it as a module instead). DisplayPort and HDMI audio is now enabled in the default x86 kernel, so you might need to change the default audio device with audiocfg(1) if you're not getting any sound output. blacklistd(8) was renamed to blocklistd(8).
Third-party software is available from pkgsrc, as ever. Binary packages are available for amd64, and I hope to publish binaries for i386 shortly.
I am building a collection of system utilities in C but with the restriction that I cannot use any system libraries, just direct system calls. This program was originally designed for FreeBSD, but I assumed that it would be simple to port between the BSDs.
It compiled fine (as soon as I added the getargs
macro for x86_64), but then when I ran it I got this error.
# ./binaries/echo hello world
-sh: Cannot execute ELF binary ./binaries/echo
I decided to check what happened with gdb
and I got this
(gdb) r hello world
Starting program: /root/small-utils/binaries/echo
exec: Cannot execute ELF binary /root/small-utils/binaries/echo
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/target.c:2170: internal-error: void target_mourn_inferior(ptid_t): Assertion `ptid == inferior_ptid` failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y
This is a bug, please report it. For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/target.c:2170: internal-error: void target_mourn_inferior(ptid_t): Assertion `ptid == inferior_ptid` failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y
[1] Abort trap (core dumped) gdb ./binaries/echo
The code can be found on GitHub at https://github.com/minneelyyyy/small-utils. For now it is just echo.
It’s Long Article Title week!
Support for running NetBSD on Oracle Cloud Arm-Based Compute Instances has been added to NetBSD -current.
A build of NetBSD/evbarm64 after 2022-10-15 will generate a bootable image (arm64.img.gz) that can be converted to a Custom Image that can run on Oracle Cloud.
To get started, the image needs to be converted to QCOW2 format:
$ gunzip arm64.img.gz $ qemu-img convert -f raw -O qcow2 arm64.img netbsd.qcow2
Next, upload the image to an Oracle Cloud storage bucket.
Once the QCOW2 file has been uploaded, switch to Compute / Custom Images and click Import image. Set an image name, make sure the Operating system field is set to Linux, and select the bucket and object name for your uploaded image. Make sure to select QCOW2 as the Image type. Set the mode to Paravirtualized mode.
After the image is imported, click Edit details and clear all checkboxes except for VM.Standard.A1.Flex. You could also try BM.Standard.A1.160 (bare metal instance) but this is untested. Once the compatible shapes have been updated, click Save changes.
Now click Edit image capabilities, and under the Firmware heading, uncheck BIOS and click Save changes.
Finally, to create an instance, click the Create instance button. Make sure to either provide SSH keys, or download the generated private key in the Add SSH keys section. Click the Create button to start the instance.
The Instance details page will assign you a public IP address. Once the instance has started, you can ssh to it with the SSH key used during image creation as user opc.
$ ssh -i ssh-key-2022-10-15.key [email protected] Last login: Sat Oct 15 18:50:51 2022 from y.y.y.y NetBSD 9.99.101 (GENERIC64) #9: Sat Oct 15 15:35:49 ADT 2022 Welcome to NetBSD! This is a development snapshot of NetBSD for testing -- user beware! Bug reports: https://www.NetBSD.org/support/send-pr.html Donations to the NetBSD Foundation: https://www.NetBSD.org/donations/ -- UNSAFE KEYS WARNING: The ssh host keys on this machine have been generated with not enough entropy configured, so may be predictable. To fix, follow the "Adding entropy" section in the entropy(7) man page and after this machine has enough entropy, re-generate the ssh host keys by running: sh /etc/rc.d/sshd keyregen instance-20221015-1520$ sysctl machdep.dmi machdep.dmi.system-vendor = QEMU machdep.dmi.system-product = KVM Virtual Machine machdep.dmi.system-version = virt-4.2 machdep.dmi.chassis-vendor = QEMU machdep.dmi.chassis-type = QEMU machdep.dmi.chassis-version = virt-4.2 machdep.dmi.chassis-asset-tag = OracleCloud.com machdep.dmi.processor-vendor = QEMU machdep.dmi.processor-version = virt-4.2 machdep.dmi.processor-frequency = 2000 MHz