shinyquagsire23 / Switch-Linux

Device trees, patches, etc for Linux on Switch
111 stars 4 forks source link

Compilation fails, no rules for NV fw #1

Open grepwood opened 6 years ago

grepwood commented 6 years ago

When executing make O=build/hac-001/ -j4 Image, at some point the compilation process will print

make[2]: * No rule to make target 'extra_firmware/nvidia/tegra210/vic04_ucode.bin', needed by 'firmware/nvidia/tegra210/vic04_ucode.bin.gen.o'.  Stop.
make[2]: * Waiting for unfinished jobs....
  MK_FW   firmware/nvidia/tegra210/vic04_ucode.bin.gen.S
make[1]: * [/usr/src/linux-next/Makefile:1018: firmware] Error 2
make[1]: * Waiting for unfinished jobs....

and when all else is finished, it will just print error 2.

annerajb commented 6 years ago

Did you follow this steps in the instructions? Download the linux-firmware package from here mkdir extra_firmware Copy nvidia/tegra210/vic04_ucode.bin and nvidia/tegra210/xusb.bin from the package to linux-

grepwood commented 6 years ago

Yes. I've taken the liberty to instead install the package from Gentoo, as it is my distro of choice and it provides the package. Is the following correct?

localhost /usr/src/linux-next # mkdir extra_firmware
localhost /usr/src/linux-next # cp /lib/firmware/nvidia/tegra210/* extra_firmware/

And yes, the directory /lib/firmware/nvidia/tegra210 contains the files we're after.

edit The instructions do not say WHERE to copy the firmware files or in what way. Should we also re-create the nvidia/tegra210 catalogs?

annerajb commented 6 years ago

i think you are sending it to the wrong destination folder. you are sending to. cp tegra210/* extra_firmware/ instead of cp tegra210/* extra_firmware/nvidia/tegra210/

grepwood commented 6 years ago

Yeah, definitely wrong. I looked at the patch code and now it builds. The instructions should say something along the lines of

mkdir -p extra_firmware/nvidia
cp -rf /lib/firmware/nvidia/tegra210 extra_firmware/nvidia

It's way easier to understand than

mkdir extra_firmware
cp foo/bar/foo extra_firmware/dir_that_doesnt_exist
cp bar/foo/foo extra_firmware/dir_that_doesnt_exist
cp foo/foo/bar extra_firmware/dir_that_doesnt_exist