Jump to content

    
Sign in to follow this  
Kiryanov

Buildroot, всве вешается при выполнении ssh-keygen -A

Recommended Posts

Привет всем!

Суть проблемы вот в чем: взял готовый u-boot, который гарантированно запускается, собираю, используя buildroot-2020.11.1, ядро установил 4.19-xilinx-rebase, оно нормально собирается, но при старте rootfs у меня всегда все вешается на ssh-keygen. Пробовал включать dropbear отключая и включая openssh - не помогает. Вот сейчас собрано вместе с dropbear и openssh - вот распечатка загрузки:

gpio: pin 48 (gpio 48) value is 0                                               
reading system.bit.bin                                                          
17416352 bytes read in 870 ms (19.1 MiB/s)                                      
reading image.ub.sd                                                             
3793324 bytes read in 201 ms (18 MiB/s)                                         
reading system.dtb                                                              
11790 bytes read in 17 ms (676.8 KiB/s)                                         
## Loading kernel from FIT Image at 10000000 ...                                
   Using 'conf@0' configuration                                                 
   Verifying Hash Integrity ... OK                                              
   Trying 'kernel@0' kernel subimage                                            
     Description:  Linux Kernel                                                 
     Type:         Kernel Image                                                 
     Compression:  uncompressed                                                 
     Data Start:   0x100000d4                                                   
     Data Size:    3792192 Bytes = 3.6 MiB                                      
     Architecture: ARM                                                          
     OS:           Linux                                                        
     Load Address: 0x00008000                                                   
     Entry Point:  0x00008000                                                   
     Hash algo:    sha1                                                         
     Hash value:   6bfb5da72c1d46c8ebc7c3d68cb4bc7ef27d6332                     
   Verifying Hash Integrity ... sha1+ OK                                        
## Flattened Device Tree blob at 20000000                                       
   Booting using the fdt blob at 0x20000000                                     
   Loading Kernel Image ... OK                                                  
   Loading Device Tree to 07ffa000, end 07fffe0d ... OK                         
                                                                                
Starting kernel ...                                                             
                                                                                
Booting Linux on physical CPU 0x0                                               
Linux version 4.19.0-xilinx (konstantin@David) (gcc version 9.3.0 (Buildroot 201
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d                 
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache        
OF: fdt: Machine model: fmc130e                                                 
Memory policy: Data cache writealloc                                            
cma: Reserved 16 MiB at 0x3f000000                                              
random: get_random_bytes called from start_kernel+0x84/0x3d4 with crng_init=0   
percpu: Embedded 16 pages/cpu @(ptrval) s35852 r8192 d21492 u65536              
Built 1 zonelists, mobility grouping on.  Total pages: 260608                   
Kernel command line: ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rootfstype=et
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)                
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)                  
Memory: 1012980K/1048576K available (6144K kernel code, 191K rwdata, 1512K roda)
Virtual kernel memory layout:                                                   
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)                               
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)                               
    vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)                               
    lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)                               
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)                               
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)                               
      .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)                               
      .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)                               
      .data : 0x(ptrval) - 0x(ptrval)   ( 191 kB)                               
       .bss : 0x(ptrval) - 0x(ptrval)   ( 129 kB)                               
rcu: Preemptible hierarchical RCU implementation.                               
rcu:    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.                    
        Tasks RCU enabled.                                                      
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2                    
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16                                 
efuse mapped to (ptrval)                                                        
slcr mapped to (ptrval)                                                         
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000           
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000        
L2C-310 erratum 769419 enabled                                                  
L2C-310 enabling early BRESP for Cortex-A9                                      
L2C-310 full line of zeros enabled for Cortex-A9                                
L2C-310 ID prefetch enabled, offset 1 lines                                     
L2C-310 dynamic clock gating enabled, standby mode enabled                      
L2C-310 cache controller enabled, 8 ways, 512 kB                                
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001                               
zynq_clock_init: clkc starts at (ptrval)                                        
Zynq clock init                                                                 
sched_clock: 64 bits at 400MHz, resolution 2ns, wraps every 4398046511103ns     
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x5c4093a7ds
Switching to timer-based delay loop, resolution 2ns                             
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 447s
timer #0 at (ptrval), irq=17                                                    
Console: colour dummy device 80x30                                              
console [tty0] enabled                                                          
Calibrating delay loop (skipped), value calculated using timer frequency.. 800.)
pid_max: default: 32768 minimum: 301                                            
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)                     
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)                
CPU: Testing write buffer coherency: ok                                         
CPU0: Spectre v2: using BPIALL workaround                                       
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000                                
Setting up static identity map for 0x100000 - 0x100060                          
rcu: Hierarchical SRCU implementation.                                          
smp: Bringing up secondary CPUs ...                                             
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001                                
CPU1: Spectre v2: using BPIALL workaround                                       
smp: Brought up 1 node, 2 CPUs                                                  
SMP: Total of 2 processors activated (1600.00 BogoMIPS).                        
CPU: All CPU(s) started in SVC mode.                                            
devtmpfs: initialized                                                           
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4         
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 191s
futex hash table entries: 512 (order: 3, 32768 bytes)                           
pinctrl core: initialized pinctrl subsystem                                     
NET: Registered protocol family 16                                              
DMA: preallocated 256 KiB pool for atomic coherent allocations                  
cpuidle: using governor menu                                                    
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.     
hw-breakpoint: maximum watchpoint size is 4 bytes.                              
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x(ptrval)                     
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized                              
e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 25, base_baud = 6250000) is as
console [ttyPS0] enabled                                                        
xuartps e0001000.serial: No serial alias passed. Using the first free id        
xuartps e0001000.serial: Checking id 0                                          
e0001000.serial: ttyPS2 at MMIO 0xe0001000 (irq = 26, base_baud = 6250000) is as
SCSI subsystem initialized                                                      
usbcore: registered new interface driver usbfs                                  
usbcore: registered new interface driver hub                                    
usbcore: registered new device driver usb                                       
media: Linux media interface: v0.10                                             
videodev: Linux video capture interface: v2.00                                  
pps_core: LinuxPPS API ver. 1 registered                                        
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@>
PTP clock support registered                                                    
EDAC MC: Ver: 3.0.0                                                             
FPGA manager framework                                                          
Advanced Linux Sound Architecture Driver Initialized.                           
clocksource: Switched to clocksource arm_global_timer                           
NET: Registered protocol family 2                                               
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)         
TCP established hash table entries: 8192 (order: 3, 32768 bytes)                
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)                       
TCP: Hash tables configured (established 8192 bind 8192)                        
UDP hash table entries: 512 (order: 2, 16384 bytes)                             
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)                        
NET: Registered protocol family 1                                               
RPC: Registered named UNIX socket transport module.                             
RPC: Registered udp transport module.                                           
RPC: Registered tcp transport module.                                           
RPC: Registered tcp NFSv4.1 backchannel transport module.                       
hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.      
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available    
workingset: timestamp_bits=30 max_order=18 bucket_order=0                       
jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.                
bounce: pool size: 64 pages                                                     
io scheduler noop registered                                                    
io scheduler deadline registered                                                
io scheduler cfq registered (default)                                           
io scheduler mq-deadline registered                                             
io scheduler kyber registered                                                   
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330                    
dma-pl330 f8003000.dmac:        DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Eve6
xilinx-vdma 40400000.dma: Xilinx AXI DMA Engine Driver Probed!!                 
brd: module loaded                                                              
loop: module loaded                                                             
m25p80 spi0.0: found n25q256a13, expected n25q512a                              
m25p80 spi0.0: n25q256a13 (32768 Kbytes)                                        
4 fixed-partitions partitions found on MTD device spi0.0                        
Creating 4 MTD partitions on "spi0.0":                                          
0x000000000000-0x000000200000 : "boot"                                          
0x000000200000-0x000000220000 : "bootenv"                                       
0x000000220000-0x000000fa0000 : "kernel"                                        
0x000000fa0000-0x000002000000 : "spare"                                         
libphy: Fixed MDIO Bus: probed                                                  
CAN device driver interface                                                     
libphy: MACB_mii_bus: probed                                                    
[Firmware Warn]: /amba/ethernet@e000b000/mdio/phy@0: Whitelisted compatible stre
Marvell 88E1510 e000b000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E)
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 28 (0)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver                      
usbcore: registered new interface driver usb-storage                            
ULPI transceiver vendor/product ID 0x0779/0x2500                                
ULPI integrity check: passed.                                                   
i2c /dev entries driver                                                         
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer with timeout 10s              
EDAC MC: ECC not enabled                                                        
Xilinx Zynq CpuIdle Driver started                                              
sdhci: Secure Digital Host Controller Interface driver                          
sdhci: Copyright(c) Pierre Ossman                                               
sdhci-pltfm: SDHCI platform and OF driver helper                                
mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA                
ledtrig-cpu: registered to indicate activity on CPUs                            
usbcore: registered new interface driver usbhid                                 
usbhid: USB HID core driver                                                     
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered                         
NET: Registered protocol family 17                                              
can: controller area network core (rev 20170425 abi 9)                          
NET: Registered protocol family 29                                              
can: raw protocol (rev 20170425)                                                
can: broadcast manager protocol (rev 20170425 t)                                
can: netlink gateway (rev 20170425) max_hops=1                                  
Registering SWP/SWPB emulation handler                                          
of-fpga-region fpga-full: FPGA Region probed                                    
hctosys: unable to open rtc device (rtc0)                                       
of_cfs_init                                                                     
of_cfs_init: OK                                                                 
ALSA device list:                                                               
  No soundcards found.                                                          
