NUC7PJYH: Installing Gentoo

Start

This project was a real rocky start. I was having a hard time booting off the USB and more trouble with a USB keyboard attached. However, when I could get the unit to boot, the chroot worked and I could compile. I was to the point think the unit was bad, so I stopped the install and started checking the problem by removing external hardware from the board. I was down to the RAM sticks, so I reseated both sticks, but as much compiling I had done on the unit, I would have expected a RAM issue show during heavy compiling.

As a last effort, that should have been an earlier effort, I updated the BIOS/UEFI. The unit had a 10/15/2019, version 1510. I had the same problem with the Asrock board, until I updated the firmware, it did not play nice. Now the unit shows the SATA drive as a possible boot option in the UEFI shell.

No way I am going over the install of Gentoo, but here are a couple references:

However, I can throw up a couple tips from years of installing Gentoo.

My Gentoo Install Tips

  • Use the Minimal Install CD  Not sure if there is a LiveDVD, but use the current minimal because it is updated. Download the iso and burn it to a USB
  • Connect the system you are installing to via ethernet cable. After booting with the above USB, do the following:
1. use passwd to give the install system a root password
2. edit /etc/ssh/sshd_config to PasswordAuthentication yes (default is no) and PermitRootLogin yes (default is commented out and prohibit-password). Save the file.
3. run /etc/init.d/ sshd start
4. do ‘ip a’ to get the install machine’s IP address
5. now you should be able to ssh and do the install from your main system.

 

  • Once the install USB loads and I can ssh into the system, it is the drive configuration. I do that in next post, but for reference I ‘mkdir /xxx’ on the running install system and mount all my partitions. Then I run the script below which is in the root of all my Gentoo systems. With that done, all that is left is a ‘chroot /xxx /bin/bash’ and then ‘source /etc/profile’
#!/bin/bash

mount --types proc /proc /xxx/proc
mount --rbind /sys /xxx/sys
mount --make-rslave /xxx/sys
mount --rbind /dev /xxx/dev
mount --make-rslave /xxx/dev

Internals

lspci

00:00.0 Host bridge: Intel Corporation Gemini Lake Host Bridge (rev 03)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 605 (rev 03)
00:0c.0 Network controller: Intel Corporation Device 31dc (rev 03)
00:0e.0 Audio device: Intel Corporation Celeron/Pentium Silver Processor High Definition Audio (rev 03)
00:0f.0 Communication controller: Intel Corporation Celeron/Pentium Silver Processor Trusted Execution Engine Interface (rev 03)
00:12.0 SATA controller: Intel Corporation Device 31e3 (rev 03)
00:13.0 PCI bridge: Intel Corporation Gemini Lake PCI Express Root Port (rev f3)
00:13.2 PCI bridge: Intel Corporation Gemini Lake PCI Express Root Port (rev f3)
00:15.0 USB controller: Intel Corporation Device 31a8 (rev 03)
00:1c.0 SD Host controller: Intel Corporation Celeron/Pentium Silver Processor SDA Standard Compliant SD Host Controller (rev 03)
00:1f.0 ISA bridge: Intel Corporation Device 31e8 (rev 03)
00:1f.1 SMBus: Intel Corporation Celeron/Pentium Silver Processor Gaussian Mixture Model (rev 03)
01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Install CD boot inside chroot: lshw

