Is there any uboot config option to print boot sequence with time prefixes similar to kernel option CONFIG_PRINTK?
I am expecting output like below,
[ 0.000000] U-Boot 1.1.4-gedeced79 (Feb 6 2012 - 09:27:11)
[ 0.011300] Starting kernel ...
[ 0.015686] Uncompressing Linux... done, booting the kernel
define DEBUG config option is best for your purpose, it is picked up by all u-boot code after you put it in your include/configs/myboard.h. (each config option is '#define', but that is doing strange things in my page preview)
Also
define CONFIG_BOOTSTAGE.
You can look at README for this, code is in common/bootstage.c, its functions do some of what you want. You may have to add a function show_boot_progress() in your BSP, for these functions to be used. With those in place, I believe there are already hooks in infrastructure code for them to get called, but I haven't used this option.
I am not aware of U-Boot config option that does such thing, but there are some other techniques which enables you to do it. I.e. config option inside the Linux kernel.
Take a look at: Measuring Boot-up time
Related
Is there any option to load the environment variables in u-boot SPL?
I have a device (Arria10 SoC) in which a part of the FPGA firmware is loaded in u-boot SPL by using the Firmware Loader API.
This allows the usage of the environment variables storage_interface and fw_dev_part to define the storage.
I was able to set the variables in u-boot and store them to the MMC device. u-boot also reads the variables correct. But in SPL the environment variables aren't initialized.
Is it possible to load it in SPL and use the values from MMC?
Thanks for any hint!
The environment is initialized by calling env_init(). Other boards call this function in the board or architecture specific spl.c file in either of the following functions:
board_boot_order()
board_init_f()
board_init_r()
spl_start_uboot()
Just grep for 'env_init(' to find the code locations.
You will have to implement one of the functions.
I have pcspkr in blacklisted in /etc/modprobe.d/pcspkr.conf. However, I can manually load the module using modprobe.
I'm guessing, some other component will be able to do the same via module alias mechanism. Is there a way to permanently block automatic loading of a specific kernel module?
My use case is that I want to experiment with an alternative driver than the one provided in-tree. For this, I do not want the system's default driver showing up. I do not want to delete the golden driver provided by the kernel and screw up either.
What options do I have ?
I want to boot my Linux 3.18.48 compiled from source, with resolution 640x480. So I'm passing it a parameter vga=0x312. For some reason, it doesn't work.
To understand what's happening, I grep'ed the kernel source for "vga=", expecting some macro __setup("vga=", function_ptr), similar to other kernel cmdline parameters (video=, root=, etc).
However, there's no such occurrence.
So how does the Linux kernel parse vga= parameter?
According to the docs:
vga= [BOOT,X86-32] Select a particular video mode
...
This is actually a boot loader parameter; the value is
passed to the kernel using a special protocol.
So the kernel does not parse this parameter at all. In my case it's GRUB 2.02 parsing this parameter and passing to the kernel through variable gfxpayload, as listed in GRUB's linux command.
Now I can continue investigating why vga= parameter is being ignored, looking at GRUB's source :-)
EDIT
vga= is parsed by GRUB only on legacy BIOS systems.
That's why vga= is being ignored on my machine. Since I'm using a UEFI system, I need to set the gfxpayload variable directly:
set gfxpayload=640x480
Now it sets the resolution correctly.
I want to write a test driver for mcspi and want to give all configuration in my driver file (instead of using user space application I want to use driver as a test driver and want to create .ko) and want to pass all configuration to the mcspi controller.
The configurations like chip_select, mode, speed, bits etc., Basically all these configurations I want to use for my test driver to check functionality of FIFO mode in the mcspi. I have already enabled FIFO in the mcspi but I want to check its functionality.
Can anyone please give me some suggestions?
I don't really know why cant you do something you want. I think you can pass the configuration by set up parameters using module_param
Adding on what #sunnyleevip suggested: another "standard" way to configure your driver would be to expose the params of interest via the /proc or the /sys filesystems.
You can find all the details in Linux Device Driver
Expanding on #sergico and #sunnyleevip, you could also use device tree to pass configuration data to the driver. The SPI bus master driver (since the 2.6.30s and all of the 3.x kernels) already are pretty devicetree supportive, so there might not be much more to do to get it to work.
My requirement is to implement(insert ) an ip address validation step in kernel.. Once any of the interface is up and got ip, then my validation should happen..
So as the first step , in source code (linux 2.6 source code I downloaded ) , in which file I need to trace
The kernel is the wrong place for this unless you're doing something embedded with a teeny tiny footprint. What you really want is ifplugd.
However, if you absolutely insist on having it be in the kernel - take a look at the kernel bits that get enabled when CONFIG_IP_PNP=y