The officially official Devuan Forum!

You are not logged in.

#1 2019-08-31 00:17:26

Ozi
Member
Registered: 2017-03-15
Posts: 80  

arm-sdk + rapsberry pi 4

Hi

Sorry if this is in the wrong place! smile

I'm wanting to connect with anyone who might be able to steer me in the right direction to build using the arm-sdk for my rpi 4. I already use the live-sdk.

Thanks

Ozi

Offline

#2 2019-08-31 14:50:44

b3bgd
Member
Registered: 2019-08-31
Posts: 14  

Re: arm-sdk + rapsberry pi 4

Hi.
For Raspi2, I just use a virtual Devuan ASCII macine for building, am follow the instructions in the arm-sdk Readme (with some initial quirks, that is).
Where are you stuck?

Last edited by b3bgd (2019-08-31 14:53:09)

Offline

#3 2019-08-31 21:12:30

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

I've emailed you. smile

Offline

#4 2019-09-01 06:35:03

b3bgd
Member
Registered: 2019-08-31
Posts: 14  

Re: arm-sdk + rapsberry pi 4

Hi again. I'm gonna answer here directly, maybe others will find this useful too.

If you setup up an amd64 machine to build, everything will be OK, because the script will use cross-compiling to the correct arm architecture (armel/armhf/arm64) depending on your board.

Please look closely at the issues and merge requests on Git. For raspi 2 I found out the partitions were not aligned correctly and the kernel modules were not handled properly, resulting in an unusable image (the image posted on Devuan site right now for Raspi2 doesn't even boot). I fixed the problems, and made a merge request. For raspi 4 things seem in order, but there is a merge request for 4G RAM limit. You might want to look at that.

Also, something else to consider:
1. Even if not mentioned in the readme, you will also need the following packages on the build host installed:

quilt bison flex chrpath gawk texinfo libsdl1.2-dev whiptail diffstat cpio libssl-dev

2. On the arm image itself, after booting, you should create the groups for the bus interfaces, because they are not included:

groupadd --system spi
groupadd --system i2c
groupadd --system gpio

3. See net.ifnames in cmdline.txt and adjust as needed for predictable or classic net names - I myself find the old classic way more predictable on raspi, because it only has one interface of each type.

4. On the raspi 2 image at least, locales are kinda missing. Setting the keyboard doesn't work either.

Offline

#5 2019-09-02 20:53:52

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

@b3bgd Thank you for your very useful reply!

Is there anything in the sdk config file that needs to be changed?

And thanks for mentioning the merge request for 4G RAM limit.

Last edited by Ozi (2019-09-02 20:56:00)

Offline

#6 2019-09-02 21:34:42

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

Just trying to install the packages and found gcc-multilib and lib32z1 packages aren't in the debian repo, but they are in the Devuan repo.

Offline

#7 2019-09-03 05:43:28

b3bgd
Member
Registered: 2019-08-31
Posts: 14  

Re: arm-sdk + rapsberry pi 4

Ozi wrote:

Is there anything in the sdk config file that needs to be changed?

Well... a lot of things are missing: the /opt/vc tools (dtparam/dtoverlay, vcdbg, tvservice etc); installing libgl1-mesa-dri tries to install Radeon and geForce drivers; wpa_supplicant is missing config; groups mentioned above are not created; xrandr is missing; etc. So not sure what to say here, there are lots of things to fix with Devuan for arm. Btw, trying to set the variable to not compress images (forgot which it was) still creates the compressed images (but also leaves the original).

Lots of things to fix.

Offline

#8 2019-09-03 20:48:21

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

I've done the changes to the config.txt and cmdline.txt file to increase ram. And also noticed a line missing in config.txt in the merge request.

## memory shared with the GPU
gpu_mem=128

Where is the variable to set the compress option?

Offline

#9 2019-09-04 04:18:09

b3bgd
Member
Registered: 2019-08-31
Posts: 14  

Re: arm-sdk + rapsberry pi 4

Ozi wrote:

Where is the variable to set the compress option?

In your raspberry-pi4.sh, near the top, before function definitions, add the lines:

vars+=(nocompressimage)
nocompressimage="true"

Last edited by b3bgd (2019-09-04 04:34:36)

Offline

#10 2019-09-04 21:29:27

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

b3bgd wrote:
Ozi wrote:

Where is the variable to set the compress option?

In your raspberry-pi4.sh, near the top, before function definitions, add the lines:

vars+=(nocompressimage)
nocompressimage="true"

Is raspberry-pi4.sh a file I need to make, or is it init.sh?

I noticed that there are no blends in the arm-sdk repo. Has anyone done a blend for the rpi4? I've done blends for the live-sdk, are they the same?

Offline

#11 2019-09-05 05:18:37

b3bgd
Member
Registered: 2019-08-31
Posts: 14  

Re: arm-sdk + rapsberry pi 4

Ozi wrote:

Is raspberry-pi4.sh a file I need to make, or is it init.sh?
?

It's in /boards, e.g.:
https://git.devuan.org/b3bgd/arm-sdk/tree/master/boards

Offline

#12 2019-09-06 12:32:12

b3bgd
Member
Registered: 2019-08-31
Posts: 14  

Re: arm-sdk + rapsberry pi 4

FYI I enabled ccache for compiling cache in my fork:
https://git.devuan.org/b3bgd/arm-sdk

Works like a charm, after the first build I get compiling times about 5x better. I needed this because I made round 50 builds from scratch in the last week or so.

P.S.: in that fork you will also find that I put vc tools for raspi 1 & 2 (because they are 32-bit, and there are no 64-bit executables and I don't know if they will work for 64-bit), and I fixed the raspi 2 image & modules.

Last edited by b3bgd (2019-09-06 12:38:04)

Offline

#13 2019-09-06 21:17:15

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

Would you consider pulling down the vc tools source and compiling, install the 64bit executables?

Offline

#14 2019-09-07 06:32:05

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

I've installed ccache, and I'm running ./init.sh now.

Offline

#15 2019-09-07 06:54:13

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

Now I'm running the build, no blend though.

Seems ok so far, it's just pulling in packages.

Offline

#16 2019-09-07 07:12:54

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

SHould I be running with using sudo?


/bin/sh: 1: bc: not found
Kbuild:42: recipe for target 'include/generated/timeconst.h' failed
make[1]: *** [include/generated/timeconst.h] Error 127
Makefile:1096: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
  HOSTCC  scripts/mod/sumversion.o
  UPD     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/bin2c
  HOSTCC  scripts/kallsyms
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/pnmtologo
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/recordmcount
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/asn1_compiler
  HOSTCC  scripts/extract-cert
 [E] error in: clone-git https://github.com/raspberrypi/linux /home/ozi/arm-sdk/tmp/kernels/raspi4/raspi4-linux rpi-4.19.y
 [W] called in: formatting root as ext4
 [W] called in: grabbing raspi4-linux
 [E] error reported, operation aborted.
  DEPMOD  4.19.71-v8+
Warning: modules_install: missing 'System.map' file. Skipping depmod.
 (*) grabbing raspi4-firmware

Offline

#17 2019-09-07 22:35:26

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

I installed bc which fixed this problem.

Offline

#18 2019-09-07 23:40:02

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

 (*) installing qemu-user-static
 (*) running debootstrap stage 2
chroot: failed to run command '/debootstrap/debootstrap': Exec format error
 [E] error in: qemu_install_user
 [W] called in: raspi4 build script loaded
 [W] called in: running debootstrap stage 2
 [E] error reported, operation aborted.
 (*) writing system configuration
 (*) running debootstrap stage 3

Offline

#19 2019-09-08 09:36:15

b3bgd
Member
Registered: 2019-08-31
Posts: 14  

Re: arm-sdk + rapsberry pi 4

Ozi wrote:

Would you consider pulling down the vc tools source and compiling, install the 64bit executables?

I don't have a 64-bit Raspberry at this point to test on... and also this:

Note that this repository does not contain the source for the edidparser and vcdbg binaries due to licensing restrictions.

Ozi wrote:

SHould I be running with using sudo?

Yes of course! See the docs.

Ozi wrote:
chroot: failed to run command '/debootstrap/debootstrap': Exec format error
 [E] error in: qemu_install_user
 [W] called in: raspi4 build script loaded
 [W] called in: running debootstrap stage 2
 [E] error reported, operation aborted.
 

Run as root/with sudo? modprobe binfmt_misc? Do you see other errors above what you posted?

P.S.: I also clear the dist/ and tmp/ folders before each build. Just in case, because I spotted something weird happening a few times.

Last edited by b3bgd (2019-09-08 09:38:22)

Offline

#20 2019-09-08 21:02:12

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

I changed the repo to:

mirror="http://deb.devuan.org/merged"
# mirror="http://pkgmaster.devuan.org/merged"

From the log:

I: Extracting util-linux...
I: Extracting zlib1g...
 (*) installing qemu-user-static
 (*) running debootstrap stage 2
chroot: failed to run command '/debootstrap/debootstrap': Exec format error
 [E] error in: qemu_install_user
 [W] called in: raspi4 build script loaded
 [W] called in: running debootstrap stage 2
 [E] error reported, operation aborted.
 (*) writing system configuration
 (*) running debootstrap stage 3
  .  mounted sys
  .  mounted proc
  .  mounted dev
  .  mounted devpts
 (*) chrooting to execute dpkgdivert...
chroot: failed to run command '/dpkgdivert': Exec format error
 [E] error in: chroot-script dpkgdivert
 [W] called in: mounted devpts
 [W] called in: chrooting to execute dpkgdivert...
 [E] error reported, operation aborted.
mv: cannot stat '/home/ozi/arm-sdk/tmp/devuan-arm64-build/bootstrap/dpkgdivert.log': No such file or directory
 (*) chrooting to execute thirdstage...
chroot: failed to run command '/thirdstage': Exec format error

Offline

#21 2019-09-08 21:21:41

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

I have some parts of this missing. I'm going to re-do the clone and run ./init.sh again.

Offline

#22 2019-09-09 21:02:30

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

That didn't help, still getting a number of "Exec format errors"

Is there some config that needs to be done for the sdk or libdevuansdk?

Offline

#23 2019-09-10 07:48:58

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

Another git clone and the build seems to be doing ok. It's doing something with all sorts of drivers. No errors so far.

Offline

#24 2019-09-10 08:40:55

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

This was a much better build, still some errors though.


 (*) chrooting to execute dpkgdivert...
chroot: failed to run command '/dpkgdivert': Exec format error
 [E] error in: chroot-script dpkgdivert
 [W] called in: mounted devpts
 [W] called in: chrooting to execute dpkgdivert...
 [E] error reported, operation aborted.
mv: cannot stat '/home/ozi/arm-sdk/tmp/devuan-arm64-build/bootstrap/dpkgdivert.log': No such file or directory
 (*) chrooting to execute postbuild...
chroot: failed to run command '/postbuild': Exec format error
 [E] error in: chroot-script dpkgdivert
 [W] called in: mounted devpts
 [W] called in: chrooting to execute postbuild...
 [E] error reported, operation aborted.
mv: cannot stat '/home/ozi/arm-sdk/tmp/devuan-arm64-build/bootstrap/postbuild.log': No such file or directory
 (*) chrooting to execute dpkgdivert...
chroot: failed to run command '/dpkgdivert': Exec format error
 [E] error in: chroot-script dpkgdivert
 [W] called in: mounted devpts
 [W] called in: chrooting to execute dpkgdivert...
 [E] error reported, operation aborted.
mv: cannot stat '/home/ozi/arm-sdk/tmp/devuan-arm64-build/bootstrap/dpkgdivert.log': No such file or directory
  .  umounted devpts
  .  umounted dev
  .  umounted proc
  .  umounted sys
 (*) setting up isolinux
  .  copying kernel and initrd
iso_setup_isolinux:10: no matches found: /home/ozi/arm-sdk/tmp/devuan-arm64-build/bootstrap/boot/vmlinuz*
iso_setup_isolinux:11: no matches found: /home/ozi/arm-sdk/tmp/devuan-arm64-build/bootstrap/boot/initrd*
cp: cannot stat '/home/ozi/arm-sdk/extra/syslinux/isolinux.bin': No such file or directory
 [E] error in: iso_setup_isolinux
 [W] called in: copying kernel and initrd
 [W] called in: setting up isolinux
 [E] error reported, operation aborted.
iso_setup_isolinux:15: no matches found: /home/ozi/arm-sdk/extra/syslinux/*.c32
 [E] error in: iso_setup_isolinux
 [W] called in: copying kernel and initrd
 [W] called in: setting up isolinux
 [E] error reported, operation aborted.
 (*) writing isolinux configuration
 (*) creating squashfs out of strapdir
sudo: mksquashfs: command not found
 [E] error in: iso_squash_strap
 [W] called in: copying kernel and initrd
 [W] called in: creating squashfs out of strapdir
 [E] error reported, operation aborted.
 (*) building iso...
sudo: xorriso: command not found
 [E] error in: iso_xorriso_build
 [W] called in: copying kernel and initrd
 [W] called in: building iso...
 [E] error reported, operation aborted.
 [E] error in: load devuan raspi4
 [W] called in: raspi4 build script loaded
 [W] called in: ccache is enabled

Last edited by Ozi (2019-09-10 21:12:45)

Offline

#25 2019-09-10 20:52:50

Ozi
Member
Registered: 2017-03-15
Posts: 80  

Re: arm-sdk + rapsberry pi 4

~/arm-sdk/lib/libdevuansdk/config

# mirror="http://pkgmaster.devuan.org/merged"
mirror="http://deb.devuan.org/merged"

Last edited by Ozi (2019-09-10 21:12:29)

Offline

Board footer