Error while running speed tests for DES-EDE with ECB,CFB,CBC and OFB modes with openssl-3.0.7 - algorithm

I'm using openssl-3.0.7, enabled legacy providers along with activating default provider. openssl list -providers is successfully listing both the providers. openssl list -cipher-algorithms is also listing default and legacy algorithms. Tried running speed test for all algorithms , I notice some errors only with DES-EDE-ECB, DES-EDE-ECB, DES-EDE-CBC, DES-EDE-CFB and DES-EDE-OFB algorithms.I have not replaced deprecated functions(don't have enough time) as there are being trated as warnings as of now and functions we can still use and ignore warnings.Encryption and decryption is happening fine with just warnings as it is expected. Here is the output of speed test for DES-EDE-OFB algorithm.
command : openssl speed -evp DES-EDE-OFB
version: 3.0.7
Doing DES-EDE-OFB for 3s on 16 size blocks: 5074005 DES-EDE-OFB's in 3.00s
Doing DES-EDE-OFB for 3s on 64 size blocks: 1297913 DES-EDE-OFB's in 3.00s
Doing DES-EDE-OFB for 3s on 256 size blocks: 325584 DES-EDE-OFB's in 3.00s
Doing DES-EDE-OFB for 3s on 1024 size blocks: 81767 DES-EDE-OFB's in 3.00s
Doing DES-EDE-OFB for 3s on 8192 size blocks: 10213 DES-EDE-OFB's in 3.00s
Doing DES-EDE-OFB for 3s on 16384 size blocks: 5106 DES-EDE-OFB's in 3.00s
40379BA7E97F0000:error:1C800079:Provider routines:(unknown function):failed to generate key:providers/implementations/ciphers/cipher_tdes_common.c:145:
40379BA7E97F0000:error:1C800079:Provider routines:(unknown function):failed to generate key:providers/implementations/ciphers/cipher_tdes_common.c:145:
40379BA7E97F0000:error:1C800079:Provider routines:(unknown function):failed to generate key:providers/implementations/ciphers/cipher_tdes_common.c:145:
40379BA7E97F0000:error:1C800079:Provider routines:(unknown function):failed to generate key:providers/implementations/ciphers/cipher_tdes_common.c:145:
40379BA7E97F0000:error:1C800079:Provider routines:(unknown function):failed to generate key:providers/implementations/ciphers/cipher_tdes_common.c:145:
40379BA7E97F0000:error:1C800079:Provider routines:(unknown function):failed to generate key:providers/implementations/ciphers/cipher_tdes_common.c:145:
version: 3.0.7
built on: Tue Jan 24 11:52:39 2023 UTC
options: bn(64,64)
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -DOPENSSL_NO_CAPIENG
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
DES-EDE-OFB 27061.36k 27688.81k 27783.17k 27909.80k 27888.30k 27885.57k
Tried searching on openssl site regarding the error but didn't find anything related, tried online to get some kind of help or clue but none. wonder if anyone else also facing the same issue.I don't have much understanding regarding openssl inner files code. please suggest some ways/suggestions to fix this.

Related

pm2 start -i max run on 12 vcpu buy my ec2 only has 8 vcpu

I just upgrade our AWS EC2 instance from t2.xlarge to t2.2xlarge, so our instance now has 8 vCPU. Upon restarting the server, I run the command pm2 start src/app.js -i max -f and to my surprise, instead of my app running on 8vCPU, it now runs on 12 vCPU. At least that's what's the pm2 list displayed. What really happen here?
Here's the output of cat /proc/cpuinfo
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 79
model name : Intel(R) Xeon(R) CPU E5-2686 v4 # 2.30GHz
stepping : 1
microcode : 0xb000038
cpu MHz : 2300.118
cache size : 46080 KB
physical id : 0
siblings : 8
core id : 7
cpu cores : 8
apicid : 14
initial apicid : 14
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x 2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_ lm abm cpuid_fault invpcid_single pti fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 4600.13
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
Summary of what we talked about in the comments.
The output of cat /proc/cpuinfo tells us, that the instance actually has 8 CPU cores, which we can see from this line:
cpu cores : 8
That tells us AWS is giving you what you're paying for :-)
I don't know anything about pm2, but the docs tell me, that -i max in pm2 start src/app.js -i max -f tells pm2 to start as many worker processes as there are CPU cores.
It seems that somehow the CPU core detection has been messed up when you changed the instance type and it has chosen to add the new 8 cores to the 4 cores it already knew about to now give you 12 processes.
As a workaround you can explicitly set the number of worker processes to 8 like this:
pm2 start src/app.js -i 8 -f

QEMU Showing Black Screen After Creating Linux uImage for ARM

So I have been following this article:
https://opensourceforu.com/2011/06/qemu-for-embedded-systems-development-part-1/
I first made sure that I enabled the “Use the ARM EABI to compile the kernel” option in the menuconfig and saved it as .config
After that I ran the following command and got the following output:
ivan#UbuntuMATE:~/Programming/linux$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- uImage -s LOADADDR=0x00008000
<stdin>:1332:2: warning: #warning syscall io_pgetevents not implemented [-Wcpp]
Image Name: Linux-4.18.0-10986-g778a33959a8a
Created: Mon Aug 20 23:09:46 2018
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2816048 Bytes = 2750.05 kB = 2.69 MB
Load Address: 00008000
Entry Point: 00008000
Now the problem happens when I try to test the image with the following command:
ivan#UbuntuMATE:~/Programming/linux$ qemu-system-arm -M versatilepb -m 256M -kernel arch/arm/boot/uImage
I get a black screen. I understand that the kernel will crash, but I still expect to see text on the screen. After reading comments and several questions similar to this online, I try the following command:
ivan#UbuntuMATE:~/Programming/linux$ qemu-system-arm -M versatilepb -m 256M -kernel arch/arm/boot/uImage -append "console=ttyAMA0"
I have also tried with tty1 and even tried what this link suggested:
Just black screen after running Qemu
Please advise as to how to proceed. Thanks in advance!
EDIT: I figured it out!! Thank you #bornfree for the starting point in guiding me to the answer!
Low and behold I no longer get a blank screen but I still get an error:
Error: invalid dtb and unrecognized/unsupported machine ID
r1=0x00000183, r2=0x00000100
r2[]=05 00 00 00 01 00 41 54 01 00 00 00 00 10 00 00 Available machine support:
ID (hex) NAME
ffffffff Generic DT based system
ffffffff ARM-Versatile (Device Tree Support)
Please check your kernel config and/or bootloader.
So after doing some research, I learned that the reason why my old commands didn't work was because back in the day they had all the code for the different boards in the kernel. So they decided to separate it out into device tree files (which is what I believe you were referring to in your last email?) So I noticed that the board files are included in /arch/arm/dts folder but they were just source files. So I had to find a way to compile the board to a dtb to be able to include it to qemu using -dtb. At first I found this command:
ivan#UbuntuMATE-VBox:~/linux/scripts/dtc$ ./dtc -I dts -O dtb -o versatile-pb.dtb /home/ivan/linux/arch/arm/boot/dts/versatile-pb.dts
Error: /home/ivan/linux/arch/arm/boot/dts/versatile-pb.dts:2.1-2 syntax error FATAL ERROR: Unable to parse input tree
So that was a bit discouraging until I found out there is a way with make to make the image I need. First to generate the config file.
ivan#UbuntuMATE-VBox:~/linux$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- versatile_defconfig
Then to generate the dtb file:
ivan#UbuntuMATE-VBox:~/linux$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- dtbs
(Before continuing I should mention that I built the simple root file system mentioned in the original tutorial I was following. You'll see below what I mean).
Then I tried running the command again:
qemu-system-arm -M versatilepb -m 256M -nographic -kernel /home/ivan/linux/arch/arm/boot/uImage -initrd /home/ivan/opt/test/rootfs -dtb dts/versatile-pb.dtb -append "root=/dev/ram rdinit=/hello console= ttyS0"
Then I get another error:
vpb_sic_write: Bad register offset 0x2c
So I found out that ttyS0 emulates PC-style 8250/16550 serial ports where QEMU uses AMBA PL011 for the versatile machines so it uses ttyAMA0, which was originally what I tested with. Since my line has changed I figured I should change it...
qemu-system-arm -M versatilepb -m 256M -nographic -kernel /home/ivan/linux/arch/arm/boot/uImage -initrd /home/ivan/opt/test/rootfs -dtb dts/versatile-pb.dtb -append "root=/dev/ram rdinit=/hello console= ttyAMA0"
Low and behold....it finally worked!!!
vpb_sic_write: Bad register offset 0x2c
Booting Linux on physical CPU 0x0
Linux version 4.18.0+ (ivan#UbuntuMATE-VBox) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-16ubuntu3)) #1 Tue Aug 21 15:56:30 PDT 2018
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00093177
CPU: VIVT data cache, VIVT instruction cache
OF: fdt: Machine model: ARM Versatile PB Memory policy: Data cache writeback
random: get_random_bytes called from start_kernel+0x7c/0x3e4 with crng_init=0 Built 1 zonelists, mobility grouping on. Total pages: 65024 Kernel command line: root=/dev/ram rdinit=/hello console=ttyAMA0 Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 253796K/262144K available (3935K kernel code, 144K rwdata, 964K rodata, 176K init, 130K bss, 8348K reserved, 0K cma-reserved) Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0x(ptrval) - 0x(ptrval) (3937 kB)
.init : 0x(ptrval) - 0x(ptrval) ( 176 kB)
.data : 0x(ptrval) - 0x(ptrval) ( 145 kB)
.bss : 0x(ptrval) - 0x(ptrval) ( 131 kB)
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 VIC #(ptrval): id 0x00041190, vendor 0x41 FPGA IRQ chip 0 "intc" # (ptrval), 20 irqs, parent IRQ: 47
clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns Failed to initialize '/amba/timer#101e3000': -22
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
Console: colour dummy device 80x30
Calibrating delay loop... 290.20 BogoMIPS (lpj=1451008)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x8400 - 0x8458 VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns futex hash table entries: 256 (order: -1, 3072 bytes)
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
OF: amba_device_add() failed (-19) for /amba/smc#10100000
OF: amba_device_add() failed (-19) for /amba/mpmc#10110000
OF: amba_device_add() failed (-19) for /amba/sctl#101e0000
OF: amba_device_add() failed (-19) for /amba/watchdog#101e1000
OF: amba_device_add() failed (-19) for /amba/sci#101f0000
OF: amba_device_add() failed (-19) for /amba/ssp#101f4000
OF: amba_device_add() failed (-19) for /amba/fpga/sci#a000
Serial: AMBA PL011 UART driver
101f1000.uart: ttyAMA0 at MMIO 0x101f1000 (irq = 28, base_baud = 0) is a PL011 rev1 console [ttyAMA0] enabled
101f2000.uart: ttyAMA1 at MMIO 0x101f2000 (irq = 29, base_baud = 0) is a PL011 rev1
101f3000.uart: ttyAMA2 at MMIO 0x101f3000 (irq = 30, base_baud = 0) is a PL011 rev1
uart-pl011 10009000.uart: aliased and non-aliased serial devices found in device tree. Serial port enumeration may be unpredictable.
10009000.uart: ttyAMA3 at MMIO 0x10009000 (irq = 54, base_baud = 0) is a PL011 rev1
clocksource: Switched to clocksource arm,sp804
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes) TCP established hash table entries: 2048 (order: 1, 8192 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048) UDP hash table entries: 256 (order: 0, 4096 bytes) UDP-Lite hash table entries: 256 (order: 0, 4096 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: 492K
NetWinder Floating Point Emulator V0.97 (double precision)
workingset: timestamp_bits=30 max_order=16 bucket_order=0 Installing knfsd (copyright (C) 1996 okir#monad.swb.de).
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) io scheduler mq-deadline registered io scheduler kyber registered pl061_gpio 101e4000.gpio: PL061 GPIO chip #0x101e4000 registered pl061_gpio 101e5000.gpio: PL061 GPIO chip #0x101e5000 registered pl061_gpio 101e6000.gpio: PL061 GPIO chip #0x101e6000 registered pl061_gpio 101e7000.gpio: PL061 GPIO chip #0x101e7000 registered versatile-tft-panel 10000000.sysreg:display#0: no panel detected
drm-clcd-pl111 dev:20: set up callbacks for Versatile PL110
brd: module loaded
of-flash 34000000.flash: versatile/realview flash protection
34000000.flash: Found 1 x32 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000 Intel/Sharp Extended Query Table at 0x0031 Using buffer write method
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico#fluxnic.net> smc91x 10010000.net eth0: SMC91C11xFD (rev 1) at (ptrval) IRQ 41 smc91x 10010000.net eth0: Ethernet addr: 52:54:00:12:34:56
rtc-ds1307 0-0068: registered as rtc0
versatile reboot driver registered
mmci-pl18x fpga:05: mmc0: PL181 manf 41 rev0 at 0x10005000 irq 59,60 (pio) mmci-pl18x fpga:0b: mmc1: PL181 manf 41 rev0 at 0x1000b000 irq 49,50 (pio) leds-syscon 10000000.core-module:led#08.0: registered LED versatile:0 leds-syscon 10000000.core-module:led#08.1: registered LED versatile:1 leds-syscon 10000000.core-module:led#08.2: registered LED versatile:2 leds-syscon 10000000.core-module:led#08.3: registered LED versatile:3 leds-syscon 10000000.core-module:led#08.4: registered LED versatile:4 leds-syscon 10000000.core-module:led#08.5: registered LED versatile:5 leds-syscon 10000000.core-module:led#08.6: registered LED versatile:6 leds-syscon 10000000.core-module:led#08.7: registered LED versatile:7
ledtrig-cpu: registered to indicate activity on CPUs
NET: Registered protocol family 17
input: AT Raw Set 2 keyboard as /devices/platform/amba/amba:fpga/10006000.kmi/serio0/input/input0
drm-clcd-pl111 dev:20: set up callbacks for Versatile PL110
drm-clcd-pl111 dev:20: set up callbacks for Versatile PL110
rtc-ds1307 0-0068: setting system clock to 2018-08-22 23:24:34 UTC (1534980274) Freeing unused kernel memory: 176K This architecture does not have kernel memory protection.
Hello World!random: fast init done
input: ImExPS/2 Generic Explorer Mouse as /devices/platform/amba/amba:fpga/10007000.kmi/serio1/input/input2
drm-clcd-pl111 dev:20: set up callbacks for Versatile PL110
Hello World!
Hello World!
Try using the below command.
qemu-system-arm -M versatilepb -m 256M -nographic -kernel
arch/arm/boot/uImage -append "console=ttyS0"

What must I change to boot Linux 4.9 with Nios2?

I read the manual and used buildroot the create the images
$ ls buildroot/output/images/
rootfs.cpio rootfs.jffs2 rootfs.tar
Then I built u-boot:
~/nios2/u-boot-socfpga$ ls -al u-boot
-rwxrwxr-x 1 developer developer 852924 apr 8 14:00 u-boot
Then I do make menuconfig and choose the path to the buildroot files
Now I build the vmImage.
OBJCOPY arch/nios2/boot/vmlinux.bin
GZIP arch/nios2/boot/vmlinux.gz
UIMAGE arch/nios2/boot/vmImage
Image Name: Linux-4.9.0-00104-g84d4f8a-dirty
Created: Sat Apr 8 14:02:22 2017
Image Type: NIOS II Linux Kernel Image (gzip compressed)
Data Size: 7237729 Bytes = 7068.09 kB = 6.90 MB
Load Address: c0000000
Entry Point: c0000000
Kernel: arch/nios2/boot/vmImage is ready
I wonder why I can't run any of the generated images now. Where is the faulty method? It all compiles but my file system doesn't come in place when I download the files to the fpga:
$ nios2-download -g /home/developer/nios2/linux4/vmlinux
Using cable "USB-Blaster [2-1]", device 1, instance 0x00
Pausing target processor: OK
Initializing CPU cache (if present)
OK
Downloaded 8504KB in 43.7s (194.5KB/s)
Verified OK
Starting processor at address 0xC0000000
It stops with kernel panic:
$ nios2-terminal
nios2-terminal: connected to hardware target using JTAG UART on cable
nios2-terminal: "USB-Blaster [2-1]", device 1, instance 0
nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate)
Linux version 4.9.0-00104-g84d4f8a-dirty (developer#1604) (gcc version 6.2.0 (Sourcery CodeBench Lite 2016.11-32) ) #49 Sat Apr 8 14:02:21 CEST 2017
bootconsole [early0] enabled
early_console initialized at 0xe8001440
On node 0 totalpages: 32768
free_area_init_node: node 0, pgdat c084e52c, node_mem_map c0883b80
Normal zone: 256 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 32768 pages, LIFO batch:7
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: debug console=ttyAL0,115200
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Sorting __ex_table...
Memory: 121196K/131072K available (2233K kernel code, 66K rwdata, 352K rodata, 5852K init, 197K bss, 9876K reserved, 0K cma-reserved)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:64 nr_irqs:64 0
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������clocksource: nios2-clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 38225208935 ns
Console: colour dummy device 80x25
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=50000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
cpu cpu0: Error -2 creating of_node link
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
�random: fast init done
clocksource: Switched to clocksource nios2-clksrc
random: crng init done
futex hash table entries: 256 (order: -1, 3072 bytes)
workingset: timestamp_bits=30 max_order=15 bucket_order=0
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
�8001440.serial: ttyJ0 at MMIO 0x8001440 (irq = 2, base_baud = 0) is a Altera JTAG UART
mousedev: PS/2 mouse device common for all mice
Warning: unable to open an initial console.
Failed to create /dev/root: -2
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -2
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
What can I do about it?
You must point the initramfs source file to the cpio archive, so /home/developer/nios2/buildroot/output/images/rootfs.cpio.
Even easier is to let Buildroot build your kernel and choose the initramfs filesystem. Then Buildroot will take care of linking the initramfs into the kernel.

Booting Linux Kernel on Zynq Devices (Zybo and ZedBoard)

We are trying to boot linux in a xilinx system following the instructions in wiki-xilinx-linux.
After a lot of different tests, after had a look (among others) here, we have enabled the option "LOW LEVEL KERNEL DEBUGGING AND EARLYPRINTKs". Thanks to this we were able to see the following:
U-Boot 2016.07-03720-g95e11f6 (Oct 13 2016 - 03:48:21 -0700)
Model: Zynq MMC: sdhci#e0100000: 0
SF: Detected S25FL256S_64K with page size 256 Bytes, eIn: serial#e0001000
Out: serial#e0001000
Err: serial#e0001000
Model: Z00b000
Hit any key to stop autoboot: 0
Copying Linux from SD to RAM...
Device: sdhci#e0100000
Manufacturer ID: 2
OEM: 544d
Name: SA04G
Tran Speed:reading uImage
3842280 bytes read in 342 ms (10.7 MiB/s)
reading devicetree.dtb
8955 bytes read in 20 ms (436.5 KiB/s)
## Booting kernel from Legacy Image at 0008000
Entry Point: 00008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02a00000
Booting using the fdt blob at OK
Loading Device Tree to 1eb0e000, end 1eb132fa ... OK
Starting kernel .... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.6.0-xilinx-22282-g7d819bd (leProcessor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasiMemory policy: Data cache writealloc
percpu: Embedded 12 pages/cpu #debcd000 s1115200 root=/dev/mmcblk0p2 rw rootwait
PID hash table entries: 2048 (order: 1, (order: 5, 131072 bytes)
Memory: 494528K/524288K available (5304K kernel code, or : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000( 512 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf .data : 0xc0900000 - 0xc0939b60 ( 231 kB)
.bss : 0xc0939b60 - 0xc09R_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cp00 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> ortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gatnq_clock_init: clkc starts at e0802100
Zynq clock init
sched_clock: 64 bits at_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
my device 80x30
Calibrating delay loop (skipped), value calculated using timer )
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testinx100058
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksT: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic cohe maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256interface driver usbfs
usbcore: registered new interface driver hub
usbcore: r00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - CoLinux Sound Architecture Driver Initialized.
clocksource: Switched to clocksourle entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (establish (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered nameRegistered tcp NFSv4.1 backchannel transport module.
hw perfevents: enabled witx_order=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Rever for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-led
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to e086c000
[drm] Initialized brd: module loaded
loop: module loaded
CAN device driver interface
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 145 (0rne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-si2c /dev entries driver
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver ste Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: Invalid maximummc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
ledtrig-cphid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller ar protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
Regards found.
Waiting for root device /dev/mmcblk0p2...
mmc0: new high speed SDHCmmcblk0: p1 p2
VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -30
Ple4 ram1 (driver?)
0102 16384 ram2 (driver?)
0103 16384 ra 16384 ram7 (driver?)
0108 16384 ram8 (driver?)
0109 0c 16384 ram12 (driver?)
010d 16384 ram13 (driver?)
010e ?)
b300 3813376 mmcblk0 driver: mmcblk
b301 1048576 mmcblk0: Unable to mount root fs on unknown-block(179,2)
CPU1: stopping
CPU: 1 PID: 0nd_backtrace) from [<c010a608>] (show_stack+0x10/0x14)
[<c010a608>] (show_stackb24>] (ipi_cpu_stop+0x3c/0x70)
[<c010cb24>] (ipi_cpu_stop) from [<c010d394>] (h4>] (__irq_svc+0x54/0x90)
Exception stack(0xde46ff70 to 0xde46ffb8)
ff60: 01 debdc5c0 474d4ec6 00000000 45283f08 00000000 00000000 00000000
ffa0: 0000000/0x1c0)
[<c0492ccc>] (cpuidle_enter_state) from [<c014a72c>] (cpu_startup_entryFS: Unable to mount root fs on unknown-block(179,2)
It seems that the Virtual File System tries to read from some unknown-block:
VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -30
Googling, no solutions were found.
Has somebody some idea on how to solve this? Where can we have a look? Which parameter to play with?
Finally I solved all the problems I had (running linux on Zybo with a custom hw in the Programmable Logic). Yes, because I am a beginner, I found different problems:
1) One of the problem was in the .dts: the part with eFuse was compleatly missing. Xilinx committed another version of the .dts with the problem fixed.
2) Another big problem was with the bitstream: at the beginning I wanted to program the PL on Zybo with a running linux using: cat bitstream.bit > /dev/xdevcfg. Of course this is compleatly possible (I tested it) as it is explaned in [this wiki-page][1]. Problem: if you have a custom HW in in FPGA you have also its description in the device-tree. The kernel tries to initialize all the periferics connected to the PS but, of course, the PL is not yet connected!! The solution is to download the bitstream before, including it in the boot.bif in order to generate the boot.bin in the right way:
image : {
[bootloader]fsbl.elf
bitstream.bit
u-boot.elf
devicetree.dtb
uramdisk.image.gz
uImage.bin // currently bootgen requires a file extension. this is just a renamed uImage
}
of course using: bootgen -image boot.bif -o i boot.bin.
There were other little problems and I will try to add a list in future editing-revision of this answer.
UPDATE:
to solve the problem described in the question, if there are no additional problems/errors, should be enough to add the bootargs the option rootdelay=3 (rootdelay — Time to delay before attempting to mount the root filesystem).
This can be necessary because u-boot tries to access the SD too fast and the SD is not ready yet.
You have it set to use the root filesystem on mmcblk0p2 - the second partition of your SD-card. If the filesystem is in fact placed there, you have to verify that the kernel has support for what the partition was formatted with (e.g. ext3).
Is this a prebuilt image or one you built yourself?
If you use the command petalinux-config before building, you can change settings for where to store the filesystem.
Btw, this is a very common problem so you should find lots of info if you use the right terms when you google it.

PHP processing speed apache 2.4 mpm-prefork mod_php 5.4 vs nginx 1.2.x PHP-FPM 5.4

I've been looking for days to see if someone has done a good, documented, PHP processing speed comparison between
apache-mpm-prefork 2.4 with mod_php 5.4
and
nginx 1.2.x + PHP-FPM 5.4
Why I'm looking: The only test I saw are abount benchmarks, serving full pages or Hello, World -like test, without proper documentation on what exactly was tested. I don't care about the request/seconds, the hardware, but I do need to see what PHP script was tested and with what exact configuration.
Why these two: mod_php was known to be the fastest on processing PHP ( no static files, no request/response measuring, just processing the PHP itself ) but a lot has changed since then, including apache version. Nginx and PHP-FPM eats a lot less memory, so it'd be a good reason to change architecture but if they're not fast enough in this case, the change would be irrelevant.
I know if I'm unable to find one I have to do it myself but I can't believe no one has done a test like this so far :)
I have completed this test on CentOS 6.3 using nginx 1.2.7, apache 2.4.3 and php 5.4.12 all compiled with no changes to default.
./configure
make && make install
With the exception of php where I enabled php-fpm
./configure --enable-fpm
All servers have 100% default config except as noted below. All testing was done on a test server, with no load and a reboot between tests. The server has a Intel(R) Xeon(R) CPU E3-1230, 1GB RAM and 2 x 60GB SSD in RAID 1. Tests were run using ab -n 50000 -c 500 http://127.0.0.1/test.php
Test PHP script:
<?php
$testing = 0;
for ($i = 0; $i < 1000; $i++) {
$testing++;
}
echo $testing;
I also had to enable php in nginx.conf as it's not enabled by default.
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
include fastcgi_params;
}
Nginx - PHP-FPM on 127.0.0.1:9000
Concurrency Level: 500
Time taken for tests: 10.932 seconds
Complete requests: 50000
Failed requests: 336
(Connect: 0, Receive: 0, Length: 336, Exceptions: 0)
Write errors: 0
Non-2xx responses: 336
Total transferred: 7837824 bytes
HTML transferred: 379088 bytes
Requests per second: 4573.83 [#/sec] (mean)
Time per request: 109.317 [ms] (mean)
Time per request: 0.219 [ms] (mean, across all concurrent requests)
Transfer rate: 700.17 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 34 338.5 0 7000
Processing: 0 34 166.5 23 8120
Waiting: 0 34 166.5 23 8120
Total: 13 68 409.2 23 9846
Percentage of the requests served within a certain time (ms)
50% 23
66% 28
75% 32
80% 33
90% 34
95% 46
98% 61
99% 1030
100% 9846 (longest request)
Nginx - PHP-FPM via socket (config change to fastcgi_pass)
fastcgi_pass unix:/var/lib/php/php.sock;
Concurrency Level: 500
Time taken for tests: 7.054 seconds
Complete requests: 50000
Failed requests: 351
(Connect: 0, Receive: 0, Length: 351, Exceptions: 0)
Write errors: 0
Non-2xx responses: 351
Total transferred: 7846209 bytes
HTML transferred: 387083 bytes
Requests per second: 7087.70 [#/sec] (mean)
Time per request: 70.545 [ms] (mean)
Time per request: 0.141 [ms] (mean, across all concurrent requests)
Transfer rate: 1086.16 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 26 252.5 0 7001
Processing: 0 24 112.9 17 3683
Waiting: 0 24 112.9 17 3683
Total: 7 50 306.4 17 7001
Percentage of the requests served within a certain time (ms)
50% 17
66% 19
75% 20
80% 21
90% 23
95% 31
98% 55
99% 1019
100% 7001 (longest request)
Apache - mod_php
Concurrency Level: 500
Time taken for tests: 10.979 seconds
Complete requests: 50000
Failed requests: 0
Write errors: 0
Total transferred: 9800000 bytes
HTML transferred: 200000 bytes
Requests per second: 4554.02 [#/sec] (mean)
Time per request: 109.793 [ms] (mean)
Time per request: 0.220 [ms] (mean, across all concurrent requests)
Transfer rate: 871.67 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 22 230.2 1 7006
Processing: 0 58 426.0 18 9612
Waiting: 0 58 425.9 18 9611
Total: 5 80 523.8 19 10613
Percentage of the requests served within a certain time (ms)
50% 19
66% 23
75% 25
80% 26
90% 31
95% 36
98% 1012
99% 1889
100% 10613 (longest request)
I'll be more than happy to tune apache further, but it seems apache just can't keep up. The clear winner is nginx with php-fpm via socket.
It seems you are comparing apples with oranges, or more to put it more accurately, you are confounding the results by adjusting two variables. Surely, it would be more sensible to compare Apache+fastcgi+php-fpm against nginx+php-fpm? You'd expect the php-fpm part to be the same, so then you would be measuring the better of Apache_fastcgi vs nginx.

Resources