-1

I am using buildroot to build a custom filesystem for the Raspberry Pi. So far everything works fine, but I can’t manage to add an out-of-tree package. I am trying to add WiringPi, since WiringPi has been marked as legacy in buildroot and is therefore not included anymore.

My external folder structure:

./Config.in
./external.desc
./external.mk
./package
./package/Confige
./package/custom_wiringpi
./package/custom_wiringpi/custom_wiringpi.mk
./package/custom_wiringpi/Confige

custom_wiringpi/Confige:

config BR2_PACKAGE_CUSTOM_WIRINGPI
        bool "custom_wiringpi"
        help
          https://github.com/WiringPi/WiringPi

This seems to work, because I can select wiringpi in menuconfig. But it does not get build. My custom_wiringpi.mk:

CUSTOM_WIRINGPI_VERSION = 20210904
CUSTOM_WIRINGPI_SOURCE = 7f8fe26e4f775abfced43c07657a353f03ddb2d0.zip
CUSTOM_WIRINGPI_SITE = https://github.com/WiringPi/WiringPi/archive/

define CUSTOM_WIRINGPI_BUILD_CMDS
        sh build
endef

I would expect this to at least download the source and extract it, but make just completely ignores this. My external.mk:

include $(sort $(wildcard $(BR2_EXTERNAL_ROOTFS_PATH)/package/*/*.mk))

How can I get buildroot to actual execute the build steps I defined?


I am aware that similar questions have been asked on SO, but none of them cover my problem.

Philipp Ludwig
  • 3,758
  • 3
  • 30
  • 48

2 Answers2

2

BR2_EXTERNAL_ROOTFS_PATH is most likely wrong in your external.mk. The BR2_EXTERNAL__PATH must match the name of the BR2_EXTERNAL as defined in your external.desc. Could you share your external.desc ?

See the documentation at https://buildroot.org/downloads/manual/manual.html#outside-br-custom or also the training slides https://bootlin.com/doc/training/buildroot/buildroot-slides.pdf starting slide 250.

Thomas Petazzoni
  • 5,636
  • 17
  • 25
  • Thanks for your comment. Just a few seconds later, I figured out what was going wrong (see my answer). Of course I read the documentation, but it would just be nice if there was a "dummy" example. Anyway, I can work from here. – Philipp Ludwig Sep 05 '21 at 08:48
1

I forgot to include this line in my custom_wiringpi.mk:

$(eval $(generic-package))

Now Make behaves as expected.

Philipp Ludwig
  • 3,758
  • 3
  • 30
  • 48