debian for arm 搭建 + ghostscript-9.26编译

网上ghostscript大多是9.04的编译过程,发现在9.26以后就行不通了  之前的版本未测试

交叉应该是可以的,不过我没弄出来,就只好在debian for arm上编译了

环境Ubuntu16.04

1. 环境安装

sudo apt-get install binfmt-support qemu qemu-user-static debootstrap

2.下载文件

sudo debootstrap --arch=armhf --foreign stretch stretch http://mirrors.ustc.edu.cn/debian/ 

3.arm环境模拟

sudo cp /usr/bin/qemu-arm-static ./usr/bin

sudo cp /etc/resolv.conf ./etc/resolv.conf

4.文件释放

sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot ./ debootstrap/debootstrap --second-stage

5.编辑源文件

vim etc/apt/sources.list

  deb http://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free
 deb-src http://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free

6.切入debian模拟环境

sudo chroot .

7.串口控制台支持

ln -s /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@ttymxc0.service//这个没有启动完串口控制台就没了

删除/etc/systemd/system/getty.target.wants/getty@tty1.service//有这个在会在LCD上出现登录界面

8.编译环境基本配置

passwd root

adduser tanic

apt-update

apt install net-tools  //ifconfig

apt-get install gcc g++ automake autoconf libtool make bison  flex pkg-config

 

行了,现在就可以把源码复制到模拟环境中编译了

把可以交叉编译的库编译好了放到模拟环境中,不能交叉编译的源码放到模拟环境编译就行啦

 

编译结果https://download.youkuaiyun.com/download/suxingtian/12919243 包含armel和armhf两个版本 亲测可用

测试指令如下

./gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE -sPAPERSIZE=a4 -r300x300 -sDEVICE=pbmraw -sOutputFile=tt.pbm tt.pdf

或者gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE -sPAPERSIZE=a4 -r300x300 -sDEVICE=ps2write -sOutputFile=tt.pbm tt.pdf 等等

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值