美文网首页
编译batocera.linux

编译batocera.linux

作者: Alvin00 | 来源:发表于2019-10-26 11:23 被阅读0次

编译batocera.linux的官方建议方法是在Docker下进行。尽管可以,但是可以直接在Linux机器上执行。

安装先决条件

选择Docker或直接编译。

Docker

第一步是在计算机上安装docker。每个OS和Linux发行版都有安装docker的特定方法。

请注意,大多数开发人员使用Ubuntu Linux来编译batocera.linux。 在2018年10月,Windows上的Docker不够稳定,无法编译batocera,而在2019年9月,开发人员无法在MacOS上使用Docker来运行完整的编译。 如果您使用Windows或Linux,请使用Ubuntu 18.04安装VM以编译Batocera。

Ubuntu/Debian: sudo apt install docker.io

(for reference) MacOS: see https://docs.docker.com/docker-for-mac/

(for reference) Windows: see https://store.docker.com/editions/community/docker-ce-desktop-windows

Docker启动并运行后,您必须自己构建映像。

sudo docker build -t batocera-docker https://raw.githubusercontent.com/batocera-linux/batocera.linux/master/batocera.docker/Dockerfile

直接编译

对于每个Linux发行版,安装必要软件包的方式各不相同。您可以在下面的发行版中找到必要的软件包。

Ubuntu 18.04 (might still work with 16.04 too)

sudo apt-get install build-essential git libncurses5-dev libssl-dev mercurial texinfo zip default-jre imagemagick subversion hgsubversion autoconf automake bison scons libglib2.0-dev bc mtools u-boot-tools flex wget cpio dosfstools libtool

sudo dpkg --add-architecture i386

sudo apt-get update

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

下载batocera.linux源

选择一个工作目录(您的$ HOME?)并克隆batocera.linux源代码。

git clone https://github.com/batocera-linux/batocera.linux.git

移至batocera.linux文件夹

如果您使用的是Docker,则该启动构建容器了。

sudo docker run -it --rm -v $PWD/batocera.linux:/build batocera-docker

否则,应转到新创建的目录。

cd batocera.linux

选择您要建立的目标

make batocera-rpi1_defconfig

# or

make batocera-rpi2_defconfig

# or

make batocera-rpi3_defconfig

# or

make batocera-odroidc2_defconfig

# or

make batocera-odroidxu4_defconfig

# or

make batocera-x86_defconfig

# or

make batocera-x86_64_defconfig

编译

make

刻录图像,(您也可以使用Etcher:https://etcher.io)

# sd card

sudo dd if=output/images/batocera/batocera.img of=/dev/mmcblk0 bs=40M; sync

# usb key, where X is your usb key, unmounted (and double check that it is not your hard drive)

sudo dd if=output/images/batocera/batocera.img of=/dev/sdX bs=40M; sync

提示

下载资源

您可以通过运行以下命令从Internet下载源文件,然后进行编译:

make source

就个人而言,我什至在10分钟内运行它,然后并行运行make。

遵循当前的汇编

tail -f output/build/build-time.log

还没有编译什么?

如果运行了make source,则可以通过运行轻松找到要编译的内容:

for i in output/build/*; do test -d "$i" && test -e "$i"/.stamp_built || echo "$i"; done; for i in output/build/*; do test -d "$i" && test -e "$i"/.stamp_built || echo "$i"; done | wc -l

在所有版本中共享一个下载文件夹

sudo docker run -it --rm -v $PWD:/build -v $HOME/dev/batocera/DL:/build/dl batocera-docker

列出Docker映像

sudo docker image ls

删除docker images

sudo docker rmi [image]

列出Docker容器

sudo docker ps

移除Docker容器

sudo docker kill [container name]

从Docker文件构建映像

git clone https://github.com/batocera-linux/batocera.docker.git

cd batocera.docker

sudo docker build . -t batocera-docker

ubuntu docker中的qt5base编译错误

在您的docker命令行中添加–security-opt seccomp:unconfined或更新libseccomp2软件包

相关文章

网友评论

      本文标题:编译batocera.linux

      本文链接:https://www.haomeiwen.com/subject/wwydvctx.html