본문 바로가기
Linux BSP

[Linux BSP] U-Boot Bootloader 빌드(ubuntu 호스트 크로스 컴파일)

by TYB 2024. 2. 7.
반응형

개념을 이해하고 오자

 

[Linux] 부트 로더 Boot Loader란?

Boot Loader의 역할? q타겟 시스템 초기화 v부트로더는 전원이 입력되면 타겟 시스템이 정상동작 할 수 있도록 하드웨어 및 소프트웨어 동작 환경을 설정 v불필요한 하드웨어의 동작 중지, 시스템

program-developers-story.tistory.com

 

ubuntu@ubuntu8:~$ mkdir pi_bsp ; cd pi_bsp
ubuntu@ubuntu8:~/pi_bsp$ sudo apt update
ubuntu@ubuntu8:~/pi_bsp$ sudo apt-get install gawk git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python-setuptools python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev xterm rsync curl zstd lz4 bison flex



다운로드 후 arm 명령어를 치고 tab을 두번 쳐주면 사용가능한 명령어가 쭉 나온다 

ubuntu@ubuntu8:~$ arm
arm-linux-gnueabihf-addr2line     arm-linux-gnueabihf-gcc-ar-9      arm-linux-gnueabihf-ld.bfd
arm-linux-gnueabihf-ar            arm-linux-gnueabihf-gcc-nm        arm-linux-gnueabihf-ld.gold
arm-linux-gnueabihf-as            arm-linux-gnueabihf-gcc-nm-9      arm-linux-gnueabihf-nm
arm-linux-gnueabihf-c++filt       arm-linux-gnueabihf-gcc-ranlib    arm-linux-gnueabihf-objcopy
arm-linux-gnueabihf-cpp           arm-linux-gnueabihf-gcc-ranlib-9  arm-linux-gnueabihf-objdump
arm-linux-gnueabihf-cpp-9         arm-linux-gnueabihf-gcov          arm-linux-gnueabihf-ranlib
arm-linux-gnueabihf-dwp           arm-linux-gnueabihf-gcov-9        arm-linux-gnueabihf-readelf
arm-linux-gnueabihf-elfedit       arm-linux-gnueabihf-gcov-dump     arm-linux-gnueabihf-size
arm-linux-gnueabihf-g++           arm-linux-gnueabihf-gcov-dump-9   arm-linux-gnueabihf-strings
arm-linux-gnueabihf-g++-9         arm-linux-gnueabihf-gcov-tool     arm-linux-gnueabihf-strip
arm-linux-gnueabihf-gcc           arm-linux-gnueabihf-gcov-tool-9   arm2hpdl
arm-linux-gnueabihf-gcc-9         arm-linux-gnueabihf-gprof
arm-linux-gnueabihf-gcc-ar        arm-linux-gnueabihf-ld
ubuntu@ubuntu8:~$ arm
arm-linux-gnueabihf-addr2line     arm-linux-gnueabihf-gcc-ar-9      arm-linux-gnueabihf-ld.bfd
arm-linux-gnueabihf-ar            arm-linux-gnueabihf-gcc-nm        arm-linux-gnueabihf-ld.gold
arm-linux-gnueabihf-as            arm-linux-gnueabihf-gcc-nm-9      arm-linux-gnueabihf-nm
arm-linux-gnueabihf-c++filt       arm-linux-gnueabihf-gcc-ranlib    arm-linux-gnueabihf-objcopy
arm-linux-gnueabihf-cpp           arm-linux-gnueabihf-gcc-ranlib-9  arm-linux-gnueabihf-objdump
arm-linux-gnueabihf-cpp-9         arm-linux-gnueabihf-gcov          arm-linux-gnueabihf-ranlib
arm-linux-gnueabihf-dwp           arm-linux-gnueabihf-gcov-9        arm-linux-gnueabihf-readelf
arm-linux-gnueabihf-elfedit       arm-linux-gnueabihf-gcov-dump     arm-linux-gnueabihf-size
arm-linux-gnueabihf-g++           arm-linux-gnueabihf-gcov-dump-9   arm-linux-gnueabihf-strings
arm-linux-gnueabihf-g++-9         arm-linux-gnueabihf-gcov-tool     arm-linux-gnueabihf-strip
arm-linux-gnueabihf-gcc           arm-linux-gnueabihf-gcov-tool-9   arm2hpdl
arm-linux-gnueabihf-gcc-9         arm-linux-gnueabihf-gprof
arm-linux-gnueabihf-gcc-ar        arm-linux-gnueabihf-ld

 

 

 

 

ubuntu@ubuntu8:/usr/bin$ ls |  wc -l 
파일의 갯수 즉, line 수를 체크하는거임


ubuntu@ubuntu8:/usr/bin$ ls arm-linux-gnueabihf-* | wc -l
36
 arm-linux-gnueabihf라는 이름이 붙어있는 특정 파일의 파일의 갯수 즉, line 수를 체크하는거임


ubuntu@ubuntu8:/usr/bin$ ls |  wc -a 
word 수를 체크하는거임



ubuntu@ubuntu8:/usr/bin$ ls | more
1 page 단위로 보겠다.


*옵션을 어떻게 쓰는지 까먹었을 때 
man은 상세한 명령어가 많이 나옴.
wc --help



특정 계정의 home directory로 가고싶을 때
ubuntu@ubuntu8:~/pi_bsp$ cd ~ubuntu/
ubuntu@ubuntu8:~$ pwd
/home/ubuntu

ubuntu 계정 비밀번호 변경
ubuntu@ubuntu8:~$ sudo passwd ubuntu

ubuntu@ubuntu8:~$ cat /etc/shadow
cat: /etc/shadow: Permission denied
ubuntu@ubuntu8:~$ sudo cat /etc/shadow
root:$6$lkfQ1KOOIs3FURsv$.T0FWoIdN8GyXpU1t5o4.U0s4excUEE9NVyJehmoYSoURxYALCCYKhUBz8IILfv8fChZevAre.ADsmV3B2rG2.:19752:0:99999:7:::
daemon:*:19432:0:99999:7:::
bin:*:19432:0:99999:7:::
sys:*:19432:0:99999:7:::
sync:*:19432:0:99999:7:::
games:*:19432:0:99999:7:::
man:*:19432:0:99999:7:::
lp:*:19432:0:99999:7:::
mail:*:19432:0:99999:7:::
news:*:19432:0:99999:7:::
uucp:*:19432:0:99999:7:::
proxy:*:19432:0:99999:7:::
www-data:*:19432:0:99999:7:::
backup:*:19432:0:99999:7:::
list:*:19432:0:99999:7:::
irc:*:19432:0:99999:7:::
gnats:*:19432:0:99999:7:::
nobody:*:19432:0:99999:7:::
systemd-network:*:19432:0:99999:7:::
systemd-resolve:*:19432:0:99999:7:::
systemd-timesync:*:19432:0:99999:7:::
messagebus:*:19432:0:99999:7:::
syslog:*:19432:0:99999:7:::
_apt:*:19432:0:99999:7:::
tss:*:19432:0:99999:7:::
uuidd:*:19432:0:99999:7:::
tcpdump:*:19432:0:99999:7:::
avahi-autoipd:*:19432:0:99999:7:::
usbmux:*:19432:0:99999:7:::
rtkit:*:19432:0:99999:7:::
dnsmasq:*:19432:0:99999:7:::
cups-pk-helper:*:19432:0:99999:7:::
speech-dispatcher:!:19432:0:99999:7:::
avahi:*:19432:0:99999:7:::
kernoops:*:19432:0:99999:7:::
saned:*:19432:0:99999:7:::
nm-openvpn:*:19432:0:99999:7:::
hplip:*:19432:0:99999:7:::
whoopsie:*:19432:0:99999:7:::
colord:*:19432:0:99999:7:::
fwupd-refresh:*:19432:0:99999:7:::
geoclue:*:19432:0:99999:7:::
pulse:*:19432:0:99999:7:::
gnome-initial-setup:*:19432:0:99999:7:::
gdm:*:19432:0:99999:7:::
sssd:*:19432:0:99999:7:::
ubuntu:$6$gjIb2Bx04TbE0VSS$91KliAOJcyKC03oFm.lwIpdnOBBaPBLkXlBD36K5rGaGLqQpj04y663zsfATrDajEloHHal9UxjrE8tmqKqqk/:19760:0:99999:7:::
systemd-coredump:!!:19752::::::
sshd:*:19753:0:99999:7:::
_rpc:*:19753:0:99999:7:::
statd:*:19753:0:99999:7:::


ubuntu를 보면 암호화 되어 있음. 알수가 없음.


ubuntu@ubuntu8:~$ sudo cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
systemd-network:x:100:102:systemd Network Management,,,:/run/systemd:/usr/sbin/nologin
systemd-resolve:x:101:103:systemd Resolver,,,:/run/systemd:/usr/sbin/nologin
systemd-timesync:x:102:104:systemd Time Synchronization,,,:/run/systemd:/usr/sbin/nologin
messagebus:x:103:106::/nonexistent:/usr/sbin/nologin
syslog:x:104:110::/home/syslog:/usr/sbin/nologin
_apt:x:105:65534::/nonexistent:/usr/sbin/nologin
tss:x:106:111:TPM software stack,,,:/var/lib/tpm:/bin/false
uuidd:x:107:114::/run/uuidd:/usr/sbin/nologin
tcpdump:x:108:115::/nonexistent:/usr/sbin/nologin
avahi-autoipd:x:109:116:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/usr/sbin/nologin
usbmux:x:110:46:usbmux daemon,,,:/var/lib/usbmux:/usr/sbin/nologin
rtkit:x:111:117:RealtimeKit,,,:/proc:/usr/sbin/nologin
dnsmasq:x:112:65534:dnsmasq,,,:/var/lib/misc:/usr/sbin/nologin
cups-pk-helper:x:113:120:user for cups-pk-helper service,,,:/home/cups-pk-helper:/usr/sbin/nologin
speech-dispatcher:x:114:29:Speech Dispatcher,,,:/run/speech-dispatcher:/bin/false
avahi:x:115:121:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/usr/sbin/nologin
kernoops:x:116:65534:Kernel Oops Tracking Daemon,,,:/:/usr/sbin/nologin
saned:x:117:123::/var/lib/saned:/usr/sbin/nologin
nm-openvpn:x:118:124:NetworkManager OpenVPN,,,:/var/lib/openvpn/chroot:/usr/sbin/nologin
hplip:x:119:7:HPLIP system user,,,:/run/hplip:/bin/false
whoopsie:x:120:125::/nonexistent:/bin/false
colord:x:121:126:colord colour management daemon,,,:/var/lib/colord:/usr/sbin/nologin
fwupd-refresh:x:122:127:fwupd-refresh user,,,:/run/systemd:/usr/sbin/nologin
geoclue:x:123:128::/var/lib/geoclue:/usr/sbin/nologin
pulse:x:124:129:PulseAudio daemon,,,:/var/run/pulse:/usr/sbin/nologin
gnome-initial-setup:x:125:65534::/run/gnome-initial-setup/:/bin/false
gdm:x:126:131:Gnome Display Manager:/var/lib/gdm3:/bin/false
sssd:x:127:132:SSSD system user,,,:/var/lib/sss:/usr/sbin/nologin
ubuntu:x:1000:1000:ubuntu,,,:/home/ubuntu:/bin/bash
systemd-coredump:x:999:999:systemd Core Dumper:/:/usr/sbin/nologin
sshd:x:128:65534::/run/sshd:/usr/sbin/nologin
_rpc:x:129:65534::/run/rpcbind:/usr/sbin/nologin
statd:x:130:65534::/var/lib/nfs:/usr/sbin/nologin

 

 

bash= born again shell임. 초창기 unix에서 born shell을 쓰다가 bash로 업그레이드 된거임.

 

 

ubuntu@ubuntu8:~$ cd /var/backups/
ubuntu@ubuntu8:/var/backups$ cd -
/home/ubuntu
ubuntu@ubuntu8:~$


cd - 를 치면 직전에 있던 위치로 이동함.

 

라즈베리파이는 boot loader를 안올려놔서 boot loader 메시지를 볼 수가 없음. 

그래서 우리는 boot load를 펌웨어에 올리고 c나 어셈블리로 기능을 추가하려고 하는거임.

boot load가 지금 없기 때문에 

 

dmesg

커널이 부팅했을때의 메시지를 버퍼에 저장하고 있다가

커널에서는 printk를 이용해서 kernel message를 출력하는데 그게 원형 버퍼에 저장되어 있음. dmesg가 그 버퍼의 내용을 출력하는 명령어인거

