Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

Linux/AM3352: Opkg fails to edit target root FS

$
0
0

Part Number:AM3352

Tool/software: Linux

Hello,

In all Sitara Linux SDKs so far there is opkg package manager in linux-devkit/sysroots/x86_64-arago-linux/usr/bin.

We use it to edit the filesystem image before deploying to target, mainly to remove unneeded packages.

However, in SDK 5.00 (latest at this time) this opkg executable does not work.

Steps to reproduce on Ubuntu host with installed SDK 5.00.

1. create directory rootfs in home, and cd rootfs

2. sudo tar xvf ~/SDK/filesystem/tisdk-rootfs-image-am335x-evm.tar.xz from SDK/filesystems, and cd ..

3. sudo ~/SDK/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/opkg -o rootfs list

There will be no output.

strace-ing opkg execution shows this (after initial libraries loading etc).

open("/home/USER/rootfs//tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/etc/opkg", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
lstat("/home/USER/rootfs//run", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
creat("/home/USER/rootfs//run/opkg.lock", 0640) = 3
fcntl(3, F_SETLK, {type=F_WRLCK, whence=SEEK_CUR, start=0, len=0}) = 0
getpid()                                = 5964
mkdir("/tmp/opkg-RRhoh0", 0700)         = 0
stat("/home/USER/rootfs//tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/var/cache/opkg", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/home/USER/rootfs/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/home/USER/rootfs///tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/var/lib/opkg/info", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/home/USER/rootfs///tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/var/lib/opkg", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/USER/rootfs///tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/var/lib/opkg/status", 0x7fffb19eedb0) = -1 ENOENT (No such file or directory)
open("/tmp/opkg-RRhoh0", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
fchdir(4)                               = 0
getdents(4, /* 2 entries */, 32768)     = 48
getdents(4, /* 0 entries */, 32768)     = 0
chdir("..")                             = 0
rmdir("/tmp/opkg-RRhoh0")               = 0
close(4)                                = 0
fcntl(3, F_SETLK, {type=F_UNLCK, whence=SEEK_CUR, start=0, len=0}) = 0
close(3)                                = 0
lstat("/home/USER/rootfs//run/opkg.lock", {st_mode=S_IFREG|0640, st_size=0, ...}) = 0
unlink("/home/USER/rootfs//run/opkg.lock") = 0
exit_group(0)                           = ?
+++ exited with 0 +++

opkg commands to remove some package will fail similarly, with a message "No packages installed or removed.".

This procedure has always worked till and including SDK 4.03. strace-ing older opkg does not show these strange

long names xxxxx/yyyyy that are indeed found in the SDK 5.00 libopkg.so.1.

So the question is: is the host opkg in SDK 5.00 usable to edit the targetg filesystem image,

and if so, what are the options, environment variables, etc. to achieve this.

Thanks


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>