This is a cache of https://discuss.96boards.org/t/how-to-install-packages-on-rpb/2824. It is a snapshot of the page at 2024-10-31T06:37:47.446+0000.
How to install packages on rpb? - HiKey 960 - 96Boards Forum

How to install packages on rpb?

How I can install packages on RPB ?
The is no apt, yum, pacman, aptitude …

Do you build OE from source ? if yes you can build the package you want (e.g bitbake valgrind) and push/install the generated rpm to the board.

If you really want runtime package management, you need to create your own host/server machine that serves up the pre-compiled packages plus the required metadata:
http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#using-runtime-package-management

No, I used : https://builds.96boards.org/snapshots/reference-platform/openembedded/morty/hikey960/rpb/77/

How to do it ? How I can add packages and build my own rpb ?

Everything is in the documentation:

There are several ways to add a package, a simple way is to append the following line in conf/local.conf:
IMAGE_INSTALL+= "package_name"
And then rebuild your image.

Take a look at the yocto cookbook for some basic examples.

I assume that he has to set

MACHINE = hikey960

for the HiKey 960 board. This isn’t documented.

hikey960 rpb-console-image fail

Has anyone successfully built rpb distro ?

I saw your bug report, which to be honest, it’s probably a bit terse to attract much attention (there’s not really enough information to persuade a developer that it’s not a user error or a “dirty” environment :wink: ).

Anyhow, I was feeling generous of spirit so I have spun up an identical OS in a container and, reinforcing the above, it builds for me following the instructions on https://github.com/Linaro/documentation/blob/master/Reference-Platform/CECommon/OE.md .

Build Configuration:
BB_VERSION = "1.32.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Debian-9.1"
TARGET_SYS = "aarch64-linaro-linux"
MACHINE = "hikey960"
DISTRO = "rpb"
DISTRO_VERSION = "2.2+linaro"
TUNE_FEATURES = "aarch64"
TARGET_FPU = ""
meta-rpb = "HEAD:543c07813f4214730bbc2aa8eae4009d1db0fb7c"
meta-oe           
meta-gnome        
meta-xfce         
meta-initramfs    
meta-multimedia   
meta-networking   
meta-webserver    
meta-ruby         
meta-filesystems  
meta-perl         
meta-python       = "HEAD:fe5c83312de11e80b85680ef237f8acb04b4b26e"
meta-browser      = "HEAD:1b4f1e588b1901d8919ea2362b0fcba37c5023e0"
meta-qt5          = "HEAD:2c9f0e4eb0e9097f6f872ec1e1d81768a8ab5f1b"
meta-virtualization = "HEAD:877379ff111931ea71f8ee47452934a6d649d790"
meta-96boards     = "HEAD:6ec11bd5495c93230cea4ee604b84fc27273fff4"
meta-intel        = "HEAD:6add41510412ca196efb3e4f949d403a8b6f35d7"
meta-qcom         = "HEAD:60ed02c2d3b86b8ebb716ed9b36569bc752ce90a"
meta-st-cannes2   = "HEAD:8ddc346d5b511291d5de1156eb933d2784a1f8ae"
meta-ti           = "HEAD:5dd6a49b64acf5a219fe3252662ae0a250dda3db"
meta-linaro       
meta-linaro-toolchain 
meta-optee        = "HEAD:49b0f32d7e955f250b0022d1b2f403f45a2c2d9c"
meta-backports    = "HEAD:308422876118f514bce8e1aed619a88972d819b3"
meta              = "HEAD:32d172c25072251d6cc7fdd40929d76b5f1f5059"

I did have to make a couple of small tweaks. Firstly because the container is really spartan I had to install the python and libssl-dev packages. Additionally I had to update SHA1 hash for the kernel because the kernel we are using for the RPB/hikey960 pre-releases changes frequently.

Anyhow… there’s no need for you to worry about the above, the build is failing for you way before any of the above makes a difference. I suggest you create a new user and try to build as that user. This will test the theory that you have set something “weird” in the environment of your own user and that this breaks the build.

Only change the issue :
./x86_64-linux-libtool: line 1033: func_split_equals: command not found

