Skip to contentSkip to conversation

Linux kernel make target

Buildroot Nick Betteridge 2 participants 4 messages Jul 5, 2023 – Jul 6, 2023

lore
Share & tools
lore
#0 lore raw

Hi,

I'm unable to find an option in menuconfig which allows me to specify a kernel target for 'make' - is this possible? In other words, I can see how to specify the kernel source location, the defconfig etc, but I also need to specify the target - in my case it's 'make nanopi6-images'.

Is there a way to do this?

Thanks,

Nick

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#1 lore raw

Hello Nick,

Quoted 3 lines · Nick Betteridge

Hi,

I'm unable to find an option in menuconfig which allows me to specify a kernel target for 'make' - is this possible? In other words, I can see how to specify the kernel source location, the defconfig etc, but I also need to specify the target - in my case it's 'make nanopi6-images'.

If this target is a defconfig, you can use BR2_LINUX_KERNEL_DEFCONFIG.
But I think this is a custom target in a non-upstream kernel.
In this case, I don't think you will be able to do it directly and will probably need to modify linux/Config.in and linux/linux.mk files.

I would suggest you avoid doing that as this is not upstream, though.

Can you be a bit more precise about what this target does ? Is it a post-install target somehow ? I don't know nanopi6 nor the kernel you are using ;-).

Regards,
JM
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw

Salut JM

Quoted 4 lines
Quoted 1 line

I'm unable to find an option in menuconfig which allows me to specify a kernel target for 'make' - is this possible? In other words, I can see how to specify the kernel source location, the defconfig etc, but I also need to specify the target - in my case it's 'make nanopi6-images'.

Can you be a bit more precise about what this target does ? Is it a post-install target somehow ? I don't know nanopi6 nor the kernel you are using ;-).

The friendlyelec nanopi t6 uses a forked kernel [1] and the build sequence is defined in [2] with a 'make' defined in [3]. The 'make' command also generates a 'resource.img' which is included in the construction of the image [4]

I guess that if I'm unable to add the target to the menuconfig kernel build options then I'll have to create the resource.img in a post-build script.

Just trying to avoid writing another script :)

Regards,

Nick

[1] https://github.com/friendlyarm/kernel-rockchip -b nanopi5-v5.10.y_opt

[2] https://wiki.friendlyelec.com/wiki/index.php/NanoPC-T6#Build_kernel_linux-v5.10.y

[3] make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi6-images -j$(nproc)

[4] https://wiki.friendlyelec.com/wiki/index.php/NanoPC-T6#Install_to_target_board

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to Jean-Michel Hautbois
Quoted 8 lines
Quoted 3 lines

I'm unable to find an option in menuconfig which allows me to specify a kernel target for 'make' - is this possible? In other words, I can see how to specify the kernel source location, the defconfig etc, but I also need to specify the target - in my case it's 'make nanopi6-images'.

If this target is a defconfig, you can use BR2_LINUX_KERNEL_DEFCONFIG.
But I think this is a custom target in a non-upstream kernel.
In this case, I don't think you will be able to do it directly and will probably need to modify linux/Config.in and linux/linux.mk files.

It works, of course! Setting the 'kernel image target name' to 'nanopi6-images' and 'kernel image name' to 'Image' - I had neglected to set the 'kernel image name'.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot