syslogd prints log messages while Linux kernel booting - embedded-linux

I am working on an Embedded board. Using the USB-Uart converter, board serial logs are accessed on my Desktop.
On my Desktop I am using the minicom application, to view the board's logs.
1] Power on the embedded board.
2] Kernel booting logs get printed on minicom.
3] It is observed that some booting messages are get printed twice on minicom, e.g.
[ 7.553435] LCD210 platform: Hook NA51068 driver.
Dec 22 12:43:37 (none) user.warn kernel: [ 7.553435] LCD210 platform: Hook NA51068 driver.
[ 7.587133] LCD200:0: suspend_state:1
Dec 22 12:43:37 (none) user.warn kernel: [ 7.587133] LCD200:0: suspend_state:1
In the above logs, line no 1 is printed by the Linux kernel,
[ 7.553435] LCD210 platform: Hook NA51068 driver.
And line no 2. is printed by syslogd on the minicom, while the kernel is booting.
Dec 22 12:43:37 (none) user.warn kernel: [ 7.553435] LCD210 platform: Hook NA51068 driver.
The above message is also present in /var/log/messages file.
I just want to avoid printing the same message twice.
How do I stop the syslogd, to don't print the messages on serial terminal, while the Linux kernel is booting?

Related

What is "hard_xmit called while tx busy"?

I try to understand some kernel messages related to the CAN bus driver for mcp251x
in syslog I have several
hard_xmit called while tx busy
and at last
mcp251x spi0.0 can0: bus-off
What is hard_xmit and what causes it?
uname -a
Linux cilix-19 5.15.32-v7l+ #1538 SMP Thu Mar 31 19:39:41 BST 2022 armv7l GNU/Linux
dmesg | grep model
[ 0.000000] OF: fdt: Machine model: Raspberry Pi Compute Module 4 Rev 1.0

PXE boot fail with kernel panic: Unable to mount root fs