pi@pi08:~ $ dmesg
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[    0.000000] Linux version 6.1.0-rpi7-rpi-v8 (debian-kernel@lists.debian.org)                                       (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP                                       PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24)
[    0.000000] random: crng init done
[    0.000000] Machine model: Raspberry Pi 4 Model B Rev 1.2
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x000000000e000000, s                                      ize 512 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id share                                      d-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000]   DMA32    [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000]   node   0: [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[    0.000000] On node 0, zone DMA32: 19456 pages in unavailable ranges
[    0.000000] percpu: Embedded 29 pages/cpu s79144 r8192 d31448 u118784
[    0.000000] pcpu-alloc: s79144 r8192 d31448 u118784 alloc=29*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: detected: Spectre-v2
[    0.000000] CPU features: detected: Spectre-v3a
[    0.000000] CPU features: detected: Spectre-v4
[    0.000000] CPU features: detected: Spectre-BHB
[    0.000000] CPU features: kernel page table isolation forced ON by KASLR
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: detected: ARM erratum 1742098
[    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 496944
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835                                      .enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 s                                      nd_bcm2835.enable_hdmi=0  smsc95xx.macaddr=DC:A6:32:7A:E0:54 vc_mem.mem_base=0x3                                      ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 console=ttyS0 root=PART                                      UUID=921b283c-02 rootfstype=ext4 fsck.repair=yes rootwait
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes,                                       linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes,                                       linear)
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] software IO TLB: area num 4.
[    0.000000] software IO TLB: mapped [mem 0x0000000037400000-0x000000003b40000                                      0] (64MB)
[    0.000000] Memory: 1348208K/2019328K available (12352K kernel code, 2172K rw                                      data, 4076K rodata, 4288K init, 1082K bss, 146832K reserved, 524288K cma-reserve                                      d)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 40060 entries in 157 pages
[    0.000000] ftrace: allocated 157 pages with 5 groups
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jif                                      fies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles:                                       0xc743ce346, max_idle_ns: 440795203123 ns
[    0.000001] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 43980                                      46511102ns
[    0.000308] Console: colour dummy device 80x25
[    0.000373] Calibrating delay loop (skipped), value calculated using timer fr                                      equency.. 108.00 BogoMIPS (lpj=216000)
[    0.000396] pid_max: default: 32768 minimum: 301
[    0.000508] LSM: Security Framework initializing
[    0.000681] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, line                                      ar)
[    0.000711] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes,                                       linear)
[    0.001883] cgroup: Disabling memory control group subsystem
[    0.003686] cblist_init_generic: Setting adjustable number of callback queues                                      .
[    0.003698] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.003848] cblist_init_generic: Setting adjustable number of callback queues                                      .
[    0.003899] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.004048] cblist_init_generic: Setting adjustable number of callback queues                                      .
[    0.004058] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.004429] rcu: Hierarchical SRCU implementation.
[    0.004439] rcu:     Max phase no-delay instances is 1000.
[    0.006430] EFI services will not be available.
[    0.006854] smp: Bringing up secondary CPUs ...
[    0.007719] Detected PIPT I-cache on CPU1
[    0.007857] CPU1: Booted secondary processor 0x0000000001 [0x410fd083]
[    0.008825] Detected PIPT I-cache on CPU2
[    0.008937] CPU2: Booted secondary processor 0x0000000002 [0x410fd083]
[    0.009859] Detected PIPT I-cache on CPU3
[    0.009972] CPU3: Booted secondary processor 0x0000000003 [0x410fd083]
[    0.010101] smp: Brought up 1 node, 4 CPUs
[    0.010116] SMP: Total of 4 processors activated.
[    0.010127] CPU features: detected: 32-bit EL0 Support
[    0.010135] CPU features: detected: 32-bit EL1 Support
[    0.010145] CPU features: detected: CRC32 instructions
[    0.010264] CPU: All CPU(s) started at EL2
[    0.010283] alternatives: applying system-wide alternatives
[    0.011894] devtmpfs: initialized
[    0.021718] Enabled cp15_barrier support
[    0.021748] Enabled setend support
[    0.021916] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma                                      x_idle_ns: 7645041785100000 ns
[    0.021946] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.035309] pinctrl core: initialized pinctrl subsystem
[    0.036080] DMI not present or invalid.
[    0.036648] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.039547] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[    0.039823] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic all                                      ocations
[    0.040672] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic a                                      llocations
[    0.040747] audit: initializing netlink subsys (disabled)
[    0.040975] audit: type=2000 audit(0.040:1): state=initialized audit_enabled=                                      0 res=1
[    0.041513] thermal_sys: Registered thermal governor 'step_wise'
[    0.041586] cpuidle: using governor menu
[    0.041800] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.041967] ASID allocator initialised with 32768 entries
[    0.042844] Serial: AMBA PL011 UART driver
[    0.055189] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[    0.076216] raspberrypi-firmware soc:firmware: Attached to firmware from 2023                                      -10-17T15:39:16, variant start
[    0.080227] raspberrypi-firmware soc:firmware: Firmware hash is 30f0c5e4d076d                                      a3ab4f341d88e7d505760b93ad7
[    0.094333] KASLR enabled
[    0.120379] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[    0.124968] iommu: Default domain type: Translated
[    0.124982] iommu: DMA domain TLB invalidation policy: strict mode
[    0.125360] SCSI subsystem initialized
[    0.125557] usbcore: registered new interface driver usbfs
[    0.125605] usbcore: registered new interface driver hub
[    0.125660] usbcore: registered new device driver usb
[    0.125990] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.126480] pps_core: LinuxPPS API ver. 1 registered
[    0.126491] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giome                                      tti <giometti@linux.it>
[    0.126513] PTP clock support registered
[    0.127480] vgaarb: loaded
[    0.127967] clocksource: Switched to clocksource arch_sys_counter
[    0.128593] VFS: Disk quotas dquot_6.6.0
[    0.128657] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.128806] FS-Cache: Loaded
[    0.128949] CacheFiles: Loaded
[    0.137751] NET: Registered PF_INET protocol family
[    0.138247] IP idents hash table entries: 32768 (order: 6, 262144 bytes, line                                      ar)
[    0.141071] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 1638                                      4 bytes, linear)
[    0.141109] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes,                                       linear)
[    0.141132] TCP established hash table entries: 16384 (order: 5, 131072 bytes                                      , linear)
[    0.141232] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linea                                      r)
[    0.141758] TCP: Hash tables configured (established 16384 bind 16384)
[    0.142042] MPTCP token hash table entries: 2048 (order: 3, 49152 bytes, line                                      ar)
[    0.142139] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.142173] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.142372] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.143012] RPC: Registered named UNIX socket transport module.
[    0.143024] RPC: Registered udp transport module.
[    0.143033] RPC: Registered tcp transport module.
[    0.143041] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.143061] PCI: CLS 0 bytes, default 64
[    0.143573] Trying to unpack rootfs image as initramfs...
[    0.153841] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counte                                      rs available
[    0.154212] kvm [1]: IPA Size Limit: 44 bits
[    0.155518] kvm [1]: vgic interrupt IRQ9
[    0.155723] kvm [1]: Hyp mode initialized successfully
[    0.901583] Freeing initrd memory: 15716K
[    1.194566] Initialise system trusted keyrings
[    1.195026] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    1.201171] zbud: loaded
[    1.203574] NFS: Registering the id_resolver key type
[    1.203620] Key type id_resolver registered
[    1.203629] Key type id_legacy registered
[    1.203720] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.203733] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering                                      ...
[    1.204952] Key type asymmetric registered
[    1.204966] Asymmetric key parser 'x509' registered
[    1.205039] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2                                      47)
[    1.205272] io scheduler mq-deadline registered
[    1.205285] io scheduler kyber registered
[    1.207482] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef                                      00100, parent irq: 27)
[    1.216586] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    1.216619] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500                                      000, using [bus 00-ff]
[    1.216693] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0                                      x00c0000000
[    1.216768] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x007fffffff -> 0                                      x0400000000
[    1.217466] brcm-pcie fd500000.pcie: setting SCB_ACCESS_EN, READ_UR_MODE, MAX                                      _BURST_SIZE
[    1.217885] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    1.217902] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.217918] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff]                                       (bus address [0xc0000000-0xffffffff])
[    1.217983] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    1.218203] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.222090] pci_bus 0000:01: supply vpcie3v3 not found, using dummy regulator
[    1.222246] pci_bus 0000:01: supply vpcie3v3aux not found, using dummy regula                                      tor
[    1.222340] pci_bus 0000:01: supply vpcie12v not found, using dummy regulator
[    1.330059] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[    1.330214] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330
[    1.330334] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[    1.330752] pci 0000:01:00.0: PME# supported from D0 D3cold
[    1.331427] pci 0000:00:00.0: BAR 8: assigned [mem 0x600000000-0x6000fffff]
[    1.331450] pci 0000:01:00.0: BAR 0: assigned [mem 0x600000000-0x600000fff 64                                      bit]
[    1.331523] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.331543] pci 0000:00:00.0:   bridge window [mem 0x600000000-0x6000fffff]
[    1.331904] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    1.332129] pcieport 0000:00:00.0: PME: Signaling with IRQ 31
[    1.332549] pcieport 0000:00:00.0: AER: enabled with IRQ 31
[    1.341882] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    1.344987] iproc-rng200 fe104000.rng: hwrng registered
[    1.345473] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000                                      000(1024 MiB)
[    1.357168] brd: module loaded
[    1.364051] loop: module loaded
[    1.364822] Loading iSCSI transport class v2.0-870.
[    1.369808] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[    1.476104] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
[    1.477076] usbcore: registered new interface driver r8152
[    1.477149] usbcore: registered new interface driver lan78xx
[    1.477207] usbcore: registered new interface driver smsc95xx
[    1.478769] xhci_hcd 0000:01:00.0: enabling device (0000 -> 0002)
[    1.478858] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.478885] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus numbe                                      r 1
[    1.479456] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 qu                                      irks 0x0b00040000000890
[    1.480048] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.480068] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus numbe                                      r 2
[    1.480089] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    1.480403] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bc                                      dDevice= 6.01
[    1.480421] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=                                      1
[    1.480434] usb usb1: Product: xHCI Host Controller
[    1.480446] usb usb1: Manufacturer: Linux 6.1.0-rpi7-rpi-v8 xhci-hcd
[    1.480457] usb usb1: SerialNumber: 0000:01:00.0
[    1.481073] hub 1-0:1.0: USB hub found
[    1.481161] hub 1-0:1.0: 1 port detected
[    1.482040] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bc                                      dDevice= 6.01
[    1.482057] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=                                      1
[    1.482070] usb usb2: Product: xHCI Host Controller
[    1.482082] usb usb2: Manufacturer: Linux 6.1.0-rpi7-rpi-v8 xhci-hcd
[    1.482093] usb usb2: SerialNumber: 0000:01:00.0
[    1.482654] hub 2-0:1.0: USB hub found
[    1.482725] hub 2-0:1.0: 4 ports detected
[    1.484211] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.484495] dwc_otg: FIQ enabled
[    1.484504] dwc_otg: NAK holdoff enabled
[    1.484512] dwc_otg: FIQ split-transaction FSM enabled
[    1.484526] Module dwc_common_port init
[    1.485643] usbcore: registered new interface driver uas
[    1.485723] usbcore: registered new interface driver usb-storage
[    1.486500] mousedev: PS/2 mouse device common for all mice
[    1.492242] sdhci: Secure Digital Host Controller Interface driver
[    1.492255] sdhci: Copyright(c) Pierre Ossman
[    1.492833] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.496339] ledtrig-cpu: registered to indicate activity on CPUs
[    1.496626] hid: raw HID events driver (C) Jiri Kosina
[    1.496808] usbcore: registered new interface driver usbhid
[    1.496819] usbhid: USB HID core driver
[    1.505086] NET: Registered PF_PACKET protocol family
[    1.505186] Key type dns_resolver registered
[    1.506141] registered taskstats version 1
[    1.506207] Loading compiled-in X.509 certificates
[    1.531293] Loaded X.509 cert 'Debian Secure Boot CA: 6ccece7e4c6c0d1f6149f3d                                      d27dfcc5cbb419ea1'
[    1.531383] Loaded X.509 cert 'Debian Secure Boot Signer 2022 - linux: 140112                                      49c2675ea8e5148542202005810584b25f'
[    1.532168] Key type .fscrypt registered
[    1.532181] Key type fscrypt-provisioning registered
[    1.544140] uart-pl011 fe201000.serial: there is not valid maps for state def                                      ault
[    1.544865] uart-pl011 fe201000.serial: cts_event_workaround enabled
[    1.545013] fe201000.serial: ttyAMA1 at MMIO 0xfe201000 (irq = 36, base_baud                                       = 0) is a PL011 rev2
[    1.545238] serial serial0: tty port ttyAMA1 registered
[    1.552860] bcm2835-aux-uart fe215040.serial: there is not valid maps for sta                                      te default
[    1.553624] printk: console [ttyS0] disabled
[    1.553729] fe215040.serial: ttyS0 at MMIO 0xfe215040 (irq = 37, base_baud =                                       62500000) is a 16550
[    1.736002] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    1.759319] printk: console [ttyS0] enabled
[    1.914600] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcd                                      Device= 4.21
[    1.917066] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.923540] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    1.928444] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains drive                                      r
[    1.938988] usb 1-1: Product: USB2.0 Hub
[    1.944689] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
[    1.949864] hub 1-1:1.0: USB hub found
[    1.955570] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
[    1.985127] of_cfs_init
[    1.991848] hub 1-1:1.0: 4 ports detected
[    1.997624] of_cfs_init: OK
[    2.033275] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[    2.118102] mmc1: new high speed SDIO card at address 0001
[    2.225994] mmc0: new ultra high speed DDR50 SDHC card at address aaaa
[    3.131724] mmcblk0: mmc0:aaaa SC32G 29.7 GiB
[    3.137699] Freeing unused kernel memory: 4288K
[    3.142341]  mmcblk0: p1 p2
[    3.142509] Run /init as init process
[    3.145670] mmcblk0: mmc0:aaaa SC32G 29.7 GiB (quirks 0x00004000)
[    3.148915]   with arguments:
[    3.148923]     /init
[    3.155111]   with environment:
[    3.155120]     HOME=/
[    3.155130]     TERM=linux
[    4.029200] brcmstb-i2c fef04500.i2c:  @97500hz registered in polling mode
[    4.069365] brcmstb-i2c fef09500.i2c:  @97500hz registered in polling mode
[    4.145833] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0
[    4.218246] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[    4.226808] Registered IR keymap rc-cec
[    4.231311] rc rc0: vc4-hdmi-0 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[    4.239858] input: vc4-hdmi-0 as /devices/platform/soc/fef00700.hdmi/rc/rc0/i                                      nput0
[    4.253234] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops [vc4])
[    4.262326] Registered IR keymap rc-cec
[    4.266400] rc rc1: vc4-hdmi-1 as /devices/platform/soc/fef05700.hdmi/rc/rc1
[    4.273756] input: vc4-hdmi-1 as /devices/platform/soc/fef05700.hdmi/rc/rc1/i                                      nput1
[    4.286088] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops [vc4])
[    4.293485] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops [vc4])
[    4.300511] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4])
[    4.307987] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4])
[    4.315423] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4])
[    4.322769] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4])
[    4.330209] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4])
[    4.342290] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
[    4.349444] vc4-drm gpu: [drm] Cannot find any crtc or sizes
[    4.357354] vc4-drm gpu: [drm] Cannot find any crtc or sizes
[    4.363252] vc4-drm gpu: [drm] Cannot find any crtc or sizes
[    4.768668] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Q                                      uota mode: none.
[    5.351635] systemd[1]: System time before build time, advancing clock.
[    5.556143] NET: Registered PF_INET6 protocol family
[    5.562711] Segment Routing with IPv6
[    5.566505] In-situ OAM (IOAM) with IPv6
[    5.653657] systemd[1]: systemd 252.17-1~deb12u1+rpi1 running in system mode                                       (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +A                                      CL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK                                       +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAM                                      EWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[    5.687340] systemd[1]: Detected architecture arm64.
[    5.704685] systemd[1]: Hostname set to <pi08>.
[    6.914941] systemd[1]: Queued start job for default target graphical.target.
[    6.948281] systemd[1]: Created slice system-getty.slice - Slice /system/gett                                      y.
[    6.958297] systemd[1]: Created slice system-modprobe.slice - Slice /system/m                                      odprobe.
[    6.969429] systemd[1]: Created slice system-serial\x2dgetty.slice - Slice /s                                      ystem/serial-getty.
[    6.980978] systemd[1]: Created slice system-systemd\x2dfsck.slice - Slice /s                                      ystem/systemd-fsck.
[    6.991834] systemd[1]: Created slice user.slice - User and Session Slice.
[    7.000465] systemd[1]: Started systemd-ask-password-wall.path - Forward Pass                                      word Requests to Wall Directory Watch.
[    7.012966] systemd[1]: Set up automount proc-sys-fs-binfmt_misc.automount -                                       Arbitrary Executable File Formats File System Automount Point.
[    7.027146] systemd[1]: Reached target integritysetup.target - Local Integrit                                      y Protected Volumes.
[    7.037385] systemd[1]: Reached target nss-lookup.target - Host and Network N                                      ame Lookups.
[    7.046130] systemd[1]: Reached target nss-user-lookup.target - User and Grou                                      p Name Lookups.
[    7.055579] systemd[1]: Reached target slices.target - Slice Units.
[    7.062564] systemd[1]: Reached target swap.target - Swaps.
[    7.068947] systemd[1]: Reached target veritysetup.target - Local Verity Prot                                      ected Volumes.
[    7.115232] systemd[1]: Listening on rpcbind.socket - RPCbind Server Activati                                      on Socket.
[    7.125294] systemd[1]: Listening on systemd-fsckd.socket - fsck to fsckd com                                      munication Socket.
[    7.135515] systemd[1]: Listening on systemd-initctl.socket - initctl Compati                                      bility Named Pipe.
[    7.147120] systemd[1]: Listening on systemd-journald-audit.socket - Journal                                       Audit Socket.
[    7.157498] systemd[1]: Listening on systemd-journald-dev-log.socket - Journa                                      l Socket (/dev/log).
[    7.168722] systemd[1]: Listening on systemd-journald.socket - Journal Socket                                      .
[    7.184207] systemd[1]: Listening on systemd-udevd-control.socket - udev Cont                                      rol Socket.
[    7.193946] systemd[1]: Listening on systemd-udevd-kernel.socket - udev Kerne                                      l Socket.
[    7.203492] systemd[1]: dev-hugepages.mount - Huge Pages File System was skip                                      ped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/huge                                      pages).
[    7.240459] systemd[1]: Mounting dev-mqueue.mount - POSIX Message Queue File                                       System...
[    7.253524] systemd[1]: Mounting proc-fs-nfsd.mount - NFSD configuration file                                      system...
[    7.267341] systemd[1]: Mounting sys-kernel-debug.mount - Kernel Debug File S                                      ystem...
[    7.281125] systemd[1]: Mounting sys-kernel-tracing.mount - Kernel Trace File                                       System...
[    7.290952] systemd[1]: auth-rpcgss-module.service - Kernel Module supporting                                       RPCSEC_GSS was skipped because of an unmet condition check (ConditionPathExists                                      =/etc/krb5.keytab).
[    7.314279] systemd[1]: Starting fake-hwclock.service - Restore / save the cu                                      rrent clock...
[    7.330522] systemd[1]: Starting keyboard-setup.service - Set the console key                                      board layout...
[    7.345997] systemd[1]: Starting kmod-static-nodes.service - Create List of S                                      tatic Device Nodes...
[    7.362270] systemd[1]: Starting modprobe@configfs.service - Load Kernel Modu                                      le configfs...
[    7.377785] systemd[1]: Starting modprobe@dm_mod.service - Load Kernel Module                                       dm_mod...
[    7.436858] systemd[1]: Starting modprobe@drm.service - Load Kernel Module dr                                      m...
[    7.459265] systemd[1]: Starting modprobe@efi_pstore.service - Load Kernel Mo                                      dule efi_pstore...
[    7.468866] device-mapper: ioctl: 4.47.0-ioctl (2022-07-28) initialised: dm-d                                      evel@redhat.com
[    7.484497] systemd[1]: Starting modprobe@fuse.service - Load Kernel Module f                                      use...
[    7.499247] systemd[1]: Starting modprobe@loop.service - Load Kernel Module l                                      oop...
[    7.509999] systemd[1]: systemd-fsck-root.service - File System Check on Root                                       Device was skipped because of an unmet condition check (ConditionPathExists=!/r                                      un/initramfs/fsck-root).
[    7.536772] systemd[1]: Starting systemd-journald.service - Journal Service..                                      .
[    7.538603] fuse: init (API version 7.37)
[    7.560129] systemd[1]: Starting systemd-modules-load.service - Load Kernel M                                      odules...
[    7.575028] systemd[1]: Starting systemd-remount-fs.service - Remount Root an                                      d Kernel File Systems...
[    7.594575] systemd[1]: Starting systemd-udev-trigger.service - Coldplug All                                       udev Devices...
[    7.617724] systemd[1]: Mounted dev-mqueue.mount - POSIX Message Queue File S                                      ystem.
[    7.628507] systemd[1]: Mounted proc-fs-nfsd.mount - NFSD configuration files                                      ystem.
[    7.637181] i2c_dev: i2c /dev entries driver
[    7.638704] systemd[1]: Mounted sys-kernel-debug.mount - Kernel Debug File Sy                                      stem.
[    7.653980] systemd[1]: Mounted sys-kernel-tracing.mount - Kernel Trace File                                       System.
[    7.665220] systemd[1]: Finished fake-hwclock.service - Restore / save the cu                                      rrent clock.
[    7.674670] EXT4-fs (mmcblk0p2): re-mounted. Quota mode: none.
[    7.677664] systemd[1]: Finished kmod-static-nodes.service - Create List of S                                      tatic Device Nodes.
[    7.693778] systemd[1]: modprobe@configfs.service: Deactivated successfully.
[    7.702871] systemd[1]: Finished modprobe@configfs.service - Load Kernel Modu                                      le configfs.
[    7.720460] systemd[1]: modprobe@dm_mod.service: Deactivated successfully.
[    7.728957] systemd[1]: Finished modprobe@dm_mod.service - Load Kernel Module                                       dm_mod.
[    7.740823] systemd[1]: modprobe@drm.service: Deactivated successfully.
[    7.749113] systemd[1]: Finished modprobe@drm.service - Load Kernel Module dr                                      m.
[    7.759225] systemd[1]: modprobe@efi_pstore.service: Deactivated successfully                                      .
[    7.768217] systemd[1]: Finished modprobe@efi_pstore.service - Load Kernel Mo                                      dule efi_pstore.
[    7.780488] systemd[1]: modprobe@fuse.service: Deactivated successfully.
[    7.789006] systemd[1]: Finished modprobe@fuse.service - Load Kernel Module f                                      use.
[    7.799390] systemd[1]: Finished keyboard-setup.service - Set the console key                                      board layout.
[    7.811162] systemd[1]: modprobe@loop.service: Deactivated successfully.
[    7.819938] systemd[1]: Finished modprobe@loop.service - Load Kernel Module l                                      oop.
[    7.830366] systemd[1]: Finished systemd-modules-load.service - Load Kernel M                                      odules.
[    7.841884] systemd[1]: Finished systemd-remount-fs.service - Remount Root an                                      d Kernel File Systems.
[    7.880978] systemd[1]: Mounting sys-fs-fuse-connections.mount - FUSE Control                                       File System...
[    7.895576] systemd[1]: Mounting sys-kernel-config.mount - Kernel Configurati                                      on File System...
[    7.905582] systemd[1]: systemd-firstboot.service - First Boot Wizard was ski                                      pped because of an unmet condition check (ConditionFirstBoot=yes).
[    7.919717] systemd[1]: systemd-pstore.service - Platform Persistent Storage                                       Archival was skipped because of an unmet condition check (ConditionDirectoryNotE                                      mpty=/sys/fs/pstore).
[    7.941550] systemd[1]: Starting systemd-random-seed.service - Load/Save Rand                                      om Seed...
[    7.950584] systemd[1]: systemd-repart.service - Repartition Root Disk was sk                                      ipped because no trigger condition checks were met.
[    7.968686] systemd[1]: Starting systemd-sysctl.service - Apply Kernel Variab                                      les...
[    7.983411] systemd[1]: Starting systemd-sysusers.service - Create System Use                                      rs...
[    8.008882] systemd[1]: Started systemd-journald.service - Journal Service.
[    8.097594] systemd-journald[290]: Received client request to flush runtime j                                      ournal.
[    8.110258] systemd-journald[290]: File /var/log/journal/9fb51d6cea754be48d0d                                      f01086e89f38/system.journal corrupted or uncleanly shut down, renaming and repla                                      cing.
[    9.574070] mc: Linux media interface: v0.10
[    9.576967] rpi-gpiomem fe200000.gpiomem: window base 0xfe200000 size 0x00001                                      000
[    9.577585] rpi-gpiomem fe200000.gpiomem: initialised 1 regions as /dev/gpiom                                      em
[    9.581073] vc_sm_cma: module is from the staging directory, the quality is u                                      nknown, you have been warned.
[    9.582861] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    9.582889] [vc_sm_connected_init]: start
[    9.587849] snd_bcm2835: module is from the staging directory, the quality is                                       unknown, you have been warned.
[    9.621342] [vc_sm_connected_init]: installed successfully
[    9.680276] bcm2835_audio bcm2835_audio: card created with 8 channels
[    9.748973] videodev: Linux video capture interface: v2.00
[   10.082238] bcm2835_mmal_vchiq: module is from the staging directory, the qua                                      lity is unknown, you have been warned.
[   10.111060] bcm2835_mmal_vchiq: module is from the staging directory, the qua                                      lity is unknown, you have been warned.
[   10.133071] bcm2835_v4l2: module is from the staging directory, the quality i                                      s unknown, you have been warned.
[   10.135464] bcm2835_isp: module is from the staging directory, the quality is                                       unknown, you have been warned.
[   10.178246] rpivid_hevc: module is from the staging directory, the quality is                                       unknown, you have been warned.
[   10.203589] bcm2835_codec: module is from the staging directory, the quality                                       is unknown, you have been warned.
[   10.236438] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev                                      /video13
[   10.236551] rpivid feb10000.codec: Device registered as /dev/video19
[   10.238090] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /de                                      v/video14
[   10.238966] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /de                                      v/video15
[   10.239642] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/                                      video16
[   10.239677] bcm2835-isp bcm2835-isp: Register output node 0 with media contro                                      ller
[   10.239698] bcm2835-isp bcm2835-isp: Register capture node 1 with media contr                                      oller
[   10.239715] bcm2835-isp bcm2835-isp: Register capture node 2 with media contr                                      oller
[   10.239731] bcm2835-isp bcm2835-isp: Register capture node 3 with media contr                                      oller
[   10.257762] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev                                      /video20
[   10.258170] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /de                                      v/video21
[   10.258524] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[   10.258568] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[   10.258941] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /de                                      v/video22
[   10.259310] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/                                      video23
[   10.259340] bcm2835-isp bcm2835-isp: Register output node 0 with media contro                                      ller
[   10.259361] bcm2835-isp bcm2835-isp: Register capture node 1 with media contr                                      oller
[   10.259379] bcm2835-isp bcm2835-isp: Register capture node 2 with media contr                                      oller
[   10.259395] bcm2835-isp bcm2835-isp: Register capture node 3 with media contr                                      oller
[   10.259604] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[   10.281081] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[   10.281137] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[   10.287539] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[   10.287607] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[   10.293794] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[   10.293844] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[   10.302166] bcm2835-codec bcm2835-codec: Device registered as /dev/video31
[   10.302231] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image
[   10.440837] cfg80211: Loading compiled-in X.509 certificates for regulatory d                                      atabase
[   10.441838] cfg80211: Loaded X.509 cert 'benh@debian.org: 577e021cb980e0e8208                                      21ba7b54b4961b8b4fadf'
[   10.442789] cfg80211: Loaded X.509 cert 'romain.perier@gmail.com: 3abbc6ec146                                      e09d1b6016ab9d6cf71dd233f0328'
[   10.443743] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   10.683040] brcmfmac: F1 signature read @0x18000000=0x15264345
[   10.696227] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio f                                      or chip BCM4345/6
[   10.697082] usbcore: registered new interface driver brcmfmac
[   10.849132] Bluetooth: Core ver 2.22
[   10.849245] NET: Registered PF_BLUETOOTH protocol family
[   10.849259] Bluetooth: HCI device and connection manager initialized
[   10.849286] Bluetooth: HCI socket layer initialized
[   10.849304] Bluetooth: L2CAP socket layer initialized
[   10.849336] Bluetooth: SCO socket layer initialized
[   10.975858] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Nov  1                                       2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
[   11.000559] Bluetooth: HCI UART driver ver 2.3
[   11.000593] Bluetooth: HCI UART protocol H4 registered
[   11.000716] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   11.001123] Bluetooth: HCI UART protocol Broadcom registered
[   11.003113] hci_uart_bcm serial0-0: supply vbat not found, using dummy regula                                      tor
[   11.003429] hci_uart_bcm serial0-0: supply vddio not found, using dummy regul                                      ator
[   11.124435] uart-pl011 fe201000.serial: no DMA platform data
[   11.364910] Bluetooth: hci0: BCM: chip id 107
[   11.365296] Bluetooth: hci0: BCM: features 0x2f
[   11.366517] Bluetooth: hci0: BCM4345C0
[   11.366543] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[   11.370957] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.raspberrypi,4-model-b.                                      hcd' Patch
[   11.532847] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:1                                      02396k SSFS
[   12.240996] Bluetooth: hci0: BCM: features 0x2f
[   12.242529] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+-0190
[   12.242560] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0382
[   13.128296] bcmgenet fd580000.ethernet: configuring instance for external RGM                                      II (RX delay)
[   13.136968] bcmgenet fd580000.ethernet eth0: Link is Down
[   13.208281] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[   13.323733] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   13.323753] Bluetooth: BNEP filters: protocol multicast
[   13.323768] Bluetooth: BNEP socket layer initialized
[   13.330541] Bluetooth: MGMT ver 1.22
[   13.344110] NET: Registered PF_ALG protocol family
[   15.819010] Bluetooth: RFCOMM TTY layer initialized
[   15.819040] Bluetooth: RFCOMM socket layer initialized
[   15.819059] Bluetooth: RFCOMM ver 1.11
[   17.216159] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   17.216526] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow c                                      ontrol rx/tx
[   18.879659] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   19.931608] NFSD: Using nfsdcld client tracking operations.
[   19.931627] NFSD: no clients to reclaim, skipping NFSv4 grace period (net f00                                      00000)

 

 

