From 44ae7a8d3b198bdafa3c3f08cbb8c8c8bf13e767 Mon Sep 17 00:00:00 2001 From: HL Yi Date: Wed, 14 Oct 2026 20:37:57 -0500 Subject: [PATCH] move modification of current files into a diff PR --- README.md | 20 +++++++------------- doc/devices/2M-PCB23-V3_2.md | 4 ++-- doc/devices/2M-PCB43-V1.1.md | 2 +- doc/devices/SWTGW215AS.md | 2 +- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 3d61c1e5..6eaf74e8 100644 --- a/README.md +++ b/README.md @@ -103,29 +103,24 @@ docker run --rm -p 8080:8080 -v $(pwd):/workspace rtlplayground-dev \ tools/output/httpd_sim /workspace/html ``` -Edit `config.txt` on your host, then re-run `make` — the +Edit `machine.h` or `config.txt` on your host, then re-run `make` — the source directory is mounted into the container, so changes take effect -immediately. To build for a different machine, pass `MACHINE=`, which -selects `machine/.c` (see [Adding a new device](doc/adding-a-device.md)). +immediately. To build for a different machine, pass `MACHINE=...`. ## (1) Compiling for direct chip flashing AND upgrading an existing RTLPlayground running device -Pass the machine that matches your device, for example: -``` -make MACHINE=DEFAULT_8C_1SFP -``` -The name selects the board definition `machine/.c`; `make` without a -`MACHINE` value stops with an error listing what is expected. If your board is -not in the list yet, see [Adding a new device](doc/adding-a-device.md). +Edit machine.h with an editor like vi or nano. Select the correct machine the firmware should build for. > [!TIP] > You can write configuration parameters in config.txt (see below) in order your switch to get > straight at the first boot, a correct IP configuration. -Now, building the firmware image should work. - +Now, building the firmware image should work: +``` +make +``` Note, that the image generated ends in .bin, not .img, in order to make IMSProg happy. image location is stored in `RTLPlayground/output/rtlplayground_version_machine.bin` @@ -358,7 +353,6 @@ Enjoy playing! ## (11) Other documents The following documents give further documentation on specific features of the RTL837x SoCs: -- [Adding a new device](doc/adding-a-device.md) - [RTL8372/3 Feature support](doc/hardware.md) - [CPU Port](doc/CpuPort.md) - [L2 learning](doc/l2.md) diff --git a/doc/devices/2M-PCB23-V3_2.md b/doc/devices/2M-PCB23-V3_2.md index f86f8db2..9cfe3acc 100644 --- a/doc/devices/2M-PCB23-V3_2.md +++ b/doc/devices/2M-PCB23-V3_2.md @@ -17,8 +17,8 @@ The original web interface reports this board as hardware version V3.2 The component placement matches [2M-PCB23-V3.1](2M-PCB23-V3_1.md): same positions for the flash (U8), the T7/T8/T9/T10 headers, the SFP cage and its LED, and the unpopulated U7/U9 footprints. Build with -`make MACHINE=KP_9000_9XHML_X_V3_2`, whose board file is a symlink to the V3.1 -definition and only differs in the reported name. +`MACHINE=KP_9000_9XHML_X_V3_2`, which uses the V3.1 machine definition and +only differs in the reported name. ## Tested diff --git a/doc/devices/2M-PCB43-V1.1.md b/doc/devices/2M-PCB43-V1.1.md index 0a11f513..97343f02 100644 --- a/doc/devices/2M-PCB43-V1.1.md +++ b/doc/devices/2M-PCB43-V1.1.md @@ -15,7 +15,7 @@ and sold by Mokerlink. The device is fully supported: - All 4 2.5GBASE-T RJ45 ports work at 10/100/1000/2500 Mbps - The SFP+ port supports 1G, 2.5G and 10G modules -- LEDs work with the same indiciations as the OEM firmware (build with `make MACHINE=KP_9000_6XHML_X2_V1_1` if building yourself, or use the corresponding pre-compiled binary) +- LEDs work with the same indiciations as the OEM firmware (use KP_9000_6XHML_X2_V1_1 in machine.h if building yourself or the corresponding pre-compiled binary) - untested due to missing Hardware: SFP+ ports equipped with 1G or 2.5G SFPs. ### Hardware overview diff --git a/doc/devices/SWTGW215AS.md b/doc/devices/SWTGW215AS.md index 6bfdaadc..0f986986 100644 --- a/doc/devices/SWTGW215AS.md +++ b/doc/devices/SWTGW215AS.md @@ -9,7 +9,7 @@ ## RTLPlayground target -Build for this device with `make MACHINE=LIANGUO_ZX_SWTGW215AS`, which selects the `machine/LIANGUO_ZX_SWTGW215AS.c` board definition. +Use machine target `MACHINE_LIANGUO_ZX_SWTGW215AS` for this device. Physical hardware verification: 5x RJ45 ports + 1x SFP port. Port 5 RJ45 is interfaced through a RTL8221B IC.