View previous topic :: View next topic |
Author |
Message |
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Sun Apr 12, 2020 3:23 pm Post subject: u-boot : how to select kernel ? |
|
|
Hello,
On the uboot (2019.??) is a way to select which kernel to load ?
I need to switch b/w 5.6 using DTS and old 3.4 using Fex.
Thanks
Laurent |
|
Back to top |
|
|
RayDude Advocate
Joined: 29 May 2004 Posts: 2078 Location: San Jose, CA
|
Posted: Sat Apr 18, 2020 9:38 pm Post subject: Re: u-boot : how to select kernel ? |
|
|
destroyedlolo wrote: | Hello,
On the uboot (2019.??) is a way to select which kernel to load ?
I need to switch b/w 5.6 using DTS and old 3.4 using Fex.
Thanks
Laurent |
u-boot is usually used on embedded systems. There is usually a u-boot environment variable that points to the startup kernel device and version.
It is fully configurable, however very different from grub and lilo.
I don't know what DTS and Fex are, I only know about u-boot because my company uses it our products.
In our products there is a linux command called, "fw_printenv" to show the environment variables and "fw_setenv" to set environment variables.
The version of u-boot I'm used to is really old, but I can't believe it would change that much.
You should be able to find the exact version of your u-boot, and google how to change the env vars to get it to boot a different image.
Or you could do what we do and create a generic name that is symlinked to the exact version you want, that way you can change without having to tweak the env vars. _________________ Some day there will only be free software. |
|
Back to top |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Fri May 01, 2020 12:49 am Post subject: |
|
|
Hello,
DTS and FEX are hardware configuration files to let the kernel knowing where hardware is enabled and located.
DTS (Device Tree) : are for 4+ kernel whereas FEX is the old way for 3.x kernel.
I found some (poor) documentation explaining how to select kernel if loaded at different addresses but not when we have to mix FEX and DTS |
|
Back to top |
|
|
RayDude Advocate
Joined: 29 May 2004 Posts: 2078 Location: San Jose, CA
|
Posted: Sat May 02, 2020 4:06 pm Post subject: |
|
|
Sorry I can't be more help. We're just upgrading from kernel 2.6 to kernel 5.X so we are learning how to generate DTS using the Altera / intel tools. _________________ Some day there will only be free software. |
|
Back to top |
|
|
qwerjkl n00b
Joined: 17 Sep 2018 Posts: 6
|
Posted: Sun May 03, 2020 7:50 am Post subject: |
|
|
It's very easy to do that.
Checkout http://linux-sunxi.org/U-boot#Booting_with_boot.cmd
Mixing FEL and dtb isn't hard as well, if you boot manually in the u-boot console, just type those commands (with the right location for dtb/FEL and kennel, of course) |
|
Back to top |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Sun May 03, 2020 3:27 pm Post subject: |
|
|
ok but it will not create a boot menu. It isn't possible to use extlinux.conf style ? I mean what is the option for FEX ?
Thanks
Laurent |
|
Back to top |
|
|
qwerjkl n00b
Joined: 17 Sep 2018 Posts: 6
|
|
Back to top |
|
|
Vazhnov n00b
Joined: 05 Oct 2019 Posts: 4 Location: Wrocław, Poland
|
Posted: Tue Jun 09, 2020 7:47 pm Post subject: uEnv.txt |
|
|
Images from rcn-ee.com, for example this one https://www.digikey.com/eewiki/display/linuxonarm/i.MX53+Quick+Start uses file /boot/uEnv.txt to choose which kernel to load:
Code: | cat /boot/uEnv.txt
uname_r=5.0.19-armv7-rt-x15
|
Boot:
Code: | Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
Checking for: /uEnv.txt ...
Checking for: /boot/uEnv.txt ...
28 bytes read in 144 ms (0 Bytes/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
Running uname_boot ...
loading /boot/vmlinuz-5.0.19-armv7-rt-x15 ...
9478656 bytes read in 938 ms (9.6 MiB/s)
loading /boot/dtbs/5.0.19-armv7-rt-x15/imx53-qsrb.dtb ...
29945 bytes read in 5142 ms (4.9 KiB/s)
debug: [console=ttymxc0,115200 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait fixrtc] ...
debug: [bootz 0x70010000 - 0x71ff0000] ...
Kernel image @ 0x70010000 [ 0x000000 - 0x90a200 ]
## Flattened Device Tree blob at 71ff0000
Booting using the fdt blob at 0x71ff0000
Using Device Tree in place at 71ff0000, end 71ffa4f8
Starting kernel ...
[ 0.000000] 000: Booting Linux on physical CPU 0x0
[ 0.000000] 000: Linux version 5.0.19-armv7-rt-x15 (dmitry@vakhrushev.info) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #1 SMP PREEMPT RT Sun May 24 03:23:11 EDT 2020
|
|
|
Back to top |
|
|
|