public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: "Sun, Yi" <yi.sun@intel.com>
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 11:18:13 +0300	[thread overview]
Message-ID: <883d7d72852c9cd027839a4dfe73eb4099750520.camel@ilbers.de> (raw)
In-Reply-To: <Z_tviUAa2RWxXCTB@ysun46-mobl.ccr.corp.intel.com>

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'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)

> ```
> 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
> ERROR: Logfile of failure stored in: /build/tmp/work/ubuntu-noble-
> riscv64/isar-apt/1.0-r0/temp/log.do_unpack.686
> 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="/repo/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.694
> ERROR: Task (/build/../repo/meta/recipes-devtools/base-apt/base-
> apt.bb:do_unpack) failed with exit code '1'
> ERROR: isar-mmdebstrap-host-1.0-r0 do_unpack: Unpack failure for URL:
> 'file://locale'. Unpack command
> PATH="/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin
> :/bin" cp -fpPRH "/build/../repo/meta/recipes-core/isar-
> bootstrap/files/locale" "." failed with return value 1
> ERROR: Logfile of failure stored in: /build/tmp/work/ubuntu-noble-
> riscv64/isar-mmdebstrap-host/1.0-r0/temp/log.do_unpack.746
> ERROR: Task (/build/../repo/meta/recipes-core/isar-mmdebstrap/isar-
> mmdebstrap-host.bb:do_unpack) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 22 tasks of which 0 didn't need to be
> rerun and 3 failed.
> 
> 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 07:52:46 - ERROR    - Command "/repo/bitbake/bin/bitbake -
> c build isar-image-base" failed with error 1
> ```
> 
> 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/BL3PR11MB6363A0B1AF096C7A2BC1014D99B02%40BL3PR11MB6363.namprd11.prod.outlook.com
> > > .
> > 
> > -- 
> > Best regards,
> > Uladzimir.
> 
> > diff --git a/meta-isar/conf/distro/ubuntu-common.inc b/meta-
> > isar/conf/distro/ubuntu-common.inc
> > index 88a3b4f0..25aa13ea 100644
> > --- a/meta-isar/conf/distro/ubuntu-common.inc
> > +++ b/meta-isar/conf/distro/ubuntu-common.inc
> > @@ -12,6 +12,9 @@ HOST_BASE_DISTRO = "${BASE_DISTRO}"
> > DISTRO_APT_SOURCES:arm64 ?= "conf/distro/${BASE_DISTRO}-
> > ${BASE_DISTRO_CODENAME}-ports.list"
> > HOST_DISTRO_APT_SOURCES:arm64 ?= "conf/distro/${HOST_DISTRO}.list
> > conf/distro/${HOST_DISTRO}-ports.list"
> > 
> > +DISTRO_APT_SOURCES:riscv64 ?= "conf/distro/${BASE_DISTRO}-
> > ${BASE_DISTRO_CODENAME}-ports.list"
> > +HOST_DISTRO_APT_SOURCES:riscv64 ?=
> > "conf/distro/${HOST_DISTRO}.list conf/distro/${HOST_DISTRO}-
> > ports.list"
> > +
> > BOOTSTRAP_KEY =
> > "file://${LAYERDIR_isar}/conf/distro/ubuntu.public.key;sha256sum=36
> > a38199a4bf4eae1e7f574891f7dfcb79b91b87a33a499383265e1224b5e989"
> > DISTRO_BOOTSTRAP_KEYS += "${BOOTSTRAP_KEY}"
> > HOST_DISTRO_BOOTSTRAP_KEYS += "${BOOTSTRAP_KEY}"
> > diff --git a/meta-isar/conf/distro/ubuntu-noble-ports.list b/meta-
> > isar/conf/distro/ubuntu-noble-ports.list
> > index adeb2639..9b101e3d 100644
> > --- a/meta-isar/conf/distro/ubuntu-noble-ports.list
> > +++ b/meta-isar/conf/distro/ubuntu-noble-ports.list
> > @@ -1,6 +1,6 @@
> > -deb	[arch=armhf,arm64]
> > http://ports.ubuntu.com/ubuntu-ports noble main restricted universe
> > multiverse
> > -deb-src	[arch=armhf,arm64]
> > http://ports.ubuntu.com/ubuntu-ports noble main restricted universe
> > multiverse
> > -deb	[arch=armhf,arm64]
> > http://ports.ubuntu.com/ubuntu-ports noble-updates main restricted
> > universe multiverse
> > -deb-src	[arch=armhf,arm64]
> > http://ports.ubuntu.com/ubuntu-ports noble-updates main restricted
> > universe multiverse
> > -deb	[arch=armhf,arm64]
> > http://ports.ubuntu.com/ubuntu-ports noble-security main restricted
> > universe multiverse
> > -deb-src	[arch=armhf,arm64]
> > http://ports.ubuntu.com/ubuntu-ports noble-security main restricted
> > universe multiverse
> > +deb	[arch=armhf,arm64,riscv64]
> > http://ports.ubuntu.com/ubuntu-ports noble main restricted universe
> > multiverse
> > +deb-src	[arch=armhf,arm64,riscv64]
> > http://ports.ubuntu.com/ubuntu-ports noble main restricted universe
> > multiverse
> > +deb	[arch=armhf,arm64,riscv64]
> > http://ports.ubuntu.com/ubuntu-ports noble-updates main restricted
> > universe multiverse
> > +deb-src	[arch=armhf,arm64,riscv64]
> > http://ports.ubuntu.com/ubuntu-ports noble-updates main restricted
> > universe multiverse
> > +deb	[arch=armhf,arm64,riscv64]
> > http://ports.ubuntu.com/ubuntu-ports noble-security main restricted
> > universe multiverse
> > +deb-src	[arch=armhf,arm64,riscv64]
> > http://ports.ubuntu.com/ubuntu-ports noble-security main restricted
> > universe multiverse

-- 
Best regards,
Uladzimir.

-- 
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/883d7d72852c9cd027839a4dfe73eb4099750520.camel%40ilbers.de.

  reply	other threads:[~2025-04-13  8:18 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 [this message]
2025-04-13  9:58       ` Sun, Yi
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=883d7d72852c9cd027839a4dfe73eb4099750520.camel@ilbers.de \
    --to=ubely@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=yi.sun@intel.com \
    /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