Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Successfuly Complied on Ubuntu based distribution
Here is how I made it as simple as I can for Ubuntu this was also tested on 20.04.1

when you doing this in a live setting make a Folder called cow

sudo mkdir /cow
For the i386-pc the install process for building the img will have a cow if there is no cow dir LOL

Anyways you will follow Most of the steps in this document
make sure you have deb-src Uncommented if they are not there , the source repo is the same link just need one with a deb-src;
Set up your sources

sudo gediet /etc/apt/sources.list
#deb cdrom:[Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731)]/ focal>
deb focal main restricted
deb focal-security main restricted
deb focal-updates main restricted
deb focal universe
deb-src focal main restricted
deb-src focal-security main restricted
deb-src focal-updates main restricted
deb-src focal universe

sudo apt-get update && sudo apt-get build-dep grub-efi edk2 && sudo apt-get install xorriso gcc-multilib dos2unix

Set all Archives in correct directories

unzip -d /home/
mv dietlibc-0.34.tar.xz /home/Ventoy-master/DOC
mv musl-1.2.1.tar.gz /home/Ventoy-master/DOC
mv /home/Ventoy-master/EDK2/
mv aarch64--uclibc--stable-2020.08-1.tar.bz2 gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz -t /opt
mv -t /home/Ventoy-master/ExFAT/
mv grub-2.04.tar.xz /home/Ventoy-master/GRUB2/

First thing that will prevent errors is this command

Replace sh with ./ For bash source compatibility.

sudo sed -i 's/sh b/.\/b/g' /home/Ventoy-master/INSTALL/

IN the EDK2 this command fixes issues with 32 bit failing and it not executing source
sudo sed -i 's/GCC48/GCC5/g' /home/Ventoy-master/EDK2/ && sudo sed -i 's/#!\/bin\/sh/#!\/bin\/bash/' /home/Ventoy-master/EDK2/
sudo sed -i 's/#!\/bin\/sh/#!\/bin\/bash/' /home/Ventoy-master/EDK2/ && sudo sed -i 's/sh .\/b/.\/b/g' /home/Ventoy-master/EDK2/

These will allow GRUB2 to compile.
sudo sed -i 's/configure/configure --disable-werror/g' /home/Ventoy-master/GRUB2/
sudo sed -i 's/grub-mknetdir/if ["$1" = "uefi" ]\; then \nwpath="x86_64-efi"\nelif [ " $1" = "i386efi" ]\; then\n wpath="i386-efi"\nelse\nwpath="i386-pc" \nfi \ngrub-mknetdir --directory "$VT_DIR\/GRUB2\/INSTALL\/lib\/grub\/$wpath"/' /home/Ventoy-master/GRUB2/MOD_SRC/grub-2.04/

Make all Scripts executable:
sudo find /home/Ventoy-master/ -name "*.sh" -exec touch {} \; -exec chmod +x {} \;

This fixes a weird error with diet for VentoyTool.
sudo sed -i 's/int __bitwise/int __bitwise\;\ntypedef int/' /usr/include/linux/fs.h

sudo sh
2.3 Prepare third-part tools

cd /home/Ventoy-master/DOC/
tar xf musl-1.2.1.tar.gz
cd musl-1.2.1
./configure && make install

tar xf /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz -C /opt
tar xf /opt/aarch64--uclibc--stable-2020.08-1.tar.bz2 -C /opt

2.4 Set PATH envrioment

export PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin:/opt/aarch64--uclibc--stable-2020.08-1/bin

better to add this line to /root/.bashrc and relogin as root

cd /home/Ventoy-master/INSTALL
sh /

That's it just tested all the commands right out of this document on a live cd.

I wonder if this will be better because its able to use gcc version 9.3.0.....

Messages In This Thread
RE: Successfuly Complied on Ubuntu based distribution - by Premiere - 01-29-2021, 10:44 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)