1. change some directory structure for the build script

2. add build script and document
   see DOC/BuildVentoyFromSource.txt for detail
This commit is contained in:
longpanda
2020-05-20 22:36:27 +08:00
parent 965417970b
commit 2aae096c2a
97 changed files with 6298 additions and 67 deletions

View File

@@ -1,8 +0,0 @@
========== About Source Code =============
1. unpack ipxe_org_code/ipxe-3fe683e.tar.bz2
2. After decompressing, delete ipxe-3fe683e/src/drivers (whole directory)
3. Merge left source code with the ipxe-3fe683e directory here
========== Build =============
make bin/ipxe.iso

17
IPXE/buildipxe.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
rm -rf ipxe-3fe683e
tar -xvf ipxe_org_code/ipxe-3fe683e.tar.bz2 -C ./
rm -rf ./ipxe-3fe683e/src/bin
rm -rf ./ipxe-3fe683e/src/drivers
/bin/cp -a ipxe_mod_code/ipxe-3fe683e ./
cd ipxe-3fe683e/src
sh build.sh
cd ../../

View File

@@ -1374,6 +1374,25 @@ static int int13_load_eltorito ( unsigned int drive, struct segoff *address ) {
return -EIO;
}
if (catalog.boot.length > 4)
{
isolinux_boot_info *bootinfo = NULL;
bootinfo = (isolinux_boot_info *)(real_to_user(address->segment, address->offset));
if (0x7C6CEAFA == bootinfo->isolinux0 && 0x90900000 == bootinfo->isolinux1)
{
if (bootinfo->BootFileLocation == 0 && bootinfo->PvdLocation == 16 &&
(bootinfo->BootFileLen / 2048) < catalog.boot.length && bootinfo->BootFileChecksum > 0)
{
if (g_debug)
{
printf("isolinux file location is 0, now fix it to %u ...\n", catalog.boot.start);
ventoy_debug_pause();
}
bootinfo->BootFileLocation = catalog.boot.start;
}
}
}
return 0;
}

View File

@@ -0,0 +1,31 @@
#!/bin/bash
build_bios() {
rm -f bin/ipxe.iso
make -e -k -j 8 bin/ipxe.iso BIOS_MODE=BIOS
if ! [ -e bin/ipxe.iso ]; then
echo "Failed"
exit 1
fi
mkdir -p ./mnt
mount bin/ipxe.iso ./mnt
rm -f ../../../INSTALL/ventoy/ipxe.krn
cp -a ./mnt/ipxe.krn ../../../INSTALL/ventoy/ipxe.krn
umount ./mnt > /dev/null 2>&1
umount ./mnt > /dev/null 2>&1
umount ./mnt > /dev/null 2>&1
rm -rf ./mnt
echo -e "\n===============SUCCESS===============\n"
}
build_bios