intel SPDK ioat example fail to run - linux

I am new in the intel SPDK and meet some problem when I run the example code.
I setup the BIOS as this page said.
Intel® Hyper-Threading Technology off
Intel SpeedStep® technology enabled
Intel® Turbo Boost Technology disabled
then I git clone from this page and run all the command. The test command ./test/unit/unittest.sh return All unit tests passed.
But when I run the example examples/ioat/verify/verify , it return
EAL: 24 hugepages of size 1073741824 reserved, but no mounted hugetlbfs found for that size
Starting SPDK v18.10-pre / DPDK 18.05.0 initialization...
[ DPDK EAL parameters: verify --no-shconf -c 0x1 --legacy-mem --file-prefix=spdk_pid3170 ]
EAL: Detected 16 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/spdk_pid3170/mp_socket
EAL: 24 hugepages of size 1073741824 reserved, but no mounted hugetlbfs found
for that size
EAL: Probing VFIO support...
User configuration:
Run time: 10 seconds
Core mask: 0x1
Queue depth: 32
Not enough ioat channels found. Check that ioat channels are bound
to uio_pci_generic or vfio-pci. scripts/setup.sh can help with this.
and scripts/setup.sh status shows
Hugepages
node hugesize free / total
node0 1048576kB 24 / 24
node0 2048kB 0 / 800
node1 1048576kB 0 / 0
node1 2048kB 0 / 224
NVMe devices
BDF Numa Node Driver name Device name
I/OAT DMA
BDF Numa Node Driver Name
virtio
BDF Numa Node Driver Name Device Name
My hardware is:
linux kernel version 4.15.7
with ioatdma compile as module
CPU intel Xeon E5-2695
chipset C612
It would be great help if somebody could give me some advises or send me some website about SPDK!
Thank you!

Run ./scripts/setup.sh (with no parameters). If there will be no ioat devices under I/OAT DMA section you can't run this app. Also there is no hugetlbfs mount points.

Related

DPDK Running As Non Privileged User

