ラズパイにBuildrootをインストールする
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
* ラズパイにBuildrootをインストールする [#z50b399f]
組み込み用途のLinux環境を構築する際に利用される [[Buildro...
参考:[[The Buildroot user manual:https://buildroot.org/d...
** ダウンロード [#deabcda1]
開発に必要なパッケージ群の追加
$ sudo apt install build-essential unzip rsync bc libncu...
Buildroot のダウンロード
$ wget https://buildroot.org/downloads/buildroot-2021.02...
展開
$ tar jxvf buildroot-2021.02.8.tar.bz2
$ cd buildroot-2021.02.8
** ビルド [#cd31a670]
まずは、できることの確認
$ make help
Cleaning:
clean - delete all files created by b...
distclean - delete all non-source files (...
Build:
all - make world
toolchain - build toolchain
sdk - build relocatable SDK
Configuration:
menuconfig - interactive curses-based conf...
nconfig - interactive ncurses-based con...
xconfig - interactive Qt-based configur...
gconfig - interactive GTK-based configu...
oldconfig - resolve any unresolved symbol...
syncconfig - Same as oldconfig, but quietl...
olddefconfig - Same as syncconfig but sets n...
randconfig - New config with random answer...
defconfig - New config with default answe...
BR2_DEFCONFIG, if set on th...
savedefconfig - Save current config to BR2_DE...
update-defconfig - Same as savedefconfig
allyesconfig - New config where all options ...
allnoconfig - New config where all options ...
alldefconfig - New config where all options ...
randpackageconfig - New config with random answer...
allyespackageconfig - New config where pkg options ...
allnopackageconfig - New config where package opti...
Package-specific:
<pkg> - Build and install <pkg> and a...
<pkg>-source - Only download the source file...
<pkg>-extract - Extract <pkg> sources
<pkg>-patch - Apply patches to <pkg>
<pkg>-depends - Build <pkg>'s dependencies
<pkg>-configure - Build <pkg> up to the configu...
<pkg>-build - Build <pkg> up to the build s...
<pkg>-show-info - generate info about <pkg>, as...
<pkg>-show-depends - List packages on which <pkg> ...
<pkg>-show-rdepends - List packages which have <pkg...
<pkg>-show-recursive-depends
- Recursively list packages on ...
<pkg>-show-recursive-rdepends
- Recursively list packages whi...
<pkg>-graph-depends - Generate a graph of <pkg>'s d...
<pkg>-graph-rdepends - Generate a graph of <pkg>'s r...
<pkg>-dirclean - Remove <pkg> build directory
<pkg>-reconfigure - Restart the build from the co...
<pkg>-rebuild - Restart the build from the bu...
<pkg>-reinstall - Restart the build from the in...
Documentation:
manual - build manual in all formats
manual-html - build manual in HTML
manual-split-html - build manual in split HTML
manual-pdf - build manual in PDF
manual-text - build manual in text
manual-epub - build manual in ePub
graph-build - generate graphs of the build ...
graph-depends - generate graph of the depende...
graph-size - generate stats of the filesys...
list-defconfigs - list all defconfigs (pre-conf...
Miscellaneous:
source - download all sources needed f...
external-deps - list external packages used
legal-info - generate info about license c...
show-info - generate info about packages,...
pkg-stats - generate info about packages ...
printvars - dump internal variables selec...
make V=0|1 - 0 => quiet build (default), 1...
make O=dir - Locate all output files in "d...
For further details, see README, generate the Buildroot ...
it on-line at http://buildroot.org/docs.html
ビルド対象の確認
$ make list-defconfigs | grep raspberry
raspberrypi0_defconfig - Build for raspbe...
raspberrypi0w_defconfig - Build for raspbe...
raspberrypi2_defconfig - Build for raspbe...
raspberrypi3_64_defconfig - Build for raspbe...
raspberrypi3_defconfig - Build for raspbe...
raspberrypi3_qt5we_defconfig - Build for raspbe...
raspberrypi4_64_defconfig - Build for raspbe...
raspberrypi4_defconfig - Build for raspbe...
raspberrypi_defconfig - Build for raspbe...
今回は、 Raspberry Pi 3B+ なので
$ make raspberrypi3_defconfig
*** カスタマイズ [#y0ebdaed]
今回は、SSHログインを使用したいので、sshサーバの省メモリ...
$ make menuconfig
Target packages --->
Networking applications --->
[*] dropbear
説明文
BR2_PACKAGE_DROPBEAR:
a small ssh 2 server designed for small memory environme...
Note that dropbear requires a per-device unique host key...
key will be generated when dropbear starts, but it is not
persistent over reboot (if you have a read-only rootfs) or
upgrade (if you have a read-write rootfs). To make the key
persistent, replace /etc/dropbear with a symlink to a
directory on a persistent, writeable filesystem.
Alternatively, mount a persistent unionfs over your root
filesystem.
https://matt.ucc.asn.au/dropbear/dropbear.html
ログインが root になるので、パスワードの設定
System configuration --->
[*] Enable root login with password
(rPi3pAss) Root password
あまり、捻りはないがパスワードは「rPi3pAss」としてビルド
$ make all
下記のようなメッセージが出力されればビルド完了
INFO: hdimage(sdcard.img): adding partition 'boot' (in M...
INFO: hdimage(sdcard.img): adding partition 'rootfs' (in...
INFO: hdimage(sdcard.img): writing MBR
速いマシンなら数十分の作業。
ちなみに~
~
カーネルの構成を修正するなら
$ make linux-menuconfig
busyboxの構成を修正するなら
$ make busybox-menuconfig
** SDへの書き込み [#m2249ff9]
生成された SDイメージは output/images/sdcard.img~
今回は 153Mバイトほど
$ ls -lh output/images/sdcard.img
-rw-r--r-- 1 developer developer 153M 1月 14 07:43 outp...
SDへの書き込み
$ sudo dd bs=4M if=output/images/sdcard.img of=/dev/sdb ...
$ sync
** 起動 [#cde7d399]
# dmesg
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.10.1-v7 (developer@debian...
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision ...
[ 0.000000] CPU: div instructions available: patching...
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, ...
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Mo...
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created CMA memory pool ...
[ 0.000000] OF: reserved mem: initialized node linux,...
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x0000...
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000...
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000...
[ 0.000000] On node 0 totalpages: 236544
[ 0.000000] DMA zone: 2079 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 236544 pages, LIFO batch:63
[ 0.000000] percpu: Embedded 20 pages/cpu s50572 r819...
[ 0.000000] pcpu-alloc: s50572 r8192 d23156 u81920 al...
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists, mobility grouping on. ...
[ 0.000000] Kernel command line: coherent_pool=1M 825...
[ 0.000000] Dentry cache hash table entries: 131072 (...
[ 0.000000] Inode-cache hash table entries: 65536 (or...
[ 0.000000] mem auto-init: stack:off, heap alloc:off,...
[ 0.000000] Memory: 854448K/946176K available (10240K...
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0...
[ 0.000000] ftrace: allocating 31783 entries in 63 pa...
[ 0.000000] ftrace: allocated 63 pages with 6 groups
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] Rude variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-en...
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated ir...
[ 0.000000] random: get_random_bytes called from star...
[ 0.000000] arch_timer: cp15 timer(s) running at 19.2...
[ 0.000000] clocksource: arch_sys_counter: mask: 0xff...
[ 0.000008] sched_clock: 56 bits at 19MHz, resolution...
[ 0.000024] Switching to timer-based delay loop, reso...
[ 0.000309] Console: colour dummy device 80x30
[ 0.001102] printk: console [tty1] enabled
[ 0.001173] Calibrating delay loop (skipped), value c...
[ 0.001232] pid_max: default: 32768 minimum: 301
[ 0.001454] LSM: Security Framework initializing
[ 0.001711] Mount-cache hash table entries: 2048 (ord...
[ 0.001762] Mountpoint-cache hash table entries: 2048...
[ 0.003320] Disabling memory control group subsystem
[ 0.003459] CPU: Testing write buffer coherency: ok
[ 0.003960] CPU0: thread -1, cpu 0, socket 0, mpidr 8...
[ 0.004957] Setting up static identity map for 0x1000...
[ 0.005183] rcu: Hierarchical SRCU implementation.
[ 0.006110] smp: Bringing up secondary CPUs ...
[ 0.007281] CPU1: thread -1, cpu 1, socket 0, mpidr 8...
[ 0.008564] CPU2: thread -1, cpu 2, socket 0, mpidr 8...
[ 0.009771] CPU3: thread -1, cpu 3, socket 0, mpidr 8...
[ 0.010012] smp: Brought up 1 node, 4 CPUs
[ 0.010045] SMP: Total of 4 processors activated (153...
[ 0.010077] CPU: All CPU(s) started in HYP mode.
[ 0.010105] CPU: Virtualization extensions available.
[ 0.011073] devtmpfs: initialized
[ 0.028439] VFP support v0.3: implementor 41 architec...
[ 0.029061] clocksource: jiffies: mask: 0xffffffff ma...
[ 0.029123] futex hash table entries: 1024 (order: 4,...
[ 0.032377] pinctrl core: initialized pinctrl subsystem
[ 0.033589] NET: Registered protocol family 16
[ 0.037616] DMA: preallocated 1024 KiB pool for atomi...
[ 0.043411] audit: initializing netlink subsys (disab...
[ 0.043752] audit: type=2000 audit(0.040:1): state=in...
[ 0.044335] thermal_sys: Registered thermal governor ...
[ 0.045227] hw-breakpoint: found 5 (+1 reserved) brea...
[ 0.045290] hw-breakpoint: maximum watchpoint size is...
[ 0.045578] Serial: AMBA PL011 UART driver
[ 0.064389] bcm2835-mbox 3f00b880.mailbox: mailbox en...
[ 0.080162] raspberrypi-firmware soc:firmware: Attach...
[ 0.090174] raspberrypi-firmware soc:firmware: Firmwa...
[ 0.139488] bcm2835-dma 3f007000.dma: DMA legacy API ...
[ 0.142058] SCSI subsystem initialized
[ 0.142330] usbcore: registered new interface driver ...
[ 0.142430] usbcore: registered new interface driver ...
[ 0.142577] usbcore: registered new device driver usb
[ 0.144451] clocksource: Switched to clocksource arch...
[ 1.753351] VFS: Disk quotas dquot_6.6.0
[ 1.753494] VFS: Dquot-cache hash table entries: 1024...
[ 1.753728] FS-Cache: Loaded
[ 1.754014] CacheFiles: Loaded
[ 1.765256] NET: Registered protocol family 2
[ 1.766200] tcp_listen_portaddr_hash hash table entri...
[ 1.766288] TCP established hash table entries: 8192 ...
[ 1.766439] TCP bind hash table entries: 8192 (order:...
[ 1.766653] TCP: Hash tables configured (established ...
[ 1.766839] UDP hash table entries: 512 (order: 2, 16...
[ 1.766918] UDP-Lite hash table entries: 512 (order: ...
[ 1.767381] NET: Registered protocol family 1
[ 1.768253] RPC: Registered named UNIX socket transpo...
[ 1.768288] RPC: Registered udp transport module.
[ 1.768317] RPC: Registered tcp transport module.
[ 1.768347] RPC: Registered tcp NFSv4.1 backchannel t...
[ 1.769922] hw perfevents: enabled with armv7_cortex_...
[ 1.773719] Initialise system trusted keyrings
[ 1.774000] workingset: timestamp_bits=14 max_order=1...
[ 1.783668] zbud: loaded
[ 1.785813] FS-Cache: Netfs 'nfs' registered for cach...
[ 1.786729] NFS: Registering the id_resolver key type
[ 1.786798] Key type id_resolver registered
[ 1.786828] Key type id_legacy registered
[ 1.787003] nfs4filelayout_init: NFSv4 File Layout Dr...
[ 1.788182] Key type asymmetric registered
[ 1.788216] Asymmetric key parser 'x509' registered
[ 1.788291] Block layer SCSI generic (bsg) driver ver...
[ 1.788332] io scheduler mq-deadline registered
[ 1.788363] io scheduler kyber registered
[ 1.791785] bcm2708_fb soc:fb: FB found 1 display(s)
[ 1.805404] Console: switching to colour frame buffer...
[ 1.813987] bcm2708_fb soc:fb: Registered framebuffer...
[ 1.820476] Serial: 8250/16550 driver, 1 ports, IRQ s...
[ 1.826272] bcm2835-rng 3f104000.rng: hwrng registered
[ 1.829629] vc-mem: phys_addr:0x00000000 mem_base=0x3...
[ 1.836604] gpiomem-bcm2835 3f200000.gpiomem: Initial...
[ 1.853196] brd: module loaded
[ 1.868546] loop: module loaded
[ 1.873204] Loading iSCSI transport class v2.0-870.
[ 1.878072] libphy: Fixed MDIO Bus: probed
[ 1.881448] usbcore: registered new interface driver ...
[ 1.884747] usbcore: registered new interface driver ...
[ 1.887780] dwc_otg: version 3.00a 10-AUG-2012 (platf...
[ 2.619055] Core Release: 2.80a
[ 2.622060] Setting default values for core params
[ 2.625178] Finished setting default values for core ...
[ 2.828629] Using Buffer DMA mode
[ 2.831622] Periodic Transfer Interrupt Enhancement -...
[ 2.834714] Multiprocessor Interrupt Enhancement - di...
[ 2.837764] OTG VER PARAM: 0, OTG VER FLAG: 0
[ 2.840740] Dedicated Tx FIFOs mode
[ 2.844264]
[ 2.844285] WARN::dwc_otg_hcd_init:1072: FIQ DMA boun...
[ 2.853262] FIQ FSM acceleration enabled for :
[ 2.853262] Non-periodic Split Transactions
[ 2.853262] Periodic Split Transactions
[ 2.853262] High-Speed Isochronous Endpoints
[ 2.853262] Interrupt/Control Split Transaction hack ...
[ 2.867510] dwc_otg: Microframe scheduler enabled
[ 2.867581]
[ 2.867591] WARN::hcd_init_fiq:457: FIQ on core 1
[ 2.872715]
[ 2.872725] WARN::hcd_init_fiq:458: FIQ ASM at 807cb6...
[ 2.877899]
[ 2.877908] WARN::hcd_init_fiq:496: MPHI regs_base at...
[ 2.883178] dwc_otg 3f980000.usb: DWC OTG Controller
[ 2.885977] dwc_otg 3f980000.usb: new USB bus registe...
[ 2.888816] dwc_otg 3f980000.usb: irq 89, io mem 0x00...
[ 2.891597] Init: Port Power? op_state=1
[ 2.894315] Init: Power Port (0)
[ 2.897347] usb usb1: New USB device found, idVendor=...
[ 2.902849] usb usb1: New USB device strings: Mfr=3, ...
[ 2.905786] usb usb1: Product: DWC OTG Controller
[ 2.908665] usb usb1: Manufacturer: Linux 5.10.1-v7 d...
[ 2.911586] usb usb1: SerialNumber: 3f980000.usb
[ 2.915287] hub 1-0:1.0: USB hub found
[ 2.918188] hub 1-0:1.0: 1 port detected
[ 2.921933] dwc_otg: FIQ enabled
[ 2.921946] dwc_otg: NAK holdoff enabled
[ 2.921958] dwc_otg: FIQ split-transaction FSM enabled
[ 2.921976] Module dwc_common_port init
[ 2.922329] usbcore: registered new interface driver ...
[ 2.925354] mousedev: PS/2 mouse device common for al...
[ 2.929355] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835...
[ 2.935223] sdhci: Secure Digital Host Controller Int...
[ 2.938171] sdhci: Copyright(c) Pierre Ossman
[ 2.941677] mmc-bcm2835 3f300000.mmcnr: could not get...
[ 2.945391] sdhost-bcm2835 3f202000.mmc: could not ge...
[ 2.948666] sdhci-pltfm: SDHCI platform and OF driver...
[ 2.953491] ledtrig-cpu: registered to indicate activ...
[ 2.957065] hid: raw HID events driver (C) Jiri Kosina
[ 2.960283] usbcore: registered new interface driver ...
[ 2.963345] usbhid: USB HID core driver
[ 2.970863] Initializing XFRM netlink socket
[ 2.973925] NET: Registered protocol family 17
[ 2.977089] Key type dns_resolver registered
[ 2.980555] Registering SWP/SWPB emulation handler
[ 2.983691] registered taskstats version 1
[ 2.986627] Loading compiled-in X.509 certificates
[ 2.990319] Key type ._fscrypt registered
[ 2.993055] Key type .fscrypt registered
[ 2.995740] Key type fscrypt-provisioning registered
[ 3.009455] uart-pl011 3f201000.serial: there is not ...
[ 3.012477] uart-pl011 3f201000.serial: cts_event_wor...
[ 3.015406] 3f201000.serial: ttyAMA0 at MMIO 0x3f2010...
[ 4.058186] printk: console [ttyAMA0] enabled
[ 4.068600] 3f215040.serial: ttyS0 at MMIO 0x3f215040...
[ 4.084388] bcm2835-power bcm2835-power: Broadcom BCM...
[ 4.096483] mmc-bcm2835 3f300000.mmcnr: mmc_debug:0 m...
[ 4.105605] mmc-bcm2835 3f300000.mmcnr: DMA channel a...
[ 4.141114] sdhost: log_buf @ (ptrval) (f5d13000)
[ 4.186553] mmc1: queuing unknown CIS tuple 0x80 (2 b...
[ 4.195085] mmc0: sdhost-bcm2835 loaded - DMA enabled...
[ 4.206576] of_cfs_init
[ 4.212054] of_cfs_init: OK
[ 4.218744] uart-pl011 3f201000.serial: no DMA platfo...
[ 4.224644] Indeed it is in host mode hprt0 = 00021501
[ 4.232848] Waiting for root device /dev/mmcblk0p2...
[ 4.295414] mmc1: queuing unknown CIS tuple 0x80 (3 b...
[ 4.305529] mmc1: queuing unknown CIS tuple 0x80 (3 b...
[ 4.314152] random: fast init done
[ 4.325528] mmc1: queuing unknown CIS tuple 0x80 (7 b...
[ 4.355987] mmc0: host does not support reading read-...
[ 4.370469] mmc0: new high speed SD card at address b...
[ 4.379988] mmcblk0: mmc0:b368 UD 1.90 GiB
[ 4.390597] mmcblk0: p1 p2
[ 4.434385] EXT4-fs (mmcblk0p2): mounted filesystem w...
[ 4.439277] mmc1: new high speed SDIO card at address...
[ 4.448551] VFS: Mounted root (ext4 filesystem) reado...
[ 4.457116] usb 1-1: new high-speed USB device number...
[ 4.467726] devtmpfs: mounted
[ 4.477204] Indeed it is in host mode hprt0 = 00001101
[ 4.552351] Freeing unused kernel memory: 1024K
[ 4.560263] Run /sbin/init as init process
[ 4.567226] with arguments:
[ 4.567238] /sbin/init
[ 4.567249] with environment:
[ 4.567260] HOME=/
[ 4.567271] TERM=linux
[ 4.734834] usb 1-1: New USB device found, idVendor=0...
[ 4.749031] usb 1-1: New USB device strings: Mfr=0, P...
[ 4.760155] hub 1-1:1.0: USB hub found
[ 4.767193] hub 1-1:1.0: 4 ports detected
[ 4.917586] EXT4-fs (mmcblk0p2): re-mounted. Opts: (n...
[ 5.051218] random: dd: uninitialized urandom read (5...
[ 5.094559] usb 1-1.1: new high-speed USB device numb...
[ 5.244886] usb 1-1.1: New USB device found, idVendor...
[ 5.259975] usb 1-1.1: New USB device strings: Mfr=0,...
[ 5.271952] hub 1-1.1:1.0: USB hub found
[ 5.279415] hub 1-1.1:1.0: 3 ports detected
[ 5.362424] NET: Registered protocol family 10
[ 5.371657] Segment Routing with IPv6
[ 5.639903] dwc_otg_handle_wakeup_detected_intr lxsta...
[ 6.074502] usb 1-1.1.1: new high-speed USB device nu...
[ 6.214999] usb 1-1.1.1: New USB device found, idVend...
[ 6.230009] usb 1-1.1.1: New USB device strings: Mfr=...
[ 6.506353] lan78xx 1-1.1.1:1.0 (unnamed net_device) ...
[ 6.524743] libphy: lan78xx-mdiobus: probed
[ 6.641518] lan78xx 1-1.1.1:1.0 (unnamed net_device) ...
[ 7.475452] random: mktemp: uninitialized urandom rea...
[ 8.462388] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link...
[ 10.902837] random: mktemp: uninitialized urandom rea...
[ 24.259146] random: crng init done
#
** 終了(電源OFF) [#vfbf3e29]
電源を切る前は忘れずに
# poweroff
※Raspberry PiはRaspberry Pi財団の登録商標です。
#htmlinsert(rpi3b+.html);
終了行:
* ラズパイにBuildrootをインストールする [#z50b399f]
組み込み用途のLinux環境を構築する際に利用される [[Buildro...
参考:[[The Buildroot user manual:https://buildroot.org/d...
** ダウンロード [#deabcda1]
開発に必要なパッケージ群の追加
$ sudo apt install build-essential unzip rsync bc libncu...
Buildroot のダウンロード
$ wget https://buildroot.org/downloads/buildroot-2021.02...
展開
$ tar jxvf buildroot-2021.02.8.tar.bz2
$ cd buildroot-2021.02.8
** ビルド [#cd31a670]
まずは、できることの確認
$ make help
Cleaning:
clean - delete all files created by b...
distclean - delete all non-source files (...
Build:
all - make world
toolchain - build toolchain
sdk - build relocatable SDK
Configuration:
menuconfig - interactive curses-based conf...
nconfig - interactive ncurses-based con...
xconfig - interactive Qt-based configur...
gconfig - interactive GTK-based configu...
oldconfig - resolve any unresolved symbol...
syncconfig - Same as oldconfig, but quietl...
olddefconfig - Same as syncconfig but sets n...
randconfig - New config with random answer...
defconfig - New config with default answe...
BR2_DEFCONFIG, if set on th...
savedefconfig - Save current config to BR2_DE...
update-defconfig - Same as savedefconfig
allyesconfig - New config where all options ...
allnoconfig - New config where all options ...
alldefconfig - New config where all options ...
randpackageconfig - New config with random answer...
allyespackageconfig - New config where pkg options ...
allnopackageconfig - New config where package opti...
Package-specific:
<pkg> - Build and install <pkg> and a...
<pkg>-source - Only download the source file...
<pkg>-extract - Extract <pkg> sources
<pkg>-patch - Apply patches to <pkg>
<pkg>-depends - Build <pkg>'s dependencies
<pkg>-configure - Build <pkg> up to the configu...
<pkg>-build - Build <pkg> up to the build s...
<pkg>-show-info - generate info about <pkg>, as...
<pkg>-show-depends - List packages on which <pkg> ...
<pkg>-show-rdepends - List packages which have <pkg...
<pkg>-show-recursive-depends
- Recursively list packages on ...
<pkg>-show-recursive-rdepends
- Recursively list packages whi...
<pkg>-graph-depends - Generate a graph of <pkg>'s d...
<pkg>-graph-rdepends - Generate a graph of <pkg>'s r...
<pkg>-dirclean - Remove <pkg> build directory
<pkg>-reconfigure - Restart the build from the co...
<pkg>-rebuild - Restart the build from the bu...
<pkg>-reinstall - Restart the build from the in...
Documentation:
manual - build manual in all formats
manual-html - build manual in HTML
manual-split-html - build manual in split HTML
manual-pdf - build manual in PDF
manual-text - build manual in text
manual-epub - build manual in ePub
graph-build - generate graphs of the build ...
graph-depends - generate graph of the depende...
graph-size - generate stats of the filesys...
list-defconfigs - list all defconfigs (pre-conf...
Miscellaneous:
source - download all sources needed f...
external-deps - list external packages used
legal-info - generate info about license c...
show-info - generate info about packages,...
pkg-stats - generate info about packages ...
printvars - dump internal variables selec...
make V=0|1 - 0 => quiet build (default), 1...
make O=dir - Locate all output files in "d...
For further details, see README, generate the Buildroot ...
it on-line at http://buildroot.org/docs.html
ビルド対象の確認
$ make list-defconfigs | grep raspberry
raspberrypi0_defconfig - Build for raspbe...
raspberrypi0w_defconfig - Build for raspbe...
raspberrypi2_defconfig - Build for raspbe...
raspberrypi3_64_defconfig - Build for raspbe...
raspberrypi3_defconfig - Build for raspbe...
raspberrypi3_qt5we_defconfig - Build for raspbe...
raspberrypi4_64_defconfig - Build for raspbe...
raspberrypi4_defconfig - Build for raspbe...
raspberrypi_defconfig - Build for raspbe...
今回は、 Raspberry Pi 3B+ なので
$ make raspberrypi3_defconfig
*** カスタマイズ [#y0ebdaed]
今回は、SSHログインを使用したいので、sshサーバの省メモリ...
$ make menuconfig
Target packages --->
Networking applications --->
[*] dropbear
説明文
BR2_PACKAGE_DROPBEAR:
a small ssh 2 server designed for small memory environme...
Note that dropbear requires a per-device unique host key...
key will be generated when dropbear starts, but it is not
persistent over reboot (if you have a read-only rootfs) or
upgrade (if you have a read-write rootfs). To make the key
persistent, replace /etc/dropbear with a symlink to a
directory on a persistent, writeable filesystem.
Alternatively, mount a persistent unionfs over your root
filesystem.
https://matt.ucc.asn.au/dropbear/dropbear.html
ログインが root になるので、パスワードの設定
System configuration --->
[*] Enable root login with password
(rPi3pAss) Root password
あまり、捻りはないがパスワードは「rPi3pAss」としてビルド
$ make all
下記のようなメッセージが出力されればビルド完了
INFO: hdimage(sdcard.img): adding partition 'boot' (in M...
INFO: hdimage(sdcard.img): adding partition 'rootfs' (in...
INFO: hdimage(sdcard.img): writing MBR
速いマシンなら数十分の作業。
ちなみに~
~
カーネルの構成を修正するなら
$ make linux-menuconfig
busyboxの構成を修正するなら
$ make busybox-menuconfig
** SDへの書き込み [#m2249ff9]
生成された SDイメージは output/images/sdcard.img~
今回は 153Mバイトほど
$ ls -lh output/images/sdcard.img
-rw-r--r-- 1 developer developer 153M 1月 14 07:43 outp...
SDへの書き込み
$ sudo dd bs=4M if=output/images/sdcard.img of=/dev/sdb ...
$ sync
** 起動 [#cde7d399]
# dmesg
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.10.1-v7 (developer@debian...
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision ...
[ 0.000000] CPU: div instructions available: patching...
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, ...
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Mo...
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created CMA memory pool ...
[ 0.000000] OF: reserved mem: initialized node linux,...
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x0000...
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000...
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000...
[ 0.000000] On node 0 totalpages: 236544
[ 0.000000] DMA zone: 2079 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 236544 pages, LIFO batch:63
[ 0.000000] percpu: Embedded 20 pages/cpu s50572 r819...
[ 0.000000] pcpu-alloc: s50572 r8192 d23156 u81920 al...
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists, mobility grouping on. ...
[ 0.000000] Kernel command line: coherent_pool=1M 825...
[ 0.000000] Dentry cache hash table entries: 131072 (...
[ 0.000000] Inode-cache hash table entries: 65536 (or...
[ 0.000000] mem auto-init: stack:off, heap alloc:off,...
[ 0.000000] Memory: 854448K/946176K available (10240K...
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0...
[ 0.000000] ftrace: allocating 31783 entries in 63 pa...
[ 0.000000] ftrace: allocated 63 pages with 6 groups
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] Rude variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-en...
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated ir...
[ 0.000000] random: get_random_bytes called from star...
[ 0.000000] arch_timer: cp15 timer(s) running at 19.2...
[ 0.000000] clocksource: arch_sys_counter: mask: 0xff...
[ 0.000008] sched_clock: 56 bits at 19MHz, resolution...
[ 0.000024] Switching to timer-based delay loop, reso...
[ 0.000309] Console: colour dummy device 80x30
[ 0.001102] printk: console [tty1] enabled
[ 0.001173] Calibrating delay loop (skipped), value c...
[ 0.001232] pid_max: default: 32768 minimum: 301
[ 0.001454] LSM: Security Framework initializing
[ 0.001711] Mount-cache hash table entries: 2048 (ord...
[ 0.001762] Mountpoint-cache hash table entries: 2048...
[ 0.003320] Disabling memory control group subsystem
[ 0.003459] CPU: Testing write buffer coherency: ok
[ 0.003960] CPU0: thread -1, cpu 0, socket 0, mpidr 8...
[ 0.004957] Setting up static identity map for 0x1000...
[ 0.005183] rcu: Hierarchical SRCU implementation.
[ 0.006110] smp: Bringing up secondary CPUs ...
[ 0.007281] CPU1: thread -1, cpu 1, socket 0, mpidr 8...
[ 0.008564] CPU2: thread -1, cpu 2, socket 0, mpidr 8...
[ 0.009771] CPU3: thread -1, cpu 3, socket 0, mpidr 8...
[ 0.010012] smp: Brought up 1 node, 4 CPUs
[ 0.010045] SMP: Total of 4 processors activated (153...
[ 0.010077] CPU: All CPU(s) started in HYP mode.
[ 0.010105] CPU: Virtualization extensions available.
[ 0.011073] devtmpfs: initialized
[ 0.028439] VFP support v0.3: implementor 41 architec...
[ 0.029061] clocksource: jiffies: mask: 0xffffffff ma...
[ 0.029123] futex hash table entries: 1024 (order: 4,...
[ 0.032377] pinctrl core: initialized pinctrl subsystem
[ 0.033589] NET: Registered protocol family 16
[ 0.037616] DMA: preallocated 1024 KiB pool for atomi...
[ 0.043411] audit: initializing netlink subsys (disab...
[ 0.043752] audit: type=2000 audit(0.040:1): state=in...
[ 0.044335] thermal_sys: Registered thermal governor ...
[ 0.045227] hw-breakpoint: found 5 (+1 reserved) brea...
[ 0.045290] hw-breakpoint: maximum watchpoint size is...
[ 0.045578] Serial: AMBA PL011 UART driver
[ 0.064389] bcm2835-mbox 3f00b880.mailbox: mailbox en...
[ 0.080162] raspberrypi-firmware soc:firmware: Attach...
[ 0.090174] raspberrypi-firmware soc:firmware: Firmwa...
[ 0.139488] bcm2835-dma 3f007000.dma: DMA legacy API ...
[ 0.142058] SCSI subsystem initialized
[ 0.142330] usbcore: registered new interface driver ...
[ 0.142430] usbcore: registered new interface driver ...
[ 0.142577] usbcore: registered new device driver usb
[ 0.144451] clocksource: Switched to clocksource arch...
[ 1.753351] VFS: Disk quotas dquot_6.6.0
[ 1.753494] VFS: Dquot-cache hash table entries: 1024...
[ 1.753728] FS-Cache: Loaded
[ 1.754014] CacheFiles: Loaded
[ 1.765256] NET: Registered protocol family 2
[ 1.766200] tcp_listen_portaddr_hash hash table entri...
[ 1.766288] TCP established hash table entries: 8192 ...
[ 1.766439] TCP bind hash table entries: 8192 (order:...
[ 1.766653] TCP: Hash tables configured (established ...
[ 1.766839] UDP hash table entries: 512 (order: 2, 16...
[ 1.766918] UDP-Lite hash table entries: 512 (order: ...
[ 1.767381] NET: Registered protocol family 1
[ 1.768253] RPC: Registered named UNIX socket transpo...
[ 1.768288] RPC: Registered udp transport module.
[ 1.768317] RPC: Registered tcp transport module.
[ 1.768347] RPC: Registered tcp NFSv4.1 backchannel t...
[ 1.769922] hw perfevents: enabled with armv7_cortex_...
[ 1.773719] Initialise system trusted keyrings
[ 1.774000] workingset: timestamp_bits=14 max_order=1...
[ 1.783668] zbud: loaded
[ 1.785813] FS-Cache: Netfs 'nfs' registered for cach...
[ 1.786729] NFS: Registering the id_resolver key type
[ 1.786798] Key type id_resolver registered
[ 1.786828] Key type id_legacy registered
[ 1.787003] nfs4filelayout_init: NFSv4 File Layout Dr...
[ 1.788182] Key type asymmetric registered
[ 1.788216] Asymmetric key parser 'x509' registered
[ 1.788291] Block layer SCSI generic (bsg) driver ver...
[ 1.788332] io scheduler mq-deadline registered
[ 1.788363] io scheduler kyber registered
[ 1.791785] bcm2708_fb soc:fb: FB found 1 display(s)
[ 1.805404] Console: switching to colour frame buffer...
[ 1.813987] bcm2708_fb soc:fb: Registered framebuffer...
[ 1.820476] Serial: 8250/16550 driver, 1 ports, IRQ s...
[ 1.826272] bcm2835-rng 3f104000.rng: hwrng registered
[ 1.829629] vc-mem: phys_addr:0x00000000 mem_base=0x3...
[ 1.836604] gpiomem-bcm2835 3f200000.gpiomem: Initial...
[ 1.853196] brd: module loaded
[ 1.868546] loop: module loaded
[ 1.873204] Loading iSCSI transport class v2.0-870.
[ 1.878072] libphy: Fixed MDIO Bus: probed
[ 1.881448] usbcore: registered new interface driver ...
[ 1.884747] usbcore: registered new interface driver ...
[ 1.887780] dwc_otg: version 3.00a 10-AUG-2012 (platf...
[ 2.619055] Core Release: 2.80a
[ 2.622060] Setting default values for core params
[ 2.625178] Finished setting default values for core ...
[ 2.828629] Using Buffer DMA mode
[ 2.831622] Periodic Transfer Interrupt Enhancement -...
[ 2.834714] Multiprocessor Interrupt Enhancement - di...
[ 2.837764] OTG VER PARAM: 0, OTG VER FLAG: 0
[ 2.840740] Dedicated Tx FIFOs mode
[ 2.844264]
[ 2.844285] WARN::dwc_otg_hcd_init:1072: FIQ DMA boun...
[ 2.853262] FIQ FSM acceleration enabled for :
[ 2.853262] Non-periodic Split Transactions
[ 2.853262] Periodic Split Transactions
[ 2.853262] High-Speed Isochronous Endpoints
[ 2.853262] Interrupt/Control Split Transaction hack ...
[ 2.867510] dwc_otg: Microframe scheduler enabled
[ 2.867581]
[ 2.867591] WARN::hcd_init_fiq:457: FIQ on core 1
[ 2.872715]
[ 2.872725] WARN::hcd_init_fiq:458: FIQ ASM at 807cb6...
[ 2.877899]
[ 2.877908] WARN::hcd_init_fiq:496: MPHI regs_base at...
[ 2.883178] dwc_otg 3f980000.usb: DWC OTG Controller
[ 2.885977] dwc_otg 3f980000.usb: new USB bus registe...
[ 2.888816] dwc_otg 3f980000.usb: irq 89, io mem 0x00...
[ 2.891597] Init: Port Power? op_state=1
[ 2.894315] Init: Power Port (0)
[ 2.897347] usb usb1: New USB device found, idVendor=...
[ 2.902849] usb usb1: New USB device strings: Mfr=3, ...
[ 2.905786] usb usb1: Product: DWC OTG Controller
[ 2.908665] usb usb1: Manufacturer: Linux 5.10.1-v7 d...
[ 2.911586] usb usb1: SerialNumber: 3f980000.usb
[ 2.915287] hub 1-0:1.0: USB hub found
[ 2.918188] hub 1-0:1.0: 1 port detected
[ 2.921933] dwc_otg: FIQ enabled
[ 2.921946] dwc_otg: NAK holdoff enabled
[ 2.921958] dwc_otg: FIQ split-transaction FSM enabled
[ 2.921976] Module dwc_common_port init
[ 2.922329] usbcore: registered new interface driver ...
[ 2.925354] mousedev: PS/2 mouse device common for al...
[ 2.929355] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835...
[ 2.935223] sdhci: Secure Digital Host Controller Int...
[ 2.938171] sdhci: Copyright(c) Pierre Ossman
[ 2.941677] mmc-bcm2835 3f300000.mmcnr: could not get...
[ 2.945391] sdhost-bcm2835 3f202000.mmc: could not ge...
[ 2.948666] sdhci-pltfm: SDHCI platform and OF driver...
[ 2.953491] ledtrig-cpu: registered to indicate activ...
[ 2.957065] hid: raw HID events driver (C) Jiri Kosina
[ 2.960283] usbcore: registered new interface driver ...
[ 2.963345] usbhid: USB HID core driver
[ 2.970863] Initializing XFRM netlink socket
[ 2.973925] NET: Registered protocol family 17
[ 2.977089] Key type dns_resolver registered
[ 2.980555] Registering SWP/SWPB emulation handler
[ 2.983691] registered taskstats version 1
[ 2.986627] Loading compiled-in X.509 certificates
[ 2.990319] Key type ._fscrypt registered
[ 2.993055] Key type .fscrypt registered
[ 2.995740] Key type fscrypt-provisioning registered
[ 3.009455] uart-pl011 3f201000.serial: there is not ...
[ 3.012477] uart-pl011 3f201000.serial: cts_event_wor...
[ 3.015406] 3f201000.serial: ttyAMA0 at MMIO 0x3f2010...
[ 4.058186] printk: console [ttyAMA0] enabled
[ 4.068600] 3f215040.serial: ttyS0 at MMIO 0x3f215040...
[ 4.084388] bcm2835-power bcm2835-power: Broadcom BCM...
[ 4.096483] mmc-bcm2835 3f300000.mmcnr: mmc_debug:0 m...
[ 4.105605] mmc-bcm2835 3f300000.mmcnr: DMA channel a...
[ 4.141114] sdhost: log_buf @ (ptrval) (f5d13000)
[ 4.186553] mmc1: queuing unknown CIS tuple 0x80 (2 b...
[ 4.195085] mmc0: sdhost-bcm2835 loaded - DMA enabled...
[ 4.206576] of_cfs_init
[ 4.212054] of_cfs_init: OK
[ 4.218744] uart-pl011 3f201000.serial: no DMA platfo...
[ 4.224644] Indeed it is in host mode hprt0 = 00021501
[ 4.232848] Waiting for root device /dev/mmcblk0p2...
[ 4.295414] mmc1: queuing unknown CIS tuple 0x80 (3 b...
[ 4.305529] mmc1: queuing unknown CIS tuple 0x80 (3 b...
[ 4.314152] random: fast init done
[ 4.325528] mmc1: queuing unknown CIS tuple 0x80 (7 b...
[ 4.355987] mmc0: host does not support reading read-...
[ 4.370469] mmc0: new high speed SD card at address b...
[ 4.379988] mmcblk0: mmc0:b368 UD 1.90 GiB
[ 4.390597] mmcblk0: p1 p2
[ 4.434385] EXT4-fs (mmcblk0p2): mounted filesystem w...
[ 4.439277] mmc1: new high speed SDIO card at address...
[ 4.448551] VFS: Mounted root (ext4 filesystem) reado...
[ 4.457116] usb 1-1: new high-speed USB device number...
[ 4.467726] devtmpfs: mounted
[ 4.477204] Indeed it is in host mode hprt0 = 00001101
[ 4.552351] Freeing unused kernel memory: 1024K
[ 4.560263] Run /sbin/init as init process
[ 4.567226] with arguments:
[ 4.567238] /sbin/init
[ 4.567249] with environment:
[ 4.567260] HOME=/
[ 4.567271] TERM=linux
[ 4.734834] usb 1-1: New USB device found, idVendor=0...
[ 4.749031] usb 1-1: New USB device strings: Mfr=0, P...
[ 4.760155] hub 1-1:1.0: USB hub found
[ 4.767193] hub 1-1:1.0: 4 ports detected
[ 4.917586] EXT4-fs (mmcblk0p2): re-mounted. Opts: (n...
[ 5.051218] random: dd: uninitialized urandom read (5...
[ 5.094559] usb 1-1.1: new high-speed USB device numb...
[ 5.244886] usb 1-1.1: New USB device found, idVendor...
[ 5.259975] usb 1-1.1: New USB device strings: Mfr=0,...
[ 5.271952] hub 1-1.1:1.0: USB hub found
[ 5.279415] hub 1-1.1:1.0: 3 ports detected
[ 5.362424] NET: Registered protocol family 10
[ 5.371657] Segment Routing with IPv6
[ 5.639903] dwc_otg_handle_wakeup_detected_intr lxsta...
[ 6.074502] usb 1-1.1.1: new high-speed USB device nu...
[ 6.214999] usb 1-1.1.1: New USB device found, idVend...
[ 6.230009] usb 1-1.1.1: New USB device strings: Mfr=...
[ 6.506353] lan78xx 1-1.1.1:1.0 (unnamed net_device) ...
[ 6.524743] libphy: lan78xx-mdiobus: probed
[ 6.641518] lan78xx 1-1.1.1:1.0 (unnamed net_device) ...
[ 7.475452] random: mktemp: uninitialized urandom rea...
[ 8.462388] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link...
[ 10.902837] random: mktemp: uninitialized urandom rea...
[ 24.259146] random: crng init done
#
** 終了(電源OFF) [#vfbf3e29]
電源を切る前は忘れずに
# poweroff
※Raspberry PiはRaspberry Pi財団の登録商標です。
#htmlinsert(rpi3b+.html);
ページ名: