I’ll check the JOSM plugin Routing tonight. Thanks.
The railways aren’t tagged highway=railway, they are tagged railway=rail. But perhaps I can use the…
railway=rail { add highway=primary}
…in the style rules for mkgmap