Search code examples
javacross-compilingyoctobitbake

How to install the result of "bitbake openjdk-7-jre" on target machine


I've successfully run "bitbake openjdk-7-jre" on a cross-compilation machine, and I want to install the result on the target embedded machine. I've found the rpm file in the "tmp/deploy/rpm" subdirectory on the host machine, and copied it to the target, but it has many unmet dependencies:

    root@t4240rdb:~# rpm -i openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500.rpm 
error: Failed dependencies:
    libc.so.6(GLIBC_2.3)(64bit) is needed by openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500
    libc.so.6(GLIBC_2.4)(64bit) is needed by openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500
    libc.so.6()(64bit) is needed by openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500
    libz1 >= 1.2.8 is needed by openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500
    libjli.so()(64bit) is needed by openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500
    libc6 >= 2.20 is needed by openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500
    openjdk-7-java is needed by openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500
    openjdk-7-common is needed by openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500
    update-alternatives-opkg is needed by openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500
    libz.so.1()(64bit) is needed by openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500
    libjli.so(SUNWprivate_1.1)(64bit) is needed by openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500
    /bin/sh is needed by openjdk-7-jre-25b30+2.3.12-r5.1.ppc64e6500
root@t4240rdb:~# 

do I really need to grab each of these by hand and install them on the target, or is there a simpler way?


Solution

  • Please use smartpm or opkg package manager to install package. smartpm handles rpm packages and opkg handles ipk packages.

    If you do not have smartpm or opkg installed. in your local.conf, please add:

    EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server-openssh package-management" IMAGE_INSTALL_append = " smartpm opkg "

    create a new image (might as well add openjdk-7-jre to the IMAGE_INSTALL_append).

    For more information, Visit OPKG and smartpm