I am having an issue on some servers since some time, and fail to find the issue.
These are x86_64 server, with Intel Xeon, configured to boot in UEFI over network, through an iPXE rom.
Kernel and initramfs are the ones from Centos 8 (tried 8.0 and 8.2).
But when booting, I always end up with (on every servers, so should not be related to an hardware failure):
[ 5.542304] hid-generic 0003:0557:2221.0002: input,hidraw1: USB HID v1.00 Keyboard [Winbond Electronics Corp Hermon USB hidmouse Device] on usb-0000:00:1a.0-1.3/input1
[ 5.599611] rtc_cmos 00:02: setting system clock to 2020-06-26 19:21:43 UTC (1593199303)
[ 5.620965] md: Waiting for all devices to be available before autodetect
[ 5.640580] md: If you don't use raid, use raid=noautodetect
[ 5.659949] md: Autodetecting RAID arrays.
[ 5.676869] md: autorun ...
[ 5.691838] md: ... autorun DONE.
[ 5.707883] List of all partitions:
[ 5.723667] No filesystem could mount root, tried:
[ 5.723667]
[ 5.754724] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 5.775237] CPU: 9 PID: 1 Comm: swapper/0 Not tainted 4.18.0-193.6.3.el8_2.x86_64 #1
[ 5.815778] Call Trace:
[ 5.830360] dump_stack+0x5c/0x80
[ 5.845920] panic+0xe7/0x2a9
[ 5.860995] mount_block_root+0x2c5/0x2e9
[ 5.877407] ? do_early_param+0x91/0x91
[ 5.892617] prepare_namespace+0x135/0x16b
[ 5.907676] kernel_init_freeable+0x22e/0x258
[ 5.922607] ? rest_init+0xaa/0xaa
[ 5.937398] kernel_init+0xa/0xff
[ 5.950991] ret_from_fork+0x35/0x40
[ 5.964572] Kernel Offset: 0x2ca00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[ 6.000387] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
The iPXE boot script is:
#!ipxe
kernel http://10.10.0.1/vmlinuz-4.18.0-193.6.3.el8_2.x86_64 initrd=initramfs-4.18.0-193.6.3.el8_2.x86_64.img selinux=0 rd.shell rd.debug root=live:http://10.10.0.1/squashfs.img rw console=tty0 console=ttyS1,115200
initrd http://10.10.0.1/initramfs-4.18.0-193.6.3.el8_2.x86_64.img
boot
Which generate this in the console:
http://10.10.0.1/vmlinuz-4.18.0-193.6.3.el8_2.x86_64... ok
http://10.10.0.1/initramfs-4.18.0-193.6.3.el8_2.x86_64.img... ok
INTEL 0x6f080f70 MAC reset (081c0261/80280783 was 081c0261/80280783)
INTEL 0x6f080f70 MAC reset (081c0261/80280783 was 081c0261/80280783)
INTEL 0x6f081ab0 MAC reset (081c0261/80280787 was 081c0261/80280787)
[ 0.000000] Linux version 4.18.0-193.6.3.el8_2.x86_64 (mockbuild#kbuilder.bsys.centos.org) (gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)) #1 SMP Wed Jun 10 11:09:32 UTC 2020
[ 0.000000] Command line: vmlinuz-4.18.0-193.6.3.el8_2.x86_64 initrd=initramfs-4.18.0-193.6.3.el8_2.x86_64.img selinux=0 rd.shell rd.debug root=live:http://10.10.0.1/squashfs.img rw console=tty0 console=ttyS1,115200
...
On the server side, on apache logs I have:
10.10.2.1 - - [26/Jun/2020:19:55:42 +0200] "GET /vmlinuz-4.18.0-193.6.3.el8_2.x86_64 HTTP/1.1" 200 8913656 "-" "iPXE/1.0.0+"
10.10.2.1 - - [26/Jun/2020:19:55:42 +0200] "GET /initramfs-4.18.0-193.6.3.el8_2.x86_64.img HTTP/1.1" 200 53703611 "-" "iPXE/1.0.0+"
So it seems to be working perfectly.
This is diskless boot here, but whatever I try (kickstart diskfull install, or even kernel+initrd alone) I always end up to this kernel panic...
I tried to reset BIOS settings, try to boot in legacy/pcbios instead of UEFI, tried to desactivate sata disks, etc. Always this same error. Also tried to use kernel+initrd from Centos ISO (checked checksum), tried to use the ones from my management node. Nothing. Do I miss something obvious?
Does any of you have an idea or already faced this kind of issue?
Many thanks in advance :-)
With my best regards
Beuk

u-boot booting. appear warning message. this must be solved?

I create a linux booting image using TI SDK (am335x) and booting Beaglebone black.
and u-boot boot message is..
U-Boot SPL 2019.01-gf95c3e0297-dirty (Oct 15 2019 - 08:45:45 +0900)
Trying to boot from MMC1
U-Boot 2019.01-gf95c3e0297-dirty (Oct 15 2019 - 08:45:45 +0900)
CPU : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment
<ethaddr> not set. Validating first E-fuse MAC
Net: eth0: ethernet#4a100000
Warning: usb_ether MAC addresses don't match:
Address in ROM is de:ad:be:ef:00:01
Address in environment is f4:e1:1e:ce:d7:49
, eth1: usb_ether
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Unable to read file boot.scr **
** Unable to read file uEnv.txt **
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
4080128 bytes read in 266 ms (14.6 MiB/s)
36717 bytes read in 3 ms (11.7 MiB/s)
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8fff4000, end 8fffff6c ... OK
Starting kernel ...
and i can't decide three warning message need to solved.
Loading Environment from FAT... *** Warning - bad CRC, using default environment ** Unable to read file boot.scr ** ** Unable to read file uEnv.txt **
u-boot and linux kernel work properly.
Do I need solve this warning ?.
Maybe your u-boot script didn't switch to the right partition of MMC before started reading uEnv.txt or so. This is okay if you are fine with booting behavior. These files contain things like do you want to enable HDMI, or console, etc. But the same could be done directly in u-boot env.

Beaglebone black uImage boot issues

I am trying to boot the beaglebone black using the uImage file that I created using the mkimage command. There is a emmc to sd image flasher package available online which has a uImage in it and also other required files (https://elinux.org/BeagleBone_Black_Extracting_eMMC_contents), I followed this website and created a flasher card of the uImage that I made using mkimage utility.
I am getting the following error during boot from SD card having that uImage:
U-Boot SPL 2016.01-00763-g3faf221 (Jan 29 2016 - 20:47:08)
Trying to boot from MMC
Card doesn't support part_switch
MMC partition switch failed
*** Warning - MMC partition switch failed, using default environment
reading u-boot.img
reading u-boot.img
U-Boot 2016.01-00763-g3faf221 (Jan 29 2016 - 20:47:08 +0000)
Watchdog enabled
I2C: ready
DRAM: 512 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - bad CRC, using default environment
Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
=> set sdboot 1
=> boot
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading boot.scr
** Unable to read file boot.scr **
reading uEnv.txt
235 bytes read in 5 ms (45.9 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
reading uImage
5497536 bytes read in 302 ms (17.4 MiB/s)
reading /am335x-boneblack.dtb
25926 bytes read in 8 ms (3.1 MiB/s)
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux kernel
Created: 2015-09-07 21:47:16 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5497472 Bytes = 5.2 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 81ff0000
Booting using the fdt blob at 0x81ff0000
Loading Kernel Image ... OK
Loading Device Tree to 8fff6000, end 8ffff545 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[ 0.177572] omap2_mbox_probe: platform not supported
[ 0.333923] tps65217-bl tps65217-bl: no platform data provided
[ 0.397544] bone-capemgr bone_capemgr.9: slot #0: No cape found
[ 0.434652] bone-capemgr bone_capemgr.9: slot #1: No cape found
[ 0.471760] bone-capemgr bone_capemgr.9: slot #2: No cape found
[ 0.508869] bone-capemgr bone_capemgr.9: slot #3: No cape found
[ 0.528815] omap_hsmmc mmc.5: of_parse_phandle_with_args of 'reset' failed
[ 0.591166] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.8
[ 0.602845] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.8) status -22
[ 0.610128] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single
[ 0.686675] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 0.695344] [<c0010f5d>] (unwind_backtrace+0x1/0x98) from [<c04994c3>] (panic+0x5b/0x158)
[ 0.703882] [<c04994c3>] (panic+0x5b/0x158) from [<c07bc94b>] (mount_block_root+0xf7/0x178)
[ 0.712595] [<c07bc94b>] (mount_block_root+0xf7/0x178) from [<c07bcb09>] (mount_root+0x95/0xb0)
[ 0.721676] [<c07bcb09>] (mount_root+0x95/0xb0) from [<c07bcbef>] (prepare_namespace+0xcb/0x11c)
[ 0.730836] [<c07bcbef>] (prepare_namespace+0xcb/0x11c) from [<c0495aff>] (kernel_init+0x7/0x98)
[ 0.740007] [<c0495aff>] (kernel_init+0x7/0x98) from [<c000c7fd>] (ret_from_fork+0x11/0x34)
Any help will be useful.
The kernel cannot find the root partition. The kernel command line is set in U-Boot via the environment variable bootargs.

uart-baudrate is changed multiple times during boot

I can not figure out, where the uart, baudrate is changed in the linux kernel.
I am using the adi_uart4.c driver (not in the major 4.14 kernel yet). But it is designed like all the other in driver/tty/serial/
While booting:
CONFIG_BAUDRATE 115200 -> uboot baudrate
earlyprintk=serial,uart0,115200 -> cmdline arg in uboot
console=ttySC0,115200 -> cmdline arg in uboot
??? -> set to 56700
Linux boot output stops, because of baudrate change:
[..]
Freeing unused kernel memory: 1024K
Starting logging: OK
Starting mdev...
Starting watchdog...
Initializing random number generator... done.
Starting network...
/bin/sh: run-parts: not found
Starting inetd: OK
��怘�~3f<��<����f<���3�f��Æ�����`?怘���<f?����`<?����`?<��~<�����������
Thank you #sawdust.
There was an additional userspace change in /etc/inittab
# Put a getty on the serial port
ttySC0::respawn:/sbin/getty -L ttySC0 56700 vt100 # GENERIC_SERIAL

Resources