Hello,

Tim Sander wrote:
> Feeling a little "spammy" today: Here's another patch for ptxdist which 
> adds support for "simpleImages" as a possible build target.

Please try to use "git send-email" or push your patches on a public
repo. Somehow your patches has gathered trailing whitespace.

> It works for me (tm)!
> I'm using it for the Xilinx XUP board together with the previously posted 
> toolchain
> description. 
> 
> The config options where partially taken from:
> http://www.aclevername.com/articles/linux-xilinx-tutorial/building-linux.html

Please add a "Signed-off-by:" line to your patch.

> Best regards
> Tim
> 
> diff --git a/platforms/kernel.in b/platforms/kernel.in                  
> index 5e20a67..46b1071 100644                                           
> --- a/platforms/kernel.in                                               
> +++ b/platforms/kernel.in                                               
> @@ -140,6 +140,11 @@ choice                                             
>                 help                                                    
>                  This is the target to get the kernel image as an raw 
> uncompressed
>                  binary file.                                                 
>     
> +       config KERNEL_IMAGE_SIMPLE                                            
>     
> +               bool                                                          
>     
> +               prompt "simpleImage"                                          
>     
> +               help                                                          
>     
> +                 Create a simple Image with embedded DTB                     
>     


>  endchoice                                                                    
>     
>                                                                               
>     
>  config KERNEL_IMAGE                                                          
>     
> @@ -163,6 +168,21 @@ config KERNEL_XZ                                         
>     
>           Select this if you're unsure, as it won't hurt. It just             
>     
>           increases the build time.                                           
>     
>                                                                               
>     
> +config KERNEL_IMAGE_SIMPLE_TARGET                                            
>     
> +       depends on KERNEL                                                     
>     
> +       depends on KERNEL_IMAGE_SIMPLE                                        
>     
> +       prompt "name of simple image"                                         
>     
> +       string                                                                
>     
> +       default "xilinx-xup"                                                  
>     
> +       help                                                                  
>     
> +         Name of created simple kernel image e.g. simpleImage.xilinx-xup     
>     

You missed the ".elf" in your description:

> simpleImage.$(PTXCONF_KERNEL_IMAGE_SIMPLE_TARGET).elf

And the description isn't clear. You should state it's the "xilinx-xup"
part of the "simpleImage.xilinx-xup.elf"

> +                                                                             
>     
> +config KERNEL_IMAGE_SIMPLE_DTS                                               
>     
> +       depends on KERNEL                                                     
>     
> +       depends on KERNEL_IMAGE_SIMPLE                                        
>     
> +       prompt "path to DTS file"                                             
>     
> +       string                                                                
>     
> +       default 
> "${PTXDIST_WORKSPACE}/../xps_linux/ppc405_0/libsrc/device-tree_v0_00_x/xilinx.dts"

A path leaving the workspace as default is probably not a good idea. Is
this DTS file usually very platform specific, then it go into
$(PTXDIST_PLATFORMCONFIGDIR).

>                                                                               
>                     
>  menu "patching & configuration      "                                        
>                     
>                                                                               
>                     
> @@ -187,6 +207,21 @@ config KERNEL_CONFIG                                     
>                     
>  endmenu                                                                      
>                     
>                                                                               
>                     
>                                                                               
>                     
> +#                                                                            
>                     
> +# autogenerated                                                              
>                     
> +#                                                                            
>                     
> +                                                                             
>                     
> +config KERNEL_IMAGE                                                          
>                     
> +       depends on KERNEL                                                     
>                     
> +       string                                                                
>                     
> +       default "bzImage" if KERNEL_IMAGE_BZ                                  
>                     
> +       default "zImage"  if KERNEL_IMAGE_Z                                   
>                     
> +       default "uImage"  if KERNEL_IMAGE_U                                   
>                     
> +       default "vmImage" if KERNEL_IMAGE_VM                                  
>                     
> +       default "vmlinux" if KERNEL_IMAGE_VMLINUX                             
>                     
> +       default "Image"   if KERNEL_IMAGE_RAW                                 
>                     
> +       default "simpleImage" if KERNEL_IMAGE_SIMPLE                          
>                     

why have you added the whole block? I think we already have it.

> +                                                                             
>                     
>  comment "Development features"                                               
>                     
>                                                                               
>                     
>  config KERNEL_EXTRA_MAKEVARS                                                 
>                     
> diff --git a/rules/kernel.make b/rules/kernel.make                            
>                     
> index 6c1be8a..cf9491f 100644                                                 
>                     
> --- a/rules/kernel.make                                                       
>                     
> +++ b/rules/kernel.make                                                       
>                     
> @@ -54,6 +54,7 @@ KERNEL_IMAGE_PATH-$(PTXCONF_KERNEL_IMAGE_VM)  += 
> $(KERNEL_DIR)/arch/$(PTXCONF_KER
>  KERNEL_IMAGE_PATH-$(PTXCONF_KERNEL_IMAGE_Z)    += 
> $(KERNEL_DIR)/arch/$(PTXCONF_KERNEL_ARCH_STRING)/boot/zImage
>  KERNEL_IMAGE_PATH-$(PTXCONF_KERNEL_IMAGE_VMLINUX) += $(KERNEL_DIR)/vmlinux   
>                                  
>  KERNEL_IMAGE_PATH-$(PTXCONF_KERNEL_IMAGE_RAW)  += 
> $(KERNEL_DIR)/arch/$(PTXCONF_KERNEL_ARCH_STRING)/boot/Image 
> +KERNEL_IMAGE_PATH-$(PTXCONF_KERNEL_IMAGE_SIMPLE) += 
> $(KERNEL_DIR)/arch/$(PTXCONF_KERNEL_ARCH_STRING)/boot/simpleImage.$(PTXCONF_KERNEL_IMAGE_SIMPLE_TARGET).elf
>                                                                               
>                                           

you probably need a "$(call remove_quotes, )" around
$(PTXCONF_KERNEL_IMAGE_SIMPLE_TARGET)

maybe you should........

>                                                                               
>                                                               
>  # 
> ----------------------------------------------------------------------------  
>                                                            
>  # Get                                                                        
>                                                               
> @@ -83,8 +84,11 @@ ifdef PTXCONF_KERNEL_MODULES_INSTALL                       
>                                                               
>  KERNEL_MAKEVARS += \                                                         
>                                                               
>         DEPMOD=$(PTXCONF_SYSROOT_CROSS)/sbin/$(PTXCONF_GNU_TARGET)-depmod     
>                                                               
>  endif                                                                        
>                                                               
> -                                                                             
>                                                               
> -KERNEL_IMAGE   := $(PTXCONF_KERNEL_IMAGE)                                    
>                                                               
> +ifndef PTXCONF_KERNEL_IMAGE_SIMPLE                                           
>                                                               
> +       KERNEL_IMAGE    := $(PTXCONF_KERNEL_IMAGE)                            
>                                                               
> +else                                                                         
>                                                               
> +       KERNEL_IMAGE    := simpleImage.$(PTXCONF_KERNEL_IMAGE_SIMPLE_TARGET)  
>                                                               
> +endif                

.... first construct this name and use it in KERNEL_IMAGE_PATH, too


>                                                                               
>                                                               
>  ifndef PTXCONF_PROJECT_USE_PRODUCTION                                        
>                                                               
>                                                                               
>                                                               
> @@ -103,7 +107,11 @@ $(STATEDIR)/kernel.prepare: $(KERNEL_CONFIG)             
>                                                               
>         @$(call targetinfo)                                                   
>                                                               
> 
>         @echo "Using kernel config file: $(<)"
> -       @install -m 644 "$(<)" "$(KERNEL_DIR)/.config"
> +       #...@install -m 644 "$(<)" "$(KERNEL_DIR)/.config"
> +       @install -m 644 $(KERNEL_CONFIG) $(KERNEL_DIR)/.config

why did you change this?

> +ifdef PTXCONF_KERNEL_IMAGE_SIMPLE
> +       cp $(PTXCONF_KERNEL_IMAGE_SIMPLE_DTS) 
> $(KERNEL_DIR)/arch/$(PTXCONF_KERNEL_ARCH_STRING)/boot/dts/$(PTXCONF_KERNEL_IMAGE_SIMPLE_TARGET).dts
> +endif
> 
>  ifdef PTXCONF_KLIBC
>  # tell the kernel where our spec file for initramfs is
> 
> --
> ptxdist mailing list
> [email protected]

marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature

--
ptxdist mailing list
[email protected]

Reply via email to