Waiting for root device /dev/mmcblk0p2...                                       
mmc0: new high speed SDHC card at address 59b4                                  
mmcblk0: mmc0:59b4 USDU1 29.7 GiB                                               
random: fast init done                                                          
 mmcblk0: p1 p2                                                                 
EXT4-fs (mmcblk0p2): warning: mounting fs with errors, running e2fsck is recommd
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)    
VFS: Mounted root (ext4 filesystem) on device 179:2.                            
devtmpfs: mounted                                                               
Freeing unused kernel memory: 1024K                                             
Run /sbin/init as init process                                                  
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)                                   
Starting syslogd: OK                                                            
Starting klogd: OK                                                              
Running sysctl: OK                                                              
Initializing random number generator: OK                                        
Saving random seed: random: dd: uninitialized urandom read (512 bytes read)     
OK                                                                              
Starting network: OK                                                            
Starting dropbear sshd: OK                                                      
Starting ssh-keygen:

 

 

Строка Starting ssh-keygen: - уже мною вставлена в стартовый скрипт /etc/init.d/S50sshd:

 

 

#!/bin/sh
#
# sshd        Starts sshd.
#

# Make sure the ssh-keygen progam exists
[ -f /usr/bin/ssh-keygen ] || exit 0

umask 077

start() {
    # Create any missing keys
    printf "Starting ssh-keygen: " #ВОТ ЗДЕСЬ ОНА
    /usr/bin/ssh-keygen -A

    printf "Starting sshd: "
    /usr/sbin/sshd
    touch /var/lock/sshd
    echo "OK"
}
stop() {
    printf "Stopping sshd: "
    killall sshd
    rm -f /var/lock/sshd
    echo "OK"
}
restart() {
    stop
    start
}

case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart|reload)
    restart
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac

exit $?

 

Никак не могу понять, почему все виснет на:

 /usr/bin/ssh-keygen -A

Я человек в buildroot новый, хотя в сборке линукса что-то понимаю, но как решить эту проблему - не понимаю. Помогите пожалуйста

Share this post


Link to post
Share on other sites

В данном случае я могу не все понимать, но мне кажется на декомпилированном dtb в dts файле вот это:

    chosen {
        bootargs = "console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rootfstype=ext4 nolock rw rootwait ip=dhcp";
        stdout-path = "serial0:115200ns";
    };

 

Share this post


Link to post
Share on other sites

Еще обратил внимание вот на что:

Собираю ядро xilinx-linux4.9 (старье) - все генерируется и запускается нормально. А когда собираю более новое: xilinx-linux-rebase-4.19   - именно тогда происходят фокусы со всякими зависаниями. В чем может быть дело?

Share this post


Link to post
Share on other sites
On 2/1/2021 at 6:42 PM, Kiryanov said:

Starting dropbear sshd: OK                                                      
Starting ssh-keygen:

Строка Starting ssh-keygen: - уже мною вставлена в стартовый скрипт /etc/init.d/S50sshd:

Зпчем вы ДВА сервера SSH запускаете ? одного достаточно - оставьте только dropbear, скрипт /etc/init.d/S50sshd вообще удалите. Что касается ошибки генерации ключей - возможно вы некорректно отключили плату при первом включении  и вместо ключей файлы нулевой длины в /etc. При первом включении ключи достаточно долго генерируются. В общем на таких устройствах openssh избыточен на мой взгляд - нет смысла его вообще включать в сборку.

Share this post


Link to post
Share on other sites

Дело в том, что я и отключая собирал, и просто с dropbear и с openssh. Результат не меняется. Здесь дело в настройках buildroot. Исходно было установлено:

BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,linux-xlnx,xilinx-v2017.3)/linux-xilinx-v2017.3.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="xilinx_zynq"

Я поменял на:

BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/Xilinx/linux-xlnx.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="xlnx_rebase_v4.19"
BR2_LINUX_KERNEL_DEFCONFIG="xilinx_zynq"

Ядро собирается, но в rootfs собирается такой ssh-keygen. Работает он только с 4.9 но не работает с 4.19.

Это уже получилось методом перебора, что оба способа включил, так как ничего не работает. Пока не разобрался еще.

Share this post


Link to post
Share on other sites

Понимаете, вешается и так и так. Когда я оставляю только dropbear, или только openssh - все по-любому вешается. Starting network: OK и на этом все. Попробовал собрать для платы ZC-706 - та же ж... только в профиль. Причем ядро грузится, остальное вешается.

Вот примет только с openssh:
 

U-Boot 2018.01 (Feb 19 2021 - 16:33:55 +0300) Xilinx Zynq ZC706                 
                                                                                
Model: Zynq ZC706 Development Board                                             
Board: Xilinx Zynq                                                              
Silicon: v3.1                                                                   
I2C:   ready                                                                    
DRAM:  ECC disabled 1 GiB                                                       
MMC:   sdhci@e0100000: 0 (SD)                                                   
SF: Detected s25fl128s_64k with page size 512 Bytes, erase size 128 KiB, total B
*** Warning - bad CRC, using default environment                                
                                                                                
In:    serial@e0001000                                                          
Out:   serial@e0001000                                                          
Err:   serial@e0001000                                                          
Net:   ZYNQ GEM: e000b000, phyaddr 7, interface rgmii-id                        
eth0: ethernet@e000b000                                                         
Hit any key to stop autoboot:  0                                                
Device: sdhci@e0100000                                                          
Manufacturer ID: 3                                                              
OEM: 5344                                                                       
Name: SS08G                                                                     
Tran Speed: 50000000                                                            
Rd Block Len: 512                                                               
SD version 3.0                                                                  
High Capacity: Yes                                                              
Capacity: 7.4 GiB                                                               
Bus Width: 4-bit                                                                
Erase Group Size: 512 Bytes                                                     
** Unable to read file uEnv.txt **                                              
Copying Linux from SD to RAM...                                                 
reading uImage                                                                  
4127864 bytes read in 234 ms (16.8 MiB/s)                                       
reading devicetree.dtb                                                          
13506 bytes read in 15 ms (878.9 KiB/s)                                         
reading uramdisk.image.gz                                                       
8769433 bytes read in 486 ms (17.2 MiB/s)                                       
## Booting kernel from Legacy Image at 02080000 ...                             
   Image Name:   Linux-4.19.0-xilinx                                            
   Image Type:   ARM Linux Kernel Image (uncompressed)                          
   Data Size:    4127800 Bytes = 3.9 MiB                                        
   Load Address: 00008000                                                       
   Entry Point:  00008000                                                       
   Verifying Checksum ... OK                                                    
## Loading init Ramdisk from Legacy Image at 04000000 ...                       
   Image Name:                                                                  
   Image Type:   ARM Linux RAMDisk Image (uncompressed)                         
   Data Size:    8769369 Bytes = 8.4 MiB                                        
   Load Address: 00000000                                                       
   Entry Point:  00000000                                                       
   Verifying Checksum ... OK                                                    
