Programming/golang2022. 4. 7. 11:09

변수 선언시에 변수명 변수타입 식으로 했듯

함수 선언에서도 

함수의 시작을 알려주는 키워드인 func 이후에 함수명(인자) 리턴 타입 순서로 선언한다.

너무 c언어에 물들어 있었나... 순서가 하나 바뀌었다고 눈에 안들어오네 -_-

 

func add(x int, y int) int {
return x + y
}

[링크 : https://go-tour-ko.appspot.com/basics/4]

 

int x,y가 함수 인자로 c에서 허용이 되었던가 기억이 안나네 -_-

아무튼 유사한 방법으로 함수 인자를 타입별로 묶어서 표현할 수 있다.

func add(x, y int) int {
return x + y
}

[링크 : https://go-tour-ko.appspot.com/basics/5]

 

요즘 언어 답게 복수 변수의 return 을 허용한다.

다만, 두개의 변수를 리턴할 때에는 소괄호를 이용해서 묶어 주어야 하는 듯.

func swap(x, y string) (string, string) {
return y, x
}

func main() {
a, b := swap("hello", "world")
fmt.Println(a, b)
}

[링크 : https://go-tour-ko.appspot.com/basics/6]

 

단순하게 return 만 씀으로서 앞서 계산한 변수의 값을 한번에 리턴한다.

물론 받는 쪽에서 리턴 변수의 이름까지 연동되진 않는다.

func split(sum int) (x, y int) {
x = sum * 4 / 9
y = sum - x
return
}

func main() {
fmt.Println(split(17))
}

[링크 : https://go-tour-ko.appspot.com/basics/7]

 

+

해당 문법은 gcc에서는 지원하지 않고 clang에서는 기본 변수타입으로 강제 지정한다.

go 에서만 지원하는 문법으로 확인.

% gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

% gcc hello.c
hello.c:3:16: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
int oops(int a,b,c)
               ^
hello.c:3:18: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
int oops(int a,b,c)

 

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

$ gcc tt.c
tt.c:3:16: error: unknown type name ‘b’
 int oops(int a,b,c)
                ^
tt.c:3:18: error: unknown type name ‘c’
 int oops(int a,b,c)

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

golang switch는 break 가 없다 (fallthough)  (0) 2022.04.07
golang for 반복문  (0) 2022.04.07
golang import  (0) 2022.04.07
golang 변수 할당문(짧은 변수 선언문) :=  (0) 2022.04.07
golang type 변환, type 확인하기  (0) 2022.04.07
Posted by 구차니
Programming/golang2022. 4. 7. 11:04

위는 하나씩 불러올 때, 아래는 factored 라는데  무슨 의미인지 와닫지 않네..

그러고 보니 factored import 의 경우 대괄호가 아니라 소괄호를 사용하는게 특이하다. 콤마로 구분도 안하고 무슨 문법일까?

import "fmt"
import "math"

import (
"fmt"
"math"
)

[링크 : https://go-tour-ko.appspot.com/basics/2]

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

golang for 반복문  (0) 2022.04.07
golang 사용자 함수  (0) 2022.04.07
golang 변수 할당문(짧은 변수 선언문) :=  (0) 2022.04.07
golang type 변환, type 확인하기  (0) 2022.04.07
go 변수, 상수, 배열  (0) 2022.04.06
Posted by 구차니
Programming/golang2022. 4. 7. 10:57

:=는 짧은 선언문 이라고 번역이 되어야 할 것 같은데

알아서 변수형을 선언해주는 착한(?) 녀석이지만 익숙해지기 전까지는 가독성에 좀 문제가 있을 것으로 보인다.

변수에 값을 할당하는게 아니라 변수 목록(?) 처럼 ,를 사용해서 선언하고 값들을 변수에 연속으로 할당해버리네.

눈에 잘 들어오지 않아, 쓰는 건 좀 주의해야 겠다.

the := short assignment statement can be used in place of a var declaration with implicit type.

var i, j int = 1, 2
k := 3
c, python, java := true, false, "no!"

[링크 : https://go.dev/tour/basics/10]

[링크 : https://go-tour-ko.appspot.com/basics/10]

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

golang 사용자 함수  (0) 2022.04.07
golang import  (0) 2022.04.07
golang type 변환, type 확인하기  (0) 2022.04.07
go 변수, 상수, 배열  (0) 2022.04.06
go 모듈 불러오기  (0) 2022.04.06
Posted by 구차니
Programming/golang2022. 4. 7. 10:52

요즘 언어답게 형변환하는 것을 함수를 통해 변환한다. (정확하게는 함수라기 보다는... 머라고 해야 할까?)

var i int = 42
var f float64 = float64(i)
var u uint = uint(f)

[링크 : https://go-tour-ko.appspot.com/basics/13]

 

import "reflect"

reflect.Typeof(varname)

 

[링크 : https://knight76.tistory.com/entry/go-타입-확인하는-방법-reflectTypeOf]

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

golang import  (0) 2022.04.07
golang 변수 할당문(짧은 변수 선언문) :=  (0) 2022.04.07
go 변수, 상수, 배열  (0) 2022.04.06
go 모듈 불러오기  (0) 2022.04.06
golang 다른 파일 함수 불러오기  (0) 2022.04.04
Posted by 구차니
Apple2022. 4. 7. 10:32

당연하다면.. 당연하려나? X11-forwarding은 안된다.

 

'Apple' 카테고리의 다른 글

dylib  (0) 2022.04.27
macos 한영 변환 단축키 변경  (0) 2022.04.07
macos cpu 정보확인  (0) 2022.04.02
mac 에서 rtl-sdr 시도..  (0) 2022.04.02
macos 더블클릭 드래그  (0) 2022.04.01
Posted by 구차니
embeded/jetson2022. 4. 6. 18:32

약자에 대한 테이블 없나..

 

[링크 : https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/bootflow_jetson_xavier.html#]

 

Jetson Nano Development Module (P3448-0000) Flashed to Micro SD Card

NameTypeAlloc PolicyFS TypeSizeFS AttributeAlloc AttributeReservedFilenameDescription
GP1
GP1
sequential
basic
2097152
0
8
0 %
 
Required. Contains primary GPT of the sdcard device. All partitions defined after this entry are configured in the kernel, and are accessible by standard partition tools such as gdisk and parted.
APP
data
sequential
basic
APPSIZE
0
0x8
0 %
APPFILE
Required. Contains the rootfs. This partition must be defined after primary_GPT so that it can be accessed as the fixed known special device /dev/mmcblk0p1.
TXC
TBCTYPE
sequential
basic
131072
0
8
0 %
TBCFILE
Required. Contains TegraBoot CPU-side binary.
RP1
data
sequential
basic
458752
0
0x8
0 %
DTBFILE
Required. Contains Bootloader DTB binary.
EBT
bootloader
sequential
basic
589824
0
8
0 %
EBTFILE
Required. Contains CBoot, the final boot stage CPU bootloader binary that loads the binary in the kernel partition..
WX0
WB0TYPE
sequential
basic
65536
0
8
0 %
WB0FILE
Required. Contains warm boot binary.
BXF
data
sequential
basic
196608
0
8
0 %
BPFFILE
Required. Contains SC7 entry firmware.
BXF-DTB
data
sequential
basic
393216
0
8
0 %
BPFDTB-FILE
Optional. Reserved for future use by BPMP DTB binary; can't remove.
FX
FBTYPE
sequential
basic
65536
0
0x8
0 %
FBFILE
Optional. Reserved for fuse bypass; removeable.
TXS
data
sequential
basic
458752
0
8
0 %
TOSFILE
Required. Contains TOS binary.
DXB
data
sequential
basic
458752
0
0x8
0 %
DTBFILE
Required. Contains kernel DTB binary.
LNX
data
sequential
basic
786432
0
0x8
0 %
LNXFILE
Required. Contains U-Boot, which loads and launches the kernel from the rootfs at /boot.
EXS
data
sequential
basic
65536
0
8
0 %
EKSFILE
Optional. Contains the encrypted keys.
BMP
data
sequential
basic
81920
0
0x8
0 %
bmp.blob
Optional. Contains BMP images for splash screen display during boot.
RP4
data
sequential
basic
131072
0
0x8
0 %
rp4.blob
Required. Contains XUSB module’s firmware file, making XUSB a true USB 3.0 compliant host controller.
GPT
GPT
sequential
basic
2097152
0
8
0 %
 
Required. Contains secondary GPT of the sdcard device.

[링크 : https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra Linux Driver Package Development Guide/part_config.html#]

 

+

22.04.07

BootROM (BR) 
Boot Configuration Table (BCT)
bootloader (BL)

[링크 : https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/bootflow_jetson_nano.html#wwpID0E02B0HA]


boot-file-set (BFS)
kernel-file-set (KFS) 
[링크 : https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/bootloader_update_nano_tx1.html]


EKB or EKS: Encrypted keyblob, an encrypted blob which holds developer-defined content
[링크 : https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/trusty.html]

1.Boot partitions, which are used in the boot process, and are visible only to Bootloader.
Many of the boot partitions have redundant copy partitions. The copy partitions must have the same names as their primaries with the suffix ‘‑1’. For example, the NVC partition’s copy must be named NVC‑1.
The boot partitions are:
•BCT, which contains redundant instances of the Boot Configuration Table. This must be the first partition on the boot device.
•NVC contains TegraBoot. This must be the second boot partition. The following boot partitions, PT through SPF, are part of the BFS.
•PT contains layout information for each BFS, and indicates the beginning of each one. It is the first partition in the BFS.
•TBC contains the TegraBoot CPU-side binary.
•RP1 contains TegraBoot DTBs.
•EBT contains CBoot.
•WB0 contains the warm boot binary.
•BPF contains BPMP microcode.
•NVC‑1 contains a copy of NVC.
•PT‑1 through BPF‑1 are copy partitions for the primaries NVC through BPF, making up a copy of the BFS, denoted BFS‑1.
•PAD is an empty partition which ensures the VER and VER_b are at the very end of the boot partition.
•VER_b contains additional version information for redundancy and version checking.
•VER contains version information.
2.GP1 contains the sdmmc_user device’s primary GPT. All partitions defined after this one are configured in the Linux kernel, and are accessible by standard partition tools such as gdisk and parted.
3.User partitions, which have a variety of uses. Some of them may be deleted, and/or may be mounted and used to store application files.
The following partitions constitute the kernel-file-set (KFS), and have redundant copy partitions:
•DTB contains kernel DTBs.
•TOS contains the trusted OS binary.
•EKS is optional, and is reserved for future use.
•LNX contains either the Linux kernel or U-Boot, depending on your choice of DFLT_KERNEL_IMAGE in the configuration file.
•DTB‑1 through EKS‑1 constitute a copy of the primary KFS, denoted KFS‑1.
•Other partitions, such as APP and BMP, are outside the scope of this document. For information about these partitions, see the appropriate subsection for your Jetson platform in Default Partition Overview.
Kernel-file-set (KFS)

[링크 : https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/bootloader_update_nano_tx1.html#]

'embeded > jetson' 카테고리의 다른 글

nvidia jetson deepstream objectDetector_SSD 실행 스크립트 분석  (0) 2022.04.13
jetson / armv8 EL  (0) 2022.04.07
jetson nano 부팅이 안됨  (0) 2022.04.06
deepstream triton server  (0) 2022.03.30
deepstream part.3  (0) 2022.03.29
Posted by 구차니
embeded/jetson2022. 4. 6. 15:07

월요일까지 잘 쓰던 녀석인데 수요일에 켜려니 안되서 멘붕

다른 SD 메모리 밀고 이미지 구워도 안켜져서 멘붕

젯슨 많이 다뤄보신분에게 여쭤보니 sdk manager를 통해서 밀어 버리지 않으면 복구 안된다고..

그러면.. jetson 보드 자체, SD 카드가 아닌 영역에도 먼가 손을 대는건가?

 

[0000.125] [L4T TegraBoot] (version 00.00.2018.01-l4t-8728f3cb)
[0000.130] Processing in cold boot mode Bootloader 2
[0000.135] A02 Bootrom Patch rev = 1023
[0000.138] Power-up reason: pmc por
[0000.141] No Battery Present
[0000.144] pmic max77620 reset reason
[0000.147] pmic max77620 NVERC : 0x40
[0000.151] RamCode = 0
[0000.153] Platform has DDR4 type RAM
[0000.156] max77620 disabling SD1 Remote Sense
[0000.161] Setting DDR voltage to 1125mv
[0000.165] Serial Number of Pmic Max77663: 0x291ae2
[0000.172] Entering ramdump check
[0000.175] Get RamDumpCarveOut = 0x0
[0000.179] RamDumpCarveOut=0x0,  RamDumperFlag=0xe59ff3f8
[0000.184] Last reboot was clean, booting normally!
[0000.188] Sdram initialization is successful
[0000.192] SecureOs Carveout Base=0x00000000ff800000 Size=0x00800000
[0000.199] Lp0 Carveout Base=0x00000000ff780000 Size=0x00001000
[0000.204] BpmpFw Carveout Base=0x00000000ff700000 Size=0x00080000
[0000.210] GSC1 Carveout Base=0x00000000ff600000 Size=0x00100000
[0000.216] GSC2 Carveout Base=0x00000000ff500000 Size=0x00100000
[0000.222] GSC4 Carveout Base=0x00000000ff400000 Size=0x00100000
[0000.228] GSC5 Carveout Base=0x00000000ff300000 Size=0x00100000
[0000.234] GSC3 Carveout Base=0x000000017f300000 Size=0x00d00000
[0000.250] RamDump Carveout Base=0x00000000ff280000 Size=0x00080000
[0000.256] Platform-DebugCarveout: 0
[0000.259] Nck Carveout Base=0x00000000ff080000 Size=0x00200000
[0000.265] Non secure mode, and RB not enabled.
[0000.269] BoardID = 3448, SKU = 0x0
[0000.272] QSPI-ONLY: SkipQspiOnlyFlag = 0
[0000.276] Nano-SD: checking PT table on QSPI ...
[0000.281] Initialize FailControl
[0000.284] Read PT from (2:0)
[0000.314] PT crc32 and magic check passed.
[0000.318] Using BFS PT to query partitions
[0000.324] Loading Tboot-CPU binary
[0000.352] Verifying TBC in OdmNonSecureSBK mode
[0000.362] Bootloader load address is 0xa0000000, entry address is 0xa0000258
[0000.369] Bootloader downloaded successfully.
[0000.373] Downloaded Tboot-CPU binary to 0xa0000258
[0000.378] MAX77620_GPIO5 configured
[0000.381] CPU power rail is up
[0000.384] CPU clock enabled
[0000.388] Performing RAM repair
[0000.391] Updating A64 Warmreset Address to 0xa00002e9
[0000.396] BoardID = 3448, SKU = 0x0
[0000.399] QSPI-ONLY: SkipQspiOnlyFlag = 0
[0000.403] Nano-SD: checking PT table on QSPI ...
[0000.407] NvTbootFailControlDoFailover: No failover; Continuing ...
[0000.413] Loading NvTbootBootloaderDTB
[0000.480] Verifying NvTbootBootloaderDTB in OdmNonSecureSBK mode
[0000.549] Bootloader DTB Load Address: 0x83000000
[0000.554] BoardID = 3448, SKU = 0x0
[0000.557] QSPI-ONLY: SkipQspiOnlyFlag = 0
[0000.561] Nano-SD: checking PT table on QSPI ...
[0000.565] NvTbootFailControlDoFailover: No failover; Continuing ...
[0000.571] Loading NvTbootKernelDTB
[0000.637] Verifying NvTbootKernelDTB in OdmNonSecureSBK mode
[0000.660] Verification of NvTbootKernelDTB failed!
[0000.665] NvTbootKernelDTB partition is corrupted!
[0000.669] *** Set to failover in the next boot ***
[0000.674] NvTbootFailControlSetClobber:
[0000.678] *** Rebooting ***

 

+ 22.04.07

jetson nano sd 정상부팅 로그

비교해보니 "Verification of NvTbootKernelDTB failed!" 에러가 나면서 무한 리부팅 걸린 듯.

그런데 image로 구으면.. DTB 파티션 안쓰나?

[0000.125] [L4T TegraBoot] (version 00.00.2018.01-l4t-8728f3cb)
[0000.130] Processing in cold boot mode Bootloader 2
[0000.135] A02 Bootrom Patch rev = 1023
[0000.138] Power-up reason: pmc por
[0000.141] No Battery Present
[0000.144] pmic max77620 reset reason
[0000.147] pmic max77620 NVERC : 0x40
[0000.151] RamCode = 0
[0000.153] Platform has DDR4 type RAM
[0000.156] max77620 disabling SD1 Remote Sense
[0000.161] Setting DDR voltage to 1125mv
[0000.165] Serial Number of Pmic Max77663: 0x291ae2
[0000.172] Entering ramdump check
[0000.175] Get RamDumpCarveOut = 0x0
[0000.179] RamDumpCarveOut=0x0,  RamDumperFlag=0xe59ff3f8
[0000.184] Last reboot was clean, booting normally!
[0000.188] Sdram initialization is successful
[0000.192] SecureOs Carveout Base=0x00000000ff800000 Size=0x00800000
[0000.199] Lp0 Carveout Base=0x00000000ff780000 Size=0x00001000
[0000.204] BpmpFw Carveout Base=0x00000000ff700000 Size=0x00080000
[0000.210] GSC1 Carveout Base=0x00000000ff600000 Size=0x00100000
[0000.216] GSC2 Carveout Base=0x00000000ff500000 Size=0x00100000
[0000.222] GSC4 Carveout Base=0x00000000ff400000 Size=0x00100000
[0000.228] GSC5 Carveout Base=0x00000000ff300000 Size=0x00100000
[0000.234] GSC3 Carveout Base=0x000000017f300000 Size=0x00d00000
[0000.250] RamDump Carveout Base=0x00000000ff280000 Size=0x00080000
[0000.256] Platform-DebugCarveout: 0
[0000.259] Nck Carveout Base=0x00000000ff080000 Size=0x00200000
[0000.265] Non secure mode, and RB not enabled.
[0000.269] BoardID = 3448, SKU = 0x0
[0000.272] QSPI-ONLY: SkipQspiOnlyFlag = 0
[0000.276] Nano-SD: checking PT table on QSPI ...
[0000.281] Initialize FailControl
[0000.284] Read PT from (2:0)
[0000.314] PT crc32 and magic check passed.
[0000.318] Using BFS PT to query partitions
[0000.324] Loading Tboot-CPU binary
[0000.352] Verifying TBC in OdmNonSecureSBK mode
[0000.362] Bootloader load address is 0xa0000000, entry address is 0xa0000258
[0000.369] Bootloader downloaded successfully.
[0000.373] Downloaded Tboot-CPU binary to 0xa0000258
[0000.378] MAX77620_GPIO5 configured
[0000.381] CPU power rail is up
[0000.384] CPU clock enabled
[0000.388] Performing RAM repair
[0000.391] Updating A64 Warmreset Address to 0xa00002e9
[0000.396] BoardID = 3448, SKU = 0x0
[0000.399] QSPI-ONLY: SkipQspiOnlyFlag = 0
[0000.403] Nano-SD: checking PT table on QSPI ...
[0000.407] NvTbootFailControlDoFailover: No failover; Continuing ...
[0000.413] Loading NvTbootBootloaderDTB
[0000.480] Verifying NvTbootBootloaderDTB in OdmNonSecureSBK mode
[0000.549] Bootloader DTB Load Address: 0x83000000
[0000.554] BoardID = 3448, SKU = 0x0
[0000.557] QSPI-ONLY: SkipQspiOnlyFlag = 0
[0000.561] Nano-SD: checking PT table on QSPI ...
[0000.565] NvTbootFailControlDoFailover: No failover; Continuing ...
[0000.571] Loading NvTbootKernelDTB
[0000.637] Verifying NvTbootKernelDTB in OdmNonSecureSBK mode
[0000.706] Kernel DTB Load Address: 0x83100000
[0000.710] BoardID = 3448, SKU = 0x0
[0000.714] QSPI-ONLY: SkipQspiOnlyFlag = 0
[0000.717] Nano-SD: checking PT table on QSPI ...
[0000.722] NvTbootFailControlDoFailover: No failover; Continuing ...
[0000.730] Loading cboot binary
[0000.845] Verifying EBT in OdmNonSecureSBK mode
[0000.887] Bootloader load address is 0x92c00000, entry address is 0x92c00258
[0000.894] Bootloader downloaded successfully.
[0000.898] BoardID = 3448, SKU = 0x0
[0000.901] QSPI-ONLY: SkipQspiOnlyFlag = 0
[0000.905] Nano-SD: checking PT table on QSPI ...
[0000.910] NvTbootFailControlDoFailover: No failover; Continuing ...
[0000.916] PT: Partition NCT NOT found !
[0000.920] Warning: Find Partition via PT Failed
[0000.924] Next binary entry address: 0x92c00258
[0000.928] BoardId: 3448
[0000.933] Overriding pmu board id with proc board id
[0000.938] Display board id is not available
[0000.942] BoardID = 3448, SKU = 0x0
[0000.945] QSPI-ONLY: SkipQspiOnlyFlag = 0
[0000.949] Nano-SD: checking PT table on QSPI ...
[0000.953] NvTbootFailControlDoFailover: No failover; Continuing ...
[0001.060] Verifying SC7EntryFw in OdmNonSecureSBK mode
[0001.115] /bpmp deleted
[0001.117] SC7EntryFw header found loaded at 0xff700000
[0001.311] OVR2 PMIC
[0001.313] Bpmp FW successfully loaded
[0001.316] BoardID = 3448, SKU = 0x0
[0001.320] QSPI-ONLY: SkipQspiOnlyFlag = 0
[0001.323] Nano-SD: checking PT table on QSPI ...
[0001.328] NvTbootFailControlDoFailover: No failover; Continuing ...
[0001.335] WB0 init successfully at 0xff780000
[0001.339] Verifying NvTbootWb0 in OdmNonSecureSBK mode
[0001.344] Set NvDecSticky Bits
[0001.348] GSC2 address ff53fffc value c0edbbcc
[0001.354] GSC MC Settings done
[0001.357] BoardID = 3448, SKU = 0x0
[0001.360] QSPI-ONLY: SkipQspiOnlyFlag = 0
[0001.364] Nano-SD: checking PT table on QSPI ...
[0001.368] NvTbootFailControlDoFailover: No failover; Continuing ...
[0001.375] TOS Image length 53680
[0001.378]  Monitor size 53680
[0001.381]  OS size 0
[0001.396] Secure Os AES-CMAC Verification Success!
[0001.401] TOS image cipher info: plaintext
[0001.405] Loading and Validation of Secure OS Successful
[0001.421] SC7 Entry Firmware - 0xff700000, 0x4000
[0001.425] NvTbootPackSdramParams: start.
[0001.430] NvTbootPackSdramParams: done.
[0001.434] Tegraboot started after 51854 us
[0001.438] Basic modules init took 931208 us
[0001.442] Sec Bootdevice Read Time = 12 ms, Read Size = 61 KB
[0001.448] Sec Bootdevice Write Time = 0 ms, Write Size = 0 KB
[0001.453] Next stage binary read took 102860 us
[0001.457] Carveout took -132464 us
[0001.461] CPU initialization took 515446 us
[0001.465] Total time taken by TegraBoot 1417050 us

[0001.469] Starting CPU & Halting co-processor

64NOTICE:  BL31: v1.3(release):b5eeb33
NOTICE:  BL31: Built : 08:56:32, Feb 19 2022
ERROR:   Error initializing runtime service trusty_fast

 

1번핀 위치 잘 보고 꽂아야 함.

아무생각없이 꽂아서 PMIC_SYS_RST 가 연결되면 전원 LED에 불도 안들어 온다.

 

[링크 : https://www.mouser.com/pdfDocs/Jetson_Nano_Developer_Kit_User_Guide.pdf]

 

아래 명령어들로 인해서 cboot, EBT, SBK 키 등이 다르게 설정되면서

SD 메모리 부팅이 정상적으로 진행되는거 아닐까?

15:57:09 INFO: Flash Jetson Nano - flash: *** Flashing target device started. ***
15:57:09 INFO: Flash Jetson Nano - flash: [ 0.0047 ] tegrasign --getmode mode.txt --key None
15:57:09 INFO: Flash Jetson Nano - flash: [ 0.0190 ] RCM 1 is saved as rcm_1.rcm
15:57:09 INFO: Flash Jetson Nano - flash: [ 0.0757 ] Assuming zero filled SBK key
15:57:09 INFO: Flash Jetson Nano - flash: [ 0.1716 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.cfg --chip 0x21 0
15:57:09 INFO: Flash Jetson Nano - flash: [ 0.1847 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatedevparam flash.xml.bin
15:57:09 INFO: Flash Jetson Nano - flash: [ 0.1942 ] tegraparser --pt flash.xml.bin --chip 0x21 0 --updatecustinfo P3448_A00_lpddr4_204Mhz_P987.bct
15:57:09 INFO: Flash Jetson Nano - flash: [ 0.2350 ] RCM version 0X210001
15:57:10 INFO: Flash Jetson Nano - flash: [ 1.2474 ] tegrarcm --download bct P3448_A00_lpddr4_204Mhz_P987.bct
15:57:10 INFO: Flash Jetson Nano - flash: [ 1.2547 ] [...] 100%
15:57:10 INFO: Flash Jetson Nano - flash: [ 1.4867 ] tegrahost --chip 0x21 --align cboot.bin
15:57:10 INFO: Flash Jetson Nano - flash: [ 1.4955 ] tegrahost --magicid EBT --appendsigheader cboot.bin cboot.bin_blheader
15:57:10 INFO: Flash Jetson Nano - flash: [ 1.5437 ] Assuming zero filled SBK key
15:57:10 INFO: Flash Jetson Nano - flash: [ 1.5577 ] tegrahost --updatesigheader tegra210-p3448-0000-p3449-0000-a02.dtb_blheader.encrypt tegra210-p3448-0000-p3449-0000-a02.dtb_blheader.hash zerosbk
15:57:10 INFO: Flash Jetson Nano - flash: [ 1.5704 ] Sending ebt
15:57:11 INFO: Flash Jetson Nano - flash: [ 1.5706 ] [...] 100%
15:57:11 INFO: Flash Jetson Nano - flash: [ 1.6794 ] Sending rp1
15:57:11 INFO: Flash Jetson Nano - flash: [ 1.6833 ] [...] 100%
15:57:11 INFO: Flash Jetson Nano - flash: [ 1.7451 ] Applet version 00.01.0000
15:57:11 INFO: Flash Jetson Nano - flash: [ 1.7561 ] tegrarcm --oem platformdetails storage storage_info.bin
15:57:11 INFO: Flash Jetson Nano - flash: [ 2.4503 ] [...] 100%
15:57:26 INFO: Flash Jetson Nano - flash: [ 2.4576 ] Writing partition PT with crc-flash.xml.bin
15:57:26 INFO: Flash Jetson Nano - flash: [ 17.2106 ] [...] 100%
15:57:30 INFO: Flash Jetson Nano - flash: [ 17.2180 ] Writing partition NVC with nvtboot.bin.encrypt
15:57:30 INFO: Flash Jetson Nano - flash: [ 21.1299 ] [...] 100%
15:57:40 INFO: Flash Jetson Nano - flash: [ 21.1431 ] Writing partition NVC_R with nvtboot.bin.encrypt
15:57:40 INFO: Flash Jetson Nano - flash: [ 31.1584 ] [...] 100%
15:57:50 INFO: Flash Jetson Nano - flash: [ 31.1746 ] Writing partition TBC with nvtboot_cpu.bin.encrypt
15:57:50 INFO: Flash Jetson Nano - flash: [ 41.1998 ] [...] 100%
15:57:54 INFO: Flash Jetson Nano - flash: [ 41.2121 ] Writing partition RP1 with kernel_tegra210-p3448-0000-p3449-0000-a02.dtb.encrypt
15:57:54 INFO: Flash Jetson Nano - flash: [ 45.3820 ] [...] 100%
15:58:08 INFO: Flash Jetson Nano - flash: [ 45.3993 ] Writing partition EBT with cboot.bin.encrypt
15:58:08 INFO: Flash Jetson Nano - flash: [ 59.3284 ] [...] 100%
15:58:37 INFO: Flash Jetson Nano - flash: [ 59.3567 ] Writing partition WB0 with warmboot.bin.encrypt
15:58:37 INFO: Flash Jetson Nano - flash: [ 88.4141 ] [...] 100%
15:58:38 INFO: Flash Jetson Nano - flash: [ 88.4254 ] Writing partition BPF with sc7entry-firmware.bin.encrypt
15:58:38 INFO: Flash Jetson Nano - flash: [ 88.6887 ] [...] 100%
15:58:38 INFO: Flash Jetson Nano - flash: [ 88.7003 ] Writing partition TOS with tos-mon-only.img.encrypt
15:58:38 INFO: Flash Jetson Nano - flash: [ 88.9647 ] [...] 100%
15:58:41 INFO: Flash Jetson Nano - flash: [ 88.9777 ] Writing partition DTB with kernel_tegra210-p3448-0000-p3449-0000-a02.dtb.encrypt
15:58:41 INFO: Flash Jetson Nano - flash: [ 92.4136 ] [...] 100%
15:58:55 INFO: Flash Jetson Nano - flash: [ 92.4320 ] Writing partition LNX with boot.img.encrypt
15:58:55 INFO: Flash Jetson Nano - flash: [ 106.3609 ] [...] 100%
15:59:35 INFO: Flash Jetson Nano - flash: [ 146.1933 ] Writing partition EKS with eks.img
15:59:35 INFO: Flash Jetson Nano - flash: [ 146.1946 ] [...] 100%
15:59:35 INFO: Flash Jetson Nano - flash: [ 146.2034 ] Writing partition BMP with bmp.blob
15:59:35 INFO: Flash Jetson Nano - flash: [ 146.4667 ] [...] 100%
15:59:44 INFO: Flash Jetson Nano - flash: [ 146.4847 ] Writing partition RP4 with rp4.blob
15:59:44 INFO: Flash Jetson Nano - flash: [ 155.5340 ] [...] 100%
15:59:52 INFO: Flash Jetson Nano - flash: [ 155.5537 ] Writing partition VER_b with qspi_bootblob_ver.txt
15:59:52 INFO: Flash Jetson Nano - flash: [ 163.3820 ] [...] 100%
15:59:53 INFO: Flash Jetson Nano - flash: [ 163.3969 ] Writing partition VER with qspi_bootblob_ver.txt
15:59:53 INFO: Flash Jetson Nano - flash: [ 163.6605 ] [...] 100%
15:59:53 INFO: Flash Jetson Nano - flash: [ 163.6712 ] Writing partition APP with system.img
100%
16:09:26 INFO: Flash Jetson Nano - flash: [ 736.6352 ] tegradevflash --write BCT P3448_A00_lpddr4_204Mhz_P987.bct
16:09:26 INFO: Flash Jetson Nano - flash: [ 736.6451 ] [...] 100%
16:09:32 INFO: Flash Jetson Nano - flash: [ 743.3077 ] tegradevflash --reboot coldboot
16:09:32 INFO: Flash Jetson Nano - flash: [ 743.3115 ] Cboot version 00.01.0000
16:09:34 INFO: Flash Jetson Nano - flash: [ 743.3184 ]
16:09:54 INFO: Flash Jetson Nano - flash: [ Component Install Finished Successfully ]
16:09:54 INFO: Flash Jetson Nano - flash: command finished successfully
16:09:54 SUMMARY: Flash Jetson Nano - flash: Install completed successfully.
16:12:05 INFO: Exactly one NVIDIA device detected, as expected.
16:12:05 INFO: Start to check if if default ip avaliable in ip addr
16:12:05 DEBUG: running command < true >
16:12:05 INFO: exec_command: true
16:12:05 INFO: command finished successfully
16:12:05 DEBUG: running command < ip addr | grep 192.168.55.1 >
16:12:05 INFO: exec_command: ip addr | grep 192.168.55.1
16:12:05 INFO: command finished successfully
16:12:05 INFO: Validated default ip avaliable.
16:12:05 INFO: Start to check if ip and ssh up with customize ip...
16:12:05 DEBUG: running command < true >
16:12:05 INFO: command finished successfully
16:12:05 DEBUG: running command < nc -z -vv -w 5 192.168.55.1 22 >
16:12:05 DEBUG: command terminated with error

 

+

~/nvidia/nvidia_sdk/JetPack_4.6.1_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/bootloader$ ls -al tegra*
-rw-r--r-- 1 root     root      229792  4월  6 15:57 tegra210-p3448-0000-p3449-0000-a02.dtb
-rwxrwxr-x 1 minimonk minimonk  959237  2월 20 02:04 tegrabct
-rwxrwxr-x 1 minimonk minimonk  922636  2월 20 02:04 tegradevflash
-rwxrwxr-x 1 minimonk minimonk   50627  2월 20 02:04 tegraflash.py
-rwxrwxr-x 1 minimonk minimonk  163998  2월 20 02:04 tegraflash_internal.py
-rwxrwxr-x 1 minimonk minimonk  912826  2월 20 02:04 tegrahost
-rwxrwxr-x 1 minimonk minimonk 2539744  2월 20 02:04 tegraopenssl
-rwxrwxr-x 1 minimonk minimonk  917258  2월 20 02:04 tegraparser
-rwxrwxr-x 1 minimonk minimonk  931472  2월 20 02:04 tegrarcm
-rwxrwxr-x 1 minimonk minimonk 1092265  2월 20 02:04 tegrasign
-rwxrwxr-x 1 minimonk minimonk   10349  2월 20 02:04 tegrasign_v3.py
-rwxrwxr-x 1 minimonk minimonk   33127  2월 20 02:04 tegrasign_v3_internal.py
-rwxrwxr-x 1 minimonk minimonk    7830  2월 20 02:04 tegrasign_v3_util.py

 

 

+ 22.04.07

 

Have you made any changes to device tree? If not, then likely you will need to reflash the unit (NvTboot is a very early stage in boot, long before Linux is ever reached). If you have an SD card for rootfs you could save a copy of that. Note that where some of this content is found differs between QSPI memory and the SD card depending on release. I can’t say much more which is useful, but if you do need more help, then knowing the release used on this unit and any flash history would help whoever answers.

[링크 : https://forums.developer.nvidia.com/t/jetson-nano-4gb-is-not-booting-suddenly/198991]

[링크 : https://forums.developer.nvidia.com/t/flashing-just-dtb-on-28-2-and-tx1/62007/3]

'embeded > jetson' 카테고리의 다른 글

jetson / armv8 EL  (0) 2022.04.07
nvidia jetson partition table  (0) 2022.04.06
deepstream triton server  (0) 2022.03.30
deepstream part.3  (0) 2022.03.29
deepstream onnx part.2  (0) 2022.03.29
Posted by 구차니

내 용돈 놔두고 몰래 지르기 ㅋㅋㅋ

 

일단 USB C to HDMI/USB3.0 허브

핸드폰들을 dex 모드로 쓰려니 USB 꽂을 방법이 없는데 다른건 다 비싸서

1포트만 나오는거 찾고  USB2.0 에 키보드/ 마우스 달고 쓰려고 생각중

[링크 : http://itempage3.auction.co.kr/DetailView.aspx?itemNo=C507222210&frm3=V2]

'개소리 왈왈 > 모바일 생활' 카테고리의 다른 글

어라 요금제 폭탄?  (0) 2022.05.17
노트5 파.. 쇄?  (0) 2022.05.09
v50s 액정 사설 수리 비용  (0) 2022.03.04
액정깨짐  (0) 2021.10.23
포켓몬 커뮤니티 데이 / 딥상어동  (0) 2021.06.06
Posted by 구차니
Programming/golang2022. 4. 6. 12:44

var는 변수를 선언한다는 키워드일 뿐 변수명/변수타입으로 선언을 해주어야 한다.

bool
string
int  int8  int16  int32  int64
uint uint8 uint16 uint32 uint64 uintptr
byte // alias for uint8
rune // alias for int32
     // represents a Unicode code point
float32 float64
complex64 complex128

 

var varname int; 식이 아니라 var () 로도 변수 선언 블럭으로 만들 수 있나보네

package main

import (
"fmt"
"math/cmplx"
)

var (
ToBe   bool       = false
MaxInt uint64     = 1<<64 - 1
z      complex128 = cmplx.Sqrt(-5 + 12i)
)

func main() {
fmt.Printf("Type: %T Value: %v\n", ToBe, ToBe)
fmt.Printf("Type: %T Value: %v\n", MaxInt, MaxInt)
fmt.Printf("Type: %T Value: %v\n", z, z)
}

[링크 : https://go.dev/tour/basics/11]

 

변수형 앞에 []를 붙여 배열임을 나타내는데

var a [10]int

 

그냥 c언어의 일반적인 배열 문법과 거의 동일하다.

package main

import "fmt"

func main() {
var a [2]string
a[0] = "Hello"
a[1] = "World"
fmt.Println(a[0], a[1])
fmt.Println(a)

primes := [6]int{2, 3, 5, 7, 11, 13}
fmt.Println(primes)
}

[링크 : https://go.dev/tour/moretypes/6]

 

+

2022.04.07

상수는 타입을 붙여도 에러는 발생하지 않는다.

const Pi = 3.14

[링크 : https://go-tour-ko.appspot.com/basics/15]

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

golang 변수 할당문(짧은 변수 선언문) :=  (0) 2022.04.07
golang type 변환, type 확인하기  (0) 2022.04.07
go 모듈 불러오기  (0) 2022.04.06
golang 다른 파일 함수 불러오기  (0) 2022.04.04
liteide  (0) 2022.04.04
Posted by 구차니
Programming/golang2022. 4. 6. 10:50

아따 어렵다 -_- 다른 동료 도움을 받아서 해결

 

일단 아래의 기본 구조를 따라가고

serial.go와 tcp.go는 이름만 거창하지 그냥 fmt.Println("hello serial world") 출력하는 테스트 코드만 들어있다.

$ tree
.
├── go.mod
├── internal
│   └── util
│       ├── serial.go
│       └── tcp.go
├── main
├── main.go
├── pkg
│   └── mod
│       └── cache
│           └── lock
└── web
    ├── img
    ├── index.html
    └── style.css

7 directories, 8 files

 

go build 하면 에러가 발생하고

go mod init 프로젝트 명   으로 모듈을 초기화 해주고 나서 다시 빌드하면 문제없이 빌드된다.

go mod tidy는 먼지 조금더 찾아봐야 할 듯.

$ go build main.go
main.go:6:2: package l2s/internal/util is not in GOROOT (/usr/lib/go-1.17/src/l2s/internal/util)

$ go mod init test
go: creating new go.mod: module test
go: to add module requirements and sums:
        go mod tidy

$ go build main.go

 

go mod init 하면서 GOMOD 경로가 변경되는 듯.

$ go env | grep GOMOD
GOMODCACHE="/home/minimonk/pkg/mod"
GOMOD="/home/minimonk/src/l2s/go.mod"

 

테스트 해보니 현재 빌드 경로에서 벗어나면 GOMOD 값이 변경된다. 신기하네..

$ go env | grep GOMOD
GOMODCACHE="/home/minimonk/pkg/mod"
GOMOD="/dev/null"

 

함수명이 대문자로 시작해야 외부에서 호출 가능한... public 함수라고 해야하나?

go 키워드를 찾아봐야겠네.

 Go에서는 대문자로 된 변수명은 패키지 외부에서 사용 할 수 있다라는 기능적 의미를 가지고 있어서 사용자가 이해하기 쉬운 측면이 있다.

[링크 : https://blog.billo.io/devposts/golang_naming_convention/]

 

아래와 같은 디렉토리들로 기본 구성되고 src는 있어서는 안된다고 한다.

/cmd (메인을 여기에?) 
/internal (메인에서 호출한 사용자 작성 모듈들을 여기에?)
/pkg (외부 종속성 추가)
/vendor

/api
/web

/configs
/init
/scripts

[링크 : https://github.com/golang-standards/project-layout/blob/master/README_ko.md]

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

golang type 변환, type 확인하기  (0) 2022.04.07
go 변수, 상수, 배열  (0) 2022.04.06
golang 다른 파일 함수 불러오기  (0) 2022.04.04
liteide  (0) 2022.04.04
golang gore(repl), delve  (0) 2022.03.31
Posted by 구차니