In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
How the beaglebone AI environment is built and run, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
Beaglebone AI environment building and running 1. Preface
This paper mainly introduces the development process and startup mode of beaglebone. At the same time, set up a set of embedded Linux development environment. In order to better grasp and understand the use of beaglebone AI. If you want to do a good job, you must first sharpen its tools and build a complete development environment, so that the follow-up work can be better carried out. If you want to make good use of a chip, you also need to have a good understanding of its startup mode. Let's show the actual operation flow.
Features of 2.beaglebone AI development board
First of all, I choose beaglebone AI as the development board of embedded Linux learning because of its good chip datasheet support and the large-scale use of TI chip, which makes it more versatile and scalable. There are many projects in which the board has high appearance, strong performance, good playability and DIY. All these give me the motivation to push this board forward, and in the process of digging and filling holes, I will regard it as another major amateur development and learning project besides raspberry pie 4. At home, this board is not very popular, but abroad, there are still a lot of people to play, I also hope that more people to play together, so as to learn better design, write more and better articles to share with you.
Build 3.1 hardware connections in 3.beaglebone AI development environment
The current development environment is built on ubuntu, which first connects the debug serial port of the development board.
The illustration on the front is as follows:
The output is used as a debug serial port.
3.2 arm cross-compilation tool chain
First of all, make sure that the default PC is 64-bit and is not suitable for 32-bit machines.
Wget-c https://releases.linaro.org/components/toolchain/binaries/6.5-2018.12/arm-linux-gnueabihf/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf.tar.xz
Tar xf gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf.tar.xz
Export CC= `pwd` / gcc-linaro-6.5.0-2018.12 Murx86x64arm Mutual LinuxMugnueabihf Bin Bing Lexi LinuxMi gnueabihf
Where pwd is the default path.
Then check the version of gcc
${CC} gcc-- version
You can see the following results
3.3.Compiling uboot
Then you can start compiling uboot.
Git clone-b v2019.07-rc4 https://github.com/u-boot/u-boot-- depth=1
Cd u-boot/
Then generate a patch file for uboot
Wget-c https://github.com/eewiki/u-boot-patches/raw/master/v2019.07-rc4/0001-am57xx_evm-fixes.patch
Patch-p1
< 0001-am57xx_evm-fixes.patch 接着开始编译 make ARCH=arm CROSS_COMPILE=${CC} distclean make ARCH=arm CROSS_COMPILE=${CC} am57xx_evm_defconfig make ARCH=arm CROSS_COMPILE=${CC} 编译完成就可以进行下面的操作了。 4.beaglebone AI启动方式 学习一款嵌入式开发板的使用,首先就要理解其启动模式。 按照https://github.com/beagleboard/beaglebone-ai/BeagleBone-AI_sch.pdf上标注,可以知道,在启动上,首先会从USB中寻找程序,然后第二启动项是SD卡,接着是eMMC。 本文主要介绍SD卡与eMMC的启动模式。并且将uboot烧录到SD卡中进行启动。 首先准备一张小于等于16GB的SD卡(实测32GB的卡插入没用),接着插入Ubuntu系统中。 输入lsblk。 bigmagic@bigmagic:~/work$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop1 7:1 0 55.3M 1 loop /snap/core18/1885 loop2 7:2 0 162.9M 1 loop /snap/gnome-3-28-1804/145 loop3 7:3 0 217.9M 1 loop /snap/gnome-3-34-1804/60 loop4 7:4 0 255.6M 1 loop /snap/gnome-3-34-1804/36 loop5 7:5 0 62.1M 1 loop /snap/gtk-common-themes/1506 loop6 7:6 0 43.2M 1 loop /snap/snap-store/415 loop7 7:7 0 50.7M 1 loop /snap/snap-store/481 loop8 7:8 0 31M 1 loop /snap/snapd/9607 loop9 7:9 0 31M 1 loop /snap/snapd/9721 loop10 7:10 0 55.4M 1 loop /snap/core18/1932 sda 8:0 0 931.5G 0 disk ├─sda1 8:1 0 465.9G 0 part / └─sda2 8:2 0 465.7G 0 part sdb 8:16 0 223.6G 0 disk ├─sdb1 8:17 0 200M 0 part /boot/efi ├─sdb2 8:18 0 99.4G 0 part ├─sdb3 8:19 0 589M 0 part ├─sdb4 8:20 0 115.4G 0 part └─sdb5 8:21 0 8G 0 part sdc 8:32 1 15G 0 disk └─sdc1 8:33 1 15G 0 part 可以看的标识是sdc,则我们可以通过下面的命令导出到全局变量。 export DISK=/dev/sdc 输入下面三条指令则可以将uboot烧录到卡里了。 sudo dd if=/dev/zero of=${DISK} bs=1M count=10 sudo dd if=./u-boot/MLO of=${DISK} count=2 seek=1 bs=128k sudo dd if=./u-boot/u-boot.img of=${DISK} count=4 seek=1 bs=384k 完成后输入sync后,可以看到uboot已经正常启动了。 从上面的过程不难分析,一般的TI芯片都会将启动分为三部分 ROM->MLO (SPL)-> uboot.img
Linux compilation of 5.beaglebone AI 5.1 compilation of kernelgit clone https://github.com/RobertCNelson/ti-linux-kernel-dev.git
Cd ti-linux-kernel-dev/
If you compile a normal kernel,
Git checkout origin/ti-linux-4.14.y-b tmp
Compile real-time kernel
Git checkout origin/ti-linux-rt-4.14.y-b tmp
The real-time kernel is RT_LINUX. Enter the following command to start the compilation.
. / build_kernel.sh
There will be a menuconfig interface to configure along the way.
Just select Exit and the program will continue to compile. Until the compilation is complete.
5.2 Select the root file system
You can choose Debian 10 or Ubuntu 20.04 LTS with the file system
Debian 10
Download first
Wget-c https://rcn-ee.com/rootfs/eewiki/minfs/debian-10.4-minimal-armhf-2020-05-10.tar.xz
You can check it.
Sha256sum debian-10.4-minimal-armhf-2020-05-10.tar.xz
The results can be obtained as follows
Then decompress.
Tar xf debian-10.4-minimal-armhf-2020-05-10.tar.xz
After decompressing it, you can enter the directory to see the following files
Where the user name and password are stored in the user_password.list.
Debian:temppwd
Ubuntu 20.04 LTS
Can be downloaded
Wget-c https://rcn-ee.com/rootfs/eewiki/minfs/ubuntu-20.04-minimal-armhf-2020-05-10.tar.xz
Check it.
Sha256sum ubuntu-20.04-minimal-armhf-2020-05-10.tar.xz
The results of the verification are as follows:
De0177ac9259fdbcc626ee239f4258b64070c0921dbc38c45fab6925a5becaa1 ubuntu-20.04-minimal-armhf-2020-05-10.tar.xz
Just decompress it.
Tar xf ubuntu-20.04-minimal-armhf-2020-05-10.tar.xz
On ubuntu, you can enter the user name Ubuntu and password temppwd.
6. Burn the image of Linux
Next, burn the image of Linux to the SD card.
6.1 format SD card
First of all, in the same way as burning uboot, if the number of the SD card is detected as sdc.
Export DISK=/dev/sdc
If it is mmcblk0, change it to that name.
Enter the following command to view the version of sfdisk.
Sudo sfdisk-version
See output
Sfdisk, from util-linux 2.34
If sfdisk > = 2.26.x is detected, enter:
Sudo sfdisk ${DISK}
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.