Linux Kernel入门到精通系列讲解(RV-Kernel 篇) 5.3 从零移植 busybox,基于RISC-V

Linux kernel从入门到精通
专栏收录该内容
¥19.90
¥99.00
106 篇文章

1. 概述

上一章节我们已经成功启动了Ubuntu,但是由于Ubuntu占用系统空间过大,所以我转向占用较小的busybox,预计就占用30M左右。

2. 源码下载

下载地址

3.编译busybox

在上一章节中,我们就提到了kernel在启动时会去初始化rootfs,具体为下列四个脚本,如果我们不去写这四个脚本会是什么样呢?如下图,它会不断重复打印log。接下来我们就先去编译busybox。

[    1.148368
VIP 从零构建RISC-V嵌入式Linux系统:QEMU模拟与工具链实战 嵌入式Linux系统开发是理解计算机底层运行原理的关键技术领域,涉及从硬件初始化到用户空间的全栈知识。其核心在于掌握系统引导、内核编译与根文件系统构建三大环节,通过交叉编译工具链将源代码转化为目标平台可执行代码。这项技术的价值在于打破对预编译SDK的依赖,使开发者能深度定制和优化系统,尤其适用于物联网、边缘设备等资源受限场景。本文聚焦于RISC-V这一开放指令集架构,结合QEMU系统级模拟器,详细演示如何从零开始搭建完整的嵌入式Linux运行环境。通过实践,读者不仅能深入理解Linux启动流程,还能掌握在Q 开通可读全文·327 阅读·11 点赞·4 收藏 阅读全文

相关推荐

RISC-V架构学习指南:从基础指令到Linux实操

指令集架构是计算机软硬件之间的桥梁,决定了处理器的基本行为与生态形态。理解指令集的设计思想,是深入体系结构、嵌入式开发和系统软件优化的基础。随着开源指令集RISC-V的兴起,开发者可以自由地学习、修改和扩展指令集,这极大地降低了架构入门门槛。RISC-V采用模块化设计,基础指令精简,扩展灵活,配合开放的工具链和QEMU模拟器,能够快速搭建从裸机程序到Linux内核的完整实验环境。本文从设计哲学、工具链准备到模拟器实操,介绍一条从零开始的RISC-V学习路径,帮助读者建立从规范到代码再到波形的可验证认知。

weixin_33795093的博客 433

用QEMU+AGENT搭建RISC-V AI芯片虚拟实验台

芯片开发往往受限于硬件资源,仿真平台成为软件先行验证的关键。QEMU作为指令级模拟器,能够完整虚拟出可启动Linux的RISC-V 64位平台,并支持RVV向量扩展指令,为AI算子提供准确的运行环境。结合AGENT自动化工具,可高效完成交叉编译、rootfs构建、启动脚本生成与算子验证,大幅降低环境搭建门槛。这种虚拟实验台特别适合AI加速器软件栈预研、指令集学习以及芯片前端验证前的功能测试,让开发者在一台普通x86电脑上即可复现RISC-V AI计算链路。本文基于QEMU与RISC-V虚拟化实践,介绍从环境

weixin_34241036的博客 448

QEMU+RISC-V搭建虚拟AI芯片实验台:AGENT辅助软件栈验证实战

指令集模拟器是芯片流片前软硬件协同验证的关键基础设施。QEMU通过虚拟RISC-V平台和V向量扩展,模拟带AI计算特征的CPU环境,让编译器、内核、算子库与工具链在真实芯片到来前即可完成功能验证。结合Buildroot构建根文件系统,并借助AGENT生成QEMU启动参数、解析VFS挂载失败等启动日志、定位内核CONFIG_RISCV_ISA_V配置缺失问题,可以快速把一套虚拟AI芯片实验台跑通。该方案适用于AI芯片软件栈开发、算子正确性验证与CI自动化回归;在QEMU上先排净软件层bug,真实芯片到手后就能

weixin_33806914的博客 514

Linux Kernel入门到精通系列讲解(RV-Kernel 篇) 5.2 从零移植 Ubuntu,基于RISC-V

之前,我们要知道几个概念,这样有助于后续移植。2. kernel和rootfs的调用关系。已经跑起来了,接下来我们就移植。3. 移植ubuntu。4. 运行ubuntu。6. 吐槽ubuntu。

DSMGUOGUO的博客 628

Linux Kernel入门到精通系列讲解(RV-Kernel 篇) 5.4 添加GPU和Framebuffer显示设备

的基本功能全部实现了,接下来,我们会不断探索,引入一些高级驱动,哇咔咔,真厉害,本章节比较简单,我们使用之前我们的。启动了,后面我们就可以做一些图形界面输出的应用了。图像输出,后续我找到资料学完了我们继续深入。窗口,并且多了七只小企鹅,一只小企鹅代表一个。4. 添加virtio gpu启动参数。3. kernel添加GPU和DRM。我没深入了解过,所以我们仅限于使用。5.重新编译kernel 并启动。上一章节我们已经成功的移植完。,到此,我们已经把我们。,我们就用其中一组模拟。

DSMGUOGUO的博客 402

学习笔记之——Event Camera(事件相机)调研

概述 Event Camera是一种bio-inspired sensor,对应的领域为bio-inspired vision。对于传统的相机,从某种程度上,是捕获一个静态/静止的空间,而Event Camera的目的是:敏感地捕捉运动的物体。 对于传统RGB-camera,相机传回的信息是同步的,所谓同步,就是在某一时刻t,相机会进行曝光,把这一时刻所有的像素填在一个矩阵里回传,一张照片就诞生了。一张照片上所有的像素都对应着同一时刻。至于视频,不过是很多帧的图片,相邻图片间的时间间隔...

gwpscut的博客 3万+

SAP与泛微OA集成(半导体行业)

本项目通过SAP PO中间件集成SAP与泛微OA在半导体行业的应用,由于行业特殊性,广泛深入应用了RSA加密等特性

集信通 1166

CCF CSP历年题解(python)

菜鸡一枚,没参加过算法竞赛,单纯为了抵研究生考试复试才刷题,通过写博客记录下来,希望能和大家互相交流,代码质量不高,大家见谅。 因为考研等原因,题目不定期更新… 第一题 201312-1出现最多次数的数 ...

weixin_44690402的博客 5010

DeepSeek+Dify实战:零代码构建智能SQL生成器

本文详细介绍了如何利用DeepSeek和Dify零代码构建智能SQL生成器,帮助非技术人员通过自然语言查询数据库。文章涵盖从数据准备、知识库设计到Agent配置的全流程,并提供了优化技巧和实际应用案例,显著提升团队数据查询效率。

weixin_29311017的博客 422

PROSPECT-D模型演进与多光谱植被参数反演实践

本文深入探讨了PROSPECT-D模型的演进历程及其在多光谱植被参数反演中的实践应用。从PROSPECT初代到最新的PROSPECT-D版本,模型通过不断优化参数系统和光谱范围,显著提升了叶片光学特性分析的精度。文章结合田间案例,展示了该辐射传输模型在农业遥感中的实际价值,包括叶绿素含量反演、水分胁迫预警等关键应用场景。

weixin_34062469的博客 535

用AI+Playwright实现零代码UI自动化测试:以登录页面为例的实战指南

本文详细介绍了如何利用AI与Playwright结合实现零代码UI自动化测试,特别以登录页面为例进行实战演示。通过自然语言描述生成测试脚本,大幅降低技术门槛,提升测试效率,并支持跨浏览器验证。适合非技术人员快速上手专业级自动化测试。

weixin_28842269的博客 407

TC3XX - MCAL知识点(一):新建Tc3xx EB-tresos工程

基于EB-tresos建立Hightec或者Tasking工程的时候,第一个步骤就是需要新建一个EB-tresos的工程,本文记录一下如何新建一个EB-tresos工程,以及对其进行简单的操作。那么Tc3xx的MCAL包含哪些内容呢?

梦想技术家 2979

【2026OD新机考】【哈希表】20260422-文章特征提取【Py/Java/C++/C/JS/Go六种语言OD真题】【欧弟算法】全网注释最详细分类最全的华子OD真题题解

90+天陪伴式学习,100+直播课时,300+动画图解视频,500+LeetCode经典题,500+华为OD真题/大厂真题,还有简历修改、模拟面试、陪伴小群、资深HR对接将为你解锁。这道题的本质是多集合交集问题的变形,属于非常典型的哈希表应用题。,储存全局的每个片段中,各个字符最少出现的次数。表示该字母并非所有片段的公共字母。,按照顺序构建答案即可。没有字母在所有三个字符串中都出现。每个字母在各字符串中都至少出现。次,所以结果中每个字母出现一次。这样,当上述循环结束后,最终。显然在上述代码中,如果字母。

weixin_48157259的博客 68

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

深度学习工具包 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&#39;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(&#39;DeepLearnToolbox&#39;));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(&#39;state&#39;,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&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,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 = &#39;sigm&#39;;%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, &#39;Too big error&#39;);```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(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;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)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;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, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% 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&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 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, &#39;Too big error&#39;);```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(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % 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, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % 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, &#39;Too big error&#39;);%% 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(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % 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, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

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

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

上一篇: Linux Kernel入门到精通系列讲解(RV-Kernel 篇) 5.2 从零移植 Ubuntu,基于RISC-V
下一篇: Linux Kernel入门到精通系列讲解(RV-Kernel 篇) 5.4 添加GPU和Framebuffer显示设备
嵌入式内核源码
博客等级 码龄8年 2097粉丝 111原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

嵌入式内核源码

给我一点肉啊

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值
⌂ 换网址