正如标题所暗示的,我正在尝试使用Ubuntu for armhf为我的Raspberry-Pi2创建一个最小的Ubuntu 14.0.4 base镜像。
我必须自己添加内核和Boot Loader,因为我不是这个主题的专业人员,所以我完全被编译内核/ U-boot的所有不同指南搞糊涂了。找不到任何东西来覆盖整个过程并启动RPi。
有没有人可以帮我把内核和引导加载程序安装到RPi2的Ubuntu (核心) rootfs上,然后创建一个可引导的SD卡(从头开始)?
PS:我想要一个整个过程的分步指南,这样我(和其他像我一样的人)可以在本地应用它们,并从零开始启动和运行Pi2。
我有一台Ubuntu 14.0.4笔记本电脑作为我的主机,用于交叉编译和复制文件等。
我绝望了,谢谢!
发布于 2016-07-12 18:56:30
为什么不使用官方发布的here?拥有SD卡的一般步骤是为SD卡分配两个分区。第一个分区将是FAT32,您的引导加载程序、设备树blob和内核映像可以驻留在其中,以及任何其他文件。如果我没记错的话,RPi在第一个分区中需要相当多的其他二进制blob。第二个分区是ext分区,您需要在其中放置rootfs。获取任何可用的发行版映像,将其写入SD卡,并将第二个rootfs分区替换为您喜欢的任何发行版rootfs。内核和设备树blob也可能驻留在第二分区的/boot上,而不是第一分区上。
我也只是快速检查了一下。我有一张RPi3的SD卡,上面有Raspbian。我用基于Ubuntu的rootfs替换了第二个分区,其中包含来自Raspbian的rootfs。它启动得非常好,但在
* 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我没有调查原因,但我相信是/etc/fstab造成的。
[root@alarmpi ~]# cat /etc/fstab
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
/dev/mmcblk0p1 /boot vfat defaults 0 0这是来自Arch的。我没有记下Ubuntu的,但它是不正确的。
用基于ArchLinux ARM的根文件系统替换根文件系统,似乎可以很好地启动。请注意,我使用了一张基于Raspbian的SD卡,并将rootfs与Arch的交换。
[ 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我希望这篇文章能让你对如何实现这一点有足够的总体认识。
https://stackoverflow.com/questions/38139687
复制相似问题