깃으로 u-boot 다운로드 받고 config 파일 make로 만들자.

깃 다운로드 받아주고
ubuntu@ubuntu8:~/pi_bsp$ git clone git://git.denx.de/u-boot.git


아키텍처 관련 파일들이 있음.
ubuntu@ubuntu8:~/pi_bsp/u-boot/arch$ ls
Kconfig  Kconfig.nxp  arc  arm  m68k  microblaze  mips  nios2  powerpc  riscv  sandbox  sh  u-boot-elf.lds  x86  xtensa


빌드해놓은 사람이 만들어놓은 환경파일을 가지고 build를 하면 됨. 라즈베리파이4 메모리 주소같은게 다 rpi_4_32b_defconfig에 정의되어 있음.

이건 초기에 1번만 하면됨!! 나중에 직접 config를 수정하고나서 이 명령어를 다시 실행하면 수정했던게 다 날라감.
ubuntu@ubuntu8:~/pi_bsp/u-boot$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- rpi_4_32b_defconfig
#
# configuration written to .config
#

.config 파일이 윗 명령어에 의해 만들어진걸 볼 수 있고
ubuntu@ubuntu8:~/pi_bsp/u-boot$ ls -l .config
-rw-rw-r-- 1 ubuntu ubuntu 45286  2월  7 11:18 .config

