summaryrefslogtreecommitdiff
path: root/recipes-bsp/u-boot
AgeCommit message (Collapse)Author
2023-02-09u-boot: distro-boot-script: support booti automatic decompressionMarcel Ziswiler
Support booti automatic decompression with the following memory layout: - loadaddr=0x48200000 allows for 128MB area for uncompressing (ie FIT images, kernel_comp_addr_r, kernel_comp_size) - fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel - scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt - ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-04-22u-boot: distro-boot-script: fix ordering of console argumentsPhilippe Schenker
systemd only prints to the last console= statement that it finds in the kernel arguments. Make sure that it prints to UART instead of display on tty1. Related-to: ELB-4435 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2022-02-01u-boot-distro-boot:boot.cmd.in: replace '@' to '-'Ming Liu
The separator of fitImage's config section has been changed from '@' to '-', let's adapt to that, or else fitImage could not boot. Related-to: TOR-1700 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2021-12-29u-boot-distro-boot: fix bug if overlays.txt missingPhilippe Schenker
Without this commit it could happen, that U-Boot falls into strange behavior when overlays.txt is missing. This commit fixes this behavior with only executing "env import" if the previous load command returned success. Related-to: ELB-4246 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2021-07-15u-boot-distro-boot: fix nfs bootingMarcel Ziswiler
In the nfs-dhcp case we should not pass any NFS related settings from U-Boot as the Linux kernel will do its very own DHCP request where it will get all those settings and knows very well how to apply those. In the nfs-static case we should add a slash in front of the rootpath as otherwise an additional /tftpboot/ will be pre-fixed which likely is not what one wants. https://man7.org/linux/man-pages/man7/bootparam.7.html 'nfsroot=...' This sets the NFS root name to the given string. If this string does not begin with '/' or ',' or a digit, then it is prefixed by '/tftpboot/'. This root name is used in case of a net boot. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2021-03-26u-boot-distro-boot: explicitly use bootm for booting fitImageMing Liu
We cant use a single KERNEL_BOOTCMD for both fit/non-fit kernel images, that makes a invalid bootcmd being used in boot.scr either for fit or for non-fit image. Let's change to explicitly use 'bootm' for booting fitimage. Related-to: TOR-1700 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2021-03-04u-boot-distro-boot: add fitimage supportMing Liu
When the kernel image type is fitimage, load it to ${ramdisk_addr_r} and boot it from there. A new variable fitconf_fdt_overlays is introduced to collect overlays boot configs from overlays.txt file, and it would be passed to boot command. Related-to: TOR-1700 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2021-02-05boot.cmd: Add flag skip_fdt_overlaysOleksandr Suvorov
This flag allows one to skip loading and applying overlay dtbo files, e.g. in case, these files prevent the system from booting. Related-to: ELB-3405 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-12-03u-boot: boot.cmd: add boot informationOleksandr Suvorov
It is useful to see which devicetree file u-boot loads to boot kernel with. Print this information. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-11-24boot.cmd.in: use configurable prefix to load overlaysOleksandr Suvorov
Use the predefined prefix to overlay files to be loaded. This significantly reduces the size of the overlays.txt file and makes this file more readable and understandable by customers. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-11-17boot.cmd: add an ability to use static ip for nfs-rootOleksandr Suvorov
The kernel is able to use predefined IP address of NFS server. Add special values of root_devtype "nfs-dhcp" and "nfs-static" and proceed them accordingly to make the script able to boot the system from a network without dhcp-server. To boot the system from the particular server, just set the "serverip" to the proper IP address of an TFTP/NFS server and set "devtype" to "tftp". To use the particular NFS server for mouting the root-fs only, set the "serverip" to the proper IP address of an NFS server and set "root_devtype" to "nfs-static". Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-11-05boot.cmd: fix booting from different mediaOleksandr Suvorov
The design of the script allows to use different sources for booting a kernel, dtb and overlays, and using as a rootfs. Using devtype to determine the media of rootfs breaks this ability. Use root_devtype setting to fix this issue. Note the script is still able to use the same devtype for both boot/rootfs media because both boot_devtype and root_devtype set from devtype by default. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-10-30boot.cmd.in: print final bootargs before handover to kernelIgor Opaniuk
Print final bootargs value before jumping to the kernel. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-30boot.cmd.in: add error message for failed bootIgor Opaniuk
Add error message if booting fails from particular boot source. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-30boot.cmd.in: support properly dhcp bootIgor Opaniuk
1. Move invocation of $setup when $load_cmd is properly set. This helps to load hdp firmware from all supported boot sources, not only from internal emmc 2. Set proper dhcpargs if we boot via DHCP Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-28u-boot: boot.cmd: add common variables descriptionOleksandr Suvorov
The script uses global variable in tftp and dhcp mode. Add a description of these variables. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-10-28u-boot: boot.cmd: fix typo in documentationOleksandr Suvorov
Use root_* incoming variable names where it should be. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-10-16u-boot-distro-boot: dont inherit nopackagesMing Liu
The reason we inherit nopackages was that there was no files being packaged at that moment, but this makes it impossible for a bbappend to add packages, let's drop it. Now torizoncore decides to add a ostree-uboot-env package in this recipe. Related-to: TOR-1335 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-10-01Revert "boot.cmd: workaround kernel_image getting set to ancient default"Philippe Schenker
This commit was intended as a last-minute fix for apalis-imx8 which cannot boot because tezi writes the environment faulty. This commit however also caused to set kernel_image to Image.gz which is also used on TK1 and there this does not work at all. This reverts commit 6d6828218c4c4ecea2c44c114a711fe19359b408. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-09-30boot.cmd: workaround kernel_image getting set to ancient defaultMarcel Ziswiler
Workaround a Toradex Easy Installer issue causing kernel_image to be wrongly set to an ancient default. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-09-28boot.cmd: Fix a licenseOleksandr Suvorov
The second license should be MIT instead of X11. Fix it. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-09-27boot.cmd: add independent boot/root settingsOleksandr Suvorov
Add an ability to independently set device type, num and partition for boot and root partitions. Makes script able to boot kernel via tftp/dhcp. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-09-07u-boot-distro-boot: provide proper KERNEL_IMAGE valueIgor Opaniuk
Provide KERNEL_IMAGE value for boot.scr. Use Image.gz for imx8 machines. Relates-to: ELB-1372 Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-09-07boot.cmd: add support Image.gz boot imageIgor Opaniuk
1. Provide information about kernel image format instead of using that information from U-Boot env. 2. Unpack kernel image before calling boot cmd, in case Image.gz is used. Relates-to: ELB-1372 Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-09-03libubootenv: drop bbappendMax Krummenacher
This has been applied to the openembedded-core layer's master and dunfell branch. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-08-09u-boot-toradex: drop u-boot-toradex-initial-env.incMing Liu
The initial env has been implemented in OE, we dont need maintain this. Related-to: ELB-2553 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-08-09libubootenv: fix several issuesMing Liu
- We dont want to store to device when fw_setenv is called and there is no value change, to avoid flash wear-out. - We are using symbolic links in /etc/fw_env.config, libubootenv should handle that. - u-boot-default-env is being referred by libubootenv, add it to RRECOMMENDS_${PN}-bin tor target build. Related-to: ELB-2552 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-06-30boot.cmd: clean up the variable on "for" loopOleksandr Suvorov
In some situation "for" loop don't alterate the non-empty iteration variable [1]. Clean up the iteration var at the end of each loop. [1] ------------------ Apalis iMX6 # load ${devtype} ${devnum}:${distro_bootpart} ${loadaddr} ${overlays_file}; env import -t ${loadaddr} ${filesize} 107 bytes read in 11 ms (8.8 KiB/s) Apalis iMX6 # print fdt_overlays fdt_overlays="devicetree/apalis-imx6_parallel-rgb_overlay.dtbo devicetree/apalis-imx6_ov5640_overlay.dtbo" Apalis iMX6 # for overlay_file in ${fdt_overlays}; do echo "file=${overlay_file}"; done file=devicetree/apalis-imx6_parallel-rgb_overlay.dtbo file=devicetree/apalis-imx6_parallel-rgb_overlay.dtbo {Add clean up} Apalis iMX6 # for overlay_file in ${fdt_overlays}; do echo "file=${overlay_file}"; setenv overlay_file; done file=devicetree/apalis-imx6_parallel-rgb_overlay.dtbo file=devicetree/apalis-imx6_ov5640_overlay.dtbo" ------------------ Related-to: ELB-2797 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> (cherry picked from commit 94f69ea2545354e2294baecc6c9d54cc89fde97a)
2020-06-09boot.cmd: add support for DT overlaysIgor Opaniuk
Add support for DT overlays, which are obtained from overlays.txt stored in bootfs. Relates-to: ELB-2722 Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> (cherry picked from commit 7b24a04860805abad1a3f5c850ee07fefa6272ac)
2020-06-01u-boot-toradex-env.inc: drop fileMing Liu
Since we already have u-boot-toradex-initial-env.inc file, and no other recipes are referring u-boot-toradex-env.inc, we could drop it now. Signed-off-by: Ming Liu <ming.liu@toradex.com> (cherry picked from commit 79daa8e8a77758b43f758546579a13e8f0f68aa6)
2020-04-06u-boot-distro-boot: PROVIDES u-boot-default-scriptMing Liu
A new virtual recipe u-boot-default-script has been introduced in meta-freescale-3rdparty and it's being included by WKS_FILE_DEPENDS, u-boot-distro-boot should PROVIDES it. Also change to deploy boot.scr-${MACHINE} instead of boot.scr, to be consistent with other u-boot-default-script recipes. Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-02-13u-boot-distro-boot: fix serial console bootarg passingMarcel Ziswiler
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 3c9ed2641a6317a4fd9db77ecd508d4008cbad74) (cherry picked from commit 5527f02bfa7c26277688692a8f2c47a423d06cb5)
2020-01-24u-boot-distro-boot: drop sota specific boot.cmd.inMing Liu
It should be moved to meta-toradex-torizon layer. Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-01-23u-boot-distro-boot: add a missing ubifsumountMing Liu
ubifs should be umounted after the uEnv.txt file loading finished. Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-01-22u-boot-distro-boot: use lower case for ubi partition nameStefan Agner
In 2016.11 U-Boot the MTD partition name which is used in the UBI distro boot script has been fixed to capital "UBI". In newer U-Boot this can be configured. With the switch to U-Boot 2019.07 we made use of that feature to align with the BSP and named the MTD partition lower case "ubi". This changes the same in the boot script to make sure Linux looks for UBI volumes in the correct MTD partition. Related-to: TOR-237, TOR-513 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2019-11-28u-boot-distro-boot: do not reuse bootcmd variableStefan Agner
The bootcmd variable is the entry point for regular boot. If booting fails for some reason and one saves the environment at this point, the next boot will no longer use distro boot. Often booting works since the boot script setup all variables correctly, so one does not notice that the boot flow has been altered/hard-coded. Do not reuse bootcmd to avoid accidentally alter the boot flow. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2019-11-11u-boot-distro-boot: disable MSI on Apalis iMX8Stefan Agner
Add pci=nomsi to boot arguments for Apalis iMX8. We cannot safely use defargs since this variabel contains downstream specific environment variables which might not work well with upstream kernels as used by TorizonCore. Related-to: #52562 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2019-09-27u-boot-distro-boot: load HDMI firmware in boot scriptStefan Agner
Use the distro boot script to load the HDMI firmware. This minimizes the dependencies to the U-Boot environment and gives more control to the distribution. Related-to: #52562 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2019-09-27Revert "u-boot-distro-boot: run setup for torizon"Stefan Agner
This reverts commit 3ad48d3c8a8fa5a1364450ea101b839140656279. Running the machine specific setup is not how distro boot should be used. Also this breaks Colibri iMX7s (and probably Colibri iMX6ULL) PSCI support. Revert this and fix the firmware loading issue separately. Related-to: #52562 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2019-09-20u-boot-distro-boot: run setup for torizonMing Liu
setup function needs to be run if it's defined in uboot environment, for instance, loadhdp is being called in it for apalis-imx8 board. Some setup functions also take care of setting bootargs, which is safe for torizon as well if we run setup function before bootcmd_args, since the later will override the bootargs. Signed-off-by: Ming Liu <ming.liu@toradex.com>
2019-09-04u-boot-distro-boot: add support for detecting UUID of rootfsIgor Opaniuk
Provide proper PARTUUID value in bootargs. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-09-04u-boot-distro-boot: fix unbalanced double quoteMax Krummenacher
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2019-08-11u-boot-distro-boot: some clean upMing Liu
- Inherit nopackages since it does not generate any non-empty packages. - Drop do_compile, we can run mkimage directly in do_deploy task. - Drop 'S = "${WORKDIR}"', we do not have to explicitly set it, the default S would be good enough. - Do not install DEPLOYDIR, that is not necessary, it's already done in deploy.bbclass. - Do not set noexec flag to do_install, do_populate_sysroot, they are basically empty tasks, making do_populate_sysroot noexec also will cause QA warning when u-boot-distro-boot is set to DEPENDS in other recipes. Signed-off-by: Ming Liu <ming.liu@toradex.com>
2019-07-29u-boot-distro-boot: add inital distro boot scriptMax Krummenacher
This creates a distro boot script boot.scr and deploys it into the ${DEPLOYDIR}. Moved here from meta-toradex-torizon u-boot-distro-boot-ostree. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2019-05-06u-boot: add inc to generate U-Boot default environmentStefan Agner
Including u-boot-toradex-initial-env.inc will generate a uEnv.txt for newer U-Boot versions using U-Boot's u-boot-initial-env Makfile target. It essential does what u-boot-toradex-env.inc did before. Note: Since there is now support for an exported environment in upstream U-Boot, we should upstream the OE logic to the official U-Boot too. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-03-28u-boot-toradex: add inc to generate U-Boot default environmentStefan Agner
Including u-boot-toradex-env.inc will generate a uEnv.txt text file containing the default environment of the U-Boot binary. This is useful for Toradex Easy Installer to write the default environment using the "u_boot_env" property. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29u-boot: get rid of obsolete patchesMarcel Ziswiler
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-03-14Apalis/Colibri iMX6: drop in favour of meta-fsl-arm-extraMax Krummenacher
machine/u-boot/kernel files have been added to meta-fsl-arm-extra. Use them from there now. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2015-12-15Update all U-Boot versions to latestMax Krummenacher
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2015-12-15Apalis iMX6: U-Boot: change name for IT modulesMax Krummenacher
Change the name form u-boot-it.imx to u-boot.imx-it. This prepares for the upcomming move of the i.MX 6 based modules BSP to meta-fsl-arm-extra. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>