Commit Graph

15 Commits

Author SHA1 Message Date
Gerard Marull-Paretas e81e92dbb9 boards: convert images to JPEG and reduce image size
The boards folder uses ~142.8 MB, being the largest in the repository.
This is due mostly to board images, which are in most cases not
optimized for web content. This patch tries to address this problem by
converting all pictures to JPEG (quality 75) and by adjusting its size
up to 750 px (the width of the documentation content). Images that
specified a fixed width in rst files are converted down to that value
instead.

With this patch, folder goes down to ~53.5 MB from 142.8 MB (-~63%).
Note that this patch introduces a new set of binary files to git
history, though (bad).

The process has been automated using this quickly crafted Python script:

```python
from pathlib import Path
import re
import subprocess

def process(doc, image, image_jpeg, size):
    subprocess.run(
        (
	     f"convert {image}"
	     "-background white -alpha remove -alpha off -quality 75"
	     f"-resize {size}\> {image_jpeg}"
	),
        shell=True,
        check=True,
        cwd=doc.parent,
    )
    if image != image_jpeg:
        (doc.parent / image).unlink()

for doc in Path(".").glob("boards/**/*.rst"):
    with open(doc) as f:
        content = ""
        image = None
        for line in f:
            m = re.match(r"^(\s*)\.\. (image|figure):: (.*)$", line)
            if m:
                if image:
                    process(doc, image, image_jpeg, size)

                image = Path(m.group(3))
                if image.suffix not in (".jpg", ".jpeg", ".png"):
                    content += line
                    image = None
                    continue

                image_jpeg = image.parent / (image.stem + ".jpg")
                size = 750
                content += (
                    f"{m.group(1)}.. {m.group(2)}:: {image_jpeg}\n"
                )
            elif image:
                m = re.match(r"\s*:height:\s*[0-9]+.*$", line)
                if m:
                    continue

                m = re.match(r"\s*:width:\s*([0-9]+).*$", line)
                if m:
                    size = min(int(m.group(1)), size)
                    continue

                content += line
                if line == "\n":
                    process(doc, image, image_jpeg, size)
                    image = None
            else:
                content += line

    with open(doc, "w") as f:
        f.write(content)
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-29 10:18:18 +02:00
Gerard Marull-Paretas 1416c8ce12 boards: qemu: delete all QEMU logos
We had a bunch of QEMU logos embedded in all QEMU boards. Logos do not
add much value to the documentation, so just delete them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-29 10:18:18 +02:00
Kumar Gala 10329165be serial: remove defconfig/proj setting of serial drivers
Now that serial drivers are enabled based on devicetree we can remove
any cases of them getting enabled by *defconfig and proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-26 09:29:24 -05:00
Maureen Helm a96f096abf dts: sparc: gaisler: Move SoC devicetree includes under a vendor dir
Cleans up SoC devicetree include file locations to follow the convention
of dts/<arch>/<vendor>/

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-05-09 17:54:48 -04:00
Filip Kokosinski 94428044e2 cmake: support multiple entries in board.cmake
Currently there is no way to support running a board on multiple
emulation platforms nor to choose a desired emulation platform for the
simulation to be run on. This commit introduces a new
SUPPORTED_EMU_PLATFORMS list, which defines available emulation
platforms for a given board.

Fixes #12375.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2021-11-12 21:33:42 -05:00
Anas Nashif b3abe11104 boards: remove CONFIG_PRINTK from board _defconfig
We should not enable this config in the board, this is an
application config.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-10-18 09:49:45 -04:00
Martin Åberg 51188bc6df board: set chosen zephyr,shell-uart in LEON boards DTS
This associates the SHELL UART backend with the DTS uart0. It solves
an issue with unresponsive shell.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2021-05-28 06:31:59 -05:00
Martin Åberg 83f733ce59 SPARC: improve fatal log
The fatal log now contains
- Trap type in human readable representation
- Integer registers visible to the program when trap was taken
- Special register values such as PC and PSR
- Backtrace with PC and SP

If CONFIG_EXTRA_EXCEPTION_INFO is enabled, then all the above is
logged. If not, only the special registers are logged.

The format is inspired by the GRMON debug monitor and TSIM simulator.
A quick guide on how to use the values is in fatal.c.

It now looks like this:

E: tt = 0x02, illegal_instruction
E:
E:       INS        LOCALS     OUTS       GLOBALS
E:   0:  00000000   f3900fc0   40007c50   00000000
E:   1:  00000000   40004bf0   40008d30   40008c00
E:   2:  00000000   40004bf4   40008000   00000003
E:   3:  40009158   00000000   40009000   00000002
E:   4:  40008fa8   40003c00   40008fa8   00000008
E:   5:  40009000   f3400fc0   00000000   00000080
E:   6:  4000a1f8   40000050   4000a190   00000000
E:   7:  40002308   00000000   40001fb8   000000c1
E:
E: psr: f30000c7   wim: 00000008   tbr: 40000020   y: 00000000
E:  pc: 4000a1f4   npc: 4000a1f8
E:
E:       pc         sp
E:  #0   4000a1f4   4000a190
E:  #1   40002308   4000a1f8
E:  #2   40003b24   4000a258

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2021-03-25 17:48:23 +01:00
Anas Nashif ff24090527 tests: filter default platforms
Do not attempt to build/run all tests. Emulation platforms should
primarily build kernel and architecture related tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-19 14:41:01 -05:00
Martin Åberg 697baf1c47 boards/sparc: default to UART_INTERRUPT_DRIVEN
Use the UART interrupt support.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2021-01-21 15:53:03 -05:00
Martin Åberg 5166b74d5f boards: set CPU_HAS_FPU on LEON3 soc and boards
GR716A and QEMU has FPU.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-12-04 14:33:43 +02:00
Martin Åberg cd0418e5a9 boards: sparc: add netif capability
Allows for network related tests to run on the SPARC board
configurations.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-17 11:44:16 +02:00
Martin Åberg 42b8a5cbca boards: Add GR716-MINI Development Board
GR716A microcontroller evaluation board with features an 80-pin
mezzanine connector. Also supports simulating with TSIM3.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-13 14:53:55 -08:00
Martin Åberg d5e0ae9d7a boards: Add generic_leon3 for FPGA design
This board configuration is compatible with
- GRLIB GPL FPGA template designs
- TSIM3 LEON3 eval

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-13 14:53:55 -08:00
Martin Åberg 34014deb0f boards: Add qemu_leon3
This board configuration can be used out-of-the-box with SPARC QEMU
distributed with Zephyr SDK v0.11.2.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-13 14:53:55 -08:00