Getting Started with FreeBSD on Raspberry Pi

本文介绍如何在Raspberry Pi上安装FreeBSD 10.0版,包括下载预构建镜像、写入SD卡、配置系统等步骤,并提供SSH登录设置及pkg工具的安装方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

For installing on Raspberry Pi official versions of FreeBSD is available from version 10.0. We can install and Configure FreeBSD 10.0 using the following procedure.

The FreeBSD is available as prebuilt image from the official repo.The following is the directory in one the official mirrors of FreeBSD.

http://mirror.yandex.ru/freebsd/snapshots/ISO-IMAGES/10.0/

The image file can also be downloaded from this link. Download and save the image into your machine. The file will be in compressed bz2 format.Extract the image

bunzip2 FreeBSD-10.0-RELEASE-arm-armv6-RPI-B-20140131-r260789.img.bz2

The output file will be in .img format. This is the prebuilt image which can be directly written to the SD that is used to boot the Raspberry Pi. We can use “dd” to write the image file into the SD card.

dd if=FreeBSD-10.0-RELEASE-arm-armv6-RPI-B-20140131-r260789.img of=/dev/x

The “x” is the file relating to the SD card. It can be replaced according to your Operating System. If it is Linux, “x” should be replaced with “sdb”.

After this image is fully written into the SD card, remove it from the machine.

Insert it into SD slot of the Raspberry Pi.Switch on the Raspberry Pi.

FreeBSD boots with an empty password. You can create a new password now

passwd root

The setup also boot up with DHCP enabled on wired ethernet interface. If you want to ssh into it as root login using password, root login and password access should be enabled in sshd configuration. It can be done by editing the /etc/ssh/ssh_config file and making the following changes.

PasswordAuthentication yes
PermitRootLogin yes

Restart the SSH service

service sshd restart

The date and time needs to be set after restart. Configure the timezone. For example, if the time zone is Indian Standard Time (IST) set the localtime to Asia/Kolkata.

cp /usr/share/zoneinfo/Asia/Kolkata /etc/localtime

Reboot the machine

reboot

You can also set the time temporarily using the following command. The syntax is “date yymmddhhmm”

date 1411291239

By default “pkg” is not installed on the system. You might get the following error while trying to install pkg by running “pkg update”

root@raspberry-pi:~ # pkg update
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/freebsd:10:armv6:32:el:eabi:softfp/latest, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/freebsd:10:armv6:32:el:eabi:softfp/latest/Latest/pkg.txz: Not Found
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.

Here we might need to install pkg from the ports. To get the portsnap from the repository, run the following commands.

portsnap fetch
portsnap extract

Run the following commands to install pkg from ports

cd /usr/ports/ports-mgmt/pkg
make install

Now you can use pkg to install and remove packages.


https://fosskb.wordpress.com/2014/11/29/getting-started-with-freebsd-on-raspberry-pi/

Key Features Get started with Raspberry Pi Zero and put all of its exciting features to use Create fun games and programs with little or no programming experience Learn to use this super-tiny PC to control hardware and software for work, play, and everything else Book Description Raspberry Pi Zero is half the size of Raspberry Pi A, only with twice the utility. At just three centimeters wide, it packs in every utility required for full-fledged computing tasks. This practical tutorial will help you quickly get up and running with Raspberry Pi Zero to control hardware and software and write simple programs and games. You will learn to build creative programs and exciting games with little or no programming experience. We cover all the features of Raspberry Pi Zero as you discover how to configure software and hardware, and control external devices. You will find out how to navigate your way in Raspbian, write simple Python scripts, and create simple DIY programs. What you will learn Understand how to initially download the operating system and set up Raspberry Pi Zero Find out how to control the GPIO pins of Raspberry Pi Zero to control LED circuits Get to grips with adding hardware to the GPIO to control more complex hardware such as motors Add USB control hardware to control a complex robot with 12 servos Include speech recognition so that projects can receive commands Enable the robot to communicate with the world around it by adding speech output Control the robot from a distance and see what the robot is seeing by adding wireless communication Discover how to build a Robotic hand and a Quadcopter About the Author Richard Grimmett has always been fascinated by computers and electronics since his very first programming project that used Fortran on punch cards. He has a bachelor's and master's degree in electrical engineering and a PhD in leadership studies. He also has 26 years of experience in the radar and telecommunications industries, and even has one of the original brick phones. He now teaches computer science and electrical engineering at the Brigham Young University, Idaho, where his office is filled with his numerous robotics projects. Table of Contents Getting Started with Raspberry Pi Zero Programming Raspberry Pi Zero Accessing the GPIO Pins on Raspberry Pi Zero Building and Controlling a Simple Wheeled Robot Building a Robot That Can Walk Adding Voice Recognition and Speech – A Voice Activated Robot Adding Raspberry Pi Zero to an RC Vehicle Playing Rock, Paper, or Scissors with Raspberry Pi Zero Adding Raspberry Pi Zero to a Quadcopter
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值