为S3C6410,S5PC110等ARM平台快速构建一个Meego环境

简介:

Meego项目亦然停止,但是好的嵌入式Linux发行版舍Meego和Ubuntu以外,实难寻觅,所以我们很可能还存在Meego的移植需求, 过程非常简单。依照http://wiki.meego.com/Image_Creation安装MIC2,准备如下的kickstarter文件 (graphics使用软解码)

# -*-mic2-options-*- -f raw --save-kernel --arch=armv7hl -*-mic2-options-*-

# 
# Do not Edit! Generated by:
# kickstarter.py
# 

lang en_US.UTF-8
keyboard us
timezone --utc America/Los_Angeles
part / --size=1750  --ondisk mmcblk0p --fstype=ext3

# This is not used currently. It is here because the /boot partition
# needs to be the partition number 3 for the u-boot usage.
part swap --size=8 --ondisk mmcblk0p --fstype=swap

# This partition is made so that u-boot can find the kernel
part /boot --size=32 --ondisk mmcblk0p --fstype=vfat

rootpw meego 
xconfig --startxonboot
# desktop --autologinuser=meego  --defaultdesktop=DUI --session="/usr/bin/mcompositor"
#
# mcompositor depends on EGL, so we move to twm windowmanager for the moment for primaII
desktop --autologinuser=meego  --defaultdesktop=DUI --session="/usr/bin/twm"
user --name meego  --groups audio,video --password meego 

repo --name=1.2.0.90-oss --baseurl=http://repo.meego.com/MeeGo/builds/1.2.0.90/@BUILD_ID@/repos/oss/armv7hl/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego
repo --name=1.2.0.90-non-oss --baseurl=http://repo.meego.com/MeeGo/builds/1.2.0.90/@BUILD_ID@/repos/non-oss/armv7hl/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego

%packages

@MeeGo Compliance
@MeeGo Core
@X for Handsets
@MeeGo Handset Desktop
@MeeGo Handset Applications
@MeeGo Base Development
@Minimal MeeGo X Window System
@Chinese Support

# for bringup, we are now using fbdev and software mesa
mesa-dri-swrast-driver
xorg-x11-drv-fbdev

xorg-x11-utils-xev
%end

%post
# save a little bit of space at least...
rm -f /boot/initrd*

rm -f /var/lib/rpm/__db*
rpm --rebuilddb

# Remove cursor from showing during startup BMC#14991
echo "xopts=-nocursor" >> /etc/sysconfig/uxlaunch

# open serial line console for embedded system
# our board uses ttyS1
#
# echo "s0:235:respawn:/sbin/agetty -L 115200 ttyO2 vt100" >> /etc/inittab
echo "s0:235:respawn:/sbin/agetty -L 115200 ttyS1 vt100" >> /etc/inittab

# Set up proper target for libmeegotouch
Config_Src=`gconftool-2 --get-default-source`
gconftool-2 --direct --config-source $Config_Src \
  -s -t string /meegotouch/target/name N900

# Normal bootchart is only 30 long so we use this to get longer bootchart during startup when needed.
cat > /sbin/bootchartd-long << EOF
#!/bin/sh
exec /sbin/bootchartd -n 4000
EOF
chmod +x /sbin/bootchartd-long

# Use eMMC swap partition as MeeGo swap as well.
# Because of the 2nd partition is swap for the partition numbering
# we can just change the current fstab entry to match the eMMC partition.
sed -i 's/mmcblk0p2/mmcblk1p3/g' /etc/fstab

# Without this line the rpm don't get the architecture right.
echo -n 'armv7hl-meego-linux' > /etc/rpm/platform
 
# Also libzypp has problems in autodetecting the architecture so we force tha as well.
# https://bugs.meego.com/show_bug.cgi?id=11484
echo 'arch = armv7hl' >> /etc/zypp/zypp.conf


%end

%post --nochroot
if [ -n "$IMG_NAME" ]; then
    echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release
fi


%end

运行如下脚本可以得到Meego的image,之后解压缩,以loop方式mount并拷贝到SD卡的文件系统分区即可。

#!/bin/bash
if [ `whoami` != root ]; then
    echo "This script must be run as root, e.g.:"
    echo "sudo $0"
    exit -1
fi

# create meego image from kickstart. this will contain everything but the kernel
mic-image-creator  --cache=../mycachedir --format=loop --arch=armv7hl --pkgmgr=yum --config=handset-armv7hl-prima2.ks --release=1.2.0.90.12.20110809.2

这一过程也可以自动化进行:

CURDIR=`pwd`
OUTDIR=${CURDIR}/1.2.0.90.12.20110809.2/images/meego-handset-armv7hl-xxx/
cd ${OUTDIR}
bunzip2 meego-handset-armv7hl-xxx-1.2.0.90.12.20110809.2.img.bz2
mkdir img
mount -o loop meego-handset-armv7hl-prima2-1.2.0.90.12.20110809.2.img img
if [ -d $1 ]; then
	echo "copy meego rootfs to $1"
	cp -fa img/* $1
	umount img
	rm -fr img
fi

启动Meego桌面的脚本如下:

 

/usr/bin/meegotouchhome -fullscreen -show-cursor -software &







本文转自 21cnbao 51CTO博客,原文链接:http://blog.51cto.com/21cnbao/898840,如需转载请自行联系原作者




相关实践学习
对象存储OSS快速上手——如何使用ossbrowser
本实验是对象存储OSS入门级实验。通过本实验,用户可学会如何用对象OSS的插件,进行简单的数据存、查、删等操作。
相关文章
|
数据采集 监控 安全
精简高效与安全兼备:ARM32与MCU32平台上的信息协议设计新思路
精简高效与安全兼备:ARM32与MCU32平台上的信息协议设计新思路
393 1
|
监控 网络协议 安全
验证嵌入式ARM32环境中4G模块的有效方法
验证嵌入式ARM32环境中4G模块的有效方法
323 0
|
Docker 容器
x86 平台利用 qemu-user-static 实现 arm64 平台 docker 镜像的运行和构建
x86 平台利用 qemu-user-static 实现 arm64 平台 docker 镜像的运行和构建
3140 1
|
存储 网络协议 安全
【Azure 环境】ARM部署模板大于4MB的解决方案及Linked Template遇见存储账号防火墙无法访问
【Azure 环境】ARM部署模板大于4MB的解决方案及Linked Template遇见存储账号防火墙无法访问
193 0
|
机器学习/深度学习 边缘计算 PyTorch
PyTorch团队为TorchAO引入1-8比特量化,提升ARM平台性能
PyTorch团队推出创新技术,在其低精度计算库TorchAO中引入低位运算符支持,实现1至8位精度的嵌入层权重量化及8位动态量化激活的线性运算符。该技术通过模块化设计和高效硬件利用,优化了资源受限环境下的深度学习计算,提升了计算效率并降低了资源消耗。新内核与PyTorch生态系统无缝集成,支持即时执行、编译优化及边缘计算,为开发者提供全方位性能优势。测试结果显示,多层次量化策略显著提升了计算效率,保持了模型精度。这一突破为深度学习框架优化开辟了多个研究方向,推动了人工智能在边缘计算等领域的广泛应用。
465 11
PyTorch团队为TorchAO引入1-8比特量化,提升ARM平台性能
|
12月前
|
存储 网络协议 网络安全
【Azure 环境】部署ARM Linked Template时候 Blob SAS Token不能正常工作
Unable to retrieve url https://<stroage account name>.blob.core.chinacloudapi.cn/arm/azuredeploy.json?sp=r 'st' is not recognized as an internal or external command, operable program or batch file. 'se' is not recognized as an internal or external command, operable program or batch file. 'spr' is no
202 1
|
前端开发 Java 编译器
阿里巴巴生态应用在Arm平台性能优化实践
本次方案的主题是阿里巴巴生态应用在 Arm 平台性能优化实践,分别从背景介绍、编译优化实践、总结和展望三个方面介绍了本主题。 1. 背景介绍 2. 编译优化实践 3. 总结和展望
260 3
|
存储 人工智能 达摩院
FunASR 语音大模型在 Arm Neoverse 平台上的优化实践
Arm 架构的服务器通常具备低功耗的特性,能带来更优异的能效比。相比于传统的 x86 架构服务器,Arm 服务器在相同功耗下能够提供更高的性能。这对于大模型推理任务来说尤为重要,因为大模型通常需要大量的计算资源,而能效比高的 Arm 架构服务器可以提供更好的性能和效率。