public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
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: Sun, 13 Apr 2025 17:58:26 +0800	[thread overview]
Message-ID: <Z_uKwiu7NFSX67lK@ysun46-mobl.ccr.corp.intel.com> (raw)
In-Reply-To: <883d7d72852c9cd027839a4dfe73eb4099750520.camel@ilbers.de>

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:

```
➜  isar git:(ubely/devel) ✗ KAS_ALLOW_ROOT=yes ./kas/kas-container build
2025-04-13 08:45:36 - INFO     - kas 4.7 started
2025-04-13 08:45:36 - INFO     - Using /repo as root for repository isar
2025-04-13 08:45:36 - INFO     - /build$ /repo/bitbake/bin/bitbake -c build isar-image-base
Loading cache: 100% |
| ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |#####################################################################################
#| Time: 0:00:00
Parsing of 70 .bb files complete (0 cached, 70 parsed). 105 targets, 14 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Sstate summary: Wanted 13 Local 0 Mirrors 0 Missed 13 Current 0 (0% match, 0% complete)#############
  | ETA:  0:00:00
Initialising tasks: 100% |##################################################################################
#| Time: 0:00:00
NOTE: Executing Tasks
ERROR: isar-apt-1.0-r0 do_unpack: Unpack failure for URL: 'file://distributions.in'. Unpack command PATH="/r
epo/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
ERROR: Logfile of failure stored in: /build/tmp/work/ubuntu-noble-riscv64/isar-apt/1.0-r0/temp/log.do_unpack
.757
ERROR: Task (/build/../repo/meta/recipes-devtools/isar-apt/isar-apt.bb:do_unpack) failed with exit code '1'
ERROR: base-apt-1.0-r0 do_unpack: Unpack failure for URL: 'file://distributions.in'. Unpack command PATH="/r
epo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/bin" cp -fpPRH "/build/../repo/meta/recipes-devtools
/base-apt/files/distributions.in" "." failed with return value 1
ERROR: Logfile of failure stored in: /build/tmp/work/ubuntu-noble-riscv64/base-apt/1.0-r0/temp/log.do_unpack
.778
(......)
Summary: 3 tasks failed:
   /build/../repo/meta/recipes-devtools/isar-apt/isar-apt.bb:do_unpack
   /build/../repo/meta/recipes-devtools/base-apt/base-apt.bb:do_unpack
   /build/../repo/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap-host.bb:do_unpack
Summary: There were 3 ERROR messages, returning a non-zero exit code.
2025-04-13 08:45:53 - ERROR    - Command "/repo/bitbake/bin/bitbake -c build isar-image-base" failed with er
ror 1
```


And the log log.do_unpack.778 and log.do_unpack.757 show the similar error:

```
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/wor
k/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/bit
bake/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
```

Is it issue of kas-contaner ? Which version of kas-contain are you
using?
I'm going to digging it out later this evening or next Monday.

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_uKwiu7NFSX67lK%40ysun46-mobl.ccr.corp.intel.com.

  reply	other threads:[~2025-04-13  9:58 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 [this message]
2025-04-13 14:41         ` Uladzimir Bely
2025-04-14 11:48           ` Sun, Yi
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_uKwiu7NFSX67lK@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