I have an issue running DPDK helloworld application as non privileged user.
[#dredd examples]$ ./dpdk-helloworld
EAL: Detected CPU lcores: 4
EAL: Detected NUMA nodes: 1
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /run/user/1000/dpdk/rte/mp_socket
EAL: rte_mem_virt2phy(): cannot open /proc/self/pagemap: Permission denied
EAL: FATAL: Cannot use IOVA as 'PA' since physical addresses are not available
EAL: Cannot use IOVA as 'PA' since physical addresses are not available
PANIC in main():
Cannot init EAL
5: [./dpdk-helloworld(_start+0x2e) [0x58ce4e]]
4: [/lib64/libc.so.6(__libc_start_main+0xf3) [0x7f93977edcf3]]
3: [./dpdk-helloworld(main+0x42) [0x58cf87]]
2: [./dpdk-helloworld(__rte_panic+0xdb) [0xa01c59]]
1: [./dpdk-helloworld(rte_dump_stack+0x27) [0xa2fcac]]
Clearly this issue is described in DPDK guide and it advises adding the capability to the executable which I did but it didn't work.
[XXX#dredd examples]$ sudo setcap cap_ipc_lock,cap_sys_admin+ep ./dpdk-helloworld
[sudo] password for XXX:
[XXX#dredd examples]$ getcap ./dpdk-helloworld
./dpdk-helloworld = cap_ipc_lock,cap_sys_admin+ep
[XXX#dredd examples]$
On other hand I have seen some pages that claim that running user itself must have the SYS_ADMIN capability. So does it mean that DPDK guide is not updated, and what why file permission may not be sufficient???
Any advises on how to overcome the permission issue for the DPDK application will be highly appreciated.
Running with sudo it seams to be working:-
[#dredd examples]$ sudo ./dpdk-helloworld
[sudo] password for XXX:
EAL: Detected CPU lcores: 4
EAL: Detected NUMA nodes: 1
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: VFIO support initialized
EAL: Using IOMMU type 8 (No-IOMMU)
EAL: Ignore mapping IO port bar(2)
EAL: Probe PCI driver: net_e1000_em (8086:100e) device: 0000:00:08.0 (socket 0)
The environment is VirtualBox AlmaLinux
[XXX#dredd examples]$ uname -a
Linux dredd 4.18.0-348.el8.x86_64 #1 SMP Tue Nov 9 06:28:28 EST 2021 x86_64 x86_64 x86_64 GNU/Linux
I have bound two pci devices to vfio-pci driver with disabled iommu support
sudo setcap all+ep ./dpdk-helloworld
But it is far from intended granularity of the solution

DPDK test application cannot found on redhat

I met a issue with error shows(when deploy dpdk on redhat) :
sudo: x86_64-native-linuxapp-gcc/app/test: command not found
I am not sure what is the matter.
Now I cannot test dpdk, could you someone help me if you met this before.
There are some detailed information about my system below.
FYI.
Kernel version
3.10.0-693.11.1.el7.x86_64
[root#cnhzdhcp16557 usertools]# ./dpdk-setup.sh
Build x86_64-native-linuxapp-gcc
...
== Build app/test-crypto-perf
== Build app/test-eventdev
Build complete [x86_64-native-linuxapp-gcc]
Installation cannot run with T defined and DESTDIR undefined
Insert IGB UIO module
Unloading any existing DPDK UIO module
Loading DPDK UIO module
Insert VFIO module
Unloading any existing VFIO module
Loading VFIO module
chmod /dev/vfio
OK
Insert KNI module
Unloading any existing DPDK KNI module
Loading DPDK KNI module
Press enter to continue ...
Network devices using kernel driver
0000:00:19.0 'Ethernet Connection I217-V 153b' if=enp0s25 drv=e1000e unused=igb_uio Active
0000:02:00.0 'Centrino Advanced-N 6235 088e' if=wlo1 drv=iwlwifi unused=igb_uio
Huge page information
AnonHugePages: 98304 kB
HugePages_Total: 128
HugePages_Free: 128
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Run test application ($RTE_TARGET/app/test)
Enter hex bitmask of cores to execute test app on
Example: to execute app on cores 0 to 7, enter 0xff
bitmask: f
Launching app
sudo: x86_64-native-linuxapp-gcc/app/test: command not found
Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)
Enter hex bitmask of cores to execute test app on
Example: to execute app on cores 0 to 7, enter 0xff
bitmask: f
Launching app
EAL: Detected 4 lcore(s)
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: PCI device 0000:00:19.0 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 8086:153b net_e1000_em
EAL: No probed ethernet devices
Interactive-mode selected
USER1: create a new mbuf pool : n=171456, size=2176,
socket=0
EAL: Error - exiting with code: 1
Cause: Creation of mbuf pool for socket 0 failed: Cannot allocate memory
The test application should be build manually with make test... command. What you really want is the testpmd application to work. There are two issues:
EAL: No probed ethernet devices log means there are no NICs available for testpmd. You need to bind your NIC to igb_uio in order to use in with DPDK application.
Cause: Creation of mbuf pool for socket 0 failed: Cannot allocate memory log means there are no enough huge pages to allocate mempool. Indeed:
HugePages_Free: 128
Hugepagesize: 2048 kB
There are 128 pages 2M each, which makes 256M of available memory. While testpmd tries to allocate create a new mbuf pool : n=171456, size=2176 which makes 171456 * 2176 = 373M, so it fails.
The solution would be to either allocate more huge pages or to run testpmd with --total-num-mbufs command line option.

T4240RDB-64B - QoIQ SDK 2.0 - Kernel crashes

I built T4240rdb-64b with QorIQ-SDK-V2.0-20160527-yocto on Ubuntu Linux 16. LTS 64bit.
This is my commands to build it:
~/QorIQ-SDK-V2.0-20160527-yocto$ source ./fsl-setup-env -m t4240rdb-64b
Configuring for t4240rdb-64b ...
~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b was created before.
Back to build project ~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b.
Nothing is changed.
~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b$ bitbake fsl-image-minimal
WARNING: Host distribution "Ubuntu-16.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |##########################################################################################################| ETA: 00:00:00
Loaded 6050 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.28.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-16.04"
TARGET_SYS = "powerpc64-fsl-linux"
MACHINE = "t4240rdb-64b"
DISTRO = "fsl-qoriq"
DISTRO_VERSION = "2.0"
TUNE_FEATURES = "m64 fpu-hard e6500 altivec"
TARGET_FPU = "hard"
meta
meta-yocto
meta-yocto-bsp = "HEAD:9a211a4a2c1bfcb292dc97d8dcac149bca9e3f1b"
meta-oe
meta-multimedia
meta-gnome
meta-networking
meta-perl
meta-python
meta-ruby
meta-filesystems
meta-webserver
meta-xfce = "HEAD:dc5634968b270dde250690609f0015f881db81f2"
meta-freescale = "HEAD:7facbdb726e2dda0515e084c2066a4b8dd99c6d2"
meta-freescale-internal = "HEAD:4829293f807e35a1111e79763294fc8b98b97810"
meta-freescale-extra = "HEAD:bee911b027e0480b034674d0ddee3fcb06d2e985"
meta-virtualization = "HEAD:042425c1d98bdd7e44a62789bd03b375045266f5"
meta-java = "HEAD:8b776ac68f9af4596be3824152bcf0bc6b67fa1d"
meta-openstack
meta-openstack-aio-deploy
meta-openstack-compute-deploy
meta-openstack-compute-test-config
meta-openstack-controller-deploy
meta-openstack-controller-test-config
meta-openstack-qemu
meta-openstack-swift-deploy
meta-cloud-services = "HEAD:d8bc0d92d0f741e2ea1e6d3d9bc6b7a091d03cfb"
meta-security = "HEAD:f9367e71f923fc7d2fb600208e2b97535ea41777"
NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 1499 tasks of which 1499 didn't need to be rerun and all succeeded.
Summary: There was 1 WARNING message shown.
~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b$
When I run QEMU with this command:
sudo ~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-ppc64 \
-cpu e5500 -nographic -m 1028 -M ppce500 \
-kernel ~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b/tmp/deploy/images/t4240rdb-64b/uImage \
-initrd ~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b/tmp/deploy/images/t4240rdb-64b/fsl-image-minimal-t4240rdb-64b.ext2.gz \
-append "root=/dev/ram rw console=ttyS0,115200 \
ip=26.26.26.2::26.26.26.1:255.255.255.0 mem=1028M" -serial tcp::4444,server,telnet -net nic,model=e1000 \
-net tap,ifname=tap0,script=no,downscript=no
It couldn't boot. This is boot massages:
~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b$ telnet 26.26.26.1 4444
Trying 26.26.26.1...
Connected to 26.26.26.1.
Escape character is '^]'.
Using QEMU e500 machine description
MMU: Supported page sizes
4 KB as direct
4096 KB as direct
16384 KB as direct
65536 KB as direct
262144 KB as direct
1048576 KB as direct
MMU: Book3E HW tablewalk not supported
Found initrd at 0xc000000004000000:0xc000000004423e3b
bootconsole [udbg0] enabled
CPU maps initialized for 1 thread per core
Starting Linux PPC64 #1 SMP Sun Jan 8 12:42:09 ICT 2017
-----------------------------------------------------
ppc64_pft_size = 0x0
phys_mem_size = 0x40000000
dcache_line_size = 0x40
icache_line_size = 0x40
cpu_features = 0x00180400181802c0
possible = 0x00180480581802c8
always = 0x00180400581802c0
cpu_user_features = 0xcc008000 0x08000000
mmu_features = 0x000a0010
firmware_features = 0x0000000000000000
-----------------------------------------------------
<- setup_system()
Linux version 4.1.8-rt8+gbd51baf (hstan#server-06) (gcc version 4.9.2 (GCC) ) #1 SMP Sun Jan 8 12:42:09 ICT 2017
qemu_e500_setup_arch()
Zone ranges:
DMA [mem 0x0000000000000000-0x000000003fffffff]
DMA32 empty
Normal empty
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000000000-0x000000003fffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x000000003fffffff]
MMU: Allocated 2112 bytes of context maps for 255 contexts
PERCPU: Embedded 17 pages/cpu #c00000003f000000 s28824 r0 d40808 u1048576
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 258560
Kernel command line: root=/dev/ram rw console=ttyS0,115200 ip=26.26.26.2::26.26.26.1:255.255.255.0 mem=1028M
PID hash table entries: 4096 (order: 3, 32768 bytes)
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
Sorting __ex_table...
Memory: 949036K/1048576K available (7856K kernel code, 1132K rwdata, 3008K rodata, 364K init, 764K bss, 99540K reserved, 0K cma-reserved)
Hierarchical RCU implementation.
RCU debugfs-based tracing is enabled.
CONFIG_RCU_FANOUT set to non-default value of 32
Additional per-CPU info printed with stalls.
RCU restricting CPUs from NR_CPUS=24 to nr_cpu_ids=1.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS:512 nr_irqs:512 16
mpic: Setting up MPIC " OpenPIC " version 1.2 at fe0040000, max 1 CPUs
mpic: ISU size: 256, shift: 8, mask: ff
mpic: Initializing for 256 sources
clocksource timebase: mask: 0xffffffffffffffff max_cycles: 0x5c4093a7d1, max_idle_ns: 440795210635 ns
clocksource: timebase mult[2800000] shift[24] registered
Console: colour dummy device 80x25
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
e500 family performance monitor hardware support registered
Brought up 1 CPUs
devtmpfs: initialized
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
xor: measuring software checksum speed
8regs : 1289.000 MB/sec
8regs_prefetch: 1079.000 MB/sec
32regs : 1745.000 MB/sec
32regs_prefetch: 1572.000 MB/sec
xor: using function: 32regs (1745.000 MB/sec)
NET: Registered protocol family 16
Found FSL PCI host bridge at 0x0000000fe0008000. Firmware bus number: 0->255
PCI host bridge /pci#fe0008000 (primary) ranges:
MEM 0x0000000c00000000..0x0000000c1fffffff -> 0x00000000e0000000
IO 0x0000000fe1000000..0x0000000fe100ffff -> 0x0000000000000000
/pci#fe0008000: PCICSRBAR # 0xdff00000
setup_pci_atmu: end of DRAM 40000000
EDAC PCI0: Giving out device to module MPC85xx_edac controller mpc85xx_pci_err: DEV fe0008000.pci (INTERRUPT)
MPC85xx_edac acquired irq 24 for PCI Err
MPC85xx_edac PCI err registered
fsl-pamu: fsl_pamu_init: could not find a PAMU node
PCI: Probing PCI hardware
fsl-pci fe0008000.pci: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x10000-0x1ffff] (bus address [0x0000-0xffff])
pci_bus 0000:00: root bus resource [mem 0xc00000000-0xc1fffffff] (bus address [0xe0000000-0xffffffff])
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
PCI: Cannot allocate resource region 0 of device 0000:00:00.0, will remap
pci 0000:00:00.0: BAR 0: assigned [mem 0xc00000000-0xc000fffff]
pci 0000:00:00.0: BAR 8: assigned [mem 0xc00100000-0xc001fffff]
pci 0000:00:01.0: BAR 6: assigned [mem 0xc00200000-0xc0023ffff pref]
pci 0000:00:01.0: BAR 0: assigned [mem 0xc00240000-0xc0025ffff]
pci 0000:00:01.0: BAR 1: assigned [io 0x11000-0x1103f]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0: bridge window [io 0x10000-0x10fff]
pci 0000:00:00.0: bridge window [mem 0xc00100000-0xc001fffff]
raid6: int64x1 gen() 721 MB/s
raid6: int64x1 xor() 495 MB/s
raid6: int64x2 gen() 1018 MB/s
raid6: int64x2 xor() 370 MB/s
raid6: int64x4 gen() 1334 MB/s
raid6: int64x4 xor() 890 MB/s
raid6: int64x8 gen() 650 MB/s
raid6: int64x8 xor() 440 MB/s
raid6: using algorithm int64x4 gen() 1334 MB/s
raid6: .... xor() 890 MB/s, rmw enabled
raid6: using intx1 recovery algorithm
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti#linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
No BMan portals available!
QMan: Allocated lookup table at 8000000000002000, entry count 65537
No QMan portals available!
No USDPAA memory, no 'fsl,usdpaa-mem' in device-tree
Switched to clocksource timebase
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 5, 131072 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...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 4236K (c000000004000000 - c000000004423000)
futex hash table entries: 256 (order: 2, 16384 bytes)
audit: initializing netlink subsys (disabled)
audit: type=2000 audit(0.952:1): initialized
HugeTLB registered 4 MB page size, pre-allocated 0 pages
HugeTLB registered 16 MB page size, pre-allocated 0 pages
HugeTLB registered 64 MB page size, pre-allocated 0 pages
HugeTLB registered 256 MB page size, pre-allocated 0 pages
HugeTLB registered 1 GB page size, pre-allocated 0 pages
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
ntfs: driver 2.1.32 [Flags: R/O].
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
async_tx: api initialized (async)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
console [ttyS0] disabled
serial8250.0: ttyS0 at MMIO 0xfe0004500 (irq = 42, base_baud = 115200) is a 16550A
console [ttyS0] enabled
console [ttyS0] enabled
bootconsole [udbg0] disabled
bootconsole [udbg0] disabled
ePAPR hypervisor byte channel driver
brd: module loaded
loop: module loaded
st: Version 20101219, fixed bufsize 32768, s/g segs 256
libphy: Fixed MDIO Bus: probed
Freescale FM module, FMD API version 21.1.0
Freescale FM Ports module
fsl_mac: fsl_mac: FSL FMan MAC API based driver
fsl_dpa: FSL DPAA Ethernet driver
fsl_advanced: FSL DPAA Advanced drivers:
fsl_proxy: FSL DPAA Proxy initialization driver
fsl_dpa_shared: FSL DPAA Shared Ethernet driver
fsl_dpa_macless: FSL DPAA MACless Ethernet driver
fsl_oh: FSL FMan Offline Parsing port driver
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2014 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
i2c /dev entries driver
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
Freescale(R) MPC85xx EDAC driver, (C) 2006 Montavista Software
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
No fsl,qman node
Freescale USDPAA process driver
fsl-usdpaa: no region found
Freescale USDPAA process IRQ driver
dce_sys_init done!
No fsl,dce node
Freescale pme2 db driver
PME2: fsl_pme2_db_init: not on ctrl-plane
Freescale pme2 scan driver
fsl-pme2-scan: device pme_scan registered
Freescale hypervisor management driver
fsl-hv: no hypervisor found
ipip: IPv4 over IPv4 tunneling driver
Initializing XFRM netlink socket
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
fsl_generic: FSL DPAA Generic Ethernet driver
hctosys: unable to open rtc device (rtc0)
md: Skipping autodetection of RAID arrays. (raid=autodetect will force)
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
devtmpfs: mounted
Freeing unused kernel memory: 364K (c000000000aa3000 - c000000000afe000)
init[1]: unhandled signal 4 at 00003fff90c3c0fc nip 00003fff90c3c0fc lr 00003fff90c1dd94 code 30001
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
CPU: 0 PID: 1 Comm: init Not tainted 4.1.8-rt8+gbd51baf #1
Call Trace:
[c0000000390538d0] [c0000000007a34fc] .dump_stack+0x8c/0xb8 (unreliable)
[c000000039053950] [c0000000007a0e34] .panic+0xf0/0x270
[c0000000390539f0] [c00000000003b520] .do_exit+0xa00/0xa04
[c000000039053ae0] [c00000000003c5a4] .do_group_exit+0x54/0xec
[c000000039053b70] [c000000000048640] .get_signal+0x2f8/0x674
[c000000039053c70] [c0000000000092bc] .do_signal+0x44/0x218
[c000000039053db0] [c00000000000959c] .do_notify_resume+0x64/0x78
[c000000039053e30] [c000000000000c4c] .ret_from_except_lite+0x78/0x7c
Rebooting in 180 seconds..
I've try boot from SD card on real T4240RDB board, it happen the same error.
Please help me.
Thanks in advance
Because the warning:
WARNING: Host distribution "Ubuntu-16.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
I have tryed build on Linux Ubuntu 14.04 LTS, but the same error when I boot the image and rootfs.

Init process not found when booting with ramdisk as rootfs

I'm trying to setup a ramdisk for a setup I have with AT91SAM9261 and 2.6.30 kernel.
I know you would say why don't I use initramfs? I will use also that one, as of now I would like to check if I can boot with a ramdisk as rootfs.
I have already a root fs running fine on this system in jffs2 format.
I used below tutorial:
http://www.ibm.com/developerworks/library/l-initrd/
So I created the ramdisk directly on the embedded target, with 4MB size.
I used "dd" and "mkefs" and the ramdisk image works fine if I mount it as loop when rootfs is my jffs2.
I can browse mount_point and do stuff inside.
The content was created according to the section "Manually building initial RAM disk" in the above link.
In /dev I placed null and console, in /bin I copied busybox and created the links.
I set the execute attribute to init script as well, which works fine when I run it here (as loop device with jffs2 as rootfs)
In my kernel config I enabled ramdisk support as follows:
CONFIG_BLK_DEV_INITRD=y
CONFIG_RD_GZIP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
Using tftp I download the ramdisk image to 0x21100000.
At 0x20008000 I have the kernel uncompressed and at 0x22000000 the zImage copied.
However, I'm not able to boot successfully the system as it hangs when checking init process.
As I mentioned, I checked several times that my init can be executed,
I also used in the bootargs init=/bin/busybox or other scripts/binaries to check if any can be used as init.
Command line I use now:
bootargs=64M console=ttyS0,115200 root=/dev/ram0 rw
initrd=0x21100000,4194304 init=/init
For some I set ownership to "nobody" just to check if it makes any difference.
As it can be seen in the log output the ramdisk is mounted, but init fails.
It gives a warning to check the ext2 image, which I did before copying it and I have no error reported.
The tftp server is on Windows7. I though I might have some incompatibility if I copy the ramdisk image from linux to Windows then do tftp from Windows server.
So I copied the image again from Windows to linux, mounted it and checked if the FS reports any error and scripts can be executed - everything looks normal.
So I do have all files in place, attributes set, ramdisk is reported as being mounted ok as rootfs, but init cannot be found.
Uncompressing Linux......................................................................................................... done, booting the kernel.
Linux version 2.6.30-olimex (mishu#KubuntuVM) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 Mon Dec 29 13:53:54 CET 2014
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Olimex SAM9-L9261
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: 64M console=ttyS0,115200 root=/dev/ram0 rw initrd=0x21100000,4194304 init=/init
NR_IRQS:192
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 57384KB available (2924K code, 246K data, 132K init, 0K highmem)
Calibrating delay loop... 99.12 BogoMIPS (lpj=495616)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 716 bytes
NET: Registered protocol family 16
AT91: Power Management
AT91: Starting after user reset
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (junk in compressed archive); looks like an initrd
Freeing initrd memory: 4096K
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 120
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_lcdfb atmel_lcdfb.0: backlight control is not available
atmel_lcdfb atmel_lcdfb.0: 225KiB frame buffer at 23140000 (mapped at ffc00000)
Console: switching to colour frame buffer device 40x30
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00600000 (mapped at c4866000), irq 21
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
ssc ssc.1: Atmel SSC device at 0xc4878000 (irq 15)
Driver 'sd' needs updating - please use bus_type methods
dm9000 Ethernet Driver, V1.31
eth0 (dm9000): not using net_device_ops yet
eth0: dm9000e at c486a000,c486e044 IRQ 107 MAC: 3a:1f:34:08:54:64 (chip)
NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 1478 at 0x00000b8c0000
Creating 2 MTD partitions on "atmel_nand":
0x000000000000-0x000000040000 : "Partition 1"
0x000000040000-0x000020000000 : "Partition 2"
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 20, io mem 0x00500000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: AT91 OHCI
usb usb1: Manufacturer: Linux 2.6.30-olimex ohci_hcd
usb usb1: SerialNumber: at91
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
udc: at91_udc version 3 May 2006
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
mice: PS/2 mouse device common for all mice
input: gpio-keys as /class/input/input0
ads7846 spi0.2: touchscreen, irq 29
input: ADS784x Touchscreen as /class/input/input1
rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
IRQ 1/rtc0: IRQF_DISABLED is not guaranteed on shared IRQs
rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
i2c /dev entries driver
i2c-gpio: probe of i2c-gpio failed with error -16
Registered led device: led1
Registered led device: led2
Registered led device: led3
Advanced Linux Sound Architecture Driver Version 1.0.20.
at73c213 spi0.3: at73c213: supported bitrate is 48500 (64 divider)
usb 1-1: new full speed USB device using at91_ohci and address 2
usb 1-1: New USB device found, idVendor=0457, idProduct=0151
usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=3
usb 1-1: Product: USB Mass Storage Device
usb 1-1: SerialNumber: 8d54bd8186b42c
usb 1-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
ALSA device list:
#0: SAM9-L9261 external DAC on irq 15
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 4096KiB [1 disk] into ram disk... done.
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 132K
Failed to execute /init. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
[<c002f414>] (unwind_backtrace+0x0/0xdc) from [<c025bd34>] (panic+0x40/0x110)
[<c025bd34>] (panic+0x40/0x110) from [<c0029500>] (init_post+0xd0/0xf8)
[<c0029500>] (init_post+0xd0/0xf8) from [<c00085a0>] (kernel_init+0xbc/0xe4)
[<c00085a0>] (kernel_init+0xbc/0xe4) from [<c0041998>] (do_exit+0x0/0x5ac)
[<c0041998>] (do_exit+0x0/0x5ac) from [<00000001>] (0x1)
I plan to rebuild busybox and try again, but as my current ramdisk image works when I mount it as loop I don't have too much confidence it will change something.
I'm out of ideas. I've been trying the whole day to get this working.
Help is much appreciated.
Thanks.
Missing libraries were the root cause for the non-executable init placed on the ramdisk.
Using chroot turned out to be extremely useful. With this issue I learned how to use chroot and simulate a jail.
Another trick was to use user_debug=31 in the command line so that the kernel will output a message saying that the file is not found.
It looks like the "file not found" does not really point to a missing file, but to a failure to read the file system due to busybox not executing properly (missing libraries).
In parallel I have compiled dynamically the busybox 1.20.02 for my arm architecture and the ramdisk worked properly (without libs).
This user_debug=31 turned out to be again useful when I compiled and ran busybox, as it was also failing after mounting the ramdisk, but it thrown out an "undefined exception" which led me to a wrong "arch" value used for compiling busybox. After changing it everything was fine.

Linux 2.6.28 crashes when mem=1024M is passed as boot parameter from u-boot

I am working on building an linux for powerpc 8641d board. My U-boot has been modified to recognize 1 GB of memory(RAM) and it does. But Linux 2.6.28 crashes when mem=1024M is passed as boot parameter from u-boot. I have specified the memory size as 0x40000000 (1GB) in DTS file. Can any one help me to findout the reason?
But the same Linux image works when I specify bootargs as 'mem=256M'. But OS idetifies the total memory of 256MB only but I want it to identify complete 1GB memory.
Here is the dump of linux boot: ** It hangs at this point:
CPU: 8641D, Version: 3.0, (0x80900130)
Core: E600 Core 0, Version: 2.2, (0x80040202)
Clock Configuration:
CPU:1000 MHz, MPX:400 MHz
DDR:200 MHz (400 MT/s data rate), LBC:25 MHz
L1: D-cache 32 KB enabled
I-cache 32 KB enabled
L2: 512 KB enabled
Board: Wind River SBC8641D
I2C: ready
DRAM: DDR: 1 GiB
FLASH: 16 MiB
PCI-EXPRESS 1: Configured as Host
IGAPS: PCIE link is Up
Scanning PCI bus 01
01 00 10cf 2034 0380 ff
PCI-EXPRESS 1 on bus 00 - 01
PCI-EXPRESS 2: Disabled
In: serial
Out: serial
Err: serial
IGAPS: Interrupts enabled...!!!!
Net: eTSEC1, eTSEC2, eTSEC3, eTSEC4
Hit any key to stop autoboot: 0
=> bootm 1000000 - 2000000
WARNING: adjusting available memory to 30000000
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-2.6.28
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 2417424 Bytes = 2.3 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
Booting using the fdt blob at 0x2000000
Uncompressing Kernel Image ... OK
Loading Device Tree to 007fb000, end 007ffb2d ... OK
WARNING: your dts/dtb is old. You must update before the next kernel release
Using MPC86xx HPCN machine description
Total memory = 1024MB; using 2048kB for hash table (at cfe00000)
Linux version 2.6.28 (TCS#localhost) (gcc version 4.5.4 (Buildroot 2012.11.1) ) #42 SMP Tue Aug 20 22:32:49 IST 2013
CPU maps initialized for 1 thread per core
console [udbg0] enabled
setup_arch: bootmem
mpc86xx_hpcn_setup_arch()
Found FSL PCI host bridge at 0x00000000f8008000. Firmware bus number: 0->1
Zone PFN ranges:
DMA 0x00000000 -> 0x00030000
Normal 0x00030000 -> 0x00030000
HighMem 0x00030000 -> 0x00040000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00040000
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
Kernel command line: console=ttyS0,115200 mem=1024M ip=172.19.180.10:172.19.180.30:172.19.180.1:255.255.255.0:sbc8641d:eth0:off rw root=/dev/nfs nfsroot=172.19.180.30:/opt/nfsRootfs
PID hash table entries: 4096 (order: 12, 16384 bytes)
clocksource: timebase mult[2800000] shift[22] registered
Console: colour dummy device 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1031376k/1048576k available (4632k kernel code, 16396k reserved, 144k data, 175k bss, 208k init)
Any reason why it hangs here?

Resources