Comments (5)
I posted this on the VyOS forum, as it is probably a problem with the VyOS build system.
https://forum.vyos.io/t/build-for-arm64-fails/10018
from vyos-pi-builder.
I am not sure if this is the correct solution, but I changed build-image.sh of vyos-pi-builder as follows, and the build was completed tentatively. I have not yet confirmed that the VyOS image built with this script works properly.
build-image.sh is:
- # Clean out the build-repo and copy all custom packages
- rm -rf vyos-build
- git clone http://github.com/vyos/vyos-build vyos-build
for a in $(find build -type f -name "*.deb" | grep -v -e "-dbgsym_" -e "libnetfilter-conntrack3-dbg"); do
echo "Copying package: $a"
cp $a vyos-build/packages/
done
cd vyos-build
echo "Copy new default configuration to the vyos image"
cp ${ROOTDIR}/config.boot.default data/live-build-config/includes.chroot/opt/vyatta/etc/config.boot.default
# Build the image
- VYOS_BUILD_FLAVOR=data/generic-arm64.json
- ./configure
- make iso
+ /vyos/vyos-build/build-vyos-image iso --architecture arm64
cd $ROOTDIR
# Build u-boot
bash build-u-boot.sh
Makefile is:
container:
- sudo rm -rf vyos-build
- git clone -b current --single-branch https://github.com/vyos/vyos-build
sudo docker build --arch arm64 vyos-build/docker -v /usr/bin/qemu-aarch64-static:/usr/bin/qemu-aarch64-static -t vyos/vyos-build:current-arm64
- iso-local:
- sudo docker run --rm -it --arch arm64 --privileged -v /usr/bin/qemu-aarch64-static:/usr/bin/qemu-aarch64-static -v "$(shell pwd)":/vyos -v /dev:/dev --sysctl net.ipv6.conf.lo.disable_ipv6=0 localhost/vyos/vyos-build:current-arm64 /bin/bash -c 'cd /vyos; /bin/bash -x build-image.sh'
iso-registry:
- sudo docker run --rm -it --arch arm64 --privileged -v /usr/bin/qemu-aarch64-static:/usr/bin/qemu-aarch64-static -v "$(shell pwd)":/vyos -v /dev:/dev --sysctl net.ipv6.conf.lo.disable_ipv6=0 vyos/vyos-build:current-arm64 /bin/bash -c 'cd /vyos; /bin/bash -x build-image.sh'
+ sudo docker run --rm -it --platform arm64 --privileged -v "$(shell pwd)":/vyos -v /dev:/dev --sysctl net.ipv6.conf.lo.disable_ipv6=0 vyos/vyos-build:current-arm64 /bin/bash -c 'cd /vyos; /bin/bash -x build-image.sh'
In addition, the following preparations were required.
$ git clone https://github.com/runborg/vyos-pi-builder
$ cd vyos-pi-builder
$ git clone -b current --single-branch https://github.com/vyos/vyos-build
$ wget -qO- https://repos.influxdata.com/influxdb.key > sudo tee vyos-build/data/live-build-config/archives/influxdb.key.chroot
$ vi vyos-build/data/architectures/arm64.toml
+ additional_repositories = [
+ "deb [arch=arm64] https://repos.influxdata.com/debian bullseye stable"
+ ]
+ kernel_flavor = "arm64-vyos"
# Packages added to images for x86 by default
packages = [
- "grub-efi-arm"
+ "grub-efi-arm64",
+ "telegraf"
]
bootloaders = "grub-efi"
$ vi build-pi-kernel.sh
set -x
set -e
ROOTDIR=$(pwd)
cd vyos-build/packages/linux-kernel/
git clone https://github.com/raspberrypi/linux
./build-kernel.sh
git clone https://github.com/accel-ppp/accel-ppp.git
./build-accel-ppp.sh
$sudo docker run --rm -it --platform arm64 --privileged -v "$(pwd)":/vyos -v /dev:/dev --sysctl net.ipv6.conf.lo.disable_ipv6=0 vyos/vyos-build:current-arm64 /bin/bash -c 'cd /vyos; /bin/bash -x build-pi-kernel.sh'
from vyos-pi-builder.
I wanted to use wi-fi but it is not recognizing the device and I am trying to work it out.
from vyos-pi-builder.
I forgot to build the firmware, so I did the following additionally.
build-pi-kernel.sh:
set -x
set -e
ROOTDIR=$(pwd)
cd vyos-build/packages/linux-kernel/
git clone https://github.com/raspberrypi/linux
./build-kernel.sh
+ ln -s linux/drivers/firmware linux-firmware
+ ./build-linux-firmware.sh
git clone https://github.com/accel-ppp/accel-ppp.git
./build-accel-ppp.sh
vyos-build/data/architectures/arm64.toml:
additional_repositories = [
"deb [arch=arm64] https://repos.influxdata.com/debian bullseye stable"
]
kernel_flavor = "arm64-vyos"
# Packages added to images for x86 by default
packages = [
"grub-efi-arm64",
+ "vyos-linux-firmware",
"telegraf"
]
bootloaders = "grub-efi"
The wi-fi device did not work even after running build-linux-firmware.sh. However, I did the following on VyOS and it is now recognized.
$ sudo -i
# wget -qO- https://github.com/openwrt/cypress-nvram/blob/master/brcmfmac43456-sdio.txt > /lib/firmware/brcm/brcmfmac43455-sdio.txt
In addition, because the kernel version included the unfamiliar "v8", the following workaround was implemented.
vyos-build/build-vyos-image:
- --linux-packages linux-image-{{kernel_version}} \
+ --linux-packages linux-image-{{kernel_version}}-v8 \
vyos-build/packages/linux-kernel/build-linux-firmware.sh:
- FW_FILES=$(find ${LINUX_SRC}/debian/linux-image/lib/modules/${KERNEL_VERSION}${KERNEL_SUFFIX}/kernel/drivers/net -name *.ko | xargs modinfo | grep "^firmware:" | awk '{print $2}')
+ FW_FILES=$(find ${LINUX_SRC}/debian/linux-image/lib/modules/${KERNEL_VERSION}-v8${KERNEL_SUFFIX}/kernel/drivers/net -name *.ko | xargs modinfo | grep "^firmware:" | awk '{print $2}')
It appears to be working at least for the moment, so I will use this image for a while.
from vyos-pi-builder.
As for now all fixes should be merged, i’ve verified that it builds fine, but do not have any means to verify it.. could you do a verification?
from vyos-pi-builder.
Related Issues (16)
- Better instructions in README? HOT 2
- What is the issue with Pi 3? HOT 4
- make iso-* failed: unknown flag: --arch HOT 2
- make container failed: unknown shorthand flag: 'v' in -v HOT 6
- build script doesnt work for 1.4 sagitta or 1.3 equuleus HOT 2
- Not really an issue ;) HOT 2
- Have you considered using GitHub Actions to ship pre-built ISOs?
- Unable to find a medium containing a live file system HOT 4
- Running VyOS-pi on CM4 HOT 1
- Raspberry pi 2B support ? HOT 1
- build error
- The following stage is required to be done first: bootstrap HOT 1
- build-image.sh fails on "make iso" due to amd64 repo pinning HOT 1
- make iso error HOT 4
- support update images HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vyos-pi-builder.