Attempting to boot new uImage - linux

I am attempting to boot uImage via uboot and I am getting some seemingly conflicting log info:
update Kernel1 tftp uImage-2.5 6.35. -digi-armv7a.LONEPEAK-Ver-4_33
Using FEC0 device
TFTP from server 10.12.1.77; our IP address is 10.12.1.205
Filename 'uImage-2.6.35-digi-armv7a.LONEPEAK-Ver-4_33'.
Load address: 0x94000000
Loading: #################################################################
#################################################################
###########################################
done
Bytes transferred = 2533360 (26a7f0 hex)
Calculated checksum = 0x49669c61
Updating partition 'Kernel1'
Erasing 128 KiB # 0x08540000: 0%
Erasing 128 KiB # 0x085e0000: 20%
Erasing 128 KiB # 0x08680000: 41%
Erasing 128 KiB # 0x08720000: 62%
Erasing 128 KiB # 0x087c0000: 83%
Erasing: complete
Writing: 0%
Writing: 51%
Writing: complete
Verifying: 0%
Verifying: 51%
Verifying: complete
Writing Parameters to NVRAM
Update successful
Above it shows a successful update but then when issue a reboot command I get:
scanning bus for devices... 1 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
** Invalid boot device **
Booting partition 'Kernel0'
## Booting kernel from Legacy Image at 90007fc0 ...
Image Name: Linux-2.6.35.14-tjerbmx51_0005+
Created: 2018-10-16 21:35:37 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2533296 Bytes = 2.4 MB
Load Address: 90008000
Entry Point: 90008000
Loading Kernel Image ... OK
OK
Starting kernel ...
So my question is:
Is there a way for me to version my kernel when I build it s/t I can set the 'Image Name' so that I know its my kernel being loaded and not some type of Legacy Image??

Perhaps the CONFIG_LOCALVERSION-option of Linux kernel .config-file will help you.
From the Kernel.org:
Keep a backup kernel handy in case something goes wrong. This is
especially true for the development releases, since each new release
contains new code which has not been debugged. Make sure you keep a
backup of the modules corresponding to that kernel, as well. If you
are installing a new kernel with the same version number as your
working kernel, make a backup of your modules directory before you do
a make modules_install.
Alternatively, before compiling, use the kernel config option
“LOCALVERSION” to append a unique suffix to the regular kernel
version. LOCALVERSION can be set in the “General Setup” menu.
So during the kernel configuration you can add some clear suffix to your kernel e.g. CONFIG_LOCALVERSION="-test_some_stuff".
Some useful links: 1 and 2.

Related

Glitch Booting Linux with Spike?

I used Spike to boot linux using the riscv tools but the linux boot sequence seems to stop at Bootconsole[early0] disabled.
I tried adding kernel command line root=/dev/vda ro console=ttyS0 but didn't work. The same console settings works in QEMU. Also checked the .config file for the line CONFIG_HVC_RISCV_SBI=y. It was there. Still coulnd't get past it.
Tried with Linux kernel version 4.19 to 5.2. No luck. Am I doing something wrong here?
Steps I followed:
Compiled linux with Riscv toolchain
compiled riscv-pk with ../configure --host=riscv64-unknown-elf --with-payload= [path to vmlinux]
used "Spike bbl" to start spike image.
Please let me know if any more info is required.
Sorry, noob here.
Attaching terminal output
bbl loader
OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
Linux version 4.19.59 (root#AsusFX504) (gcc version 8.2.0 (GCC)) #2 SMP Sat Jul 20 05:11:32 IST 2019
bootconsole [early0] enabled
initrd not found or empty - disabling initrd
Zone ranges:
DMA32 [mem 0x0000000080200000-0x00000000ffffffff]
Normal empty
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000080200000-0x00000000ffffffff]
Initmem setup node 0 [mem 0x0000000080200000-0x00000000ffffffff]
software IO TLB: mapped [mem 0xfa3fe000-0xfe3fe000] (64MB)
elf_hwcap is 0x112d
percpu: Embedded 17 pages/cpu s29912 r8192 d31528 u69632
Built 1 zonelists, mobility grouping on. Total pages: 516615
Kernel command line:
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Sorting __ex_table...
Memory: 1988760K/2095104K available (5468K kernel code, 329K rwdata, 1751K rodata, 193K init, 806K bss, 106344K reserved, 0K cma-reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
rcu: Hierarchical RCU implementation.
rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
Console: colour dummy device 80x25
console [tty0] enabled
bootconsole [early0] disabled
This might be because Virtual Terminal is enabled in your linux config. Disabling Virtual Terminal might solve your issue.
In Linux make menuconfig go to :-
Location:
-> Device Drivers
-> Character devices
and Disble Virtual terminal .
Symbol: VT [=y] n
Type : bool
Prompt: Virtual terminal
As mentioned previously, the reason is that VT is enabled so kernel has a dummy VT framebuffer that simply goes nowhere, but you don't have to disable it. console=ttyS0 will also not work, since SPIKE doesn't emulate it. Note that this won't work on the HiFive Unleashed, either, since serial terminals there are ttySIF0 and ttySIF1. What you want is console=hvc0 and SPIKE will be able to continue from there, e.g. in your kernel .config:
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="earlyprintk console=hvc0"
CONFIG_CMDLINE_FORCE=y

Creating zfs zpool on initiated iSCSI disk on FreeBSD

I have properly connected an iSCSI target to my FreeBSD host using iscsictl. This new device shows up as da7. The disk shows up with:
geom disk list
as
Geom name: da7
Providers:
1. Name: da7
Mediasize: 4294967296000 (3.9T)
Sectorsize: 512
Stripesize: 8192
Stripeoffset: 0
Mode: r0w0e0
descr: SYNOLOGY iSCSI Storage
lunname: SYNOLOGYiSCSI Storage:44281bed-ce3d-4a9f-b95e-c89b6c74c345
lunid: 600140544281beddce3dd4a9fdb95edc
ident: 44281bed-ce3d-4a9f-b95e-c89b6c74c345
rotationrate: unknown
fwsectors: 63
fwheads: 255
I wanted to create a new ZFS zpool on this single disk with the command:
zpool create backuppool /dev/da7
The zpool command will now utilise a lot of cpu, but newer finishs. (Let it run for 2h).
If I create an ufs filesystem on the properly partitioned disk, the process is extremly fast. Also if I create a pool on a different raw disks, zpool finishs within seconds.
After some research I could not find any information if creating a zpool on a iSCSI target is allowed or not. Does anyone get this working?
Tested on: FreeBSD 11.1-RELEASE-p4 #0: Tue Nov 14 06:12:40 UTC 2017

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.

Changing Start Address of Linux

We are trying to boot linux on a zedboard and monitor all memory accesses through Programmable Logic. We're first trying to boot linux with a start address above 0x40000000 with:
$ make ARCH=arm UIMAGE_LOADADDR=0x48008000 uImage
So far, we're getting:
reading uImage
3453656 bytes read in 568 ms (5.8 MiB/s)
reading devicetree.dtb
9209 bytes read in 16 ms (561.5 KiB/s)
reading uramdisk.image.gz
5310018 bytes read in 865 ms (5.9 MiB/s)
memstart 0
## Booting kernel from Legacy Image at 43000000 ...
Image Name: Linux-3.18.0-xilinx-06434-g1f570
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3453592 Bytes = 3.3 MiB
Load Address: 48008000
Entry Point: 48008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 42000000 ...
Image Name:
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 5309954 Bytes = 5.1 MiB
Load Address: 48000000
Entry Point: 48000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 42a00000
Booting using the fdt blob at 0x42a00000
Loading Kernel Image ... OK
Loading Ramdisk to 1e812000, end 1ed22602 ... OK
Loading Device Tree to 1e80c000, end 1e8113f8 ... OK
## Transferring control to Linux (at address 48008000)...
Starting kernel ...
It looks like Linux hangs after trying to enable the mmu with the command:
mcr p15, 0, r0, c1, c0, 0 # write control reg
within arch/arm/kernel/head.S.
How can I get this to work?

How can I enable persistent network interface naming with udev on ARM devices running Arch Linux?

So I'm running Arch on both a Raspberry Pi and a Beaglebone Black. Recently I noticed that neither device uses persistent udev naming on their network interfaces (i.e. still using eth0, wlan0 .etc).
On the Raspberry Pi, I deleted the file that prevents udev from renaming the interfaces persistently:
/etc/udev/rules.d/80-net-name-slot.rules
The Beaglebone Black is newer, and didn't even have the file. Deleting it on the Raspberry Pi appears to have had no effect. Both of them are running systemd 208.
Any idea what's going on here? Is persistent naming not supported on low-end ARM devices, or something?
Here is the output of the following command on both devices:
udevadm test-builtin net_id /sys/class/net/eth0
On the Raspberry Pi:
calling: test-builtin
=== trie on-disk ===
tool version: 208
file size: 5866515 bytes
header size 80 bytes
strings 1296323 bytes
nodes 4570112 bytes
load module index
ID_NET_NAME_MAC=enxb827eb2a5c39
ID_OUI_FROM_DATABASE=Raspberry Pi Foundation
unload module index
On the Beaglebone Black:
calling: test-builtin
=== trie on-disk ===
tool version: 208
file size: 5866515 bytes
header size 80 bytes
strings 1296323 bytes
nodes 4570112 bytes
load module index
ID_NET_NAME_MAC=enx9059af571ea7
ID_OUI_FROM_DATABASE=Texas Instruments
unload module index
Interesting enough, it's missing the ID_NET_NAME_PATH, as I get from my desktop:
calling: test-builtin
=== trie on-disk ===
tool version: 208
file size: 5882624 bytes
header size 80 bytes
strings 1301408 bytes
nodes 4581136 bytes
load module index
ID_NET_NAME_MAC=enx8c89a5c6f0ce
ID_OUI_FROM_DATABASE=Micro-Star INT'L CO., LTD
ID_NET_NAME_PATH=enp3s0
unload module index
Any ideas? I'd like to plug multiple WiFi adapters into one of these, and would prefer consistency.
You could still force names using MAC addresses:
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="12:34:56:78:ab:cd", NAME="whatever"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ab:cd:12:34:56:78", NAME="somethingelse"

Resources