GPG Error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

GPG Error

跳至解决方案
1,826 次查看
chuck_corley
Contributor I

(With a little help) I successfully built core-image-minimal  and installed it on an SDcard that booted my X-MCIMX8M-EVK.  My goal was to have an Ubuntu with apt-get so I could load other Linux packages.

I believe these lines in ~/imx-yocto-bsp/build-min/conf/local.conf were key to getting apt-get.

# Switch to Debian packaging and include package-management in the image
PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"

Now I have apt-get and several other apt commands:

# ls /usr/bin/*apt*
/usr/bin/apt /usr/bin/apt-ftparchive
/usr/bin/apt-cache /usr/bin/apt-get
/usr/bin/apt-cdrom /usr/bin/apt-key
/usr/bin/apt-config /usr/bin/apt-mark
/usr/bin/apt-extracttemplates /usr/bin/apt-sortpkgs

But I can't get any packages:

root@imx8mqevk:/# apt update
Reading package lists... Done
Building dependency tree... Done
All packages are up to date.
root@imx8mqevk:/# apt install build-essential
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package build-essential

I do not have any entries in /etc/apt/sources.list.

When I edited some in, i got the following errors for all that I copied from another Ubuntu 20.04 installation:

W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-security InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed

E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-security InRelease' is not signed.

N: Updating from such a repository can't be done securely, and is therefore disabled by default.

N: See apt-secure(8) manpage for repository creation and user configuration details.

Why didn't the Yocto project that I made successfully contain some valid repositories that I could use to get tools from?

0 项奖励
1 解答
1,769 次查看
chuck_corley
Contributor I

Thank you, Ebony.

I've been away from my computer for several weeks but today I got a chance to try your solution.  It worked fine!  I am now running Linux imx8mqevk 5.15.32-lts-next+gfa6c3168595c #1 SMP PREEMPT Tue Jun 7 02:34:46 UTC 2022 aarch64 GNU/Linux on my X-MCIMX8M-EVK.  And it has gcc, g++, make, and ssh installed.

One minor point for anyone else struggling with the same thing ...

I have two build directories: /imx-yocto-bsp/build and /imx-yocto-bsp/build-min.  My first attempt to implement your suggestion I edited the wrong file: /imx-yocto-bsp/build/conf/local.conf. When that didn't work, I examined bitbake-cookerdaemon.log in both build directories and confirmed that bitbake core-image-minimal actually uses the /imx-yocto-bsp/build-min directory tree.  Editing the correct local.conf, then resulted in success.

在原帖中查看解决方案

0 项奖励
3 回复数
1,815 次查看
ebony_zhu
NXP Employee
NXP Employee

Hi Chuck,

Unlike Layerscape SDK (LSDK), which uses Ubuntu as primary rootfs, i.mx uses Yocto to release rootfs and packages. "apt" is not a preferred way to install packages. That's why you don't get default repositories in Yocto rootfs.

For "The repository 'http://ports.ubuntu.com/ubuntu-ports focal-security InRelease' is not signe" issue, you can append "--allow-insecure-repositories" switch to your "apt" command to bypass security check. However, the chance is you will have dependency issues when trying to install complicated packages like gcc.

The preferred way to install packages for Yocto rootfs is to added required packages when you create rootfs. 

Since your goal is to install compilers (gcc and others), ssh client/server, sftp, you need to add following packages to the yocto rootfs:

packagegroup-core-buildessential

packagegroup-core-ssh-openssh

openssh-sftp-server

 

Please edit your local.conf and add the line below:

IMAGE_INSTALL:append = "packagegroup-core-buildessential packagegroup-core-ssh-openssh openssh-sftp-server"

Then rebuild core-image-minimal

$ bitbake core-image-minimal

Reprogram the rootfs, and you'll get the desired packages.

 

0 项奖励
1,770 次查看
chuck_corley
Contributor I

Thank you, Ebony.

I've been away from my computer for several weeks but today I got a chance to try your solution.  It worked fine!  I am now running Linux imx8mqevk 5.15.32-lts-next+gfa6c3168595c #1 SMP PREEMPT Tue Jun 7 02:34:46 UTC 2022 aarch64 GNU/Linux on my X-MCIMX8M-EVK.  And it has gcc, g++, make, and ssh installed.

One minor point for anyone else struggling with the same thing ...

I have two build directories: /imx-yocto-bsp/build and /imx-yocto-bsp/build-min.  My first attempt to implement your suggestion I edited the wrong file: /imx-yocto-bsp/build/conf/local.conf. When that didn't work, I examined bitbake-cookerdaemon.log in both build directories and confirmed that bitbake core-image-minimal actually uses the /imx-yocto-bsp/build-min directory tree.  Editing the correct local.conf, then resulted in success.

0 项奖励
1,762 次查看
ebony_zhu
NXP Employee
NXP Employee

Hi @chuck_corley ,

Very glad to hear that and good luck in your future development!

 

Regards,

Ebony

0 项奖励