From: "Sun, Yi" <yi.sun@intel.com>
To: Uladzimir Bely <ubely@ilbers.de>
Cc: "isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: Build Failed for RISC-V Image Using isar/kas-container
Date: Mon, 14 Apr 2025 19:48:03 +0800 [thread overview]
Message-ID: <Z_z18wc2MGBkOaGe@ysun46-mobl.ccr.corp.intel.com> (raw)
In-Reply-To: <aecfe9b9f62344eab660438cf2eed4ffbc72ad64.camel@ilbers.de>
On 13.04.2025 17:41, Uladzimir Bely wrote:
>On Sun, 2025-04-13 at 17:58 +0800, Sun, Yi wrote:
>> On 13.04.2025 11:18, Uladzimir Bely wrote:
>> > On Sun, 2025-04-13 at 16:02 +0800, Sun, Yi wrote:
>> > > On 13.04.2025 10:41, Uladzimir Bely wrote:
>> > > > On Sun, 2025-04-13 at 06:38 +0000, Sun, Yi wrote:
>> > > > >
>> > > > >
>> > > > >
>> > > > > Hi All,
>> > > > >
>> > > > > I'm new to ISAR and was told it's an efficient project for
>> > > > > building
>> > > > > embedded OS images.
>> > > > > I'm currently trying to create an Ubuntu Noble (24.04) image
>> > > > > for
>> > > > > the
>> > > > > RISC-V architecture.
>> > > > >
>> > > > > I gave it a quick try, but ran into some issues:
>> > > > > Step 1: KAS_ALLOW_ROOT=yes ./kas/kas-container menu
>> > > > > Step 2: KAS_ALLOW_ROOT=yes ./kas/kas-container build (or use
>> > > > > the
>> > > > > "Build" option from the menu)
>> > > > >
>> > > > > I've attached my configuration files (generated by kas-
>> > > > > container)
>> > > > > along with the error log dumped by ISAR during the build
>> > > > > process.
>> > > > >
>> > > > > Another question I have is about the concepts of "target" and
>> > > > > "host".
>> > > > > After reading as much documentation on ISAR as I could find,
>> > > > > I'm
>> > > > > still a bit confused:
>> > > > >
>> > > > > Why do we need a "host" rootfs/distro, given that ISAR runs
>> > > > > inside
>> > > > > the kas-isar Docker container, which I assume already acts as
>> > > > > the
>> > > > > host environment?
>> > > > > What I’m aiming for with this project is to generate an image
>> > > > > that
>> > > > > can be run in QEMU or flashed to a disk — that would be the
>> > > > > target
>> > > > > distro, right?
>> > > > >
>> > > > > Any guidance or suggestions would be greatly appreciated!
>> > > > >
>> > > > > Thanks
>> > > > > --Sun, Yi
>> > > > >
>> > > >
>> > > > Hello.
>> > > >
>> > > > Currently we support (and test) only amd64/i386 and arm64/armhf
>> > > > architectures for Ubuntu despite of the fact ubuntu has ports
>> > > > for
>> > > > riscv64 ( http://ports.ubuntu.com/ubuntu-ports/dists/noble/ ).
>> > > >
>> > > > For now, you could try attached patch for Isar to run ubuntu-
>> > > > noble
>> > > > build for riscv64.
>> > > >
>> > > > Also, you need to apply patches for u-boot and kernel from
>> > > > https://patchwork.isar-build.org/project/isar/list/?series=1551
>> > > > -
>> > > > or
>> > > > wait 2..3 days until they are merged to 'next' branch.
>> > > >
>> > > > ---
>> > > >
>> > > > In general, we might need to add other architectures supported
>> > > > in
>> > > > ubuntu-ports into our configs. Stay tuned.
>> > > >
>> > >
>> > > Thanks to Uladzimir for sharing your progress!
>> > > I gave the patch a quick try, but unfortunately it didn’t work as
>> > > expected.
>> > > I tried master+patch and next+patch, both are failed.
>> > > I'm still seeing the following error message.
>> > >
>> > > BTW, could you please expain more about the "host distro"? Do I
>> > > really
>> > > need a host distro if my running ISAR in KAS container?
>> > >
>> >
>> > Briefly, host distro - is a distro that is repsoncible for
>> > compiling
>> > custom packages. Target distro - is what will be installed on
>> > target.
>> >
>> > E.g., in your case (riscv64), we have:
>> > 1. Cross-compiling case:
>> > - host-distro: Ubuntu Noble / amd64
>> > - target-distro: Ubuntu Noble / riscv64
>> > 2. Non-cross-compiling case:
>> > - host-distro = target-distro = riscv64
>> >
>> > Of course, case 2 is much slower because everything is built
>> > natively
>> > using qemu-static.
>> >
>> I see — that matches my previous understanding exactly.
>> My question is: since we're already using kas-container (a Debian-
>> based OS)
>> why don’t we just compile all packages directly within it, instead of
>> chrooting into a separate host rootfs? It seems like things could be
>> simplified if there were a toggle option to do that.
>>
>> I'm asking because, while trying to figure out why the Ubuntu Noble
>> target
>> couldn't be built, I noticed that ubuntu-common.inc might be mixing
>> up
>> DISTRO_ARCH and HOST_ARCH somewhere (if I’m understanding it
>> correctly).
>>
>> > ---
>> >
>> > I've updated a bit the patch I sent and managed to completely build
>> > ubuntu-noble for starfive-visionfive2 machine.
>> >
>> > I pushed my changes to the branch "ubely/devel" so you can give it
>> > a
>> > try without any additional patches.
>> >
>> > ./kas/kas-container menu:
>> > - Machine selection
>> > - starfive-visionfive2
>> > - Distro
>> > - Allow any machine-distro combinations
>> > - Ubuntu 24.04 (Noble)
>> >
>>
>> The devel branch doesn't make things better:
>>
>
>Big sorry for misleading you... I wanted to write "ubely/riscv64"
>branch I've created for you...
>
>Please, try it instead.
Hi Uladzimir,
I gave it a try, but no luck.
What I want to point out is that the error I encountered is likely not
RISC-V specific. Due to limited time, I did a quick debug and found
that the error is coming from bitbake:
```
(root)# bitbake -c build isar-image-base
ERROR: isar-apt-1.0-r0 do_unpack: Unpack failure for URL: 'file://distributions.in'. Unpack command PATH="/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/bin" cp -fpPRH "/build/../repo/meta/recipes-devtools/isar-apt/files/distributions.in" "." failed with return value 1
```
LOG FILE:
```
DEBUG: Using /build/../repo/meta/recipes-devtools/isar-apt/files/distributions.in for distributions.in
NOTE: Unpacking /build/../repo/meta/recipes-devtools/isar-apt/files/distributions.in to /build/tmp/work/ubuntu-noble-riscv64/isar-apt/1.0-r0/
cp: failed to preserve ownership for './distributions.in': Invalid argument
ERROR: Unpack failure for URL: 'file://distributions.in'. Unpack command PATH="/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/bin" cp -fpPRH "/build/../repo/meta/recipes-devtools/isar-apt/files/distributions.in" "." failed with return value 1
DEBUG: Python function do_unpack finished
```
Log file shows that all failures are the same that caused by 'copy':
cp: failed to preserve ownership for './distributions.in': Invalid argument
@Uladzimir, if you have a moment, could you help me understand what might
be going wrong here?
I'm using the Docker image kas-isar:4.7, and I can consistently
reproduce the issue by running ./kas/kas-container build.
Here is my docker parameters:
```
docker run -v /home/riscv/isar:/repo:rw -v /home/riscv/isar:/work:rw -e KAS_WORK_DIR=/work -v /home/riscv/isar/build/rv64_sw-machine:/build:rw --workdir=/repo -e KAS_BUILD_DIR=/build -e USER_ID=0 -e GROUP_ID=0 --rm --init -t -i -e TERM=tmux-256color -e SHELL=/bin/bash -e http_proxy=http://xxx:port -e https_proxy=http://xxx:port -e NO_PROXY=localhost,127.0.0.0/8 --privileged --log-driver=none --user=root ghcr.io/siemens/kas/kas-isar:4.7 build
```
I'm pretty sure that my configue matches your demo setup:
StarFive VisionFive2 + Ubuntu 24.04 (Noble).
Thanks
--Sun, Yi
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/Z_z18wc2MGBkOaGe%40ysun46-mobl.ccr.corp.intel.com.
next prev parent reply other threads:[~2025-04-14 11:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-13 6:38 Sun, Yi
2025-04-13 7:41 ` Uladzimir Bely
2025-04-13 8:02 ` Sun, Yi
2025-04-13 8:18 ` Uladzimir Bely
2025-04-13 9:58 ` Sun, Yi
2025-04-13 14:41 ` Uladzimir Bely
2025-04-14 11:48 ` Sun, Yi [this message]
2025-04-14 15:53 ` Baurzhan Ismagulov
2025-04-15 0:10 ` Sun, Yi
2025-04-15 0:33 ` Sun, Yi
2025-04-16 19:53 ` Uladzimir Bely
2025-04-17 0:19 ` Sun, Yi
2025-04-16 15:42 ` Sun, Yi
2025-04-17 5:58 ` Uladzimir Bely
2025-04-17 12:08 ` Sun, Yi
2025-04-17 15:04 ` Uladzimir Bely
2025-04-22 13:14 ` Sun, Yi
2025-04-22 13:56 ` Uladzimir Bely
2025-04-22 15:34 ` Sun, Yi
2025-04-27 9:13 ` Sun, Yi
2025-04-27 11:32 ` Sun, Yi
2025-04-28 7:24 ` Baurzhan Ismagulov
2025-04-30 5:10 ` Sun, Yi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z_z18wc2MGBkOaGe@ysun46-mobl.ccr.corp.intel.com \
--to=yi.sun@intel.com \
--cc=isar-users@googlegroups.com \
--cc=ubely@ilbers.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox