Commit Graph

6 Commits

Author SHA1 Message Date
Hu Zhenyu 1a6098f5db doc: Modify the it8xxx2_evb overview document
1. Remove the obsoleted board
2. Add HW rework of the new it8xxx2_evb
3. Add Wiring of the new it8xxx2_evb
4. Update the Ubuntu flash guide

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-09-29 14:37:55 +00:00
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
Fu Haolei bf21e849cd doc: it8xxx2: Documentation improvements
Better documentation describing the flashing and booting process.

Signed-off-by: Fu Haolei <haolei.fu@intel.com>
2022-06-08 12:43:23 +02:00
Nazar Kazakov f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Maksim Masalski 89212a7fbf doc: fix image resolution of the ITE IT8XXX2 series board
Found out that ITE IT8XXX2 series board image is not displaying
properly. In the original doc page of the RISC-V ITE IT8XXX2 series
board image is shrinked.

Fix resolution to display image properly.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2021-06-25 11:35:44 -04:00
Cheryl Su 968dd2107b boards/riscv: add new riscv platform-it8xxx2
We create a new platform for our chip series it8xxx2.
It is a riscv base soc.

Signed-off-by: Cheryl Su <cheryl.su@ite.com.tw>
2020-12-16 08:47:36 -05:00