tanureal@tanurealDebian bld bitbake rpb-console-image
Loading cache: 100% |##########################################################################| Time: 0:00:01
Loaded 6382 entries from dependency cache.
Parsing recipes: 100% |########################################################################| Time: 0:00:03
Parsing of 2793 .bb files complete (2792 cached, 1 parsed). 6384 targets, 988 skipped, 1 masked, 0 errors.
WARNING: No recipes available for:
/media/workspace/hikey960/rpb/build/bld/conf/…/…/layers/meta-st-cannes2/recipes-graphics/drm/libdrm_2.4.74.bbappend
NOTE: Resolving any missing task queue dependencies
NOTE: multiple providers are available for iasl-native (iasl-native, acpica-native)
NOTE: consider defining a PREFERRED_PROVIDER entry to match iasl-native

Build Configuration:
BB_VERSION = “1.32.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “Debian-9.1”
TARGET_SYS = “aarch64-linaro-linux”
MACHINE = “hikey960”
DISTRO = “rpb”
DISTRO_VERSION = “2.2+linaro”
TUNE_FEATURES = “aarch64”
TARGET_FPU = “”
meta-rpb = “HEAD:543c07813f4214730bbc2aa8eae4009d1db0fb7c”
meta-oe
meta-gnome
meta-xfce
meta-initramfs
meta-multimedia
meta-networking
meta-webserver
meta-ruby
meta-filesystems
meta-perl
meta-python = “HEAD:fe5c83312de11e80b85680ef237f8acb04b4b26e”
meta-browser = “HEAD:1b4f1e588b1901d8919ea2362b0fcba37c5023e0”
meta-qt5 = “HEAD:2c9f0e4eb0e9097f6f872ec1e1d81768a8ab5f1b”
meta-virtualization = “HEAD:877379ff111931ea71f8ee47452934a6d649d790”
meta-96boards = “HEAD:6ec11bd5495c93230cea4ee604b84fc27273fff4”
meta-intel = “HEAD:6add41510412ca196efb3e4f949d403a8b6f35d7”
meta-qcom = “HEAD:60ed02c2d3b86b8ebb716ed9b36569bc752ce90a”
meta-st-cannes2 = “HEAD:8ddc346d5b511291d5de1156eb933d2784a1f8ae”
meta-ti = “HEAD:5dd6a49b64acf5a219fe3252662ae0a250dda3db”
meta-linaro
meta-linaro-toolchain
meta-optee = “HEAD:49b0f32d7e955f250b0022d1b2f403f45a2c2d9c”
meta-backports = “HEAD:308422876118f514bce8e1aed619a88972d819b3”
meta = “HEAD:32d172c25072251d6cc7fdd40929d76b5f1f5059”

Initialising tasks: 100% |#####################################################################| Time: 0:00:05
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: libtool-native-2.4.6-r0 do_install: oe_runmake failed
ERROR: libtool-native-2.4.6-r0 do_install: Function failed: do_install (log file is located at /home/tanureal/workspace/hikey960/rpb/build/bld/tmp-rpb-glibc/work/x86_64-linux/libtool-native/2.4.6-r0/temp/log.do_install.20780)
ERROR: Logfile of failure stored in: /home/tanureal/workspace/hikey960/rpb/build/bld/tmp-rpb-glibc/work/x86_64-linux/libtool-native/2.4.6-r0/temp/log.do_install.20780

It seems a machine setup problem, but it’s difficult for a user to undersnatd whats he is missing when the error seems to be a internal script issue.
For me, this line :
./x86_64-linux-libtool: line 9822: func_fatal_help: command not found
Seems as a issue inside the code to build.

True on both counts!

More importantly the error message you observe is giving back next to nothing in a google search. I’m afraid that probably means that the machine setup problem you have is unusual (maybe unique). Environment is a common cause of unusual behaviours in large scale cross-compile tools (like OE/bitbake) but it seem it isn’t that…

There are, of course, many ways you can make your machine setup unique that affect all users (odd selection of interpreter for /bin/sh, adding lots of global profile/rc files to /etc, …) its just that environment is a more common problem.

Is your debian install very mature (many times upgraded) or heavily customised in any other way?

PS I’m sorry but I do also have to ask, just to check. When you tested as another user, did you both avoid any custom environment settings and do the repo init/sync from scratch?

My machine is :
tanureal@tanurealDebian bld cat /etc/os-release
PRETTY_NAME=“Debian GNU/Linux 9 (stretch)”
NAME=“Debian GNU/Linux”
VERSION_ID=“9”
VERSION=“9 (stretch)”

Which I upgraded last week maybe ? It’s up-to-date with Debian 9.

I test a new user right now.

New user issue :

ERROR: linux-hikey960-4.12+gitAUTOINC+d3afe7b584-r0 do_fetch: Fetcher failure: Unable to find revision d3afe7b5840e00de563448727eae8e876ab9e308 in branch hikey960-upstream-rebase even from upstream
ERROR: linux-hikey960-4.12+gitAUTOINC+d3afe7b584-r0 do_fetch: Fetcher failure for URL: ‘git://github.com/96boards-hikey/linux.git;protocol=https;branch=hikey960-upstream-rebase;name=kernel;rebaseable=1’. Unable to fetch URL from any source.
ERROR: linux-hikey960-4.12+gitAUTOINC+d3afe7b584-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/tanure/oe-rpb/bld/tmp-rpb-glibc/work/hikey960-linaro-linux/linux-hikey960/4.12+gitAUTOINC+d3afe7b584-r0/temp/log.do_fetch.28006
ERROR: Task (/home/tanure/oe-rpb/bld/conf/…/…/layers/meta-96boards/recipes-kernel/linux/linux-hikey960_git.bb:do_fetch) failed with exit code ‘1’

Is trying to download :
Fetching http://sources.openembedded.org/git2_github.com.96boards-hikey.linux.git_d3afe7b5840e00de563448727eae8e876ab9e308.tar.gz

But fails.

Excellent.

That means you’re into the things I already mentioned (but that we didn’t need to worry about until we’d fixed your environment).

So the changes I made to the kernel recipe are made to …/layers/meta-96boards and look like this:

diff --git a/recipes-kernel/linux/linux-hikey960_git.bb b/recipes-kernel/linux/linux-hikey960_git.bb
index b2a46abc8d49..1376bb1b8b3c 100644
--- a/recipes-kernel/linux/linux-hikey960_git.bb
+++ b/recipes-kernel/linux/linux-hikey960_git.bb
@@ -3,7 +3,7 @@ require linux.inc
 DESCRIPTION = "96boards-hikey kernel for HiKey960"
 
 PV = "4.12+git${SRCPV}"
-SRCREV_kernel = "d3afe7b5840e00de563448727eae8e876ab9e308"
+SRCREV_kernel = "2e7981751773a386b117726c0f4951512a4b4698"
 SRCREV_FORMAT = "kernel"
 
 SRC_URI = "git://github.com/96boards-hikey/linux.git;protocol=https;branch=hikey960-upstream-rebase;name=kernel;rebaseable=1 \

I’ll have to leave you to figure out what variables you’ve got set that bitbake doesn’t like… but we should be able to get a good build from where you are now.

@danielt

Thanks for the detailed instructions. It is working for me after applying your changes:

sudo apt-get install libssl-dev

and

-SRCREV_kernel = "d3afe7b5840e00de563448727eae8e876ab9e308"
+SRCREV_kernel = "2e7981751773a386b117726c0f4951512a4b4698"

I used about 40GB SSD space for the build-rpb directory, this information could be added to the instructions.

@danielt

Could you please change the PV value to 4.13 ?
The resulting kernel is

Linux 4.13.0-linaro-hikey960+

PS. off topic, is the following command working for you ? My board crashes hard.

dd if=/dev/zero of=rand bs=1k count=3000000

Sure, changing the PV is a good idea.

I don’t actually know. I jumped onto this topic because I am adept enough with containers to replicate Lucas build machine (relatively) easily… I haven’t actually run RPB on hikey960 (although I have certainly run it on other 96Boards).