'잡동사니'에 해당되는 글 13670건

  1. 2023.08.29 bitbake --help
  2. 2023.08.28 opengl glortho gluperspective
  3. 2023.08.28 Do not use Bitbake as root.
  4. 2023.08.28 imx8 yocto
  5. 2023.08.28 debian nvme tool
  6. 2023.08.28 makefile 매크로(?)
  7. 2023.08.27 3d dlp 120Hz가 왜 망했냐면..
  8. 2023.08.26 multicast
  9. 2023.08.25 ffb - force feedback
  10. 2023.08.24 golang asm

명령어 조사중

bitbake -c compile -f recipe 식으로 많이 써왔는데

상세 명령이나 recipre 목록등을 얻는 방법을 찾는 중

 

Usage: bitbake [options] [recipename/target recipe:do_task ...]

    Executes the specified task (default is 'build') for a given set of target recipes (.bb files).
    It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which
    will provide the layer, BBFILES and other configuration information.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -b BUILDFILE, --buildfile=BUILDFILE
                        Execute tasks from a specific .bb recipe directly.
                        WARNING: Does not handle any dependencies from other
                        recipes.
  -k, --continue        Continue as much as possible after an error. While the
                        target that failed and anything depending on it cannot
                        be built, as much as possible will be built before
                        stopping.
  -f, --force           Force the specified targets/task to run (invalidating any existing stamp file).
  -c CMD, --cmd=CMD     Specify the task to execute. The exact options
                        available depend on the metadata. Some examples might
                        be 'compile' or 'populate_sysroot' or 'listtasks' may
                        give a list of the tasks available.
  -C INVALIDATE_STAMP, --clear-stamp=INVALIDATE_STAMP
                        Invalidate the stamp for the specified task such as
                        'compile' and then run the default task for the
                        specified target(s).
  -r PREFILE, --read=PREFILE
                        Read the specified file before bitbake.conf.
  -R POSTFILE, --postread=POSTFILE
                        Read the specified file after bitbake.conf.
  -v, --verbose         Enable tracing of shell tasks (with 'set -x'). Also
                        print bb.note(...) messages to stdout (in addition to
                        writing them to ${T}/log.do_<task>).
  -D, --debug           Increase the debug level. You can specify this more
                        than once. -D sets the debug level to 1, where only
                        bb.debug(1, ...) messages are printed to stdout; -DD
                        sets the debug level to 2, where both bb.debug(1, ...)
                        and bb.debug(2, ...) messages are printed; etc.
                        Without -D, no debug messages are printed. Note that
                        -D only affects output to stdout. All debug messages
                        are written to ${T}/log.do_taskname, regardless of the
                        debug level.
  -q, --quiet           Output less log message data to the terminal. You can
                        specify this more than once.
  -n, --dry-run         Don't execute, just go through the motions.
  -S SIGNATURE_HANDLER, --dump-signatures=SIGNATURE_HANDLER
                        Dump out the signature construction information, with
                        no task execution. The SIGNATURE_HANDLER parameter is
                        passed to the handler. Two common values are none and
                        printdiff but the handler may define more/less. none
                        means only dump the signature, printdiff means compare
                        the dumped signature with the cached one.
  -p, --parse-only      Quit after parsing the BB recipes.
  -s, --show-versions   Show current and preferred versions of all recipes.
  -e, --environment     Show the global or per-recipe environment complete
                        with information about where variables were
                        set/changed.
  -g, --graphviz        Save dependency tree information for the specified
                        targets in the dot syntax.
  -I EXTRA_ASSUME_PROVIDED, --ignore-deps=EXTRA_ASSUME_PROVIDED
                        Assume these dependencies don't exist and are already
                        provided (equivalent to ASSUME_PROVIDED). Useful to
                        make dependency graphs more appealing
  -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS
                        Show debug logging for the specified logging domains
  -P, --profile         Profile the command and save reports.
  -u UI, --ui=UI        The user interface to use (knotty, ncurses or teamcity
                        - default knotty).
  --token=XMLRPCTOKEN   Specify the connection token to be used when
                        connecting to a remote server.
  --revisions-changed   Set the exit code depending on whether upstream
                        floating revisions have changed or not.
  --server-only         Run bitbake without a UI, only starting a server
                        (cooker) process.
  -B BIND, --bind=BIND  The name/address for the bitbake xmlrpc server to bind
                        to.
  -T SERVER_TIMEOUT, --idle-timeout=SERVER_TIMEOUT
                        Set timeout to unload bitbake server due to
                        inactivity, set to -1 means no unload, default:
                        Environment variable BB_SERVER_TIMEOUT.
  --no-setscene         Do not run any setscene tasks. sstate will be ignored
                        and everything needed, built.
  --skip-setscene       Skip setscene tasks if they would be executed. Tasks
                        previously restored from sstate will be kept, unlike
                        --no-setscene
  --setscene-only       Only run setscene tasks, don't run any real tasks.
  --remote-server=REMOTE_SERVER
                        Connect to the specified server.
  -m, --kill-server     Terminate any running bitbake server.
  --observe-only        Connect to a server as an observing-only client.
  --status-only         Check the status of the remote bitbake server.
  -w WRITEEVENTLOG, --write-log=WRITEEVENTLOG
                        Writes the event log of the build to a bitbake event
                        json file. Use '' (empty string) to assign the name
                        automatically.
  --runall=RUNALL       Run the specified task for any recipe in the taskgraph
                        of the specified target (even if it wouldn't otherwise
                        have run).
  --runonly=RUNONLY     Run only the specified task within the taskgraph of
                        the specified targets (and any task dependencies those
                        tasks may have).

 

$ bitbake -c listtasks
Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.

 

$ bitbake-layers show-recipes

[링크 : https://stackoverflow.com/questions/32850160/bitbake-how-to-list-all-recipe-and-append-files-used-in-an-image]

 

For an updated list for a specific recipe, run:

bitbake -c listtasks <recipe>

fetchall Fetch all source
build
devshell
package_write_ipk
cleansstate Clean the build/sstate-cache directory
configure
clean clean $WORKDIR
cleanall clean $WORKDIR and sstate-cache
populate_lic
package_write
populate_sysroot
buildall
populate_lic_setscene
patch
listtasks list all tasks that can be run for a target
compile
package_setscene
fetch
checkuri
package_write_ipk_setscene
package
unpack
install
populate_sysroot_setscene
checkuriall

[링크 : https://www.openembedded.org/wiki/List_of_Executable_tasks]

'프로그램 사용 > yocto project' 카테고리의 다른 글

yocto build on i5-3570  (0) 2023.09.07
Do not use Bitbake as root.  (0) 2023.08.28
imx8 yocto  (0) 2023.08.28
imx8 yocto build on ubuntu 22.04  (0) 2023.02.10
라즈베리 파이 with yocto project  (2) 2015.07.30
Posted by 구차니
Programming/openGL2023. 8. 28. 19:28

orthogonal(직교)

perspective(원근)

 

-1.0 ~ 1.0 사이로 정규화 해야 한다는데, 그래서 이전에 막 잘리고 난리였던 듯..

[링크 : https://www.scratchapixel.com/lessons/3d-basic-rendering/perspective-and-orthographic-projection-matrix/orthographic-projection-matrix.html]

[링크 : https://heinleinsgame.tistory.com/m/11]

 

'Programming > openGL' 카테고리의 다른 글

opengl texture  (0) 2025.05.30
blender in openGL  (0) 2025.04.28
glReadPixels() 와 glUseProgram()  (0) 2022.11.17
openCV + openGL  (0) 2022.02.08
glMatrixMode()  (0) 2020.04.14
Posted by 구차니

bitbake로 yocto를 빌드 하려고 하는데 에러가 나서 찾아보니

메시지 자체는 root로 bitbake 하지 말란건데, 설정상으로는 sanity를 inherit 하지 않도록 하면 되는 듯.

 

분별을(제정신을) 상속 안받으면 제정신이 아니게 되는건가...(!)

sanity 미국∙영국 [ˈsænəti]  영국식 1. [명사] 온전한 정신 (상태)
2. [명사] 분별 (→sane), (↔insanity)

 

# Sanity checks for common user misconfigurations
#
# See sanity.bbclass
#
# Expert users can confirm their sanity with "touch conf/sanity.conf"
BB_MIN_VERSION = "1.49.2"

SANITY_ABIFILE = "${TMPDIR}/abi_version"

SANITY_VERSION ?= "1"
LOCALCONF_VERSION  ?= "1"
LAYER_CONF_VERSION ?= "7"
SITE_CONF_VERSION  ?= "1"

#INHERIT += "sanity"

[링크 : http://./sources/poky/meta/conf/sanity.conf]

'프로그램 사용 > yocto project' 카테고리의 다른 글

yocto build on i5-3570  (0) 2023.09.07
bitbake --help  (0) 2023.08.29
imx8 yocto  (0) 2023.08.28
imx8 yocto build on ubuntu 22.04  (0) 2023.02.10
라즈베리 파이 with yocto project  (2) 2015.07.30
Posted by 구차니

문서가 개정되어서 하기 쉽게 잘 나와있는 듯.

 

Rev. LF6.1.22_2.0.0 — 30 June 2023

The recommended minimum Ubuntu version is 20.04 or later.

$ sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev python3- subunit mesa-common-dev zstd liblz4-tool file locales

// lz4c 어쩌구 나오면
$ sudo apt install lz4

// repo 설치
$ mkdir ~/bin (this step may not be needed if the bin folder already exists)
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

// repo 초기화
$ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-mickledore -m imx-6.1.22-2.0.0.xml
$ repo sync

$ DISTRO=<distro name> MACHINE=<machine name> source imx-setup-release.sh -b <build dir>

$ bitbake imx-image-multimedia

[링크 : https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf]

 

python 패키지 명이 바뀌어서 손을 대보는데 그래도 안되서

혹시나 하는 마음에 3.9를 설치해보니 정상적으로 설치안되었다고 -_-

$ bitbake -c compile -f weston
Traceback (most recent call last):
  File "/home/falinux/work/work/yocto/sources/poky/bitbake/bin/bitbake", line 19, in <module>
    import bb
  File "/home/falinux/work/work/yocto/sources/poky/bitbake/lib/bb/__init__.py", line 128, in <module>
    from bb import fetch2 as fetch
  File "/home/falinux/work/work/yocto/sources/poky/bitbake/lib/bb/fetch2/__init__.py", line 26, in <module>
    import bb.persist_data, bb.utils
  File "/home/falinux/work/work/yocto/sources/poky/bitbake/lib/bb/persist_data.py", line 22, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

$ bitbake -c compile -f weston
WARNING: Host distribution "ubuntu-22.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Your Python 3 is not a full install. Please install the module distutils.sysconfig (see the Getting Started guide for further information).


Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

 

3.10 부터 패키지 명칭이 바뀌어서 그런일이 생기는 듯

For version 3.10 or above –

from collections.abc import MutableMapping
For version 3.9 or lower –

from collections import MutableMapping

[링크 : https://stackoverflow.com/questions/70943244/attributeerror-module-collections-has-no-attribute-mutablemapping]

 

+

걍 docker 쓸까..

[링크 :https://github.com/nxp-imx/imx-docker]

'프로그램 사용 > yocto project' 카테고리의 다른 글

bitbake --help  (0) 2023.08.29
Do not use Bitbake as root.  (0) 2023.08.28
imx8 yocto build on ubuntu 22.04  (0) 2023.02.10
라즈베리 파이 with yocto project  (2) 2015.07.30
yocto project 구조  (0) 2015.07.29
Posted by 구차니
Linux/Ubuntu2023. 8. 28. 12:27

프리징이 조금씩 걸리는 느낌이라 불안해서 상태보는 걸 찾는 중인데..

nvme 라는 다른 유틸리티로 봐야 하는 듯.. smartctl 로는 안되나?

 

$ sudo apt-get install nvme-cli
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다... 완료
상태 정보를 읽는 중입니다... 완료        
다음 새 패키지를 설치할 것입니다:
  nvme-cli
0개 업그레이드, 1개 새로 설치, 0개 제거 및 3개 업그레이드 안 함.
474 k바이트 아카이브를 받아야 합니다.
이 작업 후 1,136 k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://kr.archive.ubuntu.com/ubuntu jammy-updates/main amd64 nvme-cli amd64 1.16-3ubuntu0.1 [474 kB]
내려받기 474 k바이트, 소요시간 2초 (229 k바이트/초)
Selecting previously unselected package nvme-cli.
(데이터베이스 읽는중 ...현재 255415개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../nvme-cli_1.16-3ubuntu0.1_amd64.deb ...
Unpacking nvme-cli (1.16-3ubuntu0.1) ...
nvme-cli (1.16-3ubuntu0.1) 설정하는 중입니다 ...
Created symlink /etc/systemd/system/default.target.wants/nvmefc-boot-connections.service → /lib/systemd/system/nvmefc-boot-connections.service.
Created symlink /etc/systemd/system/default.target.wants/nvmf-autoconnect.service → /lib/systemd/system/nvmf-autoconnect.service.
nvmf-connect.target is a disabled or a static unit, not starting it.
Processing triggers for man-db (2.10.2-1) ...


$ sudo nvme list
Node                  SN                   Model                                    Namespace Usage                      Format           FW Rev  
--------------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1          S649NL0W000000F      Samsung SSD 980 1TB                      1         229.90  GB /   1.00  TB    512   B +  0 B   3B4QFXO7



$ sudo nvme smart-log /dev/nvme0
Smart Log for NVME device:nvme0 namespace-id:ffffffff
critical_warning : 0
temperature : 41 C (314 Kelvin)
available_spare : 100%
available_spare_threshold : 10%
percentage_used : 0%
endurance group critical warning summary: 0
data_units_read : 483,823
data_units_written : 1,853,867
host_read_commands : 5,443,068
host_write_commands : 31,140,950
controller_busy_time : 94
power_cycles : 48
power_on_hours : 72
unsafe_shutdowns : 9
media_errors : 0
num_err_log_entries : 0
Warning Temperature Time : 0
Critical Composite Temperature Time : 0
Temperature Sensor 1           : 41 C (314 Kelvin)
Temperature Sensor 2           : 40 C (313 Kelvin)
Thermal Management T1 Trans Count : 0
Thermal Management T2 Trans Count : 0
Thermal Management T1 Total Time : 0
Thermal Management T2 Total Time : 0

[링크 : https://linuxhint.com/check-ssd-health-ubuntu/]

[링크 : https://itslinuxfoss.com/test-ssd-hdd-health-in-linux/]

'Linux > Ubuntu' 카테고리의 다른 글

우분투로 공유기 만들기  (2) 2024.02.23
ubuntu pro?  (2) 2024.01.31
edid-read  (0) 2023.08.17
ubutnu file(파일) 에서 삼바 목록 안나오고 부적절한 인수 에러  (0) 2023.07.24
htop graph style  (0) 2023.07.07
Posted by 구차니

$# 인자의 갯수

$@ 현재 타겟의 이름 (나열)

$* 현재 타겟의 이름 (하나로)

$^ 현재 타겟의 종속 항목 리스트

[링크 : https://yooloo.tistory.com/m/131]

[링크 : https://bowbowbow.tistory.com/12]

'프로그램 사용 > make, configure' 카테고리의 다른 글

make 조건식  (0) 2023.08.16
cmake ninja, cmake 옵션주기  (0) 2022.12.07
cmake 옵션 확인  (0) 2021.01.20
cmake 빌드 에러시  (0) 2021.01.19
make order  (0) 2016.06.16
Posted by 구차니
하드웨어/Display 장비2023. 8. 27. 21:54

팟플레이어 문제일수도 있지만

스킵하면 바로 싱크가 문제가 생겨 좌/우가 바뀌어 버림

 

반대로.. 상업용으로 120Hz를 2시간 동안 한번도 안틀리고 재생할 수 있을 만큼

안정적이고 강력한 성능을 지녀야 한다면 너무 비싸지지 않았을까?

 

아무튼 그런 이유로 60Hz로도 충분하게 작동하는

Side by Side나 Top and bottom(혹은 Over and Under)가 대세가 된게 아닐까 생각이 든다.

 

+

2023.09.04

5분 동안에 5번 정도 좌우가 바뀌는걸 보면

내가 셋팅을 잘못했던가, 충전이 덜 되었거나 그것도 아니면 원래 불안정한 녀석이거나..

Posted by 구차니

iptime 공유기를 보는데 iptv 사용이라는 항목에

이런 주소가 보여서 multicast 주소 같은데 왜 뜬금없이 iptv라고 해둔거야? 하면서 보는데

의외로 저 주소에 추가된 ip들이 꽤 있어서 조사해 보는 중

233.233.233.233 (01:00:5e:69:e9:e9)
224.3.1.200 (01:00:5e:03:01:c8)
239.5.6.11 (01:00:5e:05:06:0b)
239.5.6.10 (01:00:5e:05:06:0a)
239.5.6.15 (01:00:5e:05:06:0f)
239.255.255.253 (01:00:5e:7f:ff:fd)
239.255.102.18 (01:00:5e:7f:66:12)

 

     * 한편, IP 멀티캐스트 주소 변환용으로, 01-00-5E-00-00-00 ~ 01-00-5E-7F-FF-FF
             범위가 예약됨 (RFC 1112 : Host Extensions for IP Multicasting)

[링크 : http://www.ktword.co.kr/test/view/view.php?m_temp1=2294]

 

ip multicast와 ethernet multicast라.. 무슨 차이지?


[링크 :
http://www.ktword.co.kr/test/view/view.php?m_temp1=5390&id=708]

 

- 주소 범위 : 224.0.0.0 ~ 239.255.255.255 

[링크 : http://www.ktword.co.kr/test/view/view.php?m_temp1=3607]

'이론 관련 > 네트워크 관련' 카테고리의 다른 글

DHCP option 82 relay  (0) 2025.01.23
cobs  (0) 2023.05.25
PAM4  (0) 2023.01.16
nrz encoding/decoding  (0) 2022.08.24
광 케이블 DAC, AOC  (0) 2022.06.30
Posted by 구차니

 

 

[링크 : https://learn.microsoft.com/en-us/windows/uwp/gaming/racing-wheel-and-force-feedback]

 

$ apt-cache search fftest
joystick - set of testing and calibration tools for joysticks

[링크 : https://www.kernel.org/doc/html/v4.12/input/ff.html]

 

[링크 : https://github.com/tloimu/adapt-ffb-joy]

 

 

2024.10.07

https://github.com/flosse/linuxconsole/blob/master/utils/fftest.c

'모종의 음모 > motion simulator' 카테고리의 다른 글

new-lg4ff 와 oversteer 설치 시도  (0) 2024.10.12
플심용 자작 시뮬레이터  (2) 2024.10.11
ffb (force feedback) linux driver  (0) 2024.10.07
AVR FFB(force feedback)  (0) 2021.06.29
usb joystick DIY / Force Feedback  (2) 2018.03.04
Posted by 구차니
Programming/golang2023. 8. 24. 10:27

고언어 에서 디스어셈블 가능하대서 해보는데

먼가.. 많이 보던(?) objdump와는 출력 포맷이 달라서 찾아보게 됨.

$ GOARCH=arm64 go build -gcflags -S .
# tt
main.main STEXT size=240 args=0x0 locals=0x818 funcid=0x0 align=0x0
0x0000 00000 (/home/user/work/src/goneon/neon.go:3) TEXT main.main(SB), ABIInternal, $2080-0
0x0000 00000 (/home/user/work/src/goneon/neon.go:3) MOVD 16(g), R16
0x0004 00004 (/home/user/work/src/goneon/neon.go:3) PCDATA $0, $-2
0x0004 00004 (/home/user/work/src/goneon/neon.go:3) SUB $1952, RSP, R17
0x0008 00008 (/home/user/work/src/goneon/neon.go:3) CMP R16, R17
0x000c 00012 (/home/user/work/src/goneon/neon.go:3) BLS 220
0x0010 00016 (/home/user/work/src/goneon/neon.go:3) PCDATA $0, $-1
0x0010 00016 (/home/user/work/src/goneon/neon.go:3) SUB $2080, RSP, R20
0x0014 00020 (/home/user/work/src/goneon/neon.go:3) STP (R29, R30), -8(R20)
0x0018 00024 (/home/user/work/src/goneon/neon.go:3) PCDATA $0, $-2
0x0018 00024 (/home/user/work/src/goneon/neon.go:3) MOVD R20, RSP
0x001c 00028 (/home/user/work/src/goneon/neon.go:3) PCDATA $0, $-1
0x001c 00028 (/home/user/work/src/goneon/neon.go:3) SUB $8, RSP, R29
0x0020 00032 (/home/user/work/src/goneon/neon.go:3) FUNCDATA $0, gclocals·g2BeySu+wFnoycgXfElmcg==(SB)
0x0020 00032 (/home/user/work/src/goneon/neon.go:3) FUNCDATA $1, gclocals·g2BeySu+wFnoycgXfElmcg==(SB)
0x0020 00032 (<unknown line number>) NOP
0x0020 00032 (/home/user/work/src/goneon/neon.go:4) MOVD $main..autotmp_5-1024(SP), R20
0x0024 00036 (/home/user/work/src/goneon/neon.go:9) PCDATA $0, $-2
0x0024 00036 (/home/user/work/src/goneon/neon.go:9) ADR 52, runtime.duffzero(R27)(R27)(REG)
0x0028 00040 (/home/user/work/src/goneon/neon.go:9) STP (R29, R27), -24(RSP)
0x002c 00044 (/home/user/work/src/goneon/neon.go:9) SUB $24, RSP, R29
0x0030 00048 (/home/user/work/src/goneon/neon.go:9) DUFFZERO runtime.duffzero(SB)
0x0034 00052 (/home/user/work/src/goneon/neon.go:9) SUB $8, RSP, R29
0x0038 00056 (/home/user/work/src/goneon/neon.go:10) PCDATA $0, $-1
0x0038 00056 (/home/user/work/src/goneon/neon.go:10) MOVD $main..autotmp_6-2048(SP), R20
0x003c 00060 (/home/user/work/src/goneon/neon.go:10) PCDATA $0, $-2
0x003c 00060 (/home/user/work/src/goneon/neon.go:10) ADR 76, runtime.duffzero(R27)(R27)(REG)
0x0040 00064 (/home/user/work/src/goneon/neon.go:10) STP (R29, R27), -24(RSP)
0x0044 00068 (/home/user/work/src/goneon/neon.go:10) SUB $24, RSP, R29
0x0048 00072 (/home/user/work/src/goneon/neon.go:10) DUFFZERO runtime.duffzero(SB)
0x004c 00076 (/home/user/work/src/goneon/neon.go:10) SUB $8, RSP, R29
0x0050 00080 (/home/user/work/src/goneon/neon.go:10) PCDATA $0, $-1
0x0050 00080 (/home/user/work/src/goneon/neon.go:10) MOVD ZR, R0
0x0054 00084 (/home/user/work/src/goneon/neon.go:13) JMP 120
0x0058 00088 (/home/user/work/src/goneon/neon.go:14) SBFIZ $2, R0, $32, R2
0x005c 00092 (/home/user/work/src/goneon/neon.go:14) MOVD $main..autotmp_5-1024(SP), R3
0x0060 00096 (/home/user/work/src/goneon/neon.go:14) MOVW R0, (R3)(R2)
0x0064 00100 (/home/user/work/src/goneon/neon.go:15) MOVD $256, R4
0x0068 00104 (/home/user/work/src/goneon/neon.go:15) SUB R0, R4, R5
0x006c 00108 (/home/user/work/src/goneon/neon.go:15) MOVD $main..autotmp_6-2048(SP), R6
0x0070 00112 (/home/user/work/src/goneon/neon.go:15) MOVW R5, (R6)(R2)
0x0074 00116 (/home/user/work/src/goneon/neon.go:13) ADD $1, R0, R0
0x0078 00120 (/home/user/work/src/goneon/neon.go:13) CMPW $256, R0
0x007c 00124 (/home/user/work/src/goneon/neon.go:13) BGE 144
0x0080 00128 (/home/user/work/src/goneon/neon.go:14) MOVW R0, R2
0x0084 00132 (/home/user/work/src/goneon/neon.go:14) CMP $256, R2
0x0088 00136 (/home/user/work/src/goneon/neon.go:14) BLO 88
0x008c 00140 (/home/user/work/src/goneon/neon.go:14) JMP 204
0x0090 00144 (/home/user/work/src/goneon/neon.go:14) MOVD ZR, R0
0x0094 00148 (/home/user/work/src/goneon/neon.go:13) JMP 156
0x0098 00152 (/home/user/work/src/goneon/neon.go:18) ADD $1, R0, R0
0x009c 00156 (/home/user/work/src/goneon/neon.go:18) CMPW $256, R0
0x00a0 00160 (/home/user/work/src/goneon/neon.go:18) BGE 180
0x00a4 00164 (/home/user/work/src/goneon/neon.go:19) MOVW R0, R2
0x00a8 00168 (/home/user/work/src/goneon/neon.go:19) CMP $256, R2
0x00ac 00172 (/home/user/work/src/goneon/neon.go:19) BLO 152
0x00b0 00176 (/home/user/work/src/goneon/neon.go:19) JMP 192
0x00b4 00180 (/home/user/work/src/goneon/neon.go:5) LDP -8(RSP), (R29, R30)
0x00b8 00184 (/home/user/work/src/goneon/neon.go:5) ADD $2080, RSP
0x00bc 00188 (/home/user/work/src/goneon/neon.go:5) RET (R30)
0x00c0 00192 (/home/user/work/src/goneon/neon.go:19) MOVD R2, R0
0x00c4 00196 (/home/user/work/src/goneon/neon.go:19) MOVD $256, R1
0x00c8 00200 (/home/user/work/src/goneon/neon.go:19) PCDATA $1, $0
0x00c8 00200 (/home/user/work/src/goneon/neon.go:19) CALL runtime.panicIndex(SB)
0x00cc 00204 (/home/user/work/src/goneon/neon.go:14) MOVD R2, R0
0x00d0 00208 (/home/user/work/src/goneon/neon.go:14) MOVD $256, R1
0x00d4 00212 (/home/user/work/src/goneon/neon.go:14) CALL runtime.panicIndex(SB)
0x00d8 00216 (/home/user/work/src/goneon/neon.go:14) HINT $0
0x00dc 00220 (/home/user/work/src/goneon/neon.go:14) NOP
0x00dc 00220 (/home/user/work/src/goneon/neon.go:3) PCDATA $1, $-1
0x00dc 00220 (/home/user/work/src/goneon/neon.go:3) PCDATA $0, $-2
0x00dc 00220 (/home/user/work/src/goneon/neon.go:3) MOVD R30, R3
0x00e0 00224 (/home/user/work/src/goneon/neon.go:3) CALL runtime.morestack_noctxt(SB)
0x00e4 00228 (/home/user/work/src/goneon/neon.go:3) PCDATA $0, $-1
0x00e4 00228 (/home/user/work/src/goneon/neon.go:3) JMP 0
0x0000 90 0b 40 f9 f1 83 1e d1 3f 02 10 eb 89 06 00 54  ..@.....?......T
0x0010 f4 83 20 d1 9d fa 3f a9 9f 02 00 91 fd 23 00 d1  .. ...?......#..
0x0020 f4 63 10 91 9b 00 00 10 fd ef 3e a9 fd 63 00 d1  .c........>..c..
0x0030 00 00 00 94 fd 23 00 d1 f4 63 00 91 9b 00 00 10  .....#...c......
0x0040 fd ef 3e a9 fd 63 00 d1 00 00 00 94 fd 23 00 d1  ..>..c.......#..
0x0050 e0 03 1f aa 09 00 00 14 02 7c 7e 93 e3 63 10 91  .........|~..c..
0x0060 60 68 22 b8 e4 03 78 b2 85 00 00 cb e6 63 00 91  `h"...x......c..
0x0070 c5 68 22 b8 00 04 00 91 1f 00 04 71 aa 00 00 54  .h"........q...T
0x0080 02 7c 40 93 5f 00 04 f1 83 fe ff 54 10 00 00 14  .|@._......T....
0x0090 e0 03 1f aa 02 00 00 14 00 04 00 91 1f 00 04 71  ...............q
0x00a0 aa 00 00 54 02 7c 40 93 5f 00 04 f1 63 ff ff 54  ...T.|@._...c..T
0x00b0 04 00 00 14 fd fb 7f a9 ff 83 20 91 c0 03 5f d6  .......... ..._.
0x00c0 e0 03 02 aa e1 03 78 b2 00 00 00 94 e0 03 02 aa  ......x.........
0x00d0 e1 03 78 b2 00 00 00 94 1f 20 03 d5 e3 03 1e aa  ..x...... ......
0x00e0 00 00 00 94 c7 ff ff 17 00 00 00 00 00 00 00 00  ................
rel 48+4 t=9 runtime.duffzero+0
rel 72+4 t=9 runtime.duffzero+0
rel 200+4 t=9 runtime.panicIndex+0
rel 212+4 t=9 runtime.panicIndex+0
rel 224+4 t=9 runtime.morestack_noctxt+0
main.add STEXT size=240 args=0x0 locals=0x818 funcid=0x0 align=0x0
0x0000 00000 (/home/user/work/src/goneon/neon.go:7) TEXT main.add(SB), ABIInternal, $2080-0
0x0000 00000 (/home/user/work/src/goneon/neon.go:7) MOVD 16(g), R16
0x0004 00004 (/home/user/work/src/goneon/neon.go:7) PCDATA $0, $-2
0x0004 00004 (/home/user/work/src/goneon/neon.go:7) SUB $1952, RSP, R17
var symregexp = flag.String("s", "", "only dump symbols matching this regexp")
var gnuAsm = flag.Bool("gnu", false, "print GNU assembly next to Go assembly (where supported)")
var symRE *regexp.Regexp
0x0008 00008 (/home/user/work/src/goneon/neon.go:7) CMP R16, R17
0x000c 00012 (/home/user/work/src/goneon/neon.go:7) BLS 220
0x0010 00016 (/home/user/work/src/goneon/neon.go:7) PCDATA $0, $-1
0x0010 00016 (/home/user/work/src/goneon/neon.go:7) SUB $2080, RSP, R20
0x0014 00020 (/home/user/work/src/goneon/neon.go:7) STP (R29, R30), -8(R20)
0x0018 00024 (/home/user/work/src/goneon/neon.go:7) PCDATA $0, $-2
0x0018 00024 (/home/user/work/src/goneon/neon.go:7) MOVD R20, RSP
0x001c 00028 (/home/user/work/src/goneon/neon.go:7) PCDATA $0, $-1
0x001c 00028 (/home/user/work/src/goneon/neon.go:7) SUB $8, RSP, R29
0x0020 00032 (/home/user/work/src/goneon/neon.go:7) FUNCDATA $0, gclocals·g2BeySu+wFnoycgXfElmcg==(SB)
0x0020 00032 (/home/user/work/src/goneon/neon.go:7) FUNCDATA $1, gclocals·g2BeySu+wFnoycgXfElmcg==(SB)
0x0020 00032 (/home/user/work/src/goneon/neon.go:9) MOVD $main..autotmp_5-1024(SP), R20
0x0024 00036 (/home/user/work/src/goneon/neon.go:9) PCDATA $0, $-2
0x0024 00036 (/home/user/work/src/goneon/neon.go:9) ADR 52, runtime.duffzero(R27)(R27)(REG)
0x0028 00040 (/home/user/work/src/goneon/neon.go:9) STP (R29, R27), -24(RSP)
0x002c 00044 (/home/user/work/src/goneon/neon.go:9) SUB $24, RSP, R29
0x0030 00048 (/home/user/work/src/goneon/neon.go:9) DUFFZERO runtime.duffzero(SB)
0x0034 00052 (/home/user/work/src/goneon/neon.go:9) SUB $8, RSP, R29
0x0038 00056 (/home/user/work/src/goneon/neon.go:10) PCDATA $0, $-1
0x0038 00056 (/home/user/work/src/goneon/neon.go:10) MOVD $main..autotmp_6-2048(SP), R20
0x003c 00060 (/home/user/work/src/goneon/neon.go:10) PCDATA $0, $-2
0x003c 00060 (/home/user/work/src/goneon/neon.go:10) ADR 76, runtime.duffzero(R27)(R27)(REG)
0x0040 00064 (/home/user/work/src/goneon/neon.go:10) STP (R29, R27), -24(RSP)
0x0044 00068 (/home/user/work/src/goneon/neon.go:10) SUB $24, RSP, R29
0x0048 00072 (/home/user/work/src/goneon/neon.go:10) DUFFZERO runtime.duffzero(SB)
0x004c 00076 (/home/user/work/src/goneon/neon.go:10) SUB $8, RSP, R29
0x0050 00080 (/home/user/work/src/goneon/neon.go:10) PCDATA $0, $-1
0x0050 00080 (/home/user/work/src/goneon/neon.go:10) MOVD ZR, R0
0x0054 00084 (/home/user/work/src/goneon/neon.go:13) JMP 120
0x0058 00088 (/home/user/work/src/goneon/neon.go:14) SBFIZ $2, R0, $32, R2
0x005c 00092 (/home/user/work/src/goneon/neon.go:14) MOVD $main..autotmp_5-1024(SP), R3
0x0060 00096 (/home/user/work/src/goneon/neon.go:14) MOVW R0, (R3)(R2)
0x0064 00100 (/home/user/work/src/goneon/neon.go:15) MOVD $256, R4
0x0068 00104 (/home/user/work/src/goneon/neon.go:15) SUB R0, R4, R5
0x006c 00108 (/home/user/work/src/goneon/neon.go:15) MOVD $main..autotmp_6-2048(SP), R6
0x0070 00112 (/home/user/work/src/goneon/neon.go:15) MOVW R5, (R6)(R2)
0x0074 00116 (/home/user/work/src/goneon/neon.go:13) ADD $1, R0, R0
0x0078 00120 (/home/user/work/src/goneon/neon.go:13) CMPW $256, R0
0x007c 00124 (/home/user/work/src/goneon/neon.go:13) BGE 144
0x0080 00128 (/home/user/work/src/goneon/neon.go:14) MOVW R0, R2
0x0084 00132 (/home/user/work/src/goneon/neon.go:14) CMP $256, R2
0x0088 00136 (/home/user/work/src/goneon/neon.go:14) BLO 88
0x008c 00140 (/home/user/work/src/goneon/neon.go:14) JMP 204
0x0090 00144 (/home/user/work/src/goneon/neon.go:14) MOVD ZR, R0
0x0094 00148 (/home/user/work/src/goneon/neon.go:13) JMP 156
0x0098 00152 (/home/user/work/src/goneon/neon.go:18) ADD $1, R0, R0
0x009c 00156 (/home/user/work/src/goneon/neon.go:18) CMPW $256, R0
0x00a0 00160 (/home/user/work/src/goneon/neon.go:18) BGE 180
0x00a4 00164 (/home/user/work/src/goneon/neon.go:19) MOVW R0, R2
0x00a8 00168 (/home/user/work/src/goneon/neon.go:19) CMP $256, R2
0x00ac 00172 (/home/user/work/src/goneon/neon.go:19) BLO 152
0x00b0 00176 (/home/user/work/src/goneon/neon.go:19) JMP 192
0x00b4 00180 (/home/user/work/src/goneon/neon.go:21) LDP -8(RSP), (R29, R30)
0x00b8 00184 (/home/user/work/src/goneon/neon.go:21) ADD $2080, RSP
0x00bc 00188 (/home/user/work/src/goneon/neon.go:21) RET (R30)
0x00c0 00192 (/home/user/work/src/goneon/neon.go:19) MOVD R2, R0
0x00c4 00196 (/home/user/work/src/goneon/neon.go:19) MOVD $256, R1
0x00c8 00200 (/home/user/work/src/goneon/neon.go:19) PCDATA $1, $0
0x00c8 00200 (/home/user/work/src/goneon/neon.go:19) CALL runtime.panicIndex(SB)
0x00cc 00204 (/home/user/work/src/goneon/neon.go:14) MOVD R2, R0
0x00d0 00208 (/home/user/work/src/goneon/neon.go:14) MOVD $256, R1
0x00d4 00212 (/home/user/work/src/goneon/neon.go:14) CALL runtime.panicIndex(SB)
0x00d8 00216 (/home/user/work/src/goneon/neon.go:14) HINT $0
0x00dc 00220 (/home/user/work/src/goneon/neon.go:14) NOP
0x00dc 00220 (/home/user/work/src/goneon/neon.go:7) PCDATA $1, $-1
0x00dc 00220 (/home/user/work/src/goneon/neon.go:7) PCDATA $0, $-2
0x00dc 00220 (/home/user/work/src/goneon/neon.go:7) MOVD R30, R3
0x00e0 00224 (/home/user/work/src/goneon/neon.go:7) CALL runtime.morestack_noctxt(SB)
0x00e4 00228 (/home/user/work/src/goneon/neon.go:7) PCDATA $0, $-1
0x00e4 00228 (/home/user/work/src/goneon/neon.go:7) JMP 0
0x0000 90 0b 40 f9 f1 83 1e d1 3f 02 10 eb 89 06 00 54  ..@.....?......T
0x0010 f4 83 20 d1 9d fa 3f a9 9f 02 00 91 fd 23 00 d1  .. ...?......#..
0x0020 f4 63 10 91 9b 00 00 10 fd ef 3e a9 fd 63 00 d1  .c........>..c..
0x0030 00 00 00 94 fd 23 00 d1 f4 63 00 91 9b 00 00 10  .....#...c......
0x0040 fd ef 3e a9 fd 63 00 d1 00 00 00 94 fd 23 00 d1  ..>..c.......#..
0x0050 e0 03 1f aa 09 00 00 14 02 7c 7e 93 e3 63 10 91  .........|~..c..
0x0060 60 68 22 b8 e4 03 78 b2 85 00 00 cb e6 63 00 91  `h"...x......c..
0x0070 c5 68 22 b8 00 04 00 91 1f 00 04 71 aa 00 00 54  .h"........q...T
0x0080 02 7c 40 93 5f 00 04 f1 83 fe ff 54 10 00 00 14  .|@._......T....
0x0090 e0 03 1f aa 02 00 00 14 00 04 00 91 1f 00 04 71  ...............q
0x00a0 aa 00 00 54 02 7c 40 93 5f 00 04 f1 63 ff ff 54  ...T.|@._...c..T
0x00b0 04 00 00 14 fd fb 7f a9 ff 83 20 91 c0 03 5f d6  .......... ..._.
0x00c0 e0 03 02 aa e1 03 78 b2 00 00 00 94 e0 03 02 aa  ......x.........
0x00d0 e1 03 78 b2 00 00 00 94 1f 20 03 d5 e3 03 1e aa  ..x...... ......
0x00e0 00 00 00 94 c7 ff ff 17 00 00 00 00 00 00 00 00  ................
rel 48+4 t=9 runtime.duffzero+0
rel 72+4 t=9 runtime.duffzero+0
rel 200+4 t=9 runtime.panicIndex+0
rel 212+4 t=9 runtime.panicIndex+0
rel 224+4 t=9 runtime.morestack_noctxt+0
go:cuinfo.producer.main SDWARFCUINFO dupok size=0
0x0000 72 65 67 61 62 69                                regabi
go:cuinfo.packagename.main SDWARFCUINFO dupok size=0
0x0000 6d 61 69 6e                                      main
go:info.main.add$abstract SDWARFABSFCN dupok size=45
0x0000 05 6d 61 69 6e 2e 61 64 64 00 01 01 0e 61 00 08  .main.add....a..
0x0010 00 00 00 00 0e 62 00 09 00 00 00 00 0e 63 00 0a  .....b.......c..
0x0020 00 00 00 00 0e 69 00 0c 00 00 00 00 00           .....i.......
rel 16+4 t=31 go:info.[]int32+0
rel 24+4 t=31 go:info.[]int32+0
rel 32+4 t=31 go:info.[]int32+0
rel 40+4 t=31 go:info.int32+0
main..inittask SNOPTRDATA size=24
0x0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x0010 00 00 00 00 00 00 00 00                          ........
type:.eqfunc1024 SRODATA dupok size=16
0x0000 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00  ................
rel 0+8 t=1 runtime.memequal_varlen+0
runtime.memequal64·f SRODATA dupok size=8
0x0000 00 00 00 00 00 00 00 00                          ........
rel 0+8 t=1 runtime.memequal64+0
runtime.gcbits.0100000000000000 SRODATA dupok size=8
0x0000 01 00 00 00 00 00 00 00                          ........
type:.namedata.*[256]int32- SRODATA dupok size=13
0x0000 00 0b 2a 5b 32 35 36 5d 69 6e 74 33 32           ..*[256]int32
type:*[256]int32 SRODATA dupok size=56
0x0000 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00  ................
0x0010 5c eb 0a 2f 08 08 08 36 00 00 00 00 00 00 00 00  \../...6........
0x0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x0030 00 00 00 00 00 00 00 00                          ........
rel 24+8 t=1 runtime.memequal64·f+0
rel 32+8 t=1 runtime.gcbits.0100000000000000+0
rel 40+4 t=5 type:.namedata.*[256]int32-+0
rel 48+8 t=1 type:[256]int32+0
runtime.gcbits. SRODATA dupok size=0
type:[256]int32 SRODATA dupok size=72
0x0000 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x0010 1e 16 ae f5 0a 04 04 11 00 00 00 00 00 00 00 00  ................
0x0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x0040 00 01 00 00 00 00 00 00                          ........
rel 24+8 t=1 type:.eqfunc1024+0
rel 32+8 t=1 runtime.gcbits.+0
rel 40+4 t=5 type:.namedata.*[256]int32-+0
rel 44+4 t=-32763 type:*[256]int32+0
rel 48+8 t=1 type:int32+0
rel 56+8 t=1 type:[]int32+0
gclocals·g2BeySu+wFnoycgXfElmcg== SRODATA dupok size=8
0x0000 01 00 00 00 00 00 00 00                          ........

 

PCDATA 라는 녀석은 Program Counter는 절~대 아니고

걍 gabage collector 관련한 지시어라고.. 그런데 왜 컴파일러에게 알려주지?

The FUNCDATA and PCDATA directives contain information for use by the garbage collector; they are introduced by the compiler.

[링크 : https://doc.codingdict.com/golang/doc/golang.org/doc/asm.html]

  [링크 : https://stackoverflow.com/questions/53436811/what-is-the-meaning-of-pcdata-in-go-assembly]

 

Plan 9 어셈블러라는게 있는 듯.

The assembler is based on the input style of the Plan 9 assemblers, which is documented in detail elsewhere. 

[링크 : https://go.dev/doc/asm]

 

어쩌구 저쩌구.. MOVF와 MOVD를 이용해서 단배정도/복수배정도 실수에 대해서 읽거나 저장하는데

MOVWD, MOVWF, MOVDW, MOVWD, MOVFD, MOVFD 등으로 변환된다

라는데.. 레지스터도 그냥 R0~R12로만 되어있고 aarch64등과 같은 세부 아키텍쳐는 생략된 일종의 중간언어로 어셈을 쓰는 느낌?

ARM
The assembler provides access to R0 through R14 and the PC. The stack pointer is R13, the link register is R14, and the static base register is R12. R0 is the return register and also the register holding the first argument to a subroutine. The external registers in Plan 9’s C are allocated from R10 down. R11 is used by the loader as a temporary register. The assembler supports the CPSR and SPSR registers. It also knows about coprocessor registers C0 through C15. Floating registers are F0 through F7, FPSR and FPCR.
As with the other architectures, loads and stores are called MOV, e.g. MOVW for load word or store word, and MOVM for load or store multiple, depending on the operands.
Addressing modes are supported by suffixes to the instructions: .IA (increment after), .IB (increment before), .DA (decrement after), and .DB (decrement before). These can only be used with the MOV instructions. The move multiple instruction, MOVM, defines a range of registers using brackets, e.g. [R0-R12]. The special MOVM addressing mode bits W, U, and P are written in the same manner, for example, MOVM.DB.W. A .S suffix allows a MOVM instruction to access user R13 and R14 when in another processor mode. Shifts and rotates in addressing modes are supported by binary operators << (logical left shift), >> (logical right shift), -> (arithmetic right shift), and @> (rotate right); for example R7>>R2or R2@>2. The assembler does not support indexing by a shifted expression; only names can be doubly indexed.
Any instruction can be followed by a suffix that makes the instruction conditional: .EQ, .NE, and so on, as in the ARM manual, with synonyms .HS (for .CS) and .LO (for .CC), for example ADD.NE. Arithmetic and logical instructions can have a .S suffix, as ARM allows, to set condition codes.
The syntax of the MCR and MRC coprocessor instructions is largely as in the manual, with the usual adjustments. The assembler directly supports only the ARM floating-point coprocessor operations used by the compiler: CMP, ADD, SUB, MUL, and DIV, all with F or D suffix selecting single or double precision. Floating-point load or store become MOVF and MOVD. Conversion instructions are also specified by moves: MOVWD, MOVWF, MOVDW, MOVWD, MOVFD, and MOVDF.

[링크 : https://9p.io/sys/doc/asm.html]

 

 

 

'Programming > golang' 카테고리의 다른 글

golang echo 패키지 소스  (0) 2023.09.13
go packed struct  (0) 2023.09.01
golang goarch=arm64 와 디스어셈블러  (0) 2023.08.23
golang echo 서버 이상한 버그 발견?  (0) 2023.06.27
go ws server client example  (0) 2023.06.08
Posted by 구차니