How to generate image to boot linux on more tiles ?

216 views
Skip to first unread message

6455...@qq.com

unread,
Jul 8, 2024, 3:51:53 AM7/8/24
to OpenPiton Discussion
Hi  Experts

I can boot linux on openption 1 tile design. below is the linux printing.
[   92.254750] size: 0
[   92.264391] crc_header: 0
[   92.273477] reserved: 0
[   92.283540] current lba: 0
[   92.293329] backup lda: 0
[   92.303600] partition entries lba: 0
[   92.313717] number partition entries: 0
[   92.328317] size partition entries: 0
[  100.602856] libphy: Fixed MDIO Bus: probed
[  101.310714] NET: Registered protocol family 10
[  101.731425] Segment Routing with IPv6
[  101.776074] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[  102.055106] NET: Registered protocol family 17
[  102.183900] Key type dns_resolver registered
[  102.282291] Loading compiled-in X.509 certificates
[  107.553203] Freeing unused kernel memory: 10588K
[  107.568931] This architecture does not have kernel memory protection.
[  107.588807] Run /init as init process
[  107.600837]   with arguments:
[  107.611660]     /init
[  107.620523]   with environment:
[  107.631531]     HOME=/
[  107.640744]     TERM=linux
Starting klogd: OK
Hello, world! The system has booted.

But When I use the same image to boot linux on design of openption 16tiles,  it reported below error.  maybe the 1core image is mismatch with more cores?
  图像.png

My question is how to generate the linux images based on the tiles? many thanks!
Best regards
Bingxu

Jonathan Balkind

unread,
Jul 8, 2024, 3:54:06 AM7/8/24
to OpenPiton Discussion
Hi Bingxu,

The device tree should be communicating the correct number of tiles and thus we never usually have to change software to change the number of cores. I have a feeling that this might be related to a bad macro in opensbi here: https://github.com/riscv-software-src/opensbi/blob/master/platform/fpga/openpiton/platform.c#L30

Try changing that to a more reasonable number (say 16 or 64) and let me know if it works!

Thanks,
Jon

--
You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openpiton/4cf7dec8-b395-4411-a2a7-ec3ad368e799n%40googlegroups.com.

6455...@qq.com

unread,
Jul 17, 2024, 2:22:41 PM7/17/24
to OpenPiton Discussion
Hi Jon

  Many thanks for your quick support. But I dont know the method of generating linux image. Could you help to provide the method to generate linux image? thanks!

Best regards
Bingxu

6455...@qq.com

unread,
Jul 18, 2024, 11:22:45 AM7/18/24
to OpenPiton Discussion
Hi Jon
  
  I have download  https://github.com/riscv-software-src/opensbi  to local, but I dont know other steps. Could you help to provide the following steps? then I can generate the many-cores' linux image. thanks for your support!

Screenshot_4.png
Best regards
Bingxu
在2024年7月8日星期一 UTC+8 15:54:06<jbal...@ucsb.edu> 写道:

bingxu li (summer)

unread,
Jul 19, 2024, 12:26:16 PM7/19/24
to OpenPiton Discussion
Hi Experts

  Based on your advice, I try to chagne the HART_COUNT to 64.
  1.png  
below my run steps
  b.  git submodule update --init --recursive
  c.  make fw_payload.bin 

 After fw_payload.elf and fw_payload.bin are generated,  then I try  to run Spike, below is the commands
2.png
result is as blow,   It doesn't seem to be working by change HART_COUNT number.
   3.png
  4.png

So far, I don't know how to proceed. Could you help that? many thanks for your support!

Best regards
Bingxu

Jonathan Balkind

unread,
Jul 21, 2024, 4:41:09 PM7/21/24
to OpenPiton Discussion
Hi Bingxu,

It looks like you modified the fpga/openpiton platform but then in spike you are running the spike version of opensbi.

