mkimage

[Linux外设驱动详解]U-Boot mkimage 工具分析 U-Boot mkimage工具分析摘要 mkimage是U-Boot提供的镜像打包工具,主要作用是为裸机二进制文件添加标准化的头部信息。该工具支持Legacy和FIT两种格式,其中Legacy格式采用64字节固定头部结构,包含镜像魔数、CRC校验、加载地址、入口点等关键信息。在RK3588平台上,mkimage还实现了Rockchip V2格式的特殊启动头,适配芯片特定的启动流程。通过添加这些头部信息,mkimage确保了镜像能被Boot ROM正确识别和加载,同时提供完整性校验和多镜像支持能力。 阅读详情

 ext2.gz 必須再包裝成 U-Boot 的格式,才能透過 U-Boot 載入到 RAM,以成為 kernel 的 initial ramdisk(initrd):

# mkimage -A arm -O linux -T ramdisk -C none -a 0x30800000 -e 0x30800000 -n ramdisk -d ext2fs.gz urootfs.img

mkimage的參數使用說明可以由mkimage (不接任何參數)得到

# mkimage
-A ==> set architecture to 'arch'
-O ==> set operating system to 'os'
-T ==> set image type to 'type'
-C ==> set compression type 'comp'
-a ==> set load address to 'addr' (hex)
-e ==> set entry point to 'ep' (hex)
-n ==> set image name to 'name'
-d ==> use image data from 'datafile'
-x ==> set XIP (execute in place)

其中特別要注意的是當製作kernel映像檔時,使用-T kernel -a 0x30008000 -e 0x30008000;製作rootfs映像檔時,使用-T ramdisk -a 0x30800000 -e 0x30800000。

執行mkimage後可得到 urootfs.img 檔案,在測試階段為了方便起見,我們可以直接將 urootfs.img 載到 RAM 做測試;U- Boot 指令如下:

jollen.org # tftpboot 32000000 urootfs.img; tftpboot 30F00000 uimage.img; bootm 30F00000  32000000 

urootfs.img 是我們製作的 root filesystem,uimage-*.img 則是給 Jollen-Kit! 使用的 Linux kernel(pre-built)。

#systemverilog# 之 event region 和 timeslot 仿真调度(三)Verdi 辅助查看 通过今天的学习,我们知道:event region 是event sequence 的全集。我们打开了 event region feature 也就开启了event sequence 的功能。 阅读详情

相关推荐

C#利用S7netplus实现西门子S7_200_SMART PLC高效点位监控与操作

本文详细介绍了如何使用C#结合S7netplus开源库高效监控与操作西门子S7-200 SMART PLC的点位。内容涵盖从开发环境搭建、建立通信连接,到核心的点位读写、批量数据处理及字节与位数组转换等关键技术,并提供了构建稳定监控程序的架构与避坑指南,帮助开发者快速实现上位机与PLC的稳定数据交互。

rum55的博客 315

zynq rootfs制作ramdisk及启动失败问题

1.使用rootfs压缩包制作ramdisk (1) 建立空文件 dd if=/dev/zero of=./ramdisk.Image bs=10M count=10 (2) 将普通文件与设备节点绑定 losetup /dev/loop0 ./ramdisk.image (3) 格式化/dev/loop0 mkfs.extt2 /dev/loop0 (4) 挂在/dev/loop0设...

flyzhao的专栏 4322

ESP32、MicroPython、天问ASR-PRO,串口发送数据并播报

天问ASRPRO语音芯片内置脑神经网络处理器,支持DNN、TDNN、RNN等神经网络及卷积运算硬件运算,非软件运算,支持语音识别、声纹识别、语音增强、语音检测、单麦克风降噪增强、单麦克风回声消除、360度全方位拾音等功能。ASR-PRO可以图形化编程,降低开发难度,对小白友好。之前使用ASRPRO与ESP32进行过语音控制,这次由于一个项目需要对ESP处理过后的数据进行播报,就想到利用该模块。以下程序主要为测试代码,并非实际项目,仅供参考学习(若有错误,欢迎指正)。二者通过串口通信,波特率为9600。

weak_student的博客 5947

mkimage 使用

mkimage 使用和使用示例

yytyu2017的博客 873

CNN经典论文(一)LeNet

Gradient-Based Learning Applied to Document Recognition(梯度学习在文档识别中的应用) Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner 发表时间:December 1998 期刊:Proceedings of the IEEE 影响:世界上第一个卷积神经网络 论文地址:Gradient-Based Learning Applied to Document Recognition

loveling丶的博客 3597

ROS2+PYTHON VENV虚拟环境配置方法

ROS2+PYTHON VENV配置方法本篇针对的是python。

下雨夏云的博客 555

mkimage使用与解包

在最初学习阶段,我们经常使用mkimage来制作uImage和ramdisk,实质是在被处理的文件前面加上64字节的头部。在到后来,我们可以将多个内核+多个设备树文件+ramdisk打包成一个 linux.itb 文件,用于一个镜像文件支持多平台启动,同样是使用 mkimage 工具来制作,不难猜测,它也是将这多个文件按照一定的方式进行组合,然后再在文件的开头加上64字节的头部。 有时候难免悲剧发生,发现自己ramdisk.img的源码找不到了,又懒重新制作,但是又需要对镜像进行修改,无奈之下我们需要解包

boyemachao的专栏 1525

Android/Linux驱动开发:使用dev_dbg进行设备驱动调试

在本文中,我们将介绍如何使用dev_dbg宏和相关的函数来进行设备驱动调试。函数在该目录下创建了一个名为"debug"的debugfs文件。在这些函数中,您可以执行与您的设备驱动相关的调试操作。函数在该目录下创建了一个名为"debug"的debugfs文件。在这些函数中,您可以执行与您的设备驱动相关的调试操作。的结构体指针,其中包含了我们定义的文件操作函数。的结构体指针,其中包含了我们定义的文件操作函数。在上面的示例中,我们首先通过调用。在上面的示例中,我们定义了。在上面的示例中,我们定义了。

ByteKnight的博客 372

U-boot mkimage指定Linux内核地址时的两种方式

uImage的制作是使用的u-boot工具mkimage,build完u-boot后也会将mkimage build出來到/tools目录下,可以直接拿來用,它的作用就是在zImage的前面加上64个字节的头,让u-boot能够识别要加载内核的类型、加载地址等。 基本格式:mk

EmbededSwordman的专栏 3425

YOLOv11改进 | 缝合CCFM轻量检测模型实现高精度跨尺度特征融合【附参考代码】

YOLOv11作为一代优秀的端到端目标检测模型,已经在速度和精度之间取得了较好的平衡。但其默认的Neck结构(通常为FPN + PAN)在处理小目标与多尺度信息时,仍存在信息流冗余、跨尺度特征融合不充分等问题。 本文提出一种轻量化的跨尺度跨通道融合模块(CCFM, Cross-scale and Cross-channel Fusion Module),以替代或增强YOLOv11中的Neck部分,有效提升特征表达能力和检测性能,尤其是在小目标和复杂场景下取得显著涨点。

一键难忘的博客 1412

WQ7033开发指南(应用篇)之2.1 主函数详解(1)

整个系列文章查看: ​​​​​​WQ7033开发指南汇总 目录 1.函数模块位置 2.函数main_chip_init()解析 2.1 cal_data_ana_load() 2.2 函数iot_cache_restore_register()解析 3.函数iot_soc_chip_init()解析 3.1 soc芯片初始化的低功耗使能 3.2 分支预设功能使能 3.3 数据异常中止使能 3.4 外围低速总线访问路径使能 3.5 1.8V DCDC功能配置 3.6 ADC配..

心跳包的博客 802

Xilinx FPGA 嵌入式系统程序引导和启动的流程分析设计

Xilinx FPGA 嵌入式系统程序引导和启动的流程 北京华环电子        任晓亮                             2016年1月15日 参考材料:http://www.360doc.com/content/13/1113/20/8744436_328989607.shtml http://www.wiki.xilinx.com/Build+Device+T

ren1335654481的博客 5570

自动驾驶大模型---小米&华科的ORION端到端方案

本文介绍了小米汽车与华中科技大学联合开发的ORION自动驾驶端到端方案。该框架创新性地将视觉语言模型(VLM)与自动驾驶系统结合,包含QT-Former特征提取模块、大语言模型(LLM)推理模块和生成式规划器三大核心组件。通过视觉感知与语言理解的深度融合,ORION能更准确地理解人类指令并生成合理轨迹,同时提升系统的可解释性。实验证明,该方案在准确性、泛化能力和决策透明度方面均有显著优势。ORION框架为自动驾驶技术提供了新思路,有望推动行业向更安全、智能的方向发展。

智能汽车人的博客 2005

mkimage使用详解

uboot源代码的tools 目录下有mkimage工具,这个工具可以用来制作不压缩或者压缩的多种可启动镜像文件。 mkimage在制作镜像文件的时候,是在原来的可执行镜像文件的前面加上一个0x40字节的头,记录参数所指定的信息,这样uboot才能识别这个镜像文件的CPU体系结构的、操作系统、加载内存的位置, 入口地址等。 使用mkimage命令前,最好将mkimage 命令复制到 /usr/

我的博客 9471

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

mkimage用法

通常,u-boot为kernel提供一些kernel无法知道的信息,比如ramdisk在RAM中的地址。Kernel也必须为U-boot提供必要的信息,如通过mkimage这个工具(在u-boot代码的tools目录中)可以给zImage添加一个header,也就是使得通常编译的内核zImage添加一个数据头,把添加头后的image通常叫uImage,uImage是可以被U-boot直接引导的内核镜像。那么如何使用mkimage工具而产生uImage的呢?下面将具体介绍mkimage工具的使用:1.首先查看

babyfans的专栏 2224

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

如何安装mkimage工具

beyond@ubuntu:~/dev/arch/arm/boot$ sudo apt-cache search mkimage jigit - tools for working with jigdo files uboot-mkimage - generate kernel image for U-Boot beyond@ubuntu:~/dev/arch/arm/boot$ sudo

dadahacker的笔记 8582

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

mkimage详解

mkimage详解

hahaha133456的博客 2606

mkimage 命令找不到

mkimage 工具不是ubuntu自带的, 是u-boot中编译出来的: 如果使用make uImage 则能生成由uboot 引导的内核文件, 需要用到 uboot/tools/mkimage,可以在/etc/bashrc 文件末加入一下语句: export PATH:=$PATH:/usr/src/arm/u-boot-1.1.5/tools 这样就能直接引用mkimage

zzobin的专栏 1万+

mkimage工具安装

转自:http://blog.youkuaiyun.com/dadahacker/article/details/7108068 beyond@ubuntu:~/dev/arch/arm/boot$ sudo apt-cache search mkimage jigit - tools for working with jigdo files uboot-mkimage - generate kerne

mbgalex356的专栏 821

mkimage那些事

在编译linux内核时,往往会涉及到以下3个命令: • make Image • make zImage • make uImage 那么,这3个命令分别是做什么的?所生成的对象又有什么区别呢? Image为普通的内核映像文件,而zImage为压缩过的内核映像文件(其中的z字母就是压缩的意思)。一般情况下,编译出来的Image大约为4M,而zImage不到2M。uImage它是uboot专用的映像...

Huskar_Liu的博客 1374

mkimage工具讲解

mkimage使用详解 uboot源代码的tools/目录下有mkimage工具,这个工具可以用来制作不压缩或者压缩的多种可启动映象文件。 mkimage在制作映象文件的时候,是在原来的可执行映象文件的前面加上一个0x40字节的头,记录参数所指定的信息,这样uboot才能识别这个映象是针对哪个CPU体系结构的,哪个OS的,哪种类型,加载内存中的哪个位置, 入口点在内存的那个位置以及映象名是

win9 2514

u-boot中mkimage工具的具体使用

通常,u-boot为kernel提供一些kernel无法知道的信息,比如ramdisk在RAM中的地址。Kernel也必须为U-boot提供必要的信息,如通过mkimage这个工具(在u-boot代码的tools目录中)可以给zImage添加一个header,也就是使得通常编译的内核zImage添加一个数据头,把添加头后的image通常叫uImage,uImage是可以被U-boot直接引导的内核

李亚锋老师 1万+

mkimage的原理和使用

mkimage是U-Boot提供的核心工具,用于为内核镜像、ramdisk等二进制文件添加64字节头部信息,使U-Boot能识别并正确加载。该头部包含魔数、时间戳、加载地址、入口点等关键信息。使用时需通过编译U-Boot源码获取工具,基本命令包括指定架构、操作系统、镜像类型等参数。常见应用包括制作可引导的uImage内核镜像、uInitrd以及处理设备树文件。现代U-Boot推荐使用更高级的FIT Image格式。注意加载地址需根据具体硬件设置,错误地址会导致启动失败。该工具是嵌入式Linux开发的关键组件

weixin_44932366的博客 1504
上一篇: 製作 Root Filesystem 映像檔(Image File)
下一篇: Build Android SDK
jackie_gnu
博客等级 码龄16年 3粉丝 114原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值