diff --git a/README.md b/README.md index 6eaf74e8..3d61c1e5 100644 --- a/README.md +++ b/README.md @@ -103,24 +103,29 @@ docker run --rm -p 8080:8080 -v $(pwd):/workspace rtlplayground-dev \ tools/output/httpd_sim /workspace/html ``` -Edit `machine.h` or `config.txt` on your host, then re-run `make` — the +Edit `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=...`. +immediately. To build for a different machine, pass `MACHINE=`, which +selects `machine/.c` (see [Adding a new device](doc/adding-a-device.md)). ## (1) Compiling for direct chip flashing AND upgrading an existing RTLPlayground running device -Edit machine.h with an editor like vi or nano. Select the correct machine the firmware should build for. +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). > [!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: -``` -make -``` +Now, building the firmware image should work. + 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` @@ -353,6 +358,7 @@ 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 9cfe3acc..f86f8db2 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 -`MACHINE=KP_9000_9XHML_X_V3_2`, which uses the V3.1 machine definition and -only differs in the reported name. +`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. ## Tested diff --git a/doc/devices/2M-PCB43-V1.1.md b/doc/devices/2M-PCB43-V1.1.md index 97343f02..0a11f513 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 (use KP_9000_6XHML_X2_V1_1 in machine.h if building yourself or the corresponding pre-compiled binary) +- 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) - 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 0f986986..6bfdaadc 100644 --- a/doc/devices/SWTGW215AS.md +++ b/doc/devices/SWTGW215AS.md @@ -9,7 +9,7 @@ ## RTLPlayground target -Use machine target `MACHINE_LIANGUO_ZX_SWTGW215AS` for this device. +Build for this device with `make MACHINE=LIANGUO_ZX_SWTGW215AS`, which selects the `machine/LIANGUO_ZX_SWTGW215AS.c` board definition. Physical hardware verification: 5x RJ45 ports + 1x SFP port. Port 5 RJ45 is interfaced through a RTL8221B IC.