1285개의 boot 관련 config  파일을 지원해준다는 걸 알 수 있고
ubuntu@ubuntu8:~/pi_bsp/u-boot/configs$ ls | wc -l
1285

그중에서도 우리가 사용하는 raspberry pi4의 config 파일 만 보면됨.
ubuntu@ubuntu8:~/pi_bsp/u-boot/configs$ ls rpi_4*
rpi_4_32b_defconfig  rpi_4_defconfig

어떤 코드를 빌드해야하는지 makefile이 판단을 해야되는데 조건부 컴파일로 선택하게끔 코딩되어 있음.

 


지금 할건 아니지만 미리 뭘 해보자면

ubuntu@ubuntu8:~/pi_bsp/u-boot$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
*
* Unable to find the ncurses package.
* Install ncurses (ncurses-devel or libncurses-dev
* depending on your distribution).
*
make[1]: *** [scripts/kconfig/Makefile:227: scripts/kconfig/.mconf-cfg] Error 1
make: *** [Makefile:586: menuconfig] Error 2


ubuntu@ubuntu8:~/pi_bsp/u-boot$ sudo apt install libncurses-dev

 

여기 메뉴에서 수정을 하게 되면 .config에 설정되어 있는 걸 불러오고 여기서 gui를 통해 값을 바꿀 수 있는거임.

 

