this patch adds tftpboot.img as a target when building sparc64 kernels. This is used for net booting sparc machines.
Since it contains some (minor) changes to common code, I am putting out on this list. The sparc arch specific stuff will be in my updated sparc64 kbuild patch. -tduffy
--- linux_kbuild/Documentation/Configure.help.orig +++ linux_kbuild/Documentation/Configure.help @@ -24507,6 +24507,11 @@ when the kernel is to reside in flash and be executed directly. + tftpboot.img This is the vmlinux file converted to a.out format + so that it can be booted over a network using tftp + (trivial file transfer protocol). Mostly used on Sun + machines for sparc32 and sparc64 kernels. + Note that bzImage format does NOT use the `bzip' or `bzip2' compression programs, as some have suggested. --- linux_kbuild/Makefile.in.orig +++ linux_kbuild/Makefile.in @@ -178,6 +178,20 @@ () ) +# --------- Start of tftpboot.img code --------- + +installable(CONFIG_TFTPBOOT tftpboot.img) + +user_command(tftpboot.img + ($(objfile /vmlinux)) + (set -e; + $(OBJCOPY) --strip-all $(objfile /vmlinux) $(objfile .tmp_tftpboot); + rm -f $@; + elftoaout -o $@ $(objfile .tmp_tftpboot); + ) + () + ) + # --------- Start of vmlinux.srec code --------- installable(CONFIG_VMLINUX_SREC vmlinux.srec) --- linux_kbuild/arch/sparc64/boot/config.install-2.5.orig +++ linux_kbuild/arch/sparc64/boot/config.install-2.5 @@ -2,7 +2,8 @@ choice 'Format to compile kernel in' \ "vmlinux CONFIG_VMLINUX \ - vmlinuz CONFIG_VMLINUZ" vmlinuz + vmlinuz CONFIG_VMLINUZ \ + tftpboot.img CONFIG_TFTPBOOT" vmlinuz bool 'Use a prefix on install paths' CONFIG_INSTALL_PREFIX if [ "$CONFIG_INSTALL_PREFIX" = "y" ]; then --- linux_kbuild/arch/sparc64/boot/rules-2.5.cml.orig +++ linux_kbuild/arch/sparc64/boot/rules-2.5.cml @@ -7,11 +7,12 @@ . VMLINUX_SPARC64 'vmlinux' like VMLINUX_help VMLINUZ_SPARC64 'vmlinuz' like VMLINUZ_help +TFTPBOOT_SPARC64 'tftpboot.img' like TFTPBOOT_help -private VMLINUX_SPARC64 VMLINUZ_SPARC64 +private VMLINUX_SPARC64 VMLINUZ_SPARC64 TFTPBOOT_SPARC64 choices kernel_format_sparc64 # The format that the kernel is to be compiled in - VMLINUX_SPARC64 VMLINUZ_SPARC64 default VMLINUZ_SPARC64 + VMLINUX_SPARC64 VMLINUZ_SPARC64 TFTPBOOT_SPARC64 default VMLINUZ_SPARC64 # FIXME: These critical config options should be in arch/$(ARCH)/rules.cml. For # coexistence of kbuild 2.4 and 2.5 it is easier to put them here, move them