]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - DOC/BuildVentoyFromSource.txt
update languages.ini (#829 #834)
[Ventoy.git] / DOC / BuildVentoyFromSource.txt
index eb04b196f7f81a3aad36e5a5f09ee1b6b3c6b425..8aae2823f0e9b8f28ba3bf465792ac36e0eb4969 100644 (file)
@@ -3,7 +3,7 @@
 1. Compile Enviroment\r
 ==========================================\r
     My build envrioment is CentOS 7.8 x86_64. So here I first explain how to create the build environment from scratch.\r
-    Because Ventoy is based on many open source projects, so the environment is important. I suggest you test it on a virtual machine first.\r
+    Because Ventoy is based on many open source projects, so the environment is important. I suggest you test it on a virtual machine firstly.\r
 \r
 1.1 Install CentOS 7.8\r
     I use CentOS-7-x86_64-Everything-2003.iso and select Minimal install\r
@@ -14,7 +14,7 @@
         mpfr.i686 mpfr-devel.i686 zlib.i686 rsync autogen autoconf automake libtool gettext* bison binutils \\r
         flex device-mapper-devel SDL libpciaccess libusb freetype freetype-devel gnu-free-* qemu-* virt-* \\r
         libvirt* vte* NetworkManager-bluetooth brlapi fuse-devel dejavu* gnu-efi* pesign shim \\r
-        iscsi-initiator-utils grub2-tools zip nasm acpica-tools glibc-static zlib-static\r
+        iscsi-initiator-utils grub2-tools zip nasm acpica-tools glibc-static zlib-static xorriso\r
     \r
 \r
 \r
 2. Download Source Code\r
 ==========================================\r
 2.1 Download Ventoy source code from github and decompress it. \r
-    Next I assume that you have unzipped the code into the /home directory (check /home/Ventoy-master/README.md file for the directory level).\r
+    Next I assume that you have unzipped the code into the /home directory (check /home/Ventoy-master/README.md file for the directory layout).\r
     \r
-2.2 Download third-part source code\r
+2.2 Download third-part source code and tool\r
     \r
     https://www.fefe.de/dietlibc/dietlibc-0.34.tar.xz                    ===>  /home/Ventoy-master/DOC/dietlibc-0.34.tar.xz\r
+    https://musl.libc.org/releases/musl-1.2.1.tar.gz                     ===>  /home/Ventoy-master/DOC/musl-1.2.1.tar.gz\r
     https://ftp.gnu.org/gnu/grub/grub-2.04.tar.xz                        ===>  /home/Ventoy-master/GRUB2/grub-2.04.tar.xz\r
     https://codeload.github.com/tianocore/edk2/zip/edk2-stable201911     ===>  /home/Ventoy-master/EDK2/edk2-edk2-stable201911.zip\r
     https://codeload.github.com/relan/exfat/zip/v1.3.0                   ===>  /home/Ventoy-master/ExFAT/exfat-1.3.0.zip\r
     https://codeload.github.com/libfuse/libfuse/zip/fuse-2.9.9           ===>  /home/Ventoy-master/ExFAT/libfuse-fuse-2.9.9.zip\r
     https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz           ===>  /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz\r
     https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--uclibc--stable-2020.08-1.tar.bz2 ===> /opt/aarch64--uclibc--stable-2020.08-1.tar.bz2\r
+    http://ftp.loongnix.org/toolchain/gcc/release/mips-loongson-gcc7.3-2019.06-29-linux-gnu.tar.gz ===> /opt/mips-loongson-gcc7.3-2019.06-29-linux-gnu.tar.gz\r
+    https://github.com/ventoy/musl-cross-make/releases/download/latest/output.tar.bz2 ===> /opt/output.tar.bz2\r
+\r
+\r
+    http://www.tinycorelinux.net/11.x/x86_64/release/distribution_files/vmlinuz64 ===> /home/Ventoy-master/LiveCD/ISO/EFI/boot/vmlinuz64\r
+    http://www.tinycorelinux.net/11.x/x86_64/release/distribution_files/corepure64.gz ===> /home/Ventoy-master/LiveCD/ISO/EFI/boot/corepure64.gz\r
+    http://www.tinycorelinux.net/11.x/x86_64/release/distribution_files/modules64.gz ===> /home/Ventoy-master/LiveCD/ISO/EFI/boot/modules64.gz    \r
+\r
+2.3 Prepare third-part tools\r
+    cd /home/Ventoy-master/DOC/\r
+    tar xf musl-1.2.1.tar.gz\r
+    cd musl-1.2.1\r
+    ./configure && make install\r
+\r
+    tar xf /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz  -C /opt\r
+    tar xf /opt/aarch64--uclibc--stable-2020.08-1.tar.bz2  -C /opt\r
+    tar xf /opt/output.tar.bz2  -C /opt\r
+    mv /opt/output /opt/mips64el-linux-musl-gcc730\r
+    \r
+\r
+2.4 Set PATH envrioment\r
+    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:/opt/mips64el-linux-musl-gcc730/bin\r
+    better to add this line to /root/.bashrc and relogin as root\r
 \r
 \r
 ==========================================\r
 3. All in one script\r
 ==========================================\r
-    I have made the whole build process in all_in_one.sh, you can run this script to build and pack ventoy.\r
+    I have made a all_in_one.sh, you can run this script to build and pack ventoy.\r
     If you want to compile a certain part separately, you can continue to refer to the later chapters of this text.\r
     \r
     cd /home/Ventoy-master/INSTALL\r
     sh all_in_one.sh\r
 \r
-    It should be noted that, some part of Ventoy has 32bit&64bit version (like 4.9 4.10 4.11 follows)\r
-    all_in_one.sh only build 64bit version of them, if you want to rebuild the 32bit verison. You should create a 32bit CentOS environment and build them.\r
-    Fortunately these parts are few modified, you only need to build once or you can directly use the binary I have built.\r
+    It should be noted that:\r
+    1. Only grub2/EDK2/IPXE will be recompiled in all_in_one.sh. Other part contains the binaries and are few modified, so will no be recompiled everytime.\r
+       You can rebuild these parts separately if you want.\r
+       \r
+    2. some part of Ventoy has 32bit&64bit version (like 4.9 4.10 4.11 follows)\r
+       all_in_one.sh only build 64bit version of them, if you want to rebuild the 32bit verison. You should create a 32bit CentOS environment and build them.\r
+       Fortunately these parts are few modified, you only need to build once or you can directly use the binary I have built.\r
 \r
     Besides, after a fully compile and pack, you can only build the part you modified (for example grub2) and run ventoy_pack.sh to generate the package.\r
 \r
-\r
-\r
 ==========================================\r
 4. Build every part of Ventoy\r
 ==========================================\r