arm arch 들어가면 MMU가 잇음. mmu는 memory management unit임. help를 눌러서 아래로 가면

 

여기서 뭘 바꾸면 vi .config 해서 확인했을 때 바뀐 부분이 확인이 가능함

나중에 이 menu를 만드는 것도 해볼 예정임.

 

 


이제 빌드를 해보자

ubuntu@ubuntu8:~/pi_bsp/u-boot$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- all

 

에러가 났는데 패키지 라이브러리가 설치가 안되서 그런거임.

오류가 나면 기본적으로 패키지가 설치되있음.

 

구글링을 해보니 ssl library가 있음.

 

Fatal Error: openssl/evp.h No such file or directory

I successfully compiled openssl using android ndk build and .so files are built successfully. I am trying to 'include' built .so files in an android project. Getting an error in below line: #inc...

stackoverflow.com

 

역시 선배개발자형님들..

 

ubuntu@ubuntu8:~/pi_bsp/u-boot$ sudo apt-get install libssl-dev
설치가 안된다면 sudo apt update를 하고 다시 해보면 될듯..!

 

 

다시 해보면 이번엔 쭈루룩 내려가면서 됨!

ubuntu@ubuntu8:~/pi_bsp/u-boot$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- all

ubuntu@ubuntu8:~/pi_bsp/u-boot$ ls -lt
total 10448
drwxrwxr-x   2 ubuntu ubuntu    4096  2월  7 11:37 dts
-rw-rw-r--   1 ubuntu ubuntu   99356  2월  7 11:37 System.map
-rw-rw-r--   1 ubuntu ubuntu  201497  2월  7 11:37 u-boot.sym
-rw-rw-r--   1 ubuntu ubuntu  609612  2월  7 11:37 u-boot-nodtb.bin
-rw-rw-r--   1 ubuntu ubuntu  609612  2월  7 11:37 u-boot.bin
-rw-rw-r--   1 ubuntu ubuntu 1752756  2월  7 11:37 u-boot.srec
-rwxrwxr-x   1 ubuntu ubuntu 5847212  2월  7 11:37 u-boot
-rw-rw-r--   1 ubuntu ubuntu 1102756  2월  7 11:37 u-boot.map
-rw-rw-r--   1 ubuntu ubuntu    1721  2월  7 11:37 u-boot.lds
drwxrwxr-x   2 ubuntu ubuntu    4096  2월  7 11:37 net
drwxrwxr-x  24 ubuntu ubuntu   12288  2월  7 11:37 lib
drwxrwxr-x  15 ubuntu ubuntu    4096  2월  7 11:36 fs
drwxrwxr-x   2 ubuntu ubuntu    4096  2월  7 11:36 env
drwxrwxr-x  76 ubuntu ubuntu    4096  2월  7 11:36 drivers
drwxrwxr-x   2 ubuntu ubuntu    4096  2월  7 11:36 disk
drwxrwxr-x   5 ubuntu ubuntu    4096  2월  7 11:36 common
drwxrwxr-x  10 ubuntu ubuntu   12288  2월  7 11:36 cmd
drwxrwxr-x   2 ubuntu ubuntu    4096  2월  7 11:36 boot
drwxrwxr-x  39 ubuntu ubuntu   20480  2월  7 11:36 include
drwxrwxr-x  16 ubuntu ubuntu   12288  2월  7 11:36 tools
-rw-rw-r--   1 ubuntu ubuntu   12889  2월  7 11:33 u-boot.cfg
-rw-rw-r--   1 ubuntu ubuntu    1892  2월  7 11:18 generated_defconfig
drwxrwxr-x  18 ubuntu ubuntu    4096  2월  7 11:00 test
drwxrwxr-x   6 ubuntu ubuntu    4096  2월  7 11:00 scripts
drwxrwxr-x   5 ubuntu ubuntu    4096  2월  7 11:00 post
drwxrwxr-x   4 ubuntu ubuntu    4096  2월  7 11:00 examples
drwxrwxr-x  19 ubuntu ubuntu    4096  2월  7 11:00 doc
drwxrwxr-x   2 ubuntu ubuntu   73728  2월  7 11:00 configs
-rw-rw-r--   1 ubuntu ubuntu    2180  2월  7 11:00 config.mk
drwxrwxr-x 189 ubuntu ubuntu    4096  2월  7 11:00 board
drwxrwxr-x  14 ubuntu ubuntu    4096  2월  7 11:00 arch
-rw-rw-r--   1 ubuntu ubuntu   93584  2월  7 11:00 README
drwxrwxr-x   2 ubuntu ubuntu    4096  2월  7 11:00 api
-rw-rw-r--   1 ubuntu ubuntu     783  2월  7 11:00 Kbuild
-rw-rw-r--   1 ubuntu ubuntu   24970  2월  7 11:00 Kconfig
drwxrwxr-x   2 ubuntu ubuntu    4096  2월  7 11:00 Licenses
-rw-rw-r--   1 ubuntu ubuntu   45139  2월  7 11:00 MAINTAINERS
-rw-rw-r--   1 ubuntu ubuntu   82857  2월  7 11:00 Makefile

ls -lt 를 쳐보면 

 

이제 이 binary 파일을 target 보드에 write 하면 되는거임

 


 

정석으로 하려면 라즈베리파이의 sd카드를 빼서 ubuntu에 연결 후

df로 파티션 확인 후

sd 카드에 직접 u-boot.bin를 cp해주면 됨.

cp ub-boot.bin /media/ubuntu/bootfs/

vi /media/ubuntu/bootfs/config.txt

---------

kernel=u-boot.bin

---------

 

라즈베리파이에 다시 sd카드 삽입하고 부팅하면, 빌드 시간이 확인가능해야함. 


위의 과정을 nfs로 대체하겠다.

 

 

ubuntu@ubuntu8:~/pi_bsp/u-boot$ cp u-boot.bin /srv/nfs/

pi@pi08:/mnt/ubuntu_nfs$ ls
a.txt  main  u-boot.bin

참 쉽죠?

 

라즈베리파이에 기존에 부트로더가 없기 때문에 그냥 복사

 

pi@pi08:/mnt/ubuntu_nfs$ sudo cp u-boot.bin /boot/.


pi@pi08:/boot$ ls
cmdline.txt                    issue.txt
config-6.1.0-rpi7-rpi-v6       overlays
config-6.1.0-rpi7-rpi-v7       System.map-6.1.0-rpi7-rpi-v6
config-6.1.0-rpi7-rpi-v7l      System.map-6.1.0-rpi7-rpi-v7
config-6.1.0-rpi7-rpi-v8       System.map-6.1.0-rpi7-rpi-v7l
config.txt                     System.map-6.1.0-rpi7-rpi-v8
firmware                       u-boot.bin
initrd.img-6.1.0-rpi7-rpi-v6   vmlinuz-6.1.0-rpi7-rpi-v6
initrd.img-6.1.0-rpi7-rpi-v7   vmlinuz-6.1.0-rpi7-rpi-v7
initrd.img-6.1.0-rpi7-rpi-v7l  vmlinuz-6.1.0-rpi7-rpi-v7l
initrd.img-6.1.0-rpi7-rpi-v8   vmlinuz-6.1.0-rpi7-rpi-v8

