hns - 日記自動生成システム - Version 2.19.9

先月 2023年05月 来月
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2023年05月19日(金) 旧暦 [n年日記] [更新:"2004/08/09 23:43:33"]

#1 [pkgsrc] libkver and pbulk

libkver is the utility of faking the result of uname -a, and it is nice to use CHROOT pkgsrc build
when the kernel and userland in chroot is different. The typical story is:
  1. install NetBSD current, say 10.99.4
  2. prepare chrooted environment with 9.3
    (I do not use sandbox, but use pax to openup binaries/*.xz)
  3. do pkgsrc build inside chroot for Release 9.3

Info from ryoon, Ryo Onodera:

This is my start point, really helpful, thank you

pbulk and chroot:

Following two are theoretically, independent
  1. chroot
  2. pbulk
But we usually employ both at the same time. Especially pbulk remove everything under /usr/pkg

libkver:

  • install (make package) libkver inside of chroot for pbulk
    cd /usr/pkgsrc/pkgtools/libkver ; 
    env PATH=/usr/pkg_bulk/bin:/usr/pkg_bulk/sbin:${PATH} bmake package-install
    
  • copy two files onto outside of chroot
    sudo -s
    mkdir -p /usr/pkg_bulk/sbin
    mkdir    /usr/pkg_bulk/lib
    cp -p /CHROOT/usr/pkg_bulk/sbin/kver      /usr/pkg_bulk/sbin
    cp -p /CHROOT/usr/pkg_bulk/lib/libkber.so /usr/pkg_bulk/lib
    
    without doing above, you may got
    /usr/pkg/lib/libkver.so not found
    
    (after you once run pbulk)

start chroot with kver:

prepare shell script to start chroot shell (kind of optional)
/usr/pkg_bulk/sbin/kver -r 9.3 /usr/sbin/chroot /CHROOT
In my case, I insist using zsh, so zsh has been installed in chroot also, and then
env SHELL=/usr/pkg_bulk/bin/zsh  /usr/pkg_bulk/sbin/kver -r 9.3 /usr/sbin/chroot /CHROOT
sx2-252@makoto 11:27:38/230520(~)% sudo sh   /CHROOT/chroot-9.3.sh 
Password: 

sx2-252# uname -a
NetBSD sx2-252.s.ki.nu 9.3 NetBSD 9.3 (LIBKVER) #0: 
  Tue Jan 19 00:00:00 UTC 2038 root@localhost:/sys/arch/amd64/compile/LIBKVER amd64


2023年05月08日(月) 旧暦 [n年日記]

#1 [git] CONFLICT issue

need to specify how to reconcile them.:

SX2@makoto 08:32:30/230507(..git-work/netbsd-src)% git pull
warning: redirecting to https://github.com/IIJ-NetBSD/netbsd-src/
remote: Enumerating objects: 205208, done.
remote: Counting objects: 100% (75260/75260), done.
remote: Compressing objects: 100% (1062/1062), done.
remote: Total 205208 (delta 74196), reused 75241 (delta 74190), pack-reused 129948
Receiving objects: 100% (205208/205208), 278.57 MiB | 9.65 MiB/s, done.
Resolving deltas: 100% (168503/168503), completed with 19182 local objects.
From http://github.com/IIJ-NetBSD/netbsd-src
   025caf2395f..766c72c19da  master     -> origin/master
 * [new branch]              netbsd-10  -> origin/netbsd-10
   41205f1b587..a457ead2823  netbsd-6   -> origin/netbsd-6
   cbd11cbb7c7..2a5630b4849  netbsd-7   -> origin/netbsd-7
   295dbf2e9ba..f4e744ccb8b  netbsd-8   -> origin/netbsd-8
   4a25d6f57ec..925f41e229c  netbsd-9   -> origin/netbsd-9
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

git config pull.rebase false:

I'm too silly (?) to take the first option among shown listed, but NOT good.
SX2@makoto 08:36:40/230507(..git-work/netbsd-src)%  git config pull.rebase false

SX2@makoto 08:36:44/230507(..git-work/netbsd-src)% git pull
warning: redirecting to https://github.com/IIJ-NetBSD/netbsd-src/
Auto-merging distrib/sets/lists/tests/mi
CONFLICT (content): Merge conflict in distrib/sets/lists/tests/mi
Auto-merging share/man/man9/atomic_loadstore.9
CONFLICT (content): Merge conflict in share/man/man9/atomic_loadstore.9
Auto-merging share/man/man9/uvm_hotplug.9
CONFLICT (content): Merge conflict in share/man/man9/uvm_hotplug.9
Auto-merging usr.bin/make/unit-tests/varmod-edge.exp
CONFLICT (content): Merge conflict in usr.bin/make/unit-tests/varmod-edge.exp
Auto-merging usr.bin/make/unit-tests/varmod-edge.mk
CONFLICT (content): Merge conflict in usr.bin/make/unit-tests/varmod-edge.mk
Automatic merge failed; fix conflicts and then commit the result.

git branch:

SX2@makoto 08:38:06/230507(..git-work/netbsd-src)% git branch
  8.99.28
  debug-acpi-201901
  debug-drm
  iwn-debug
* master
  mptutil
  netbsd-7
  netbsd-9
  panasonic
  sloss-toughbook
  sloss-toughbook-9
  sloss-toughbook-9.0
  sshd

git config pull.rebase true:

I often encountered the problem shown above, and now thiks my option was bad.
Then I took the second one, looks (works) good
SX2@makoto 08:39:25/230507(..git-work/netbsd-src)%  git config pull.rebase true

SX2@makoto 08:39:32/230507(..git-work/netbsd-src)% git merge --abort
Updating files: 100% (158700/158700), done.

SX2@makoto 08:40:37/230507(..git-work/netbsd-src)% git pull
warning: redirecting to https://github.com/IIJ-NetBSD/netbsd-src/
warning: skipped previously applied commit 1449ec34474
warning: skipped previously applied commit 1e9ad558f7b
warning: skipped previously applied commit d459f1e9bef
warning: skipped previously applied commit 8e9097a515d
warning: skipped previously applied commit 80baaac0d21
hint: use --reapply-cherry-picks to include skipped commits
hint: Disable this message with "git config advice.skippedCherryPicks false"
Successfully rebased and updated refs/heads/master.


2023年05月07日() 旧暦 [n年日記] [更新:"2004/08/09 23:43:33"]

#1 [NetBSD] 10.99.4 problem for N3150 or N3160

10.99.4 has problem for this processor:
[     3.987066] kern.module.path=/stand/amd64/10.99.4/modules
[     4.001301] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[     4.007065] [drm] Driver supports precise vblank timestamp query.
[     4.017058] i915drmkms0: interrupting at msi4 vec 0 (i915drmkms0)
[     4.247060] [drm] Initialized i915 1.6.0 20200114 for i915drmkms0 on minor 0
[     5.027062] intelfb0 at i915drmkms0
[     5.027062] [drm] DRM_I915_DEBUG enabled
[     5.037057] [drm] DRM_I915_DEBUG_GEM enabled
[     5.037057] intelfb0: framebuffer at 0x90020000, size 1920x1080, depth 32, stride 7680
[     5.037057] uvm_fault(0xffffffff819101c0, 0xfffffffffffff000, 1) -> e
[     5.047053] fatal page fault in supervisor mode
[     5.047053] trap type 6 code 0 rip 0xffffffff80dc2dce cs 0x8 rflags 0x10286 
      cr2 0xfffffffffffffff0 ilevel 0 rsp 0xffffb80449741af0
[     5.057053] curlwp 0xffffe4850c812080 pid 0.211 lowest kstack 0xffffb8044973d2c0
It is reported as: PR/kern 57154

#2 work around for the problem

Connect USB disk and
zcat  NetBSD-10.99.4-amd64-bios-install.img.gz | sudo dd of=/dev/rsd0d bs=64m
0+40000 records in
0+40000 records out
2621440000 bytes transferred in 82.765 secs (31673291 bytes/sec)
  • connect USB serial cable and
    cu -l /dev/dtyU0
    
  • boot from above USB disk
  • count down starts for 30 second, and interrupt by any key
    Welcome to the NetBSD/amd64 10.99.4 installation image
    =========================================================
    
    If you encounter a problem while booting, report a bug at
    https://www. NetBSD.org/.
    
     1. Install NetBSD
     2. Drop to boot prompt
    
    Choose an option; RETURN for default; SPACE to stop countdown.
    Option 1 wiil be chosen in 30 seconds.
    
    Option: [1]:2
    type "?" or "help" for help.
    > consdev com0
    
  • select 2 for drop to boot prompt, and type
    > consdev com0
    
    now directs to serial connected window.
  • then following will disable drmkms to avoid PR/kern 57154
    > userconf disable i915drmkms
    > boot netbsd
    
Now sysinst starts
(and completed)

now rebooting from installed system:


  \\-__,------,___.
   \\        __,---`  NetBSD/x86 BIOS Boot
    \\       `---,_.  Revision 5.11 (Sat May  6 17:21:51 UTC 2023)
     \\-,_____,.---`
      \\
       \\
        \\


     1. Boot normally
     2. Boot single user
     3. Drop to boot prompt

Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 0 seconds.     

Option: [1]:3
userconf disable i915drmkms
boot netbsd -s
Enter pathname of shell or RETURN for /bin/sh: 
We recommend that you create a non-root account and use su(1) for root access.
# mount -a
# cd /
# cat boot.cfg
menu=Boot normally:rndseed /var/db/entropy-file;boot
menu=Boot single user:rndseed /var/db/entropy-file;boot -s
menu=Drop to boot prompt:prompt
default=1
timeout=5
clear=1
#
# export TERM=xterm
# vi /boot.cfg

menu=Boot    normally:rndseed /var/db/entropy-file;userconf disable i915drmkms; boot
menu=Boot single user:rndseed /var/db/entropy-file;userconf disable i915drmkms; boot -s
menu=Drop to boot prompt:prompt
default=1
timeout=5
clear=1

Related PR: install/50808 (closed for now)


2023年05月06日() 旧暦 [n年日記] [更新:"2004/08/09 23:43:33"]

#1 [NetBSD] Dynabook R73/T acpi problem

10.99.4 problem:

1.02419201 trap type 1 code 0 rip OXfIFTITISUM
1.02419201 curlup OxffffffFF81886580 pid 0.0 louest kstack Bb

Stopped in pid 0.0 (system) at netbsd:breakpoint+0x5: leavea
breakpoint () at netbsd:breakpoint+0x5
vpanic() at netbsd:panic+0x173 
panic() at netbsd:panic+0x3c 
extent_alloc_region() at netbsd:extent_alloc_region+0×253
bus_space_reserve() at netbsd:bus_space_reserve+0×54 
bus_space_map() at netbsd:bus_space_map+0x43
lpt_acpi_attach() at netbsd:lpt_acpi_attach+0xa7
config_attach_internal () at netbsd:config_attach_internal+0x19f 
config-found() at netbsd:config_found+Oxc3
acpi_rescan() at netbsd: acpi_rescan+0x36d 
acpi_attach () at netbsd:acpi_attach+0x44d 
config_attach_internal () at netbsd:config_attach_internal+0x19f 
config_found() at netbsd:config_found+Oxc3
amd64_mainbus_attach() at netbsd:and64_mainbus_attach+0x28c 
config_attach_internal () at netbsd:config_attach_internal+0x19f 
config_rootfound() at netbsd:config_rootfound+0x7?
cpu configure() at netbsd:cpu_configure+0x38 
main() at netbsd:main+0x32c
ds     ffff

Manual bisect:

sys/sys/param.hDatehashresult
9.99.51
a448ee406f9good
9.99.76
25fb6b0155cgood
9.99.85

good
9.99.902021-09-30cecc8649fa4good
9.99.902021-10-1056901406d02good
9.99.912021-10-11264edd1cddegood

2021-10-12236a2da8495good

2021-10-160afa3e1220egood

2021-10-18817528da449bad
9.99.922021-10-207cbfca3eab0bad


ec3d1ddf142bad
9.99.942022-03-0397bb14546bbbad
Dmesg for 9.99.91
git bisect start bad good
git bisect good
git bisect bad
git bisect skip
git g -- sys/dev/acpi
* 4b77a4866ad [2021-10-15 19:21:45 +0000] Convert some debug messages to aprint_debug @jmcneill
* 957ea0a8133 [2021-10-07 00:11:08 +0000] Also print the device name with aprint_naive, 
                                          like wss@pnpbios does. @uwe
* 78d045556f6 [2021-10-06 20:10:42 +0000] Don't use aprint_normal_dev("") to print the device name. @uwe
* baaa913025e [2021-10-06 18:41:34 +0000] Fix KASSERT triggered when attaching opl at wss. @uwe
time sudo ./build.sh -j 4 -u -T /export/T -O /export/O kernel=GENERIC
localhost@makoto 18:01:11/230506(..git-work/netbsd-src)% git bisect good
0223269e93ddbb5f5587645143bfaaed9e00fab2 is the first bad commit
commit 0223269e93ddbb5f5587645143bfaaed9e00fab2
Author: jmcneill <jmcneill@netbsd.org>
Date:   Sat Oct 16 13:09:40 2021 +0000

    Enable com and lpt at ACPI attachments.

 sys/arch/amd64/conf/GENERIC | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)


2023年05月04日(木) 旧暦 [n年日記] [更新:"2004/08/09 23:43:33"]

#1 [TODO]

raid setup by sysinst:

(how to install netbsd on raid1 using raidframe)
  1. do as described on 2016 advent calendar
  2. (say, manual installboot for -t raid)
    # installboot -fv -o console=com0,speed=115200 -t raid /dev/wd0a bootxx_ffsv2 /boot
    File system:         /dev/rwd0a                                                                 
    File system type:    raid (blocksize 16384, needswap 0)                                         
    Primary bootstrap:   bootxx_ffsv2                                                               
    Secondary bootstrap: /boot                                                                      
    Boot options:        timeout 5, flags 0, speed 115200, ioaddr 0, console com0                   
    # installboot -fv -o console=com0,speed=115200 -t raid /dev/wd1a bootxx_ffsv2 /boot
    File system:         /dev/rwd1a                                                                 
    File system type:    raid (blocksize 16384, needswap 0)                                         
    Primary bootstrap:   bootxx_ffsv2                                                               
    Secondary bootstrap: /boot                                                                      
    Boot options:        timeout 5, flags 0, speed 115200, ioaddr 0, console com0                   
    # exit
    
  3. The first reboot may fail as saying cannot mount root, error = 16
    [   6.0764013] uhub3: single transaction translator                                
    [   6.4968109] WARNING: findroot: double match for boot device 
                   (bootinfo/bootwedge:wd0 bootinfo/bootwedge:wd1)
    [   6.5168301] raid5: RAID Level 1                                                 
    [   6.5268407] raid5: Components: /dev/wd1a /dev/wd0a                              
    [   6.5268407] raid5: Total Sectors: 159999936 (78124 MB)                          
    [   6.5568691] WARNING: 3 errors while detecting hardware; check system log.       
    [   6.5668794] boot device: wd0                                                    
    [   6.5668794] root on wd0a dumps on wd0b                                          
    [   6.5668794] vfs_mountroot: can't open root device                               
    [   6.5768887] cannot mount root, error = 16
    [   6.5768887] root device (default wd0a): raid5a
    [  16.4264490] dump device (default raid5b):
    [  17.7076926] file system (default generic):
    [  18.3483145] root on raid5a dumps on raid5b                                      
    [  18.3783460] root file system type: ffs                                          
    [  18.3783460] kern.module.path=/stand/amd64/9.3/modules                           
    [  18.3883539] kern info: [drm] Memory usable by graphics device = 2048M           
    [  18.3990870] kern info: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).                                                                              
    [  18.4083730] kern info: [drm] Driver supports precise vblank timestamp query.    
    [  18.4083730] kern info: [drm] failed to find VBIOS tables                        
    [  18.4584207] i915drmkms0: interrupting at ioapic0 pin 16 (i915drmkms0)           
    [  18.6486087] kern info: [drm] GMBUS [i915 gmbus dpc] timed out, 
                   falling back to bit banging on pin 4                                                    
    
    but type
    raid5 (in my case) for boot device
  4. raidctl -A softroot raid5
  5. reboot
  6. working fine
Really unbelievable !!



最近の日記
2024年05月08日
comparison on ./buildsh tools
2024年05月06日
py-setuptools (python 3.11.9)
make release took 1 hours and 10 min
qemu invocation for 10.99.10
2024年05月05日
Windows 10 version
serial connection
bc bench
2024年05月04日
Trial on 10.99.10
another version (later trial) to succeed
2024年04月29日
dkim
以上、5 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)