sehraf / d1-riscv-arch-image-builder

RISC-V Archlinux D1 LicheeRV image builder
MIT License
113 stars 33 forks source link

Please don't be Arch-specific for the build system #33

Open romanrm opened 3 months ago

romanrm commented 3 months ago

Hello,

Even if this builds an Arch image, it doesn't have to be that this only works on an Arch system to build.

For example I launch the scripts on a Debian machine. First attempt:

bash: ./1_compile.sh: /usr/bin/sh: bad interpreter: No such file or directory

What is wrong with the normal "/bin/sh"?

Second attempt:

./consts.sh: line 61: pacman: command not found
Please install 'riscv64-linux-gnu-gcc'

Sorry I got no "pacman" on my machine, meanwhile /usr/bin/riscv64-linux-gnu-gcc-12 is happily present and ready to be executed. Why not just check for presence of the compiler, not of an Arch package of a compiler.

Feels very petty and hostile, like "f u if you use a different distro", we will specifically hardcode our own little incompatible ways so this doesn't work on your system.

sehraf commented 3 months ago

I've fixed the first error by making it distro independent.

Regarding the second, I cannot (and will not) maintain different distros, if this sounds or feels hostile, deal with it - if I remove that check, people will complain that the script isn't working because they are missing packages. Nevertheless, I'm open for PRs, so feel free to add a check for Debian.