livecd                      
    description: Computer
    product: NUC7PJYH
    vendor: Intel(R) Client Systems
    version: J67992-404
    serial: G6JY020001Q9
    width: 4294967295 bits
    capabilities: smbios-3.1 dmi-3.1 smp vsyscall32
    configuration: boot=normal family=JY uuid=DBC56638-F377-2C29-5B8C-1C697A64A2F2
  *-core
       description: Motherboard
       product: NUC7JYB
       vendor: Intel Corporation
       physical id: 0
       version: J67969-404
       serial: GEJY01400BA8
       slot: Default string
     *-firmware
          description: BIOS
          vendor: Intel Corp.
          physical id: 0
          version: JYGLKCPX.86A.0053.2019.1015.1510
          date: 10/15/2019
          size: 64KiB
          capacity: 6592KiB
          capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int14serial int17printer acpi usb biosbootspecification uefi
     *-memory
          description: System Memory
          physical id: 18
          slot: System board or motherboard
          size: 8GiB
        *-bank:0
             description: SODIMM DDR4 Synchronous 2400 MHz (0.4 ns)
             product: CT4G4SFS824A.C8FE
             vendor: Crucial
             physical id: 0
             serial: 22982412
             slot: SODIMM1
             size: 4GiB
             width: 64 bits
             clock: 2400MHz (0.4ns)
        *-bank:1
             description: SODIMM DDR4 Synchronous 2400 MHz (0.4 ns)
             product: CT4G4SFS824A.C8FE
             vendor: Crucial
             physical id: 1
             serial: 22990315
             slot: SODIMM2
             size: 4GiB
             width: 64 bits
             clock: 2400MHz (0.4ns)
     *-cache:0
          description: L1 cache
          physical id: 24
          slot: L
          size: 224KiB
          capacity: 224KiB
          capabilities: synchronous internal write-back
          configuration: level=1
     *-cache:1
          description: L2 cache
          physical id: 25
          slot: e
          size: 4MiB
          capacity: 4MiB
          capabilities: synchronous internal write-back unified
          configuration: level=2
     *-cpu
          description: CPU
          product: Intel(R) Pentium(R) Silver J5005 CPU @ 1.50GHz
          vendor: Intel Corp.
          physical id: 26
          bus info: cpu@0
          version: Intel(R) Pentium(R) Silver J5005 CPU @ 1.50GHz
          slot: SOCKET 0
          size: 2696MHz
          capacity: 2800MHz
          width: 64 bits
          clock: 100MHz
          capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm 3dnowprefetch cpuid_fault cat_l2 pti cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust smep erms mpx rdt_a rdseed smap clflushopt intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts umip rdpid md_clear arch_capabilities cpufreq
          configuration: cores=4 enabledcores=4 threads=4
     *-pci
          description: Host bridge
          product: Gemini Lake Host Bridge
          vendor: Intel Corporation
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 03
          width: 32 bits
          clock: 33MHz
        *-display UNCLAIMED
             description: VGA compatible controller
             product: UHD Graphics 605
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             version: 03
             width: 64 bits
             clock: 33MHz
             capabilities: pciexpress msi pm vga_controller bus_master cap_list
             configuration: latency=0
             resources: memory:a0000000-a0ffffff memory:90000000-9fffffff ioport:f000(size=64) memory:c0000-dffff
        *-network
             description: Wireless interface
             product: Intel Corporation
             vendor: Intel Corporation
             physical id: c
             bus info: pci@0000:00:0c.0
             logical name: wlo2
             version: 03
             serial: f8:e4:e3:30:45:08
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
             configuration: broadcast=yes driver=iwlwifi driverversion=5.4.80-gentoo-r1-x86_64 firmware=46.4d093a30.0 latency=0 link=no multicast=yes wireless=IEEE 802.11
             resources: irq:44 memory:a1314000-a1317fff
        *-multimedia
             description: Audio device
             product: Celeron/Pentium Silver Processor High Definition Audio
             vendor: Intel Corporation
             physical id: e
             bus info: pci@0000:00:0e.0
             version: 03
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi pciexpress bus_master cap_list
             configuration: driver=snd_hda_intel latency=0
             resources: irq:126 memory:a1310000-a1313fff memory:a1000000-a10fffff
        *-communication UNCLAIMED
             description: Communication controller
             product: Celeron/Pentium Silver Processor Trusted Execution Engine Interface
             vendor: Intel Corporation
             physical id: f
             bus info: pci@0000:00:0f.0
             version: 03
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi bus_master cap_list
             configuration: latency=0
             resources: memory:a131f000-a131ffff
        *-storage
             description: SATA controller
             product: Intel Corporation
             vendor: Intel Corporation
             physical id: 12
             bus info: pci@0000:00:12.0
             version: 03
             width: 32 bits
             clock: 66MHz
             capabilities: storage msi pm ahci_1.0 bus_master cap_list
             configuration: driver=ahci latency=0
             resources: irq:122 memory:a1318000-a1319fff memory:a131e000-a131e0ff ioport:f090(size=8) ioport:f080(size=4) ioport:f060(size=32) memory:a131d000-a131d7ff
        *-pci:0
             description: PCI bridge
             product: Gemini Lake PCI Express Root Port
             vendor: Intel Corporation
             physical id: 13
             bus info: pci@0000:00:13.0
             version: f3
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:120 memory:a1200000-a12fffff
           *-generic
                description: Unassigned class
                product: RTS5229 PCI Express Card Reader
                vendor: Realtek Semiconductor Co., Ltd.
                physical id: 0
                bus info: pci@0000:01:00.0
                version: 01
                width: 32 bits
                clock: 33MHz
                capabilities: pm msi pciexpress bus_master cap_list
                configuration: driver=rtsx_pci latency=0
                resources: irq:125 memory:a1200000-a1200fff
        *-pci:1
             description: PCI bridge
             product: Gemini Lake PCI Express Root Port
             vendor: Intel Corporation
             physical id: 13.2
             bus info: pci@0000:00:13.2
             version: f3
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:121 ioport:e000(size=4096) memory:a1100000-a11fffff
           *-network
                description: Ethernet interface
                product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
                vendor: Realtek Semiconductor Co., Ltd.
                physical id: 0
                bus info: pci@0000:02:00.0
                logical name: eno1
                version: 15
                serial: 1c:69:7a:64:a2:f2
                size: 1Gbit/s
                capacity: 1Gbit/s
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.149 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
                resources: irq:20 ioport:e000(size=256) memory:a1104000-a1104fff memory:a1100000-a1103fff
        *-usb
             description: USB controller
             product: Intel Corporation
             vendor: Intel Corporation
             physical id: 15
             bus info: pci@0000:00:15.0
             version: 03
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi xhci bus_master cap_list
             configuration: driver=xhci_hcd latency=0
             resources: irq:123 memory:a1300000-a130ffff
           *-usbhost:0
                product: xHCI Host Controller
                vendor: Linux 5.4.80-gentoo-r1-x86_64 xhci-hcd
                physical id: 0
                bus info: usb@1
                logical name: usb1
                version: 5.04
                capabilities: usb-2.00
                configuration: driver=hub slots=9 speed=480Mbit/s
              *-usb:0
                   description: Mass storage device
                   product: Cruzer Glide
                   vendor: SanDisk
                   physical id: 1
                   bus info: usb@1:1
                   version: 1.27
                   serial: 4C530001270803117175
                   capabilities: usb-2.00 scsi
                   configuration: driver=usb-storage maxpower=200mA speed=480Mbit/s
              *-usb:1
                   description: Keyboard
                   product: 2.4G Receiver
                   vendor: Compx
                   physical id: 2
                   bus info: usb@1:2
                   version: 2.41
                   capabilities: usb-1.10
                   configuration: driver=usbhid maxpower=100mA speed=12Mbit/s
              *-usb:2 UNCLAIMED
                   description: Bluetooth wireless interface
                   product: Bluetooth 9460/9560 Jefferson Peak (JfP)
                   vendor: Intel Corp.
                   physical id: 9
                   bus info: usb@1:9
                   version: 0.02
                   capabilities: bluetooth usb-2.00
                   configuration: maxpower=100mA speed=12Mbit/s
           *-usbhost:1
                product: xHCI Host Controller
                vendor: Linux 5.4.80-gentoo-r1-x86_64 xhci-hcd
                physical id: 1
                bus info: usb@2
                logical name: usb2
                version: 5.04
                capabilities: usb-3.00
                configuration: driver=hub slots=7 speed=5000Mbit/s
        *-generic
             description: SD Host controller
             product: Celeron/Pentium Silver Processor SDA Standard Compliant SD Host Controller
             vendor: Intel Corporation
             physical id: 1c
             bus info: pci@0000:00:1c.0
             version: 03
             width: 64 bits
             clock: 33MHz
             capabilities: pm bus_master cap_list
             configuration: driver=sdhci-pci latency=0
             resources: irq:39 memory:a131c000-a131cfff memory:a131b000-a131bfff
        *-isa
             description: ISA bridge
             product: Intel Corporation
             vendor: Intel Corporation
             physical id: 1f
             bus info: pci@0000:00:1f.0
             version: 03
             width: 32 bits
             clock: 33MHz
             capabilities: isa bus_master
             configuration: latency=0
        *-serial
             description: SMBus
             product: Celeron/Pentium Silver Processor Gaussian Mixture Model
             vendor: Intel Corporation
             physical id: 1f.1
             bus info: pci@0000:00:1f.1
             version: 03
             width: 64 bits
             clock: 33MHz
             configuration: driver=i801_smbus latency=0
             resources: irq:20 memory:a131a000-a131a0ff ioport:f040(size=32)
  *-scsi
       physical id: 1
       bus info: scsi@2
       logical name: scsi2
       capabilities: scsi-host
       configuration: driver=usb-storage

New Toy: Intel NUC 7 Essential Kit NUC7PJYH

I decided to start with an older, but a little higher end than the bottom NUC. At the time Walmart had the better price. On Ebay, a used unit can be had for $40 to $100 cheaper with some already containing RAM and an SSD. There is also a link off the Intel site to request a demo unit. I signed up, but have not heard back and I will try again.

ItemStoreCost
Intel NUC 7 Essential Kit NUC7PJYHWalmart$199.73
Crucial RAM 4GB DDR4 2400MHz CL17 Laptop Memory CT4G4SFS824AAmazon$16.99 x 2
Samsung SSD 860 EVO 250GB 2.5 Inch SATA III Internal SSD (MZ-76E250B/AM)Amazon$39.99
Total$273.70
All the parts

References:

Product Identification Information

A note about the NUC7-JY products that could catch a person off guard. Intel® NUC Products NUC7{x}JY{y}  {z}  Identification Information:

Product Name Intel NUC
Kit SA #
Intel® NUC
Board AA #
Differentiating Features
NUC7CJYH J67971-400 J67967-400 Kit with power adapter, no memory, no eMMC, no OS
NUC7PJYH J67992-400 J67969-400 Kit with power adapter, no memory, no eMMC, no OS
NUC7CJYS

J67993-400

J67994-400

J67970-400 Mini PC with power adapter, preinstalled with 4GB
2400MHz DDR4 SO-DIMM, 32GB e-MMC with
Microsoft* Windows* 10 Home

Note:
{x} = “C” for “Celeron”, “P” for “Pentium”:

  • Celeron is Intel Celeron processor (J4005), stepping B0, and S-Spec number SR3S5.
  • Pentium is Intel Pentium Silver processor (J5005), stepping B0, and S-Spec number SR3S3.

{y} = “H” for “kit” and “S” = “system”: The system comes with RAM, MMC, and Win10 Home.

{z} Here is the catchy thing that could surprise:

Product codes Power cord type
BOXNUC7CJYH / BOXNUC7PJYH No power cord included.
BOXNUC7CJYH1 / BOXNUC7PJYH1 US power cord included.
BOXNUC7CJYH2 / BOXNUC7PJYH2 EU power cord included.
BOXNUC7CJYH3 / BOXNUC7PJYH3 UK power cord included.
BOXNUC7CJYH4 / BOXNUC7PJYH4 Australia/New Zealand power cord included.
BOXNUC7CJYH5 / BOXNUC7PJYH5 India power cord included.
BOXNUC7CJYH9 / BOXNUC7PJYH9 Japan/Taiwan power cord included.

 

Unit bottom – screws to get in to the box.
The unit opened up.

The SSD slides in the bottom of the unit.

SSD insert

The below shows both 4G RAM sticks inserted and the SSD in place.

RAM installed

Next, Gentoo install …

Gentoo: Gnome-builder 3.38.1 error compiling with Sysprof 3.38.1

As of 24 December I was getting an error with dev-util/gnome-builder-3.38.1 and dev-util/sysprof-3.38.1 with the sysprof flag active. My compile config:

dev-util/gnome-builder-3.38.1 clang devhelp git glade gtk-doc spell sysprof  PYTHON_SINGLE_TARGET="python3_8"
dev-util/sysprof-3.38.1 gtk unwind

Sysprof has a /usr/include/sysprof-3 with duplicate headers that get picked up first and give redefine error when the same headers are included from sysprof-4. My quick and dirty fix:

cd /usr/include/sysprof-3

mv sysprof-version-macros.h _sysprof-version-macros.h
mv sysprof-clock.h _sysprof-clock.h
mv sysprof-capture-types.h _sysprof-capture-types.h
mv sysprof-capture-reader.h _sysprof-capture-reader.h
mv sysprof-address.h _sysprof-address.h
mv sysprof-capture-condition.h _sysprof-capture-condition.h
mv sysprof-capture-writer.h _sysprof-capture-writer.h
mv sysprof-collector.h _sysprof-collector.h
mv sysprof-capture-cursor.h _sysprof-capture-cursor.h
mv sysprof-platform.h _sysprof-platform.h
mv sysprof-capture.h _sysprof-capture.h

Gentoo: geany-plugins-1.37-r100 compile error with pretty-printer plugin enabled

The error:

PrettyPrinter.h:55:22: error: two or more data types in declaration specifiers
   55 | typedef unsigned int bool;
      |                      ^~~~
In file included from PluginEntry.h:34,
                 from PluginEntry.c:28:
PrettyPrinter.h:55:1: warning: useless type name in empty declaration
   55 | typedef unsigned int bool;
      | ^~~~~~~

Solution, comment out line 55 of PrettyPrinter.h and restart compile using ebuild followed by install and qmerge.

Compile errors with broadcom-sta and kernel 5.9

The net-wireless/broadcom-sta package does compile with the 5.9 versions of the kernel. Specifically, the current driver version 6.30.223.271-r6. The following patch will allow compiling of a working driver.

I named the following patch linux-5.9.patch and placed in:

/etc/portage/patches/net-wireless/broadcom-sta-6.30.223.271-r6

--- a/src/wl/sys/wl_linux.c	2020-11-16 06:13:53.274122141 -0500
+++ b/src/wl/sys/wl_linux.c	2020-11-16 05:25:24.506040486 -0500
@@ -1662,8 +1662,13 @@
 		goto done2;
 	}
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
+       if (uaccess_kernel())
+               buf = ioc.buf;
+#else
 	if (segment_eq(get_fs(), KERNEL_DS))
 		buf = ioc.buf;
+#endif
 
 	else if (ioc.buf) {
 		if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {

Gnome 3.36 and Workspaces to Dock Overview Issues

17 July update – the r2 version is in portage, but still requires this fix.

Simply, the overview functionality of Workspaces to Dock is broke with gnome-shell 3.36.4, it just does not work.  It seems that this time it is a gnome-shell issue which can be corrected by:  workspacesView: Revert commits of !1119.

Execute ebuild gnome-shell-3.36.4-r1.ebuild configure

The r1 version is current as of today, the next version may fix this issue.  Insert the changes into workspacesView.js. Then the followup commands that I do individually:

ebuild gnome-shell-3.36.4-r1.ebuild compile

ebuild gnome-shell-3.36.4-r1.ebuild install

ebuild gnome-shell-3.36.4-r1.ebuild qmerge