I would suggest you try using my fork of ariane-sdk (https://github.com/Jbalkind/ariane-sdk/tree/openpiton-opensbi) to build your fw_payload.bin. There are several recent threads on the google group where others have tried this so if you have issues I'd suggest to take a look because there can be some minor ones. Happy to answer any questions that arise though!

Thanks,
Jon

bingxu li (summer)

unread,
Jul 22, 2024, 7:07:32 AM7/22/24
to OpenPiton Discussion
Hi Jon
  
  Many thanks for your support, below is my run command:
  7.png
 8.png
  When I execute ‘git submodule update --init --recursive’,  report below error.  please help to take a look? many thanks
   5.png
   below is .gitmodules information:
  6.png

Jonathan Balkind

unread,
Jul 22, 2024, 7:08:44 AM7/22/24
to OpenPiton Discussion
I linked to the branch openpiton-opensbi but I don't think that you switched to that branch? That branch should give different errors (for which I think fixes have been described on the google group as I noted).

Thanks,
Jon

bingxu li (summer)

unread,
Jul 22, 2024, 10:13:30 AM7/22/24
to OpenPiton Discussion
Hi Jon

This  is the website you provided, https://github.com/Jbalkind/ariane-sdk/tree/openpiton-opensbi. I git clone  https://github.com/Jbalkind/ariane-sdk.git. is that right ?
1.png

my step:
  2. sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev libusb-1.0-0-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev device-tree-compiler pkg-config libexpat-dev
 3. cd ariane-sdk; git submodule update --init --recursive

Many thanks for your help.

Best regards
Bingxu

Jonathan Balkind

unread,
Jul 22, 2024, 10:14:47 AM7/22/24
to OpenPiton Discussion
You aren't pointing git at the branch which corresponds with the URL. You need to change `git clone https://github.com/Jbalkind/ariane-sdk.git` to `git clone https://github.com/Jbalkind/ariane-sdk.git -b openpiton-opensbi` in order to clone the correct branch.

Thanks,
Jon

bingxu li (summer)

unread,
Jul 23, 2024, 11:56:06 AM7/23/24
to OpenPiton Discussion
Hi Jon

Thanks for your suggestion, it works. but I faced other issues related to  c-stack.c. after I comment some lines in  c-stack.c, it report error about  libfakeroot.c. Below is my steps:

Step1[success]

git clone https://github.com/Jbalkind/ariane-sdk.git -b openpiton-opensbi .

Cloning into '.'...

remote: Enumerating objects: 309, done.

remote: Counting objects: 100% (13/13), done.

remote: Compressing objects: 100% (6/6), done.

remote: Total 309 (delta 8), reused 7 (delta 7), pack-reused 296

Receiving objects: 100% (309/309), 187.55 KiB | 219.00 KiB/s, done.

Resolving deltas: 100% (159/159), done.

  Step2[success]

  sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev libusb-1.0-0-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev   

  device-tree-compiler pkg-config libexpat-dev

 Step3[success]

  export RISCV=/path/to/install/riscv/toolchain

  export RISCV=/opt/riscv

  export PATH=$PATH:$RISCV/bin

Step4[success]

git submodule update --init –recursive

Submodule 'buildroot' (git://git.buildroot.net/buildroot) registered for path 'buildroot'

Submodule 'opensbi' (https://github.com/riscv/opensbi.git) registered for path 'opensbi'

Cloning into '/home/bingxuli/0723/buildroot'...

Cloning into '/home/bingxuli/0723/opensbi'...

Submodule path 'buildroot': checked out '81ada4dff4334a6fbb7ae3a547de4cf6aab54a91'

Submodule path 'opensbi': checked out '234ed8e427f4d92903123199f6590d144e0d9351'

 

Step5[fail]

make fw_payload.bin

 

from c-stack.c:49:

c-stack.c:55:26: error: missing binary operator before token "("

   55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384

      |                          ^~~~~~~~

  CC       pipe2.o

  CC       pipe2-safer.o

make[5]: *** [Makefile:1915: c-stack.o] Error 1

  CC       printf-frexp.o

make[5]: *** Waiting for unfinished jobs....

make[5]: Leaving directory '/home/bingxuli/0723/buildroot/output/build/host-m4-1.4.18/lib'

make[4]: *** [Makefile:1674: all] Error 2

make[4]: Leaving directory '/home/bingxuli/0723/buildroot/output/build/host-m4-1.4.18/lib'

make[3]: *** [Makefile:1572: all-recursive] Error 1

make[3]: Leaving directory '/home/bingxuli/0723/buildroot/output/build/host-m4-1.4.18'

make[2]: *** [Makefile:1528: all] Error 2

make[2]: Leaving directory '/home/bingxuli/0723/buildroot/output/build/host-m4-1.4.18'

make[1]: *** [package/pkg-generic.mk:250: /home/bingxuli/0723/buildroot/output/build/host-m4-1.4.18/.stamp_built] Error 2

make[1]: Leaving directory '/home/bingxuli/0723/buildroot'

make: *** [Makefile:12: Image] Error 2

*********************************************************************************************************************************

Below is my trying, comment line 55~60 in  ./buildroot/output/build/host-m4-1.4.18/lib/c-stack.c

  54 # define SIGSTKSZ 16384

  55 //#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384

  56 /* libsigsegv 2.6 through 2.8 have a bug where some architectures     use

  57    more than the Linux default of an 8k alternate stack when decid    ing

  58    if a fault was caused by stack overflow.  */

  59 //# undef SIGSTKSZ

  60 //# define SIGSTKSZ 16384

  61 #endif


Continue to make fw_payload.bin

libfakeroot.c:89:46: note: in definition of macro SEND_GET_STAT64

   89 | #define SEND_GET_STAT64(a,b) send_get_stat64(a)

      |                                              ^

In file included from libfakeroot.c:60:

communicate.h:209:44: note: expected struct stat64 * but argument is of type struct stat *

  209 | extern void send_get_stat64(struct stat64 *buf);

      |                             ~~~~~~~~~~~~~~~^~~

libtool: link: /usr/bin/ar cru .libs/libcommunicate.a .libs/communicate.o

make[4]: *** [Makefile:652: libfakeroot.lo] Error 1

make[4]: *** Waiting for unfinished jobs....

/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')

libtool: link: /usr/bin/ranlib .libs/libcommunicate.a

libtool: link: ( cd ".libs" && rm -f "libmacosx.la" && ln -s "../libmacosx.la" "libmacosx.la" )

libtool: link: ( cd ".libs" && rm -f "libcommunicate.la" && ln -s "../libcommunicate.la" "libcommunicate.la" )

make[4]: Leaving directory '/home/bingxuli/0723/buildroot/output/build/host-fakeroot-1.20.2'

make[3]: *** [Makefile:670: all-recursive] Error 1

make[3]: Leaving directory '/home/bingxuli/0723/buildroot/output/build/host-fakeroot-1.20.2'

make[2]: *** [Makefile:445: all] Error 2

make[2]: Leaving directory '/home/bingxuli/0723/buildroot/output/build/host-fakeroot-1.20.2'

make[1]: *** [package/pkg-generic.mk:250: /home/bingxuli/0723/buildroot/output/build/host-fakeroot-1.20.2/.stamp_built] Error 2

make[1]: Leaving directory '/home/bingxuli/0723/buildroot'

make: *** [Makefile:12: Image] Error 2


Best regards

Bingxu

Jonathan Balkind

unread,
Jul 23, 2024, 11:57:59 AM7/23/24
to OpenPiton Discussion
These errors look quite different from the ones I have seen in the past. I think either your platform is much newer or older than what I have run on. Could you share info on what OS you're running etc?

Also this conversation would likely be easier to have on Zulip (openpiton.zulipchat.com) than via the google group, given the back and forth.

Thanks,
Jon

bingxu li (summer)

unread,
Jul 24, 2024, 7:10:44 AM7/24/24
to OpenPiton Discussion
Hi Jon

This is my os vesion. thanks!

  PRETTY_NAME="Ubuntu 22.04.3 LTS"
 NAME="Ubuntu"
 VERSION_ID="22.04"
 VERSION="22.04.3 LTS (Jammy Jellyfish)"
 VERSION_CODENAME=jammy
 ID=ubuntu
 ID_LIKE=debian
 HOME_URL="https://www.ubuntu.com/"
 SUPPORT_URL="https://help.ubuntu.com/"
 BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
 PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
 UBUNTU_CODENAME=jammy

Best regards
Bingxu

Reply all
Reply to author
Forward
0 new messages