mirror of
				https://gitlab.com/qemu-project/ipxe.git
				synced 2025-11-03 07:59:06 +08:00 
			
		
		
		
	When building as a Linux userspace application, iPXE currently implements its own system calls to the host kernel rather than relying on the host's C library. The output binary is statically linked and has no external dependencies. This matches the general philosophy of other platforms on which iPXE runs, since there are no external libraries available on either BIOS or UEFI bare metal. However, it would be useful for the Linux userspace application to be able to link against host libraries such as libslirp. Modify the build process to perform a two-stage link: first picking out the requested objects in the usual way from blib.a but with relocations left present, then linking again with a helper object to create a standard hosted application. The helper object provides the standard main() entry point and wrappers for the Linux system calls required by the iPXE Linux drivers and interface code. Signed-off-by: Michael Brown <mcb30@ipxe.org>
		
			
				
	
	
		
			72 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			72 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: Build
 | 
						|
 | 
						|
on: push
 | 
						|
 | 
						|
jobs:
 | 
						|
 | 
						|
  x86:
 | 
						|
    name: x86
 | 
						|
    runs-on: ubuntu-20.04
 | 
						|
    steps:
 | 
						|
      - name: Check out code
 | 
						|
        uses: actions/checkout@v2
 | 
						|
        with:
 | 
						|
          fetch-depth: 0
 | 
						|
      - name: Install packages
 | 
						|
        run: |
 | 
						|
          sudo dpkg --add-architecture i386
 | 
						|
          sudo apt update
 | 
						|
          sudo apt install -y -o Acquire::Retries=50 \
 | 
						|
                           mtools syslinux isolinux \
 | 
						|
                           libc6-dev-i386 libc6-dbg:i386 valgrind
 | 
						|
      - name: Build (BIOS)
 | 
						|
        run: |
 | 
						|
          make -j 4 -C src
 | 
						|
      - name: Build (Everything)
 | 
						|
        run: |
 | 
						|
          make -j 4 -C src everything
 | 
						|
      - name: Test
 | 
						|
        run: |
 | 
						|
          valgrind ./src/bin-i386-linux/tests.linux
 | 
						|
          valgrind ./src/bin-x86_64-linux/tests.linux
 | 
						|
 | 
						|
  arm32:
 | 
						|
    name: ARM32
 | 
						|
    runs-on: ubuntu-20.04
 | 
						|
    steps:
 | 
						|
      - name: Check out code
 | 
						|
        uses: actions/checkout@v2
 | 
						|
        with:
 | 
						|
          fetch-depth: 0
 | 
						|
      - name: Install packages
 | 
						|
        run: |
 | 
						|
          sudo apt update
 | 
						|
          sudo apt install -y -o Acquire::Retries=50 \
 | 
						|
                           mtools syslinux isolinux gcc-arm-none-eabi
 | 
						|
      - name: Build
 | 
						|
        run: |
 | 
						|
          make -j 4 -C src CROSS=arm-none-eabi- \
 | 
						|
               bin-arm32-efi/intel.efi \
 | 
						|
               bin-arm32-efi/intel.usb \
 | 
						|
               bin-arm32-efi/intel.iso
 | 
						|
 | 
						|
  arm64:
 | 
						|
    name: ARM64
 | 
						|
    runs-on: ubuntu-20.04
 | 
						|
    steps:
 | 
						|
      - name: Check out code
 | 
						|
        uses: actions/checkout@v2
 | 
						|
        with:
 | 
						|
          fetch-depth: 0
 | 
						|
      - name: Install packages
 | 
						|
        run: |
 | 
						|
          sudo apt update
 | 
						|
          sudo apt install -y -o Acquire::Retries=50 \
 | 
						|
                           mtools syslinux isolinux gcc-aarch64-linux-gnu
 | 
						|
      - name: Build
 | 
						|
        run: |
 | 
						|
          make -j 4 -C src CROSS=aarch64-linux-gnu- \
 | 
						|
               bin-arm64-efi/ipxe.efi \
 | 
						|
               bin-arm64-efi/ipxe.usb \
 | 
						|
               bin-arm64-efi/ipxe.iso
 |