## Flattened Device Tree blob at 02000000                                       
   Booting using the fdt blob at 0x2000000                                      
   Loading Kernel Image ... OK                                                  
   Loading Ramdisk to 1f7a3000, end 1fffff59 ... OK                             
   Loading Device Tree to 1f79c000, end 1f7a24c1 ... OK                         
                                                                                
Starting kernel ...                                                             
                                                                                
Booting Linux on physical CPU 0x0                                               
Linux version 4.19.0-xilinx (konstantin@David) (gcc version 10.2.0 (Buildroot 21
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d                 
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache        
OF: fdt: Machine model: Xilinx ZC706 board                                      
Memory policy: Data cache writealloc                                            
cma: Reserved 16 MiB at 0x3f000000                                              
random: get_random_bytes called from start_kernel+0x84/0x3d4 with crng_init=0   
percpu: Embedded 16 pages/cpu @(ptrval) s35916 r8192 d21428 u65536              
Built 1 zonelists, mobility grouping on.  Total pages: 260608                   
Kernel command line:                                                            
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)                
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)                  
Memory: 1004380K/1048576K available (6144K kernel code, 205K rwdata, 1628K roda)
Virtual kernel memory layout:                                                   
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)                               
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)                               
    vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)                               
    lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)                               
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)                               
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)                               
      .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)                               
      .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)                               
      .data : 0x(ptrval) - 0x(ptrval)   ( 206 kB)                               
       .bss : 0x(ptrval) - 0x(ptrval)   ( 133 kB)                               
rcu: Preemptible hierarchical RCU implementation.                               
rcu:    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.                    
        Tasks RCU enabled.                                                      
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2                    
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16                                 
efuse mapped to (ptrval)                                                        
slcr mapped to (ptrval)                                                         
L2C: platform modifies aux control register: 0x02060000 -> 0x32460000           
L2C: DT/platform modifies aux control register: 0x02060000 -> 0x32460000        
L2C-310 erratum 769419 enabled                                                  
L2C-310 enabling early BRESP for Cortex-A9                                      
L2C-310 full line of zeros enabled for Cortex-A9                                
L2C-310 dynamic clock gating enabled, standby mode enabled                      
L2C-310 cache controller enabled, 8 ways, 512 kB                                
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46460001                               
zynq_clock_init: clkc starts at (ptrval)                                        
Zynq clock init                                                                 
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns     
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af02s
Switching to timer-based delay loop, resolution 3ns                             
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537s
timer #0 at (ptrval), irq=17                                                    
Console: colour dummy device 80x30                                              
console [tty0] enabled                                                          
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.)
pid_max: default: 32768 minimum: 301                                            
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)                     
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)                
CPU: Testing write buffer coherency: ok                                         
CPU0: Spectre v2: using BPIALL workaround                                       
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000                                
Setting up static identity map for 0x100000 - 0x100060                          
rcu: Hierarchical SRCU implementation.                                          
smp: Bringing up secondary CPUs ...                                             
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001                                
CPU1: Spectre v2: using BPIALL workaround                                       
smp: Brought up 1 node, 2 CPUs                                                  
SMP: Total of 2 processors activated (1333.33 BogoMIPS).                        
CPU: All CPU(s) started in SVC mode.                                            
devtmpfs: initialized                                                           
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4         
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 191s
futex hash table entries: 512 (order: 3, 32768 bytes)                           
pinctrl core: initialized pinctrl subsystem                                     
NET: Registered protocol family 16                                              
DMA: preallocated 256 KiB pool for atomic coherent allocations                  
cpuidle: using governor menu                                                    
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.     
hw-breakpoint: maximum watchpoint size is 4 bytes.                              
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x(ptrval)                     
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized                              
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 26, base_baud = 3125000) is as
console [ttyPS0] enabled                                                        
vgaarb: loaded                                                                  
SCSI subsystem initialized                                                      
usbcore: registered new interface driver usbfs                                  
usbcore: registered new interface driver hub                                    
usbcore: registered new device driver usb                                       
media: Linux media interface: v0.10                                             
videodev: Linux video capture interface: v2.00                                  
pps_core: LinuxPPS API ver. 1 registered                                        
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@>
PTP clock support registered                                                    
EDAC MC: Ver: 3.0.0                                                             
FPGA manager framework                                                          
Advanced Linux Sound Architecture Driver Initialized.                           
clocksource: Switched to clocksource arm_global_timer                           
NET: Registered protocol family 2                                               
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)         
TCP established hash table entries: 8192 (order: 3, 32768 bytes)                
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)                       
TCP: Hash tables configured (established 8192 bind 8192)                        
UDP hash table entries: 512 (order: 2, 16384 bytes)                             
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)                        
NET: Registered protocol family 1                                               
RPC: Registered named UNIX socket transport module.                             
RPC: Registered udp transport module.                                           
RPC: Registered tcp transport module.                                           
RPC: Registered tcp NFSv4.1 backchannel transport module.                       
Trying to unpack rootfs image as initramfs...                                   
Freeing initrd memory: 8564K                                                    
hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.      
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available    
workingset: timestamp_bits=30 max_order=18 bucket_order=0                       
jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.                 
bounce: pool size: 64 pages                                                     
io scheduler noop registered                                                    
io scheduler deadline registered                                                
io scheduler cfq registered (default)                                           
io scheduler mq-deadline registered                                             
io scheduler kyber registered                                                   
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330                    
dma-pl330 f8003000.dmac:        DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Eve6
brd: module loaded                                                              
loop: module loaded                                                             
m25p80 spi0.0: found s25fl128s, expected n25q128a11                             
m25p80 spi0.0: s25fl128s (32768 Kbytes)                                         
5 fixed-partitions partitions found on MTD device spi0.0                        
Creating 5 MTD partitions on "spi0.0":                                          
0x000000000000-0x000000100000 : "qspi-fsbl-uboot"                               
0x000000100000-0x000000600000 : "qspi-linux"                                    
0x000000600000-0x000000620000 : "qspi-device-tree"                              
0x000000620000-0x000000c00000 : "qspi-rootfs"                                   
0x000000c00000-0x000001000000 : "qspi-bitstream"                                
libphy: Fixed MDIO Bus: probed                                                  
CAN device driver interface                                                     
libphy: MACB_mii_bus: probed                                                    
Marvell 88E1116R e000b000.ethernet-ffffffff:07: attached PHY driver [Marvell 88)
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 28 (0)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k                              
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.                             
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver                      
ehci-pci: EHCI PCI platform driver                                              
usbcore: registered new interface driver usb-storage                            
chipidea-usb2 e0002000.usb: e0002000.usb supply vbus not found, using dummy regr
chipidea-usb2 e0002000.usb: Linked as a consumer to regulator.0                 
ULPI transceiver vendor/product ID 0x0424/0x0007                                
Found SMSC USB3320 ULPI transceiver.                                            
ULPI integrity check: passed.                                                   
ci_hdrc ci_hdrc.0: EHCI Host Controller                                         
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1                
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00                                   
hub 1-0:1.0: USB hub found                                                      
hub 1-0:1.0: 1 port detected                                                    
i2c /dev entries driver                                                         
cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 23                             
si570 1-005d: registered, current frequency 148500000 Hz                        
i2c i2c-0: Added multiplexed i2c bus 1                                          
i2c i2c-0: Added multiplexed i2c bus 2                                          
at24 3-0054: 1024 byte 24c08 EEPROM, writable, 1 bytes/write                    
i2c i2c-0: Added multiplexed i2c bus 3                                          
i2c i2c-0: Added multiplexed i2c bus 4                                          
rtc rtc0: invalid alarm value: 2020-10-2 24:8:0                                 
rtc-pcf8563 5-0051: rtc core: registered rtc-pcf8563 as rtc0                    
i2c i2c-0: Added multiplexed i2c bus 5                                          
i2c i2c-0: Added multiplexed i2c bus 6                                          
i2c i2c-0: Added multiplexed i2c bus 7                                          
i2c i2c-0: Added multiplexed i2c bus 8                                          
pca954x 0-0074: registered 8 multiplexed busses for I2C switch pca9548          
ucd9000 8-0065: Device ID UCD90120A|2.3.4.0000|110603                           
random: fast init done                                                          
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer with timeout 10s              
EDAC MC: ECC not enabled                                                        
Xilinx Zynq CpuIdle Driver started                                              
sdhci: Secure Digital Host Controller Interface driver                          
sdhci: Copyright(c) Pierre Ossman                                               
sdhci-pltfm: SDHCI platform and OF driver helper                                
mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA                
ledtrig-cpu: registered to indicate activity on CPUs                            
usbcore: registered new interface driver usbhid                                 
usbhid: USB HID core driver                                                     
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered                         
NET: Registered protocol family 10                                              
Segment Routing with IPv6                                                       
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver                             
NET: Registered protocol family 17                                              
can: controller area network core (rev 20170425 abi 9)                          
NET: Registered protocol family 29                                              
can: raw protocol (rev 20170425)                                                
can: broadcast manager protocol (rev 20170425 t)                                
can: netlink gateway (rev 20170425) max_hops=1                                  
Registering SWP/SWPB emulation handler                                          
of-fpga-region fpga-full: FPGA Region probed                                    
rtc-pcf8563 5-0051: setting system clock to 2020-10-03 17:03:21 UTC (1601744601)
of_cfs_init                                                                     
of_cfs_init: OK                                                                 
ALSA device list:                                                               
mmc0: new high speed SDHC card at address aaaa                                  
  No soundcards found.                                                          
mmcblk0: mmc0:aaaa SS08G 7.40 GiB                                               
Freeing unused kernel memory: 1024K                                             
Run /init as init process                                                       
 mmcblk0: p1                                                                    
Starting syslogd: OK                                                            
Starting klogd: OK                                                              
Running sysctl: OK                                                              
Saving random seed: random: dd: uninitialized urandom read (512 bytes read)     
OK                                                                              
Starting network: OK

Edited by Kiryanov

Share this post


Link to post
Share on other sites

Только что влетел в такую же историю: ssh-keygen зависает на вызове getrandom()

 

Быстрое и неправильное решение:

1. Добавляем rng-tools (Target packages → Hardware handling → [*] rng-tools)

2. Собираем buildroot, удаляем target/etc/init.d/S21rngd

3. Перед вызовом ssh-keygen добавляем:

# Dirty hack to feed kernel's random pool
rngd -r /dev/urandom

 

Share this post


Link to post
Share on other sites

Спасибо, это в целом заработало. Правда приходится всегда долго ждать генерации ключей.

Starting network: OK                                                            
random: rngd: uninitialized urandom read (16 bytes read)                        
random: rngd: uninitialized urandom read (4 bytes read)                         
random: crng init done                                                          
ssh-keygen: generating new host keys: RSA random: 2 urandom warning(s) missed dg              # здесь каждый раз приходится долго ждать
DSA ECDSA ED25519                                                               
Starting sshd: OK                                                               
Starting tcf-agent: OK                                                          
Starting squid: OK    

 

Только если оно неправильное - почему? И есть ли какое-то более правильное решение?

Share this post


Link to post
Share on other sites
1 hour ago, Kiryanov said:

Правда приходится всегда долго ждать генерации ключей.

Они должны один раз сгенерироваться. Корневая ФС сохраняет изменения?

 

1 hour ago, Kiryanov said:

Только если оно неправильное - почему?

Неправильное, потому что энтропия недостаточно "энтропийная" получается. Для 99.99% случаев это неважно.

 

1 hour ago, Kiryanov said:

И есть ли какое-то более правильное решение?

Есть многостраничные обсуждения, и как-то в более свежих ядрах заправлено.

 

Share this post


Link to post
Share on other sites
15 minutes ago, aaarrr said:

Они должны один раз сгенерироваться. Корневая ФС сохраняет изменения?

Нет, корневая ФС не сохраняет изменения, она:     uramdisk.image.gz      согласно:
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842369/Build+Linux+for+Zynq-7000+AP+SoC+using+Buildroot
 

То есть, распаковывается в RAM. Я просто скопировал все сгенерированные ключи, и вкинул в     output/target/etc/ssh/ и пересобрал все.

PS. Спасибо за рекомендацию

Share this post


Link to post
Share on other sites

Да, простите еще вопрос: как на нем заставить работать ftp или sftp?   Они включаются в  target packages -> networking applications -> lftp

        [*] lftp
         [*]   FTP protocol

         [*]   SFTP protocol

Но не работает, по крайней мере в midnight commander

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this