여기에 config.txt없으면 안되유~ /boot/firmware안에 들어가 있는 경우도 있음.
pi@pi08:/boot$ ls -l config.txt
lrwxrwxrwx 1 root root 19 Dec  5 10:07 config.txt -> firmware/config.txt
symbolic link 파일이라고 부르는데 링크된 파일을 수정하면 원본 파일도 수정됨. 같은 파일인데 링크되어 있는 느낌.


symbolic link가 안되어 있다면 firmware안에 들어가서 config.txt를 수정해주면 되겠다.

 

 

pi@pi08:/boot$ sudo vi config.txt

G로 제일 아래로 내려가서

kernel=u-boot.bin

추가

 

이렇게 하면 안됨

그래서 u-boot.bin 파일을 firmware안으로 옮겨 줘야함

mv u-boot.bin ./firmware

하고 reboot하면 

 

 

 

 

 

요렇게 나옴

 

이러면 bootcmd가 이상한 것으로 세팅되어 있기 때문에 커널에 진입을 못함.

printenv로 환경변수값 살펴보면

U-Boot> printenv
arch=arm
baudrate=115200
board=rpi
board_name=4 Model B
board_rev=0x11
board_rev_scheme=1
board_revision=0xB03112
boot_targets=mmc usb pxe dhcp
bootcmd=bootflow scan
bootdelay=2
bootp_arch=a
bootp_vci=PXEClient:Arch:0000a:UNDI:003000
cpu=armv7
dfu_alt_info=u-boot.bin fat 0 1;uboot.env fat 0 1; config.txt fat 0 1;zImage fat 0 1
dhcpuboot=usb start; dhcp u-boot.uimg; bootm
dnsip=8.8.8.8
ethact=ethernet@7d580000
ethaddr=dc:a6:32:7a:e0:54
fdt_addr=2e088600
fdt_addr_r=0x02600000
fdt_high=ffffffff
fdtcontroladdr=3af52460
fdtfile=bcm2711-rpi-4-b.dtb
gatewayip=10.10.15.254
initrd_high=ffffffff
ipaddr=10.10.15.210
kernel_addr_r=0x00080000
loadaddr=0x1000000
netmask=255.255.255.0
preboot=pci enum; usb start;
pxefile_addr_r=0x02500000
ramdisk_addr_r=0x02700000
scriptaddr=0x02400000
serial#=100000009fa2af8b
soc=bcm283x
stderr=serial,vidconsole
stdin=serial,usbkbd
stdout=serial,vidconsole
usbethaddr=dc:a6:32:7a:e0:54
vendor=raspberrypi

Environment size: 938/16380 bytes

 

printenv bootcmd를 치면 

U-Boot> printenv bootcmd                                        
bootcmd=bootflow scan

이렇게 나옴

이걸 바꿔줘야됨.

 

 

U-Boot>setenv bootargs 8250.nr_uarts=1 console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait rw

//bootcmd 확인
U-Boot> printenv bootargs                                                       
bootargs=8250.nr_uarts=1 console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait rw

- user_mmc_boot U-boot 부팅 스프립트 작성
U-Boot> setenv bootcmd 'run user_mmc_boot'
U-Boot> setenv user_mmc_boot 'mmc dev 0; fatload mmc 0:1 ${kernel_addr_r} kernel7l.img; fatload mmc 0:1 ${fdt_addr_r} bcm2711-rpi-4-b.dtb; bootz ${kernel_addr_r} - ${fdt_addr_r} '
U-Boot> saveenv		//환경변수 저장
U-Boot> reset			//재부팅

mmc가 fat file system을 쓰는데 fat을 load하는 부분이 있는거고 kernel img를 커널이 적재될 주소에 적재시켜주는거임.

mmc 0:1이 boot 영역 

kernel 주소를 printenv로 찍어보면 실제로 나옴.

U-Boot> printenv ${kernel_addr_r}
## Error: "0x00080000" not defined

 

하고나면 3초동안 키 입력을 받으면 U-Boot으로 들어가고 입력이 없으면 정상적으로 kernel이 실행되고 booting이 성공하는 것을 볼 수 있음.

 

 

 

 

 

 

 

 

반응형