STM32/STM8技术william hill官网
直播中

jyaxz

12年用户 430经验值
擅长:嵌入式技术
私信 关注
[经验]

【STM32MP157A-DK1开发板试用连载】配置新建的操作系统

Linux系统调整
    系统烧录到SD卡后,正常已经可以启动,并且通过串口看到打出来的启动记录了。
U-Boot SPL 2020.04-rc4 (Apr 02 2020 -11:31:41 +0800)
Model: STMicroelectronicsSTM32MP157A-DK1 Discovery Board
RAM: DDR3-1066/888 bin G 1x4Gb 533MHzv1.45
Trying to boot from MMC1
U-Boot 2020.04-rc4 (Apr 02 2020 -11:31:41 +0800)
CPU: STM32MP157AAC Rev.B
Model: STMicroelectronicsSTM32MP157A-DK1 Discovery Board
Board: stm32mp1 in basic mode(st,stm32mp157a-dk1)
Board: MB1272 Var1 Rev.C-01
DRAM: 512 MiB
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
NAND: 0 MiB
MMC:  STM32 SDMMC2: 0
Loading Environment from EXT4... OK
In:   serial
Out:  serial
Err:  serial
****************************************************
*       WARNING 500mA power supply detected      *
*    Current too low, use a 3A power supply!      *
****************************************************
Net:  eth0: ethernet@5800a000
Hit any key to stop autoboot:  0
Boot over mmc0!
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:4...
Found /boot/extlinux/extlinux.conf
Retrieving file:/boot/extlinux/extlinux.conf
125 bytes read in 21 ms (4.9 KiB/s)
1:  stm32mp15-buildroot
Retrieving file: /boot/zImage
3944592 bytes read in 187 ms (20.1MiB/s)
append: root=/dev/mmcblk0p4 rootwait
Retrieving file:/boot/stm32mp157a-dk1.dtb
68262 bytes read in 24 ms (2.7 MiB/s)
## Flattened Device Tree blob atc4000000
  Booting using the fdt blob at 0xc4000000
ERROR: reserving fdt memory regionfailed (addr=dc000000 size=4000000)
  Using Device Tree in place at c4000000, end c4013aa5
Starting kernel ...
[   0.000000] Booting Linux on physical CPU 0x0
[   0.000000] Linux version 4.19.26 (jy@jiyong) (gcc version 8.2.1 20180802(GNU Toolchain for the A-profile Architecture 8.2-2018.11 (arm-rel-8.26))) #1SMP PREEMPT Thu Apr 2 11:37:48 CST 2020
[   0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7),cr=10c5387d
[   0.000000] CPU: div instructions available: patching division code
[   0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasinginstruction cache
[   0.000000] OF: fdt: Machine model: STMicroelectronics STM32MP157A-DK1Discovery Board
[   0.000000] Memory policy: Data cache writealloc
[   0.000000] Reserved memory: created DMA memory pool at 0x10000000, size 0MiB
[   0.000000] OF: reserved mem: initialized node mcuram2@0x10000000,compatible id shared-dma-pool
[   0.000000] Reserved memory: created DMA memory pool at 0x10040000, size 0MiB
[   0.000000] OF: reserved mem: initialized node vdev0vring0@10040000,compatible id shared-dma-pool
[   0.000000] Reserved memory: created DMA memory pool at 0x10042000, size 0MiB
[   0.000000] OF: reserved mem: initialized node vdev0vring1@10042000,compatible id shared-dma-pool
[   0.000000] Reserved memory: created DMA memory pool at 0x10044000, size 0MiB
[   0.000000] OF: reserved mem: initialized node vdev0buffer@10044000,compatible id shared-dma-pool
[   0.000000] Reserved memory: created DMA memory pool at 0x30000000, size 0MiB
[   0.000000] OF: reserved mem: initialized node mcuram@0x30000000,compatible id shared-dma-pool
[   0.000000] Reserved memory: created DMA memory pool at 0x38000000, size 0MiB
[   0.000000] OF: reserved mem: initialized node retram@0x38000000,compatible id shared-dma-pool
[   0.000000] cma: Reserved 128 MiB at 0xd4000000
[   0.000000] psci: probing for conduit method from DT.
[   0.000000] psci: PSCIv1.0 detected in firmware.
[   0.000000] psci: Using standard PSCI v0.2 function IDs
[   0.000000] psci: Trusted OS migration not required
[   0.000000] psci: SMC Calling Convention v1.0
[   0.000000] random: get_random_bytes called from start_kernel+0x9c/0x400with crng_init=0
[   0.000000] percpu: Embedded 15 pages/cpu @(ptrval) s30028 r8192 d23220u61440
[   0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 113792
[   0.000000] Kernel command line: root=/dev/mmcblk0p4 rootwait
[   0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144bytes)
[   0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[   0.000000] Memory: 313440K/458752K available (6144K kernel code, 190Krwdata, 1416K rodata, 1024K init, 165K bss, 14240K reserved, 131072Kcma-reserved, 0K highmem)
[   0.000000] Virtual kernel memory layout:
[   0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4kB)
[   0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[   0.000000]     vmalloc : 0xdc800000- 0xff800000   ( 560 MB)
[   0.000000]     lowmem  : 0xc0000000 - 0xdc000000   ( 448 MB)
[   0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2MB)
[   0.000000]     modules : 0xbf000000- 0xbfe00000   (  14 MB)
[   0.000000]       .text : 0x(ptrval)- 0x(ptrval)   (7136 kB)
[   0.000000]       .init : 0x(ptrval)- 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 191 kB)
[   0.000000]        .bss : 0x(ptrval)- 0x(ptrval)   ( 166 kB)
[   0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[   0.000000] rcu: Preemptible hierarchical RCU implementation.
[   0.000000] rcu:     RCU restrictingCPUs from NR_CPUS=4 to nr_cpu_ids=2.
[   0.000000]  Tasks RCU enabled.
[   0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[   0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[   0.000000] /soc/interrupt-controller@5000d000: bank0
[   0.000000] /soc/interrupt-controller@5000d000: bank1
[   0.000000] /soc/interrupt-controller@5000d000: bank2
[   0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[   0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffffmax_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[   0.000009] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every4398046511097ns
[   0.000026] Switching to timer-based delay loop, resolution 41ns
[   0.001121] Console: colour dummy device 80x30
[   0.002368] console [tty0] enabled
[   0.002419] Calibrating delay loop (skipped), value calculated using timerfrequency.. 48.00 BogoMIPS (lpj=240000)
[   0.002470] pid_max: default: 32768 minimum: 301
[   0.002687] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[   0.002729] Mountpoint-cache hash table entries: 1024 (order: 0, 4096bytes)
[   0.003393] CPU: Testing write buffer coherency: ok
[   0.003830] CPU0: update cpu_capacity 1024
[   0.003871] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[   0.059758] Setting up static identity map for 0xc0100000 - 0xc0100060
[   0.079739] rcu: Hierarchical SRCU implementation.
[   0.119826] smp: Bringing up secondary CPUs ...
[   0.200094] CPU1: update cpu_capacity 1024
[   0.200106] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[   0.200253] smp: Brought up 1 node, 2 CPUs
[   0.200332] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[   0.200359] CPU: All CPU(s) started in SVC mode.
[   0.201330] devtmpfs: initialized
[   0.222711] VFP support v0.3: implementor 41 architecture 2 part 30variant 7 rev 5
[   0.223195] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff,max_idle_ns: 19112604462750000 ns
[   0.223263] futex hash table entries: 512 (order: 3, 32768 bytes)
[   0.228795] pinctrl core: initialized pinctrl subsystem
[   0.229895] NET: Registered protocol family 16
[   0.252217] DMA: preallocated 256 KiB pool for atomic coherent allocations
[   0.255802] stm32-pm-domain pm_domain: domain core-ret-power-domainregistered
[   0.255875] stm32-pm-domain pm_domain: subdomain core-power-domainregistered
[   0.255910] stm32-pm-domain pm_domain: domains probed
[   0.267754] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOA bankadded
[   0.268100] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOB bankadded
[   0.268365] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOC bankadded
[   0.268627] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOD bankadded
[   0.268873] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOE bankadded
[   0.269123] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOF bankadded
[   0.269379] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOG bankadded
[   0.269625] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOH bankadded
[   0.269878] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOI bankadded
[   0.270027] stm32mp157-pinctrl soc:pin-controller@50002000: Pinctrl STM32initialized
[   0.270750] stm32mp157-pinctrl soc:pin-controller-z@54004000: GPIOZ bankadded
[   0.270804] stm32mp157-pinctrl soc:pin-controller-z@54004000: PinctrlSTM32 initialized
[   0.282712] stm32-mdma 58000000.dma: STM32 MDMA driver registered
[   0.284229] u***core: registered new interface driver u***fs
[   0.284340] u***core: registered new interface driver hub
[   0.284503] u***core: registered new device driver u***
[   0.284750] pps_core: LinuxPPS API ver. 1 registered
[   0.284778] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 RodolfoGiometti <giometti@linux.it>
[   0.284838] PTP clock support registered
[   0.285191] Advanced Linux Sound Architecture Driver Initialized.
[   0.286178] clocksource: Switched to clocksource arch_sys_counter
[   0.296642] NET: Registered protocol family 2
[   0.297521] tcp_listen_portaddr_hash hash table entries: 512 (order: 0,6144 bytes)
[   0.297597] TCP established hash table entries: 4096 (order: 2, 16384bytes)
[   0.297685] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[   0.297799] TCP: Hash tables configured (established 4096 bind 4096)
[   0.297961] UDP hash table entries: 256 (order: 1, 8192 bytes)
[   0.298026] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[   0.298248] NET: Registeredprotocol family 1
[   0.299900] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[   0.309592] Block layer SCSI generic (bsg) driver version 0.4 loaded(major 248)
[   0.309651] io scheduler noop registered
[   0.309677] io scheduler deadline registered
[   0.309903] io scheduler cfq registered (default)
[   0.309936] io scheduler mq-deadline registered
[   0.309963] io scheduler kyber registered
[   0.310562] stm32-u***phyc 5a006000.u***phyc: Linked as a consumer toregulator.1
[   0.310656] stm32-u***phyc 5a006000.u***phyc: Linked as a consumer toregulator.2
[   0.310720] stm32-u***phyc 5a006000.u***phyc: Dropping the link toregulator.2
[   0.310794] stm32-u***phyc 5a006000.u***phyc: Dropping the link to regulator.1
[   0.313333] stm32-dma 48000000.dma: STM32 DMA driver registered
[   0.314867] stm32-dma 48001000.dma: STM32 DMA driver registered
[   0.379643] STM32 USART driver initialized
[   0.380784] 40010000.serial: ttySTM0 at MMIO 0x40010000 (irq = 25,base_baud = 4000000) is a stm32-usart
[   1.190067] console [ttySTM0] enabled
[   1.194246] stm32-usart 40010000.serial: interrupt mode used for rx (nodma)
[   1.200821] stm32-usart 40010000.serial: interrupt mode used for tx (nodma)
[   1.227570] brd: module loaded
[   1.231380] random: fast init done
[   1.236551] loop: module loaded
[   1.240095] libphy: Fixed MDIO Bus: probed
[   1.241370] random: crng init done
[   1.242812] CAN device driver interface
[   1.251462] stm32-dwmac 5800a000.ethernet: PTP uses main clock
[   1.255878] stm32-dwmac 5800a000.ethernet: no reset control found
[   1.262077] stm32-dwmac 5800a000.ethernet: No phy clock provided...
[   1.279049] stm32-dwmac 5800a000.ethernet: User ID: 0x40, Synopsys ID:0x42
[   1.284602] stm32-dwmac 5800a000.ethernet:   DWMAC4/5
[   1.289608] stm32-dwmac 5800a000.ethernet: DMA HW capability registersupported
[   1.296905] stm32-dwmac 5800a000.ethernet: RX Checksum Offload Enginesupported
[   1.304213] stm32-dwmac 5800a000.ethernet: TX Checksum insertion supported
[   1.311118] stm32-dwmac 5800a000.ethernet: Wake-Up On Lan supported
[   1.317399] stm32-dwmac 5800a000.ethernet: TSO supported
[   1.322695] stm32-dwmac 5800a000.ethernet: Enable RX Mitigation via HW WatchdogTimer
[   1.330571] stm32-dwmac 5800a000.ethernet: TSO feature enabled
[   1.336625] libphy: stmmac: probed
[   1.342884] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   1.348034] ehci-platform: EHCI generic platform driver
[   1.353675] ohci_hcd: USB 1.1'Open' Host Controller (OHCI) Driver
[   1.359449] ohci-platform: OHCI generic platform driver
[   1.367943] stm32_rtc 5c004000.rtc: rtc core: registered 5c004000.rtc asrtc0
[   1.373877] stm32_rtc 5c004000.rtc: Date/Time must be initialized
[   1.379813] stm32_rtc 5c004000.rtc: registered rev:1.2
[   1.385049] i2c /dev entries driver
[   1.408918] stm32f7-i2c 40012000.i2c: can't use DMA
[   1.415365] sii902x 0-0039: Failed to get supply 'iovcc': -517
[   1.420073] stm32f7-i2c 40012000.i2c: STM32F7 I2C-0 bus adapter
[   1.446312] stm32f7-i2c 5c002000.i2c: can't use DMA
[   1.451399] typec_stu*** 1-0028: STUSB driver registered
[   1.456713] stpmic1 1-0033: PMIC Chip Version: 0x10
[   1.465397] BUCK1: supplied by regulator-dummy
[   1.472184] BUCK2: supplied by regulator-dummy
[   1.478474] BUCK3: supplied by regulator-dummy
[   1.485123] BUCK4: supplied by regulator-dummy
[   1.491490] LDO1: supplied by v3v3
[   1.498770] LDO2: supplied by regulator-dummy
[   1.505289] LDO3: supplied by vdd_ddr
[   1.511250] LDO4: supplied by regulator-dummy
[   1.515544] LDO5: supplied by regulator-dummy
[   1.522255] LDO6: supplied by v3v3
[   1.527827] VREF_DDR: supplied by regulator-dummy
[   1.534082] BOOST: supplied by regulator-dummy
[   1.538045] VBUS_OTG: supplied by bst_out
[   1.542025] SW_OUT: supplied by bst_out
[   1.548767] input: pmic_onkey as/devices/platform/soc/5c002000.i2c/i2c-1/1-0033/5c002000.i2c:stpmic@33:onkey/input/input0
[   1.558972] stm32f7-i2c 5c002000.i2c: STM32F7 I2C-1 bus adapter
[   1.567593] mmci-pl18x 58005000.sdmmc: Linked as a consumer to regulator.8
[   1.573188] mmci-pl18x 58005000.sdmmc: mmc0: PL180 manf 53 rev2 at0x58005000 irq 56,0 (pio)
[   1.608468] sdhci: Secure Digital Host Controller Interface driver
[   1.614343] sdhci: Copyright(c) Pierre Ossman
[   1.617692] Synopsys Designware Multimedia Card Interface Driver
[   1.623929] sdhci-pltfm: SDHCI platform and OF driver helper
[   1.631765] u***core: registered new interface driver u***hid
[   1.635944] u***hid: USB HID core driver
[   1.640986] stm32-ipcc 4c001000.mailbox: ipcc rev:1.0 enabled, 6 chans,proc 0
[   1.648968] stm32-rproc m4@0: wdg irq registered
[   1.652435] remoteproc remoteproc0: m4 is available
[   1.659164] vref: supplied by vdd
[   1.661188] stm32-adc-core 48003000.adc: Linked as a consumer toregulator.4
[   1.668254] stm32-adc-core 48003000.adc: Linked as a consumer toregulator.7
[   1.695182] mmc0: host does not support reading read-only switch, assumingwrite-enable
[   1.701853] iio iio:device2: Can't get offset/scale: -517
[   1.710589] NET: Registered protocol family 10
[   1.716822] mmc0: new high speed SDHC card at address 994b
[   1.722727] mmcblk0: mmc0:994b SU04G 3.69 GiB
[   1.731837] Segment Routing with IPv6
[   1.734164] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[   1.736047]  mmcblk0: p1 p2 p3 p4
[   1.740954] NET: Registered protocol family 17
[   1.747828] can: controller area network core (rev 20170425 abi 9)
[   1.754048] NET: Registered protocol family 29
[   1.758418] can: raw protocol (rev 20170425)
[   1.762643] can: broadcast manager protocol (rev 20170425 t)
[   1.768341] can: netlink gateway (rev 20170425) max_hops=1
[   1.774092] ThumbEE CPU extension supported.
[   1.778119] Registering SWP/SWPB emulation handler
[   1.783845] stm32-u***phyc 5a006000.u***phyc: Linked as a consumer toregulator.1
[   1.790273] stm32-u***phyc 5a006000.u***phyc: Linked as a consumer toregulator.2
[   1.797581] stm32-u***phyc 5a006000.u***phyc: Linked as a consumer toregulator.12
[   1.805471] stm32-u***phyc 5a006000.u***phyc: registered rev:1.0
[   1.811947] dwc2 49000000.u***-otg: 49000000.u***-otg supply vu***_d notfound, using dummy regulator
[   1.819852] dwc2 49000000.u***-otg: Linked as a consumer to regulator.0
[   1.826317] dwc2 49000000.u***-otg: 49000000.u***-otg supply vu***_a notfound, using dummy regulator
[   1.835431] dwc2 49000000.u***-otg: Configuration mismatch. dr_mode forcedto host
[   1.848324] dwc2 49000000.u***-otg: Linked as a consumer to regulator.3
[   1.853940] dwc2 49000000.u***-otg: DWC OTG Controller
[   1.858563] dwc2 49000000.u***-otg: new USB bus registered, assigned busnumber 1
[   1.865929] dwc2 49000000.u***-otg: irq 50, io mem 0x49000000
[   1.872627] hub 1-0:1.0: USB hub found
[   1.875336] hub 1-0:1.0: 1 port detected
[   1.880114] ehci-platform 5800d000.u***h-ehci: EHCI Host Controller
[   1.885445] ehci-platform 5800d000.u***h-ehci: new USB bus registered,assigned bus number 2
[   1.894146] ehci-platform 5800d000.u***h-ehci: irq 60, io mem 0x5800d000
[   1.926222] ehci-platform 5800d000.u***h-ehci: USB 2.0 started, EHCI 1.00
[   1.932463] hub 2-0:1.0: USB hub found
[   1.935277] hub 2-0:1.0: 2 ports detected
[   1.941764] sii902x 0-0039: Linked as a consumer to regulator.10
[   1.946430] sii902x 0-0039: Linked as a consumer to regulator.14
[   1.956240] i2c i2c-0: Added multiplexed i2c bus 2
[   1.961712] [drm] ltdc hw version 0x00010300 - ready
[   1.965319] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[   1.971903] [drm] Driver supports precise vblank timestamp query.
[   1.978418] [drm] Initialized stm 1.0.0 20170330 for5a001000.display-controller on minor 0
[   1.986513] dwc2 49000000.u***-otg: Overcurrent change detected
[   1.992265] [drm] Cannot find any crtc or sizes
[   1.996911] dwc2 49000000.u***-otg: Overcurrent change detected
[   2.002567] stm32_rtc 5c004000.rtc: setting system clock to 2000-01-0100:18:32 UTC (946685912)
[   2.011629] [drm] Cannot find any crtc or sizes
[   2.012154] vdda: disabling
[   2.019046] ALSA device list:
[   2.021525]   No soundcards ??  2.031230] EXT4-fs (mmcblk0p4): INFO: recoveryrequired on readonly filesystem
[   2.037303] EXT4-fs (mmcblk0p4): write access will be enabled duringrecovery
[   2.165773] EXT4-fs (mmcblk0p4): recovery complete
[   2.181060] EXT4-fs (mmcblk0p4): mounted filesystem with ordered datamode. Opts: (null)
[   2.187841] VFS: Mounted root (ext4 filesystem) readonly on device 179:4.
[   2.196339] devtmpfs: mounted
[   2.199559] Freeing unused kernel memory: 1024K
[   2.202865] Run /***in/init as init process
[   2.306260] u*** 2-1: new high-speed USB device number 2 usingehci-platform
[   2.327892] EXT4-fs (mmcblk0p4): re-mounted. Opts: (null)
Starting syslogd: OK
Starting klogd: OK
Initializing random number generator...done.
Starting network: [    2.507686] hub 2-1:1.0: USB hub found
[   2.510211] hub 2-1:1.0: 4 ports detected
[   2.574522] Generic PHY stmmac-0:00: attached PHY driver [Generic PHY](mii_bus:phy_addr=stmmac-0:00, irq=POLL)
[   2.594948] dwmac4: Master AXI performs any burst length
[   2.599050] stm32-dwmac 5800a000.ethernet eth0: No Safety Features supportfound
[   2.606348] stm32-dwmac 5800a000.ethernet eth0: IEEE 1588-2008 AdvancedTimestamp supported
[   2.614952] stm32-dwmac 5800a000.ethernet eth0: registered PTP clock
[   2.621995] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
OK
Starting sshd: OK
Welcome to Buildroot
buildroot login: [    3.677059] stm32-dwmac 5800a000.etherneteth0: Link is Up - 100Mbps/Full - flow control rx/tx
[   3.684327] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
1.  U-BOOT启动记录解析
通过打印的第一条信息可以看出来,我们采用的U-BOOT是2020.04-rc4版本已经相当新了,编译时间为2020年4月2日,11:31:41,是我们最新编译的时间。
Model:STMicroelectronics STM32MP157A-DK1 Discovery Board
RAM:DDR3-1066/888 bin G 1x4Gb 533MHz v1.45
Board:stm32mp1 in basic mode (st,stm32mp157a-dk1)
Board:MB1272 Var1 Rev.C-01
DRAM:  512 MiB
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
NAND:  0 MiB
MMC:   STM32 SDMMC2: 0
Net:   eth0: ethernet@5800a000
DK1板和DDR3内存等相关信息也打印出来了,说明我们的针对DK1板编译的U-BOOT还是比较适合的。
    UBOOT从MMC0的分区#0启动,通过扫描分区找到了启动所需的相关信息,extlinux.conf、zImage,stm32157a-dk1.dtb,还有根分区挂载root=/dev/mmcblk0p4rootwait
2.  Linux系统的调整
看到上面的信息,说明我们的系统启动已经没有问题了,但是新启动的系统很多地方还是不能完全满足我们的需求,例如以太网等的配置等。
2.1.  系统提示符
刚才生成的系统如果登录后我们可以看到,系统的提示符就一个字符“#”,你进到那一层目录,当前用户是谁都不知道。于是我们需要调整以下让他适合我们的使用。
打开/etc/profile文件,并按照如下方式添加修改后,保存。
HOSTNAME='/bin/hostname'
PS1='[u@h W]#'
export PS1 HOSTNAME
#if [ "$PS1" ]; then
#   if [ "`id-u`" -eq 0 ]; then
#       export PS1='#'
#   else
#       export PS1='$'
#   fi
#fi
当前系统中提供了vi编辑器,这个比较好用。
重新启动系统,登陆,这时提示符发生很大的变化,已经和我们熟悉的linux环境差不多了。
    提示符变为:
              [root@buildroot ~]#
可以看到,当前用户和当前路径我们都可以显示出来了。
2.2. 以太网配置
登录后我们执行
    # ifconfig –a
来查看当前的系统配置的网络设备,可以看到系统的信息。
[root@buildroot~]#ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:80:E1:42:5F:28  
          inet addr:172.17.100.125  Bcast:0.0.0.0 Mask:255.255.0.0
          inet6 addr: fe80::280:e1ff:fe42:5f28/64Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500 Metric:1
          RX packets:87172 errors:0dropped:4003 overruns:0 frame:0
          TX packets:86 errors:0 dropped:0overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6638661 (6.3 MiB)  TX bytes:9025 (8.8 KiB)
          Interrupt:57 Base address:0x4000
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536 Metric:1
          RX packets:0 errors:0 dropped:0overruns:0 frame:0
          TX packets:0 errors:0 dropped:0overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
sit0      Link encap:IPv6-in-IPv4  
          NOARP MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0overruns:0 frame:0
          TX packets:0 errors:0 dropped:0overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
信息显示我们有eth0这个以太网设备,但是他的ip地址可能不是我们想要的,我们需要他启动后自动设置为我们需要的地址。于是,我们需要调整以太网接口配置文件。
    打开/etc/network/interfaces,增加
auto eth0
iface eth0 inet static
    address172.17.100.125
    netmask255.255.0.0
    gateway 172.17.64.2
    其中的IP、子网掩码、网关地址根据需要修改就好了。
此时重新启动系统,在执行ifconfig,观察一下我们的ip地址调整结果。
2.3. SSH配置
1)Sshd_config配置文件修改
这个配置应该是比较重要的,我们将来的操作都应该基于SSH+SFTP来完成。我们在系统创建的时候已经选择了openssh的功能模块,因此我们的系统已经具备的基本条件,只要重新配置一下sshd_config应该就可以了。
配置文件路径 /etc/ssh/sshd_config
配置中有几个地方我觉得比较关键:
    Port 22
AddressFamily any
ListenAddress 0.0.0.0
PermitRootLogin yes
PasswordAuthentication yes
PermitEmptyPasswords yes
这几个配置表明端口号为22,允许root用户登录,允许无密码登录,将来开发过程中使用比较方便。开发完成了,在把选项关上,要求使用密码登录。
2)passwd文件修改
我们还要在passwd文件中增加一些ssh的相关设定。
文件路径: /etc/passwd
添加内容:在文件末尾增加
       sshd:x:74:74:Privilege-separated
       保存后退出。
3)更改var目录属性
修改var目录的属性,执行
    # chown –R root:root /var
将var目录的组和用户全部改成root。
通过如上的三步更改后,重启系统,通过ssh终端软件登录STM32MP1-DK1成功。
系统配置完成,到目前位置,系统已经准备好了,剩下的是我们的应用测试了。
后附我的修改文件,放到相应的目录下可以解决问题。
下一贴开始我们由浅入深的测试过程了。
附上我的调整文件:
03.rar (1.96 KB)
(下载次数: 0, 2020-4-8 10:30 上传)


回帖(1)

安东摄像头模组

2020-4-11 11:32:21
感谢楼主谢谢分享
举报

更多回帖

发帖
×
20
完善资料,
赚取积分