Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Running within Fedora Silverblue 37, I attempted to build the VF2(visionfive 2) image from within a podman ubuntu 20.04(focal) container rather than from straight ubuntu focal.
- Unfortunately, I have not been able to successfully repeat the build to get all the described VF2 build binaries and images and such with the steps described below.
- Afterwards, how does one slip in/overlay the Fedora Silverblue 37 packages as much as possible into the VF2 image using the existing working VF2 kernel?
- Why is it that buildroot also annoying downloads all the dependant packages from different repositories within the build process?
- Why couldn't all these buildroot packages all be fetched beforehand AND THEN build?
- Why is it that we don't separate the package documentation from the package binaries and optionally build documentation afterwards? This could save enormous amounts of build time when iterating through all this.
- ###fetch ubuntu 20.04 focal container
- podman pull ubuntu:focal-20221130
- ### create a directory to share data between the container and the host fedora silverblue 37
- mkdir -p /mnt/vf2share
- ###start ubuntu 20.04 focal container
- podman run -v ~/vf2share:/mnt/vf2share --net host -i -t ubuntu:focal-20221130 /bin/bash
- ###Later we'll start it like this after it has been committed
- ###podman run -v /var/home/davidm/vf2share:/mnt/vf2share:Z --net host -i -t ubuntu-vf2-buildr /bin/bash
- ###issues with group and owner in the build. Attempted to resolve them with this alias, but did nothing to help.
- alias tar='tar --no-same-owner'
- #############################inside ubuntu 20.04 focal container
- mkdir visionfive2prep
- cd visionfive2prep/
- apt update
- apt-get install curl
- apt-get install git-lfs
- apt-get install build-essential g++ git autoconf automake autotools-dev texinfo bison xxd curl flex gawk gdisk gperf libgmp-dev libmpfr-dev libmpc-dev libz-dev libssl-dev libncurses-dev libtool patchutils python screen texinfo unzip zlib1g-dev libyaml-dev wget cpio bc dosfstools mtools device-tree-compiler libglib2.0-dev libpixman-1-dev kpartx
- apt-get install rsync
- apt-get install time
- apt-get install emacs-nox
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh -o script.deb.sh
- sudo bash ./script.deb.sh
- git clone https://github.com/starfive-tech/VisionFive2.git
- cd VisionFive2
- cat .gitmodules
- [submodule "buildroot"]
- path = buildroot
- url = https://github.com/starfive-tech/buildroot.git
- branch = JH7110_VisionFive2_devel
- [submodule "u-boot"]
- path = u-boot
- url = https://github.com/starfive-tech/u-boot.git
- branch = JH7110_VisionFive2_devel
- [submodule "linux"]
- path = linux
- url = https://github.com/starfive-tech/linux.git
- branch = JH7110_VisionFive2_devel
- [submodule "opensbi"]
- path = opensbi
- url = https://github.com/starfive-tech/opensbi.git
- branch = master
- Besides this one, the conf/buildroot_initramfs_config and conf/buildroot_rootfs_config also need to modify the
- BR2_KERNEL_HEADERS_CUSTOM_REPO_URL="git@github.com:starfive-tech/linux.git"
- to
- BR2_KERNEL_HEADERS_CUSTOM_REPO_URL="https://github.com/starfive-tech/linux.git"
- cd VisionFive2
- git checkout JH7110_VisionFive2_devel
- git submodule update --init --recursive
- cd buildroot && git checkout --track origin/JH7110_VisionFive2_devel && cd ..
- cd u-boot && git checkout --track origin/JH7110_VisionFive2_devel && cd ..
- cd linux && git checkout --track origin/JH7110_VisionFive2_devel && cd ..
- cd opensbi && git checkout master && cd ..
- cd soft_3rdpart && git checkout JH7110_VisionFive2_devel && cd ..
- ##to capture all the build output run a shell in emacs with no color
- emacs -nw --color=no
- ##alt-x shell
- time make -j$(nproc)
- #############################FINISHED ubuntu 20.04 focal container
- ###pause podman container
- ctrl-p ctrl-q
- ###list podman containers
- podman ps
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- 8c35f4187b36 docker.io/library/ubuntu:focal-20221130 /bin/bash 2 hours ago Up 2 hours ago admiring_wescoff
- ###save all our actions and name the container
- podman commit 8c35f4187b36 ubuntu-vf2-buildr
- ###attach back into the running session
- podman attach ubuntu-vf2-buildr
- ###kill any running containers
- podman kill b2df210888d6
- ###next time you want to use this container
- podman run -v /var/home/davidm/vf2share:/mnt/vf2share:Z --net host -i -t ubuntu-vf2-buildr /bin/bash
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement