Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Successfuly Complied on Ubuntu based distribution
#1
Haven't yet fully tested this and I had to make a quite a few changes to the build scripts to get everything to compiled,
So far it's working well. 



 I wounder if the -m32 and -stactic options will cause issues for the 32 bit versions?  Confused 

I will post a how to once I verify all the steps.

I Love open source.
Reply
#2
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 https://github.com/ventoy/Ventoy/blob/ma...Source.txt
MAKE SURE YOU HAVE THE NEWEST VERSION! ! https://github.com/ventoy/Ventoy
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 http://archive.ubuntu.com/ubuntu/ focal main restricted
deb http://security.ubuntu.com/ubuntu/ focal-security main restricted
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
deb http://archive.ubuntu.com/ubuntu/ focal universe
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted
deb-src http://security.ubuntu.com/ubuntu/ focal-security main restricted
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ 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

#!/bin/bash
unzip Ventoy-master.zip -d /home/
mv dietlibc-0.34.tar.xz /home/Ventoy-master/DOC
mv musl-1.2.1.tar.gz /home/Ventoy-master/DOC
mv edk2-edk2-stable201911.zip /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 exfat-1.3.0.zip libfuse-fuse-2.9.9.zip -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/all_in_one.sh

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/build.sh && sudo sed -i 's/#!\/bin\/sh/#!\/bin\/bash/' /home/Ventoy-master/EDK2/build.sh
sudo sed -i 's/#!\/bin\/sh/#!\/bin\/bash/' /home/Ventoy-master/EDK2/buildedk.sh && sudo sed -i 's/sh .\/b/.\/b/g' /home/Ventoy-master/EDK2/buildedk.sh

These will allow GRUB2 to compile.
sudo sed -i 's/configure/configure --disable-werror/g' /home/Ventoy-master/GRUB2/buildgrub.sh
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/install.sh

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


Need ROOT
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 /all_in_one.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.....
Reply
#3
UpDATE:
So ...
You dont need the source but you definitely need to use gcc 7.5 for the i386-pc. There is a glitch with the compilation of the lzma- D compressor( ONLY i386-pc) it will all compile fine with 7.5 no issues. It will end up having over 120 MB of white space with 9.3
Yet You only need a few more Libraries that can be obtained with install not the build-dep ,the gigabyte Of sources. I WILL edit the above and tell you here Smile. Also not sure but I recommend adding make distroclean to the GRUB2 install.sh. at the bottom its missing for i386-pc. Unless they update it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)