From 81635dc8fa4debabf76ad86e608c4cb8028818dd Mon Sep 17 00:00:00 2001 From: Randolph Sapp Date: Thu, 5 Dec 2024 22:37:28 -0600 Subject: [PATCH] fix: set language for a few code-blocks Fix and tag the code-blocks to cut down on parsing and attribute errors. Also, it adds syntax highlighting and some rudimentary syntax checking for these examples. Signed-off-by: Randolph Sapp --- source/buildroot/Overview.rst | 2 +- source/debian/Building_Debian_Image.rst | 24 ++--- .../PRU-ICSS/Linux_Drivers/pru-icssg-pwm.rst | 16 ++-- .../PRU-ICSS/Linux_Drivers/pru-sw-uart.rst | 26 +++--- .../PRU-ICSS/Linux_Drivers/pruss-uart.rst | 44 +++++----- .../How_to_Setup_Ubuntu_1404_Network_Boot.rst | 88 +++++++++---------- .../Demo_User_Guides/Chromium_Browser.rst | 8 +- 7 files changed, 104 insertions(+), 104 deletions(-) diff --git a/source/buildroot/Overview.rst b/source/buildroot/Overview.rst index 9a6c3647f..9eb5b0598 100644 --- a/source/buildroot/Overview.rst +++ b/source/buildroot/Overview.rst @@ -44,7 +44,7 @@ to github repository. Repository structure ==================== -.. code-block:: +.. code-block:: text buildroot-external-TI ├── external.desc diff --git a/source/debian/Building_Debian_Image.rst b/source/debian/Building_Debian_Image.rst index 1e4c7205b..bd56fdf3f 100644 --- a/source/debian/Building_Debian_Image.rst +++ b/source/debian/Building_Debian_Image.rst @@ -31,7 +31,7 @@ The scripts are hosted at https://github.com/TexasInstruments/ti-bdebstrap To clone the repository, run: -.. code-block:: +.. code-block:: console git clone https://github.com/TexasInstruments/ti-bdebstrap.git @@ -39,7 +39,7 @@ To clone the repository, run: Repository Structure -------------------- -.. code-block:: +.. code-block:: text ti-bdebstrap ├── build.sh @@ -108,13 +108,13 @@ Install Pre-requisite Packages First, ensure that your repositories are up-to-date: -.. code-block:: +.. code-block:: console sudo apt update Then, install packages as follows: -.. code-block:: +.. code-block:: console sudo apt install -y \ pigz expect pv \ @@ -128,13 +128,13 @@ Then, install packages as follows: Ensure that all packages were correctly installed using: -.. code-block:: +.. code-block:: console sudo apt install --fix-broken Finally, install ``toml-cli`` and ``yamllint``: -.. code-block:: +.. code-block:: console pip3 install toml-cli pip3 install yamllint @@ -182,7 +182,7 @@ Building the Image To build an image, you need to run the :file:`build.sh` script: -.. code-block:: +.. code-block:: console sudo ./build.sh @@ -192,7 +192,7 @@ After the build, the RootFS, Boot partition and bsp_sources are stored in :file: Example: to build for ``trixie-am62pxx-evm``, run: -.. code-block:: +.. code-block:: console sudo ./build.sh trixie-am62pxx-evm @@ -205,13 +205,13 @@ This step can be skipped if you do not want to share the generated Image with an To generate an SD Card Image with the generated RootFS and Boot partition files, run: -.. code-block:: +.. code-block:: console ./create-wic.sh Example: to build for ``trixie-am62pxx-evm``, run: -.. code-block:: +.. code-block:: console ./create-wic.sh trixie-am62pxx-evm @@ -222,13 +222,13 @@ Flash Image to SD Card using Script To flash the SD card without generating a wic image, use the :file:`create-sdcard.sh` script. Run it using the below command and follow with the prompts. -.. code-block:: +.. code-block:: console sudo ./create-sdcard.sh For example, if the image is ``trixie-am62pxx-evm``, type: -.. code-block:: +.. code-block:: console sudo ./create-sdcard.sh trixie-am62pxx-evm diff --git a/source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/pru-icssg-pwm.rst b/source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/pru-icssg-pwm.rst index 3672e9ea7..59fcc8305 100644 --- a/source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/pru-icssg-pwm.rst +++ b/source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/pru-icssg-pwm.rst @@ -36,16 +36,16 @@ The PRU PWM Linux kernel driver depends on the PRU-ICSS kernel driver. So the following kernel Kconfig options should be enabled to use the PRU PWM module. -.. code:: +.. code-block:: menuconfig - Device Drivers ---> - SOC (System On Chip) specific Drivers ---> - [*] TI SOC drivers support ---> - TI PRU-ICSS Subsystem Platform drivers + Device Drivers ---> + SOC (System On Chip) specific Drivers ---> + [*] TI SOC drivers support ---> + TI PRU-ICSS Subsystem Platform drivers - Device Drivers ---> - Pulse-Width Modulation (PWM) Support ---> - PRU-ICSS PWM support + Device Drivers ---> + Pulse-Width Modulation (PWM) Support ---> + PRU-ICSS PWM support .. rubric:: PRU PWM Sysfs Usage diff --git a/source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/pru-sw-uart.rst b/source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/pru-sw-uart.rst index 81a099577..6e8cf40fb 100644 --- a/source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/pru-sw-uart.rst +++ b/source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/pru-sw-uart.rst @@ -42,16 +42,16 @@ in PRU R30 and R31. For details please refer to the kernel device tree binding doc: -.. code:: +.. code-block:: text - Documentation/devicetree/bindings/serial/pru-suart.txt + Documentation/devicetree/bindings/serial/pru-suart.txt The Processor SDK Linux kernel also provides an device tree example for Beaglebone Black: -.. code:: +.. code-block:: text - arch/arm/boot/dts/am335x-boneblack-prusuart.dts + arch/arm/boot/dts/am335x-boneblack-prusuart.dts This example defines the 3 UARTs on PRU0 without hardware flow control and 3 UARTs on PRU1 with hardware flow control. All the UART pins are available on @@ -64,16 +64,16 @@ The PRU Soft UART Linux kernel driver depends on the PRU-ICSS kernel driver. So the following kernel Kconfig options should be enabled to use the PRU Soft UART module. -.. code:: +.. code-block:: menuconfig - Device Drivers ---> - SOC (System On Chip) specific Drivers ---> - [*] TI SOC drivers support ---> - TI PRU-ICSS Subsystem Platform drivers + Device Drivers ---> + SOC (System On Chip) specific Drivers ---> + [*] TI SOC drivers support ---> + TI PRU-ICSS Subsystem Platform drivers - Device Drivers ---> - Character devices ---> - Serial drivers ---> - TI PRU Software UART suppor + Device Drivers ---> + Character devices ---> + Serial drivers ---> + TI PRU Software UART suppor diff --git a/source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/pruss-uart.rst b/source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/pruss-uart.rst index 0b6a85a96..5b850fbc2 100644 --- a/source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/pruss-uart.rst +++ b/source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/pruss-uart.rst @@ -30,45 +30,45 @@ The PRUSS UART Linux kernel driver depends on the PRU-ICSS kernel drivers. So the following kernel Kconfig options should be enabled to use the PRUSS UART module. -.. code:: +.. code-block:: menuconfig - Device Drivers ---> - SOC (System On Chip) specific Drivers ---> - [*] TI SOC drivers support ---> - TI PRU-ICSS Subsystem Platform drivers + Device Drivers ---> + SOC (System On Chip) specific Drivers ---> + [*] TI SOC drivers support ---> + TI PRU-ICSS Subsystem Platform drivers - Device Drivers ---> - IRQ chip support ---> - TI PRU-ICSS Interrupt Controller + Device Drivers ---> + IRQ chip support ---> + TI PRU-ICSS Interrupt Controller - Device Drivers ---> - Character devices ---> - Serial drivers ---> - TI PRU-ICSS UART support + Device Drivers ---> + Character devices ---> + Serial drivers ---> + TI PRU-ICSS UART support .. rubric:: Example DT configuration From am335x-evmsk.dts -.. code:: +.. code-block:: dts - &pruss_uart { - prus = <&pru0>; - ti,pru-interrupt-map = <0 6 2 2>; - pinctrl-names = "default"; - pinctrl-0 = <&prussuart_pins>; - status = "okay"; - }; + &pruss_uart { + prus = <&pru0>; + ti,pru-interrupt-map = <0 6 2 2>; + pinctrl-names = "default"; + pinctrl-0 = <&prussuart_pins>; + status = "okay"; + }; .. rubric:: Driver Usage Once the driver is probed, kernel log shows the following message. -.. code:: +.. code-block:: dmesg - [ 28.617700] 4a328000.serial: ttyS1 at MMIO 0x4a328000 (irq = 77, base_baud = 12000000) is a 16550A + [ 28.617700] 4a328000.serial: ttyS1 at MMIO 0x4a328000 (irq = 77, base_baud = 12000000) is a 16550A Therefore the device node /dev/ttyS1 is associated to the PRUSS UART, user space application can read/write this serial port. For detalls please refer diff --git a/source/linux/How_to_Guides/Host/How_to_Setup_Ubuntu_1404_Network_Boot.rst b/source/linux/How_to_Guides/Host/How_to_Setup_Ubuntu_1404_Network_Boot.rst index cf69a2e11..1138b9f47 100644 --- a/source/linux/How_to_Guides/Host/How_to_Setup_Ubuntu_1404_Network_Boot.rst +++ b/source/linux/How_to_Guides/Host/How_to_Setup_Ubuntu_1404_Network_Boot.rst @@ -60,7 +60,7 @@ USB there are some additional steps required. theoretically any system properly ported and configured for AM335x/AM437x. #. Install the necessary services using a terminal on the Linux box. - .. code:: + .. code-block:: console sudo apt-get install isc-dhcp-server atftpd xinetd @@ -71,38 +71,37 @@ USB there are some additional steps required. Edit /etc/dhcp/dhcpd.conf - .. code:: + .. code-block:: text subnet 192.168.2.0 netmask 255.255.255.0 { range dynamic-bootp 192.168.2.2 192.168.2.100; if substring (option vendor-class-identifier, 0, 10) = "AM335x ROM" - { - filename "u-boot-spl-restore.bin"; - } - elsif substring (option vendor-class-identifier, 0, 10) = "DM814x ROM" - { - filename "u-boot-spl-restore.bin"; - } - elsif substring (option vendor-class-identifier, 0, 10) = "AM43xx ROM" - { - filename "u-boot-restore.img"; - } - elsif substring (option vendor-class-identifier, 0, 17) = "AM335x U-Boot SPL" - { - filename "u-boot-restore.img"; - } - elsif substring (option vendor-class-identifier, 0, 10) = "AM43xx U-B" - { - filename "u-boot-restore.img"; - } - else - { - filename "zImage"; - } - + { + filename "u-boot-spl-restore.bin"; + } + elsif substring (option vendor-class-identifier, 0, 10) = "DM814x ROM" + { + filename "u-boot-spl-restore.bin"; + } + elsif substring (option vendor-class-identifier, 0, 10) = "AM43xx ROM" + { + filename "u-boot-restore.img"; + } + elsif substring (option vendor-class-identifier, 0, 17) = "AM335x U-Boot SPL" + { + filename "u-boot-restore.img"; + } + elsif substring (option vendor-class-identifier, 0, 10) = "AM43xx U-B" + { + filename "u-boot-restore.img"; + } + else + { + filename "zImage"; + } range 192.168.2.101 192.168.2.199; - } + } .. note:: This configuration creates a subnet, 192.168.2.0, with a bootp IP Address range of 2 - 100. The isc-dhcp-server will use this @@ -120,27 +119,27 @@ USB there are some additional steps required. Edit /etc/default/atftpd (create the file if necessary) with: - .. code:: + .. code-block:: text - USE_INETD=false - OPTIONS="--tftpd-timeout 300 --retry-timeout 5 --maxthread 100 --verbose=5 --logfile /var/log/atftpd.log --port 69 /tftpboot" + USE_INETD=false + OPTIONS="--tftpd-timeout 300 --retry-timeout 5 --maxthread 100 --verbose=5 --logfile /var/log/atftpd.log --port 69 /tftpboot" - .. note:: This is an example configuration and it can certainly be modified for specific situations. + .. note:: This is an example configuration and it can certainly be modified for specific situations. #. Create directory to store TFTP files (/tftpboot used here) - .. code:: + .. code-block:: console - sudo mkdir /tftpboot - sudo chmod -R 777 /tftpboot - sudo chown -R nobody /tftpboot + sudo mkdir /tftpboot + sudo chmod -R 777 /tftpboot + sudo chown -R nobody /tftpboot Make sure the server is configured to look at the port that you are using. Edit /etc/default/isc-dhcp-server and add the appropriate port (ex. usb0 or eth1) to the INTERFACES option. The example below includes eth0, eth1, and usb0. - .. code:: + .. code-block:: text INTERFACES="eth0 eth1 usb0" @@ -148,7 +147,8 @@ USB there are some additional steps required. Check the interfaces in your PC by using `ip addr` and find the appropriate interface and its IP address. #. Restart the services to pick-up the configuration changes -.. code:: + + .. code-block:: console sudo service isc-dhcp-server restart sudo service atftpd restart @@ -191,13 +191,13 @@ USB there are some additional steps required. - As root, create /etc/NetworkManager/dispatcher.d/99am-usb-dhcp-server - .. code:: + .. code-block:: sh #!/bin/sh   IF=$1 STATUS=$2 -   + if [ "$IF" = "usb0" ] && [ "$STATUS" = "up" ]; then service isc-dhcp-server restart fi @@ -229,7 +229,7 @@ USB there are some additional steps required. A) Configure /etc/network/interfaces by adding the below structure for usb0: - .. code:: + .. code-block:: text allow-hotplug usb0 iface usb0 inet static @@ -245,10 +245,10 @@ USB there are some additional steps required. /etc/network/interfaces). This script restarts the DHCP/BOOTP server automatically. - .. code:: + .. code-block:: sh #!/bin/sh -   + if [ "$IFACE" = usb0 ]; then sudo service isc-dhcp-server restart fi @@ -263,11 +263,11 @@ USB there are some additional steps required. managed by /etc/network/interfaces by adding the below code to /etc/NetworkManager/NetworkManager.conf: - .. code:: + .. code-block:: ini [main] plugins=ifupdown -   + [ifupdown] managed=false diff --git a/source/system/Demo_User_Guides/Chromium_Browser.rst b/source/system/Demo_User_Guides/Chromium_Browser.rst index b5f9475d6..3dae92433 100644 --- a/source/system/Demo_User_Guides/Chromium_Browser.rst +++ b/source/system/Demo_User_Guides/Chromium_Browser.rst @@ -70,7 +70,7 @@ Graphics Feature Status To see the GPU features that are in use, enter :code:`chrome://gpu` into the Chromium URL/Navigation bar. A web page will be rendered with this information. The below example shows what is enabled/disabled when GPU acceleration is working correctly -.. code-block:: +.. code-block:: text * Canvas: Hardware accelerated * Canvas out-of-process rasterization: Disabled @@ -119,7 +119,7 @@ Pull in the meta-browser and meta-clang layer into a Scarthgap Yocto build. meta-browser should be pinned to commit: -.. code-block:: +.. code-block:: text commit 1ed2254d72a4c25879014c98be287a7e3e22904c Author: Max Ihlenfeldt @@ -129,7 +129,7 @@ meta-browser should be pinned to commit: meta-clang needs to be pinned to HEAD commit of branch "scarthgap", as of the time of writing that equates to this commit: -.. code-block:: +.. code-block:: text commit e7dceb1c92caf7f21ef1d7b49c85328c30cffd90 (HEAD -> scarthgap, origin/scarthgap) Author: Etienne Cordonnier @@ -176,7 +176,7 @@ Where is defined in the :ref:`Build Options section of "Building the S into by default. If you want to build it into another image, then you would need to modify the .bb recipe for the image. Or alternatively add the line: -.. code-block:: console +.. code-block:: text IMAGE_INSTALL:append = " chromium-ozone-wayland"