You either need the company to commit to making software for it even when hardware sales are lacking (Wii U is a decent example, had really good Nintendo made games despite bad sales), or be a company with such a dedicated fan base that they’ll buy your product regardless of if the software support is there or not (Apple for example).