[Buildroot] [PATCH 1/1] package/python-pykwalify: add required package for zephyr cmake

Charles Hardin ckhardin at gmail.com
Tue Aug 22 18:02:59 UTC 2023


Thomas,

> On Aug 22, 2023, at 10:57 AM, Thomas Petazzoni <thomas.petazzoni at bootlin.com> wrote:
> 
> Hello Charles,
> 
>> On Mon, 21 Aug 2023 16:45:23 -0700
>> Charles Hardin <ckhardin at gmail.com> wrote:
>> 
>> https://github.com/zephyrproject-rtos
> 
> Yes, I know what Zephyr is :-)
> 
>> The build is cmake derived but relies on calling into some python scripts to
>> generate some build dependencies
>> 
>> https://github.com/zephyrproject-rtos/zephyr/blob/main/scripts/requirements-base.txt
> 
> OK.
> 
>> So, we have various RTOS MCUs that are hooked up into linux controllers,
>> and this is just a simple hook so that the same SDK can be handled to build
>> both firmware for something like an STM32 and a Raspberry-pi
> 
> If I rephrase this: you want to use Buildroot to build the Zephyr
> firmware for your STM32 micro-controller, alongside with the Linux
> system running on the RaspberryPi?
> 

Yes, and we are doing this today with these patches.

>> Assume a reference to
>> https://gist.github.com/titouanc/ea0685d9cd8592deb1c49d48e33b3eee to add
>> the gcc eabi toolchain has been done in an external package, with the
>> patches above we can actually build both firmware and the drivers in
>> buildroot from one tree with external recipes like below
> 
> Note: this gcc eabi toolchain is now in Buildroot upstream, no need to
> add it as an external package.
> 

Thanks 

>> env PATH=/opt/sdk/aarch64-buildroot-linux-gnu_sdk-buildroot/bin:$PATH cmake
>> \
>> 
>>    -DCMAKE_TOOLCHAIN_FILE=/opt/sdk/aarch64-buildroot-linux-gnu_sdk-buildroot/share/buildroot/toolchainfile.cmake
>> \
>> 
>> 
>> -DARMGNU_GCC_TOOLCHAIN_PREFIX="/opt/sdk/aarch64-buildroot-linux-gnu_sdk-buildroot/share/gcc-arm-none-eabi"
>> \
>> 
>>    -DCMAKE_BUILD_TYPE=Debug \
>> 
>>        ../buildroot-external
> 
> Not sure to really follow in which projects this cmake command is used?
> To build Zephyr?
> 

There is a custom cmake file to do the zephyr build, so make does the buildroot build and we can use cmake for the zephyr build.

It is not out of the box but pretty simple glue to make it work.

> Best regards,
> 
> Thomas
> -- 
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com



More information about the buildroot mailing list