2016-07-01 7 views
0

Wie der Titel andeutet, versuche ich dierootfs für armhf zu verwenden, um ein minimales Ubuntu-Image für meine Raspberry-Pi2 zu erstellen.wie Linux Kernel und Bootloader zu einem Ubuntu 14.0.4 Core Rootfs für Raspberry Pi2 hinzufügen?

Ich muss den Kernel und einen Bootloader zur Mischung selbst hinzufügen, und da ich in diesem Thema nicht Pro bin, bin ich total verwirrt von den verschiedenen Anleitungen zum Kompilieren eines Kernels/U-Boot. Konnte nichts finden, um den gesamten Prozess abzudecken und das RPi zum Booten zu bringen.

Gibt es jemanden, der mir helfen kann, einen Kernel und einen Bootloader auf die Ubuntu (Core) rootfs für RPi2 zu schlagen und eine bootfähige SD-Karte zu erstellen (von Grund auf neu)?

PS: Ich hätte gerne eine Schritt-für-Schritt-Anleitung für den gesamten Prozess, damit ich (und jeder andere wie ich) sie lokal anwenden und einen Pi2 von Grund auf neu starten kann.

Ich habe ein Ubuntu 14.0.4 Laptop als meine Host-Maschine für Cross-Compilierung und Kopieren von Dateien usw.

Ich bin verzweifelt, danke!

Antwort

0

Warum nicht die offiziellen Versionen here verwenden? Das allgemeine Verfahren, eine SD-Karte zu haben, besteht darin, zwei Partitionen für die SD-Karte zu haben. Die erste Partition ist FAT32, in der sich Ihr Bootloader, Gerätebaum-Blob und Kernel-Image befinden kann und jede andere Datei. RPI benötigt einige andere binäre Blobs in der ersten Partition, wenn ich mich richtig erinnere. Die zweite ist eine ext-Partition, in die Sie die rootfs setzen müssen. Nimm ein beliebiges verfügbares Verteilungsbild, schreibe es auf die SD-Karte und ersetze die zweite rootfs-Partition durch ein beliebiges Distributions-rootfs. Es ist auch möglich, dass sich der Kernel und das Gerätebaum-Blob auf dem/boot der zweiten Partition statt der ersten befinden.

Ich habe auch nur schnell überprüft. Ich hatte eine SD-Karte für RPi3 mit Raspbian. Ich ersetzte die zweite Partition, die rootfs von Raspbian hatte, mit den Ubuntu-basierten rootfs. Es bootet völlig in Ordnung, aber Stände auf

* Starting Mount filesystems on boot[ OK ] 
* Starting Populate /dev filesystem[ OK ] 
* Stopping Populate /dev filesystem[ OK ] 
* Starting Populate and link to /run filesystem[ OK ] 
* Stopping Populate and link to /run filesystem[ OK ] 
* Stopping Track if upstart is running in a container[ OK ] 
* Starting Initialize or finalize resolvconf[ OK ] 
* Starting set console keymap[ OK ] 
* Starting Signal sysvinit that virtual filesystems are mounted[ OK ] 
* Starting Signal sysvinit that virtual filesystems are mounted[ OK ] 
* Starting Bridge udev events into upstart[ OK ] 
* Starting device node and kernel event manager[ OK ] 
* Starting Signal sysvinit that remote filesystems are mounted[ OK ] 
* Stopping set console keymap[ OK ] 
* Starting load modules from /etc/modules[ OK ] 
* Starting cold plug devices[ OK ] 
* Starting log initial device creation[ OK ] 
* Stopping load modules from /etc/modules[ OK ] 
* Starting set console font[ OK ] 
* Stopping set console font[ OK ] 
* Starting userspace bootsplash[ OK ] 
* Starting Send an event to indicate plymouth is up[ OK ] 
* Stopping userspace bootsplash[ OK ] 
* Stopping Send an event to indicate plymouth is up[ OK ] 
* Stopping cold plug devices[ OK ] 
* Stopping log initial device creation[ OK ] 
* Starting configure network device security[ OK ] 
* Starting Mount network filesystems[ OK ] 
* Starting configure network device security[ OK ] 
* Stopping Mount network filesystems[ OK ] 
* Starting configure network device[ OK ] 
* Starting configure network device[ OK ] 
* Starting Bridge socket events into upstart[ OK ] 
The disk drive for/is not ready yet or not present. 
keys:Continue to wait, or Press S to skip mounting or M for manual recovery 

ich nicht den Grund untersuchen haben, aber ich glaube, es ist wegen der/etc/fstab.

[[email protected] ~]# cat /etc/fstab 
# 
# /etc/fstab: static file system information 
# 
# <file system> <dir> <type> <options>  <dump> <pass> 
/dev/mmcblk0p1 /boot vfat defaults  0  0 

Dies ist von Arch. Ich habe Ubuntu's nicht notiert, aber es war falsch.

Ersetzt die rootfs mit ArchLinux ARM-basierten rootfs und es scheint gut zu starten. Beachten Sie, dass ich eine Raspbian-basierte SD-Karte genommen und die Rootfs mit Arch ausgetauscht habe.

[ 3.743064] systemd-journald[85]: Received request to flush runtime journal from PID 1 
[ 4.791472] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup 

Arch Linux 4.1.18-v7+ (ttyS0) 

alarmpi login: 
Arch Linux 4.1.18-v7+ (ttyS0) 

alarmpi login: root 
Password: 
Welcome to Arch Linux ARM 

    Website: http://archlinuxarm.org 
     Forum: http://archlinuxarm.org/forum 
     IRC: #archlinux-arm on irc.Freenode.net 
[ 15.258407] random: nonblocking pool is initialized 

Ich hoffe, dies gibt Ihnen genug von einer allgemeinen Idee, wie Sie dies angehen.