Commit graph

84566 commits

Author SHA1 Message Date
Pali Rohár
afd82187b5 tools: imagetool: Skip autodetection of gpimage type
gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-06 14:35:14 -05:00
Pali Rohár
6c58aa1e61 tools: imagetool: Show error message when detecting image type failed
Signed-off-by: Pali Rohár <pali@kernel.org>
2023-02-06 14:35:14 -05:00
Pali Rohár
27e46a991c tools: imagetool: Fix error message when verify_header is undefined
Signed-off-by: Pali Rohár <pali@kernel.org>
2023-02-06 14:35:14 -05:00
Simon Glass
662cfa03cb arm: qemu: Move GUIDs to the C file
These are only used in one place, so move them there.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:53 -05:00
Simon Glass
ece763de2f arm: qemu: Switch to a text environment
Use the new environment format so we can drop most of the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:53 -05:00
Simon Glass
c2488a81b8 arm: qemu: Switch to standard boot
Drop use of the distro scripts and use standard boot instead.

Enable BOOTDEV_FULL just for convenience, although this does add quite a
bit to the size.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:53 -05:00
Simon Glass
9c6d57dc7e qemu: Add a bootmeth for qfw
This supports reading a kernel and ramdisk from qfw, then loading it with
either the booti or bootz commands.

For now this uses the existing booti and bootz commands, rather than
trying to call that functionality directly (e.g. do_bootm_states()). It
does not require the HUSH parser though, which helps a little with size.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:53 -05:00
Simon Glass
dd4bd9ad86 qemu: Add a bootdev for qfw
Add a bootdev device for qfw so that it can be used with standard boot.
This simply checks for the correct method and then does the read. Most of
the other logic is handed in a new bootmeth driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:53 -05:00
Simon Glass
00fa989eab qemu: Move qfw kernel setup into a common file
This is currently in the cmd/ file but we want to call it from a driver.
Move it into a common place. Tidy up the header-file order while we are
here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:53 -05:00
Simon Glass
e08e6ea67d qemu: Update qfw command to use addresses
This uses casts all over the place. Use the correct type so that these
can be avoided, as is done with other commands. Also simplify a few
conditionals.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:53 -05:00
Simon Glass
22353fa6b5 bootstd: Add some default filesystems and commands
We need to support a basic set of filesystems for booting to work in most
cases. Add these in via a new option, letting the board disable them
individually (for space reasons) if desired.

This enables the filesystem commands as well as the actual functionality,
even though bootstd is quite happy to use ext4 without the ext4 command.
Further work would be needed to disintangle this and reduce code size.

Add several other options as well, providing sensible defaults.

We cannot enable this by default, since it expands the size of many
boards quite a lot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:53 -05:00
Simon Glass
a710f5b2eb bootstd: Correct virtio block-device handling
At present virtio tries to attach QEMU services to a bootdev device, which
cannot work. Add a check for this.

Also use bootdev_setup_sibling_blk() to create the bootdev device, since
it allows the correct name to be used and bootdev_get_sibling_blk() to
work as expected.

The bootdev is not created on sandbox since it does have a real virtio
device and it is not possible to read blocks.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: a60f7a3e35 ("bootstd: Add a virtio bootdev")
Reported-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-02-06 13:04:53 -05:00
Simon Glass
965020c3f7 bootstd: Probe the block device before use
In some cases the block device is obtained but is not probed, since it
is a sibling of the bootdev. Make sure it is probed, so it can be used
without any trouble.

This fixes a bug with virtio, where the device is accessed before it has
been set up by the virtio uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 201417d700 ("bootstd: Add the bootdev uclass")
Reported-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-02-06 13:04:53 -05:00
Simon Glass
0041b1c09a bootstd: Allow enabling BOOTSTD_FULL without needing EXPO
It is sometimes useful to have one without the other, e.g. on a device
without a display, since at present the expo feature requires CONFIG_VIDEO
to be enabled.

Update the Makefile and bootflow command to support this, as well as the
EXPO dependency.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:53 -05:00
Simon Glass
d472e93ab4 virtio: Add some debugging
When QEMU does not respond for some reason, it is helpful to have
debugging info to show. Add some.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:53 -05:00
Simon Glass
4f6daaca0f log: Add a category for filesystems
Sometimes it is useful to log things related to filesystems. Add a new
category and place it at the top of one of the FAT files.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:53 -05:00
Matwey V. Kornilov
3574eb8229 am335x_evm_defconfig: Enable CONFIG_CMD_EXTENSION
am335x_evm_defconfig is used for BeagleBone Black, popular single board
computer with wide extension support. Enable CONFIG_CMD_EXTENSION by default
since extension detection is already implemented for am335x.

Also run make savedefconfig for am335x_evm_defconfig

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
2023-02-06 13:04:53 -05:00
Tom Rini
4af25d8f72 ti: j721e_evm: Add USB to the default boot order
This family of platforms typically has a USB port, and so attempting to
boot from it, and making it first, will provide a better overall user
experience.

Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-06 13:04:53 -05:00
Heiko Schocher
afb269c679 powerpc/mpc85xx: socrates: enable signed fitImages
allow only to boot signed fitimages (and signed u-boot
scripts).

Signed-off-by: Heiko Schocher <hs@denx.de>
2023-02-06 13:04:53 -05:00
Heiko Schocher
9e85d186ea powerpc/mpc85xx: socrates: enable protected Environment
enable protected Environment on socrates board.

Signed-off-by: Heiko Schocher <hs@denx.de>
2023-02-06 13:04:53 -05:00
Heiko Schocher
5a971a2728 powerpc/mpc85xx: socrates: add autoboot delay string
add autoboot delay string for socrates board.
use sha256 for abort autoboot, use "ao" to abort.

Signed-off-by: Heiko Schocher <hs@denx.de>
2023-02-06 13:04:53 -05:00
Heiko Schocher
1088fcb96f powerpc/mpc85xx: socrates: add support for i2c eeprom at 0x51
add support for i2c eeprom on address 0x51.

Signed-off-by: Heiko Schocher <hs@denx.de>
2023-02-06 13:04:53 -05:00
Heiko Schocher
6073fbea88 powerpc/mpc85xx: socrates: Add boot retry feature
add boot retry feature and reboot after 120 seconds.

Signed-off-by: Heiko Schocher <hs@denx.de>
2023-02-06 13:04:53 -05:00
Heiko Schocher
aeb9db9080 powerpc/mpc85xx: socrates: drop second flash bank
drop second flash bank, as not used anymore.

Signed-off-by: Heiko Schocher <hs@denx.de>
2023-02-06 13:04:53 -05:00
Heiko Schocher
316d3d0605 powerpc/mpc85xx: socrates: add initrd_high default environment variable
we need to set initrd_high to get fitimage booting.

Without, U-Boot drops when booting fitimage:

ERROR: Failed to allocate 0x59a0b6 bytes below 0x800000.
ramdisk - allocation error
bootm - boot application image from memory

Signed-off-by: Heiko Schocher <hs@denx.de>
2023-02-06 13:04:53 -05:00
Heiko Schocher
2e9eea4ebd powerpc/mpc85xx: socrates: add MTD partitioning support
setup MTD partitioning through mtdparts variable
and set it to:

mtdparts=fe0000000.nor:13312k(system1),13312k(system2),5120k(data),128k(env),128k(env-red),768k(u-boot)

and pass this to linux per kernel commandline.

Signed-off-by: Heiko Schocher <hs@denx.de>
2023-02-06 13:04:53 -05:00
Heiko Schocher
73038dd6fd powerpc: dts: updates socrates board
include common e500v2_power_isa.dtsi and rearrange
some nodes.

Signed-off-by: Heiko Schocher <hs@denx.de>
2023-02-06 13:04:53 -05:00
Heiko Schocher
a78b2538fd powerpc/mpc85xx: drop socrates specific image creation
convert socrates board to use MPC85XX_HAVE_RESET_VECTOR and
disable CONFIG_OF_BOARD and use common u-boot.dtsi for
creating u-boot-dtb.bin.

Signed-off-by: Heiko Schocher <hs@denx.de>
2023-02-06 13:04:53 -05:00
Heiko Schocher
12ae7bc83a powerpc/mpc85xx: socrates: rework build process
U-Boot build process for socrates board produces final U-Boot binary in
file u-boot-socrates.bin (by binman) And as a bonus it produces two
unusable broken binaries u-boot-dtb.bin and u-boot.bin (by Makefile).

Clean this up, so final U-Boot binary is in u-boot-dtb.bin

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Heiko Schocher <hs@denx.de>
2023-02-06 13:04:53 -05:00
Heiko Schocher
01d85e7a0c powerpc/mpc85xx: fixes and updates for socrates board
current mainline does not work on socrates board. To
get it back up working, there are some updates needed
in socrates_defconfig.

Signed-off-by: Heiko Schocher <hs@denx.de>
Fixes: 94633c36f9 ("net: Make DM_ETH be selected by NETDEVICE")
Fixes: 2f8a6db5d8 ("Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig")
2023-02-06 13:04:53 -05:00
Simon Glass
69a3e0779a spl: Drop unwanted return in spl_fit_upload_fpga()
This was added by mistake and renders the function useless. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 33c60a38bb ("trace: Use notrace for short")
Reported-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier-oss@weidmueller.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
2023-02-06 13:04:53 -05:00
Roger Quadros
4599bb7d79 arm: dts: k3-am64: Fix CPSW3G ethernet
As MDIO driver does not support Driver Model, the
pinctrl settings in the MDIO node will not
be applied resulting in PHY not being detected.

To workaround this we add the MDIO pinctrl in
the CPSW3G node in the -u-boot.dtsi file.

Add the missing MDIO and RGMII pinctrl nodes in
k3-am642-r5-evm.dts

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-02-06 13:04:53 -05:00
Roger Quadros
f85631d06f arm: dts: k3-am6: Fix "EEPROM not available" error
We need to enable i2c0 so u-boot can read from EEPROM.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-02-06 13:04:53 -05:00
Roger Quadros
ffefc72083 arm: dts: k3-am64: sync with Linux DT files
Sync AM64 DT files with Linux v6.2-rc4

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-02-06 13:04:53 -05:00
Holger Brunck
9b26a251cf km/ppc832x: join config files
There are no differences for the different 832x targets we have in
the header defined with SYS_CONFIG_NAME. So we can join the five
headers to a single file.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2023-02-06 13:04:53 -05:00
Holger Brunck
5043ce2874 km/ppc: remove km-mpc8360.h and km-mpc832x.h
Next step to get rid of the header files in icnlude/configs. Move
most of the defines to km83xx.c directly. Some remaining defines
which should go to Kconfig are moved to km-mpc83xx.h for now.

Also remove some unused defines and move one define to powerpc.env
as we only need it there.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2023-02-06 13:04:53 -05:00
Nikhil M Jain
0952aa81da board: ti: am62x: am62x: Add splash screen env variables
Set splash screen related env variables. Default splash source is
set to mmc where user is expected to keep bmp in compressed format
with name ti.gz on first partition of mmc.

Splash file will be uncompressed to DDR at address 0x82000000 and
splash position is set to middle of screen.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
2023-02-06 13:04:52 -05:00
Nikhil M Jain
6a74e2537f include: configs: am62x_evm: Add .env file for Am62x
Use .env file for setting board related environment variables,
in place of am62x_evm.h file. Except for BOOTENV settings, as
config_distro_boot.env file doesn't exist.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-02-06 13:04:52 -05:00
Linus Walleij
0c1413f6d7 test: bootdev: Do not require USB to compile test
This test will block compilation of the entire test suite
on platforms without USB support. Make the extern
"usb_started" conditional on USB host or gadget and
define a dummy flag if neither is enabled.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:52 -05:00
KaDiWa
4209c47364 elf: add Elf64_Sym
Required as Elf_Sym in tools/prelink-riscv.inc. I assume people have
been using an OS-supplied elf.h, but macOS doesn't have that.

Taken from
https://github.com/torvalds/linux/blob/v6.1/include/uapi/linux/elf.h

Signed-off-by: KaDiWa <kalle.wachsmuth@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:52 -05:00
Christian Marangi
748c1ab464 Makefile: fix shell error for darwin major/minor version check
Fix shell error:
 /bin/sh: line 0: [: too many arguments

for the darwin major/minor version check.

It seems for os_x_before for some reason DARWIN_MAJOR_VERSION and
DARWIN_MINOR_VERSION are empty. To fix this set DARWIN_MAJOR_VERSION
and DARWIN_MINOR_VERSION to be evaluated once so the value is retained.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-06 13:04:52 -05:00
Sjoerd Simons
c5279ea1c3 lmb: Set correct lmb flags for EFI memory map entries
When adding reserved memory areas from the EFI memory map set the NOMAP
flag when applicable. When this isn't done adding "no-map" flagged entries
from the fdt after receiving the same from the EFI memory map fails due
to non-matching flags.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2023-02-06 12:07:18 -05:00
Tom Rini
007ae5d108 lmb: Default to not-LMB_USE_MAX_REGIONS
The LMB code allows for picking a hard limit on the number of regions it
can know of, or to dynamically allocate these regions. The reason for
this choice is to allow for the compiler to perform a size optimization
in the common case. This optimization however, is very small, ranging
from 196 bytes to 15 bytes saved, or in some cases, being larger. Now
that we also have more regions covered by LMB (in order to protect
various parts of our self at run time), the default of 8 is also much
easier to hit and leads to non-obvious error messages (which imply that
an area is protected, not that we're out of areas to add to the list).

Switch to the dynamic use as the default.

Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-06 12:07:18 -05:00
Tom Rini
f8f47e6ff2 - restore TI AM335x LCDC driver with DM support
- make simple panel independent of backlight
  - add ofnode panel timing decode functions with test
  - add TIDSS video driver and AM62x splash screen
  - add TI logo
 -----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCY96rpQ4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXBXnAJ9hs98w0Azf1VpfhfGnV0IETCzu7ACfSA8X2qck
 oldzKOBwb247sPVc2X0=
 =0jSk
 -----END PGP SIGNATURE-----

Merge tag 'video-20230204' of https://source.denx.de/u-boot/custodians/u-boot-video

 - restore TI AM335x LCDC driver with DM support
 - make simple panel independent of backlight
 - add ofnode panel timing decode functions with test
 - add TIDSS video driver and AM62x splash screen
 - add TI logo
2023-02-04 14:53:00 -05:00
Nikhil M Jain
03610ebf35 tools: logos: Add TI logo files
The default splashfile name saved is ti.gz. User can use these
logo files and use it to test splash screen.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
2023-02-04 18:19:00 +01:00
Nikhil M Jain
d5f563ccdd board: ti: am62x: evm: Add splash screen support
Splash screen function needs splash source information
to load image and display it, splash_location provides
the necessary info, Set default_splash_location to MMC
at partition 1:1. Probe DSS for splash screen display.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
2023-02-04 18:16:56 +01:00
Nikhil M Jain
5f9f816bb8 drivers: video: tidss: TIDSS video driver support for AM62x
Added tidss video driver support which enables display
on oldi panel using AM62x, it creates a simple pipeline
framebuffer==>vidl1==>ovr1==>vp1==>oldi_panel and
calculates clock rates for panel from panel node in
device tree.

To compile TIDSS when user sets CONFIG_VIDEO_TIDSS
add rule in Makefile. Include tidss folder location
in Kconfig.

TIDSS is ported from linux kernel version 5.10.145

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
2023-02-04 18:16:30 +01:00
Nikhil M Jain
3ebe3c703b drivers: video: simple_panel: make simple panel independent of backlight
This patch updates the necessary Kconfigs to make simple panel
driver independent of backlight driver  and compiling backlight
related code in simple-panel driver conditionally to when user
has set CONFIG_BACKLIGHT.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-04 18:16:00 +01:00
Nikhil M Jain
2f3d6a4230 test: dm: test-fdt: Add decode_panel_timing test
To test decode_panel_timing add a panel-timings node
and a DM test for decode panel timingd by matching
the panel timing node parameters.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-04 18:15:14 +01:00
Nikhil M Jain
0347cc7732 drivers: core: ofnode: Add panel timing decode.
ofnode_decode_display_timing supports reading timing parameters from
subnode of display-timings node, for displays supporting multiple
resolution, in case if a display supports single resolution, it fails
reading directly from display-timings node, to support it
ofnode_decode_panel_timing is added.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-04 18:13:21 +01:00