Ports/mipsel/BuildHowto: различия между версиями

Материал из ALT Linux Wiki
< Ports‎ | mipsel
Строка 39: Строка 39:
  rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/mipsel Sisyphus/mipsel classic
  rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/mipsel Sisyphus/mipsel classic
  rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/mipsel Sisyphus/noarch classic
  rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/mipsel Sisyphus/noarch classic
Теперь можно создать сборочницу:
hsh --with-qemu=mipsel --target=mipsel --apt-config=/home/jqt4/boot_image_mipsel/apt.conf.mipsel --initroot-only ~/hasher
Также можно собрать пакет под mipsel, например такой:
hsh -v --with-qemu=mipsel --target=mipsel --apt-config=apt.conf.mipsel ~/hasher bc-1.06-alt4.src.rpm

Версия от 15:36, 10 июля 2018


Настройка сборки пакетов под mipsel на x86

На основании статьи о настройках для arm: https://www.altlinux.org/Ports/arm/BuildHowto и статьи https://wiki.gentoo.org/wiki/Embedded_Handbook/General/Compiling_with_qemu_user_chroot где описаны настройки binfmt_misc под различные платформы, в том числе и под mipsel

Настраиваем binfmt_misc:

  • монтируем файловую систему binfmt_misc(если ещё не примонтирована)
 mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
  • регистрируем qemu-mipsel, как интерпретатор mipsel'овских ELF'ов (команда от root):
 sudo su
 echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/.host/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register

Настраиваем репозиторий mipsel

Нужно создать файлы:

  • apt.conf.mipsel

содержащий:

 Dir::Etc::main "/dev/null";
 Dir::Etc::parts "/var/empty";
 Dir::Etc::SourceParts "/var/empty";
 
 Dir::Etc::sourcelist "/<путь от корня>/sources.list.mipsel";
  • /<путь от корня>/sources.list.mipsel

содержащий:

rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/mipsel Sisyphus/mipsel classic
rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/mipsel Sisyphus/noarch classic

Теперь можно создать сборочницу:

hsh --with-qemu=mipsel --target=mipsel --apt-config=/home/jqt4/boot_image_mipsel/apt.conf.mipsel --initroot-only ~/hasher

Также можно собрать пакет под mipsel, например такой:

hsh -v --with-qemu=mipsel --target=mipsel --apt-config=apt.conf.mipsel ~/hasher bc-1.06-alt4.src.rpm