yocto单独编译busybox

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

yocto单独编译busybox

Jump to solution
5,582 Views
luoyaojun
Contributor II

使用yocto工程如何能够单独编译busybox,并生成新的ext4文件系统?

例如:

修改busybox中的源码文件:busybox-1.23.1/libbb/printable_string.c修改代码中某个函数,实现支持中文的显示。

修改完成后使用bitbake fsl-image-qt5并不能生成正确的busybox,如何操作才能正确重新编译busybox并生成我想要的文件系统?

当我使用bitbake -c compile -f busybox编译了busybox后再用命令bitbake fsl-image-qt5生成文件系统时报错:

/yocto/fsl-release-bsp/sources/poky/meta/recipes-core/busybox/busybox_1.23.1.bb.do_compile is tainted from a forced run

ERROR: Unable to install packages. Command '/yocto/fsl-release-bsp/imx6ul/tmp/sysroots/x86_64-linux/usr/bin/smart --quiet --data-dir=/yocto/fsl-release-bsp/imx6ul/tmp/work/imx6ulevk-poky-linux-gnueabi/fsl-image-qt5/1.0-r0/rootfs/var/lib/smart install -y packagegroup-core-ssh-dropbear@all psplash@cortexa7hf_vfp_neon packagegroup-core-tools-profile@imx6ulevk xserver-xorg-extension-glx@cortexa7hf_vfp_neon liberation-fonts@all rpm@cortexa7hf_vfp_neon packagegroup-fsl-pulseaudio@all packagegroup-fsl-tools-benchmark@imx6ulevk smartpm@cortexa7hf_vfp_neon xorg-minimal-fonts@all packagegroup-core-boot@imx6ulevk packagegroup-core-tools-testapps@imx6ulevk mesa-megadriver@cortexa7hf_vfp_neon packagegroup-core-x11-base@all packagegroup-core-nfs-server@all packagegroup-fsl-tools-gpu-external@imx6ulevk packagegroup-fsl-multimedia-gstreamer1.0-core@imx6ulevk packagegroup-fsl-tools-gpu@imx6ulevk packagegroup-core-x11-sato-games@imx6ulevk packagegroup-fsl-tools-testapps@imx6ulevk packagegroup-fsl-tools-bluetooth@all packagegroup-core-tools-debug@all packagegroup-fsl-multimedia-gstreamer1.0-testapps@imx6ulevk packagegroup-base-extended@imx6ulevk packagegroup-core-x11-sato@imx6ulevk locale-base-en-us@cortexa7hf_vfp_neon locale-base-en-gb@cortexa7hf_vfp_neon' returned 1:
error: Can't install packagegroup-core-boot-1.0-r17@imx6ulevk: no package provides busybox-hwclock


ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /yocto/fsl-release-bsp/imx6ul/tmp/work/imx6ulevk-poky-linux-gnueabi/fsl-image-qt5/1.0-r0/temp/log.do_rootfs.9658
ERROR: Task 7 (/yocto/fsl-release-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/images/fsl-image-qt5.bb, do_rootfs) failed with exit code '1'

如何正确修改busybox源码,修改完成后能够正常重新打包文件系统(使用命令bitbake fsl-image-qt5)?

Labels (1)
0 Kudos
1 Solution
5,155 Views
radhikasomaiya
Senior Contributor II

Hi  luo yaojun,

We are able to recompile a busybox with yocto sumo (L4.14.98_2.0.0). Can you please try to recompile the busybox with a newer version?

Our configurations are:

  • Yocto sumo (L4.14.98_2.0.0)
  • Host system: ubuntu 16.04
  • Distro : fsl-imx-xwayland
  • Image: fsl-image-qt5-validation-imx

The steps which we have followed are as per below:

  • $ source setup-environment <build-directory>
  • $ bitbake fsl-image-qt5-validation-imx
  • Made changes in printable_string.c & unicode.c file from this link: 
  • To add support of Chinese characters you can refer the below link:

       Building Qt5 Yocto Image with Turkish and Chinese characters? 

  • $ vi conf/local.conf      (add the following two lines at the end to support Chinese)

        GLIBC_GENERATE_LOCALES = "zh_CN.UTF-8 en_GB.UTF-8 en_US.UTF-8"

        IMAGE_LINGUAS ?= "zh-cn"

  • $ bitbake -c compile busybox -f  (recompile the busybox)

  • $ bitbake fsl-image-qt5-validation-imx -f (recompile your image with changes)
  • copy the .ttf of your fonts to the  /usr/share/fonts/ttf/  in rootfs of your image.
  • Boot up the board with the image.

  • vi /etc/profile      (add the following line at the end)

        export LANG=zh_CN.UTF-8

  • Open any text file containing Chinese font to verify.

Let us know in case of any concerns.

Regards,

Radhika Somaiya.

View solution in original post

0 Kudos
7 Replies
5,155 Views
radhikasomaiya
Senior Contributor II

Hi luoyaojun,

You can take reference of the below link:

MACCHIATObin Wiki | Build from source - Buildroot  

The Buildroot user manual (section 6.1.2 and 6.1.3)

I hope it can help you.

Regards,

Radhika Somaiya.

0 Kudos
5,155 Views
luoyaojun
Contributor II

非常感谢,已成功实现中文支持。

0 Kudos
5,156 Views
radhikasomaiya
Senior Contributor II

Hi  luo yaojun,

We are able to recompile a busybox with yocto sumo (L4.14.98_2.0.0). Can you please try to recompile the busybox with a newer version?

Our configurations are:

  • Yocto sumo (L4.14.98_2.0.0)
  • Host system: ubuntu 16.04
  • Distro : fsl-imx-xwayland
  • Image: fsl-image-qt5-validation-imx

The steps which we have followed are as per below:

  • $ source setup-environment <build-directory>
  • $ bitbake fsl-image-qt5-validation-imx
  • Made changes in printable_string.c & unicode.c file from this link: 
  • To add support of Chinese characters you can refer the below link:

       Building Qt5 Yocto Image with Turkish and Chinese characters? 

  • $ vi conf/local.conf      (add the following two lines at the end to support Chinese)

        GLIBC_GENERATE_LOCALES = "zh_CN.UTF-8 en_GB.UTF-8 en_US.UTF-8"

        IMAGE_LINGUAS ?= "zh-cn"

  • $ bitbake -c compile busybox -f  (recompile the busybox)

  • $ bitbake fsl-image-qt5-validation-imx -f (recompile your image with changes)
  • copy the .ttf of your fonts to the  /usr/share/fonts/ttf/  in rootfs of your image.
  • Boot up the board with the image.

  • vi /etc/profile      (add the following line at the end)

        export LANG=zh_CN.UTF-8

  • Open any text file containing Chinese font to verify.

Let us know in case of any concerns.

Regards,

Radhika Somaiya.

0 Kudos
4,634 Views
xfg
Contributor I

你好,在哪里修改源码的,work路径下busybox吗,这边一直修改后busybox下的ls文件没有更新busybox是更新

0 Kudos
5,155 Views
luoyaojun
Contributor II

非常感谢!晚点我会验证这个BSP是否可行。

另外我想问下nxp有关于使用linaro的toolchain来编译buildroot的相关文档吗?

0 Kudos
5,155 Views
joanxie
NXP TechSupport
NXP TechSupport

after "bitbake -c compile -f busybox", how about using "bitbake -f busybox"

0 Kudos
5,155 Views
luoyaojun
Contributor II

linus@yocto:/yocto/fsl-release-bsp/imx6ul$ bitbake -f busybox
WARNING: Host distribution "Ubuntu-16.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |###################################################################################################################################################################################################################################################################| ETA: 00:00:00
Loaded 2579 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.26.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-16.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "imx6ulevk"
DISTRO = "fsl-imx-x11"
DISTRO_VERSION = "3.14.52-1.1.1"
TUNE_FEATURES = "arm armv7a vfp neon callconvention-hard cortexa7"
TARGET_FPU = "vfp-neon"
meta
meta-yocto = "(nobranch):b74ea963cefffad9fbd91d4eb9b240f6a8c86cd0"
meta-oe
meta-multimedia = "(nobranch):df2f700d66bace65f5d802225232d01cf511fe81"
meta-fsl-arm = "(nobranch):70ddee3ebeacbc53180ee7221533375bf0c9eac4"
meta-fsl-arm-extra = "(nobranch):41e79c6bd055f12b6252618c22c43a2fed5cfb49"
meta-fsl-demos = "(nobranch):17f9da65efb5c65c1d44b5cc18584034b29a742b"
meta-bsp
meta-sdk = "(nobranch):4b97cb6690333ec643fc2c602a01f77b86e1b65a"
meta-browser = "(nobranch):30b8d6b3d0d6501c56ef6967a2fa73a3d4bf5fe9"
meta-gnome
meta-networking
meta-python
meta-ruby
meta-filesystems = "(nobranch):df2f700d66bace65f5d802225232d01cf511fe81"
meta-qt5 = "(nobranch):51b4620392aa9041d8512549bfa554bea368c5ea"

NOTE: Preparing RunQueue
NOTE: Tainting hash to force rebuild of task /yocto/fsl-release-bsp/sources/poky/meta/recipes-core/busybox/busybox_1.23.1.bb, do_build
WARNING: /yocto/fsl-release-bsp/sources/poky/meta/recipes-core/busybox/busybox_1.23.1.bb.do_compile is tainted from a forced run
WARNING: /yocto/fsl-release-bsp/sources/poky/meta/recipes-core/busybox/busybox_1.23.1.bb.do_build is tainted from a forced run
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 684 tasks of which 683 didn't need to be rerun and all succeeded.

Summary: There were 3 WARNING messages shown.

0 Kudos