imx6ull:bootz启动linux内核

本文详细解析了UBoot中bootz命令启动Linux内核的过程,涉及images全局变量、bootm_headers_t结构体、BOOTM_STATE_宏定义、do_bootz和bootz_start函数,以及如何通过bootm_os_get_boot_func找到Linux启动函数do_bootm_linux,最后解释了boot_jump_linux函数如何跳转到Linux内核入口点。
摘要由CSDN通过智能技术生成

images全局变量

  • 不管是 bootz 还是 bootm 命令,在启动 Linux 内核的时候都会用到一个重要的全局变量images
  • images 是 bootm_headers_t 类型的全局变量
    /*
     * Legacy and FIT format headers used by do_bootm() and do_bootm_<os>()
     * routines.
     */
    typedef struct bootm_headers {
    	/*
    	 * Legacy os image header, if it is a multi component image
    	 * then boot_get_ramdisk() and get_fdt() will attempt to get
    	 * data from second and third component accordingly.
    	 */
    	image_header_t	*legacy_hdr_os;		/* image header pointer */
    	image_header_t	legacy_hdr_os_copy;	/* header copy */
    	ulong		legacy_hdr_valid;
    
    #if defined(CONFIG_FIT)
    	const char	*fit_uname_cfg;	/* configuration node unit name */
    
    	void		*fit_hdr_os;	/* os FIT image header */
    	const char	*fit_uname_os;	/* os subimage node unit name */
    	int		fit_noffset_os;	/* os subimage node offset */
    
    	void		*fit_hdr_rd;	/* init ramdisk FIT image header */
    	const char	*fit_uname_rd;	/* init ramdisk subimage node unit name */
    	int		fit_noffset_rd;	/* init ramdisk subimage node offset */
    
    	void		*fit_hdr_fdt;	/* FDT blob FIT image header */
    	const char	*fit_uname_fdt;	/* FDT blob subimage node unit name */
    	int		fit_noffset_fdt;/* FDT blob subimage node offset */
    
    	void		*fit_hdr_setup;	/* x86 setup FIT image header */
    	const char	*fit_uname_setup; /* x86 setup subimage node name */
    	int		fit_noffset_setup;/* x86 setup subimage node offset */
    #endif
    
    #ifndef USE_HOSTCC
    	image_info_t	os;		/* os image info */
    	ulong		ep;		/* entry point of OS */
    
    	ulong		rd_start, rd_end;/* ramdisk start/end */
    
    	char		*ft_addr;	/* flat dev tree address */
    	ulong		ft_len;		/* length of flat device tree 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值