SliTaz SliTaz Forum

You are not logged in.

#1 2012-03-02 17:10:47

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

An ARM GNU/Linux box for $25. Take a byte!

Raspberry Pi

An ARM GNU/Linux box for $25. Take a byte!

1.

http://www.raspberrypi.org/

http://elinux.org/RPi-hub

The Raspberry Pi is a credit-card sized computer board that plugs into a TV and a keyboard. It's a miniature ARM-based PC which can be used for many of the things that a desktop PC does, like spreadsheets, word-processing and games. It also plays High-Definition video.

Features

    Broadcom BCM2835 700MHz ARM1176JZFS processor with FPU and Videocore 4 GPU

    GPU provides Open GL ES 2.0, hardware-accelerated OpenVG, and 1080p30 H.264 high-profile decode

    GPU is capable of 1Gpixel/s, 1.5Gtexel/s or 24GFLOPs with texture filtering and DMA infrastructure

    256MB RAM

    Boots from SD card, running the Fedora version of Linux

    10/100 BaseT Ethernet socket

    HDMI socket

    USB 2.0 socket

    RCA video socket

    SD card socket

    Powered from microUSB socket

    3.5mm audio out jack

    Header footprint for camera connection

    Size: 85.6 x 53.98 x 17mm

2. download

Raspberry Pi Releases 1st SD Card Image (Debian)

http://www.raspberrypidownload.co.uk/debian/download/debian6-17-02-2012.zip

http://raspberrypi.peir.com/images/debian/6/debian6-17-02-2012/debian6-17-02-2012.zip

http://dl.dropbox.com/u/45842273/zImage_3.1.9

http://dl.dropbox.com/u/1024195/qemu-1.0.1.tazpkg

http://dl.dropbox.com/u/1024195/qemu-arm-1.0.1.tazpkg

3.

# unzip debian6-17-02-2012.zip

debian6-17-02-2012.img

debian6-17-02-2012.img.sha1

4. install qemu-arm-1.0.1

# tazpkg install /pathtodir/qemu-1.0.1.tazpkg

# tazpkg install /pathtodir/qemu-arm-1.0.1.tazpkg

# qemu-system-arm -cpu ? | grep 1176

  arm1176

5. start qemu-arm

# qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda debian6-17-02-2012.img -kernel zImage_3.1.9 -append "root=/dev/sda2" -serial stdio

Default login     pi/suse

$ startx

That's it.

[attachment=7044,348] [attachment=7044,349]

Offline

#2 2012-03-02 22:34:18

devl547
Administrator
Registered: 2011-06-01
Posts: 285

Re: An ARM GNU/Linux box for $25. Take a byte!

Too bad there are no powerful multicore ARM motherboards for desktop to create a slitaz buildbot with sad

And still waiting for Goodson (MIPS)... Want a slitaz system on it :3

Offline

#3 2012-03-02 23:25:12

claudinei
Administrator
Registered: 2011-03-29
Posts: 102

Re: An ARM GNU/Linux box for $25. Take a byte!

@alanyih Wonderful job to put SliTaz running on RP smile

@devl547 I'm wondering if we can setup this for SliTaz: http://archlinuxarm.org/developers/distcc-cross-compiling

Offline

#4 2012-03-02 23:34:45

pankso
Administrator
Registered: 2026-06-27
Posts: 341
Website

Re: An ARM GNU/Linux box for $25. Take a byte!

Hi folks,

I know it is a lot of job but... SliTaz 5.0 will run on that kind of ARM board. I wouls love that and slitaz would fit so nicely on it :-)

@claudinei We first need a full ARM toolchain before compiling anything

Offline

#5 2012-03-03 11:04:07

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: An ARM GNU/Linux box for $25. Take a byte!

@pankso

@Claudinei Pereira

BCM2835-ARM-Peripherals

http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf

http://www.raspberrypi.org/archives/615

[..]

We've been leaning (gently and charmingly) on Broadcom, who make BCM2835, the SoC at the heart of the Raspberry Pi, to produce an abbreviated datasheet describing the ARM peripherals in the chip. If you’re a casual user, this won’t be of much interest to you, but if you’re wanting to port your own operating system or just want to understand our Linux kernel sources, this is the document for you.

[attachment=7072,350] [attachment=7072,351]

Offline

#6 2012-03-03 11:23:17

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: An ARM GNU/Linux box for $25. Take a byte!

1.

pi@raspberrypi:~$ uname -a

Linux raspberrypi 3.1.9 #2 Sat Feb 18 12:14:02 ICT 2012 armv6l GNU/Linux

2.

pi@raspberrypi:~$ cat /etc/debian_version

6.0.4

3.

pi@raspberrypi:~$ dmesg | head -12

Linux version 3.1.9 (jaufranc@debian) (gcc version 4.4.5 (Debian 4.4.5-8) ) #2 Sat Feb 18 12:14:02 ICT 2012

CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d

CPU: VIPT aliasing data cache, unknown instruction cache

Machine: ARM-Versatile PB

Memory policy: ECC disabled, Data cache writeback

On node 0 totalpages: 65536

free_area_init_node: node 0, pgdat c03d22fc, node_mem_map c03ee000

  Normal zone: 512 pages used for memmap

  Normal zone: 0 pages reserved

  Normal zone: 65024 pages, LIFO batch:15

sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms

pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768

4.

pi@raspberrypi:~$ cat /proc/cpuinfo

Processor       : ARMv6-compatible processor rev 7 (v6l)

BogoMIPS        : 376.01

Features        : swp half thumb fastmult edsp java tls

CPU implementer : 0x41

CPU architecture: 7

CPU variant     : 0x0

CPU part        : 0xb76

CPU revision    : 7

Hardware        : ARM-Versatile PB

Revision        : 0000

Serial          : 0000000000000000

pi@raspberrypi:~$

Offline

#7 2012-03-04 14:14:47

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: An ARM GNU/Linux box for $25. Take a byte!

GPU-bootloader

1.

http://elinux.org/RPi_Software

[..]

BootRom

The boards do not include NAND or NOR storage - everything is on the SD card, which has a FAT32 partition with GPU firmware and a kernel image, and an EXT2 partition with the rootfs.

We're not currently using a bootloader - we actually boot via the GPU, which contains a proprietary RISC core (wacky architecture). The GPU mounts the SD card, loads GPU firmware and brings up display/video/3d, loads a kernel image, resets the SD card host and starts the ARM.

You could replace the kernel image with a bootloader image, and that would work fine.

[..]

GPU

The GPU provides APIs for Open GL ES 2.0, hardware-accelerated OpenVG, and 1080p30 H.264 high-profile decode.

The GPU is capable of 1Gpixel/s, 1.5Gtexel/s or 24 GFLOPs of general purpose compute and features a bunch of texture filtering and DMA infrastructure - the Raspberry Pi team are looking at how they can make this available to application programmers.

The GPU blob is an 18MB elf file, including libraries. It does an awful lot. [3]

2.

http://www.raspberrypi.org/faqs

[..]

Is there a GPU binary?

Yes. The GPU binary also contains the first stage bootloader.

what means “GPU binary”?

Reply ↓

    jamesh on September 1, 2011 at 8:19 pm said:

    The is a binary blob that runs on the GPU – this is closed source, but there are drivers that run on the Arm that give access to the GPU features ie OpenGLES, OpenVG etc. The device boots the GPU first, the bootloader loads the GPU with this binary blob, then Linux is booted on the Arm.

[attachment=7127,355]

Offline

#8 2012-03-04 14:23:00

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: An ARM GNU/Linux box for $25. Take a byte!

boot partition

start.elf: The GPU binary firmware image, provided by the foundation.

1. download util-linux-ng-mount

http://dl.dropbox.com/u/1024195/util-linux-ng-mount-2.19.1.tazpkg

# mount -V

mount from util-linux 2.19.1 (with libblkid support)

2. show partition

# file debian6-17-02-2012.img

debian6-17-02-2012.img: x86 boot sector; partition 1: ID=0xc, starthead 0, startsector 2048, 153600 sectors; partition 2: ID=0x83, starthead 3, startsector 157696, 3256320 sectors; partition 3: ID=0x82, starthead 3, startsector 3416064, 391168 sectors, code offset 0xb8

3. show offset

# parted debian6-17-02-2012.img

GNU Parted 2.4

Using /media/DATA/raspi/debian6-17-02-2012/debian6-17-02-2012.img

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) unit b

unit b

(parted) print

print

Model:  (file)

Disk /media/DATA/raspi/debian6-17-02-2012/debian6-17-02-2012.img: 1977614336B

Sector size (logical/physical): 512B/512B

Partition Table: msdos

Number  Start        End          Size         Type     File system     Flags

1      1048576B     79691775B    78643200B    primary  fat32           lba

2      80740352B    1747976191B  1667235840B  primary  ext4

3      1749024768B  1949302783B  200278016B   primary  linux-swap(v1)

4. mount boot partition

# mount -o loop,offset=1048576 -t vfat debian6-17-02-2012.img /mnt/raspi-fat

# ls -l /mnt/raspi-fat

total 28072

-rwxr-xr-x    1 root     root       2001244 Feb 17 12:02 arm128_start.elf

-rwxr-xr-x    1 root     root       2001244 Feb 17 12:02 arm192_start.elf

-rwxr-xr-x    1 root     root       2001244 Feb 17 12:02 arm224_start.elf

-rwxr-xr-x    1 root     root         16528 Feb 13 18:53 bootcode.bin

-rwxr-xr-x    1 root     root           141 Feb 14 18:38 cmdline_testmode.txt

-rwxr-xr-x    1 root     root           127 Feb 14 18:52 cmdline.txt

-rwxr-xr-x    1 root     root      16412020 Feb 14 18:47 kernel_emergency.img

-rwxr-xr-x    1 root     root       3990020 Feb 13 18:53 kernel.img

-rwxr-xr-x    1 root     root        314691 Feb 13 18:53 loader.bin

-rwxr-xr-x    1 root     root       2001244 Feb 17 12:02 start.elf

5. firmware from original debian sdcard release

https://github.com/raspberrypi/firmware/tree/master/boot

firmware / boot

    name     age history message

    ..

file     arm128_start.elf     6 days ago

file     arm192_start.elf     6 days ago

file     arm224_start.elf     6 days ago

file     bootcode.bin     6 days ago

file     cmdline.txt     6 days ago

file     kernel.img     6 days ago

file     kernel_emergency.img     6 days ago

file     loader.bin     6 days ago

file     start.elf     6 days ago    

6. Setting up the boot partition

http://elinux.org/RPi_Advanced_Setup

[..]

Setting up the boot partition

The boot partition must contain:

    bootcode.bin : 2nd stage bootloader, starts with SDRAM disabled

    loader.bin : 3rd stage bootloader, starts with SDRAM enabled

    start.elf: The GPU binary firmware image, provided by the foundation.

    kernel.img: The OS kernel to load on the ARM processor. Normally this is Linux - see instructions for compiling a kernel.

    cmdline.txt: Parameters passed to the kernel on boot.

Optional files:

    config.txt: A configuration file read by the GPU. Use this to override set the video mode, alter system clock speeds, voltages, etc.

    vlls directory: Additional GPU code, e.g. extra codecs. Not present in the initial release.

Additional files supplied by the foundation

These files are also present on the SD cards supplied by the foundation.

Additional kernels. Rename over kernel.img to use them (ensure you have a backup of the original kernel.img first!):

    kernel_emergency.img : kernel with busybox rootfs. You can use this to repair the main linux partition using e2fsck if the linux partition gets corrupted.

Additional GPU firmware images, rename over start.elf to use them:

    arm128_start.elf : 128M ARM, 128M GPU split (use this for heavy 3D work, possibly also required for some video decoding)

    arm192_start.elf : 192M ARM, 64M GPU split (this is the default)

    arm224_start.elf : 224M ARM, 32M GPU split (use this for Linux only with no 3D or video processing. Its enough for the 1080p framebuffer, but not much else)

Offline

#9 2012-03-05 09:18:30

Somewhat Reticent
Member
Registered: 2012-03-05
Posts: 35

Re: An ARM GNU/Linux box for $25. Take a byte!

Wonder if T2-SDE would help? http://www.t2-project.org/architectures/

Offline

#10 2012-03-06 08:20:34

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: An ARM GNU/Linux box for $25. Take a byte!

git repo

https://github.com/raspberrypi

1. firmware

https://github.com/raspberrypi/firmware

firmware and opt/vc from original debian sdcard release

2. quake3

https://github.com/raspberrypi/quake3

a baseline Quake 3 which may be used for further development.

3. linux

https://github.com/raspberrypi/linux

kernel source

4. tools

https://github.com/raspberrypi/tools

toolchain and tool to produce kernel.img

5. initial patches

http://elinux.org/images/8/8a/Rpi-linux-patches-3.1.9.tgz

http://elinux.org/RPi_Software#Kernel

Kernel

The initial patches (Media:Rpi-linux-patches-3.1.9.tgz) are released against the 3.1.9 kernel - but may also work against later kernels.

The kernel is now also available on https://github.com/raspberrypi/linux

6. bcm2708

http://www.cnx-software.com/2012/01/22/linux-kernel-3-1-9-for-raspberry-pi-released

[..]

The code related to Broadcom BCM2835 processor is referred as bcm2708 in the kernel and I can see committed related to the watchdog timer, the framebuffer,  the VCHIQ driver (the driver sending messages to the GPU) and general commits for bcm2708.

For those interested in the messages used to communicate between userspace and the GPU, the VCHIQ driver code is located at drivers/misc/vc04_services in the tree. I haven't studied it yet, but as the platform should support graphics standards such as OpenGL and OpenMAX IL, most people should not really care about this interface as I suppose the OpenGL library (Mesa?) uses this driver.

Offline

#11 2012-03-06 08:24:26

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: An ARM GNU/Linux box for $25. Take a byte!

Distributions

1. What Linux distros will be supported at launch?

http://www.raspberrypi.org/faqs

[..]

Fedora, Debian and ArchLinux will be supported from the start. We hope to see support from other distros later. (Because of issues with newer releases of Ubuntu and the ARM processor we are using, Ubuntu can't commit to support Raspberry Pi at the moment.) You will be able to download distro images from us as soon as the Raspberry Pi is released, and we will also be selling pre-loaded SD cards shortly after release.

2. RPi Distributions

http://elinux.org/RPi_Distributions

3. Distributions

http://elinux.org/RPi_Software#Distributions

[..]

Source code and binaries for Raspberry Pi will be available at various places from launch, including pre-built Linux distributions.

Raspberry Pi Fedora Remix 14, developed by Seneca College, is the recommended distribution and pre-loaded SD cards with this distribution will be available shortly after the initial launch through the Raspberry Pi Store.

4. Downloads

http://www.raspberrypi.org/downloads

[..]

Debian 「squeeze」

Reference root filesystem from Gray and Dom, containing LXDE, Midori, development tools and example source code for multimedia functions.

Torrent     debian6-17-02-2012.zip.torrent

Direct download     debian6-17-02-2012.zip

SHA-1     4bf7a47151ab6f1835be53ec99d8d750861213d4

Default login     pi/suse

Arch Linux ARM

Arch Linux ARM is based on Arch Linux, which aims for simplicity and full control to the end user. Note that this distribution may not be suitable for beginners.

Torrent     archlinuxarm-01-03-2012.zip.torrent

Direct download     archlinuxarm-01-03-2012.zip

SHA-1     94ba748b1d0de704e5c4bd1335570fe1d23b38ba

Default login     root/root

5. mirror

Raspberry Pi Distribution Downloads

Total number of mirrors: 96

Total estimated bandwidth: 180 Gbits/s

Total number of mirrors in this continent: 1

Total estimated bandwidth for this continent: 75 Gbits/s

File: debian6-17-02-2012.zip

File Size: 797.11 MiB

Raspberry Pi Distribution Downloads

Total number of mirrors: 96

Total estimated bandwidth: 180 Gbits/s

Total number of mirrors in this continent: 1

Total estimated bandwidth for this continent: 75 Gbits/s

File: archlinuxarm-01-03-2012.zip

File Size: 215.73 MiB

6. Raspberry Pi Fedora Remix 14

http://zenit.senecac.on.ca/wiki/index.php/Raspberry_Pi_Fedora_Remix_14

The Raspberry Pi Fedora Remix 14 was the first version of the Remix released.

    Release date: February 29, 2012

    Fedora package collection version: 14

    Kernel version: 3.1.9

    Architecture: armv5tel

The next release will be the Raspberry Pi Fedora Remix 17.

SD Card Installation Using the dd Command

http://zenit.senecac.on.ca/wiki/index.php/Raspberry_Pi_Fedora_Remix_Installation

[..]

Steps:

    Download the image (link to be provided after mirrors sync up)

Offline

#12 2012-03-30 15:04:01

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: An ARM GNU/Linux box for $25. Take a byte!

Kernel

http://elinux.org/RPi_Software#Kernel

The initial patches (Media:Rpi-linux-patches-3.1.9.tgz) are released against the 3.1.9 kernel - but may also work against later kernels.

The kernel is now also available on https://github.com/raspberrypi/linux

See rpi kernel compilation (unfinished) for how to compile the kernel.

Compiler

The Broadcom processor on Raspberry Pi contains an ARM v6 general purpose processor and a Broadcom VideoCore IV GPU. No data is currently available on other cores (if any) available in the BCM2835.

ARM

There is broad compiler support including gcc - please see ARM Compilers

The ARM is capable of around 500 BOGOMIPS [1], 5400 LINPACK KFLOPS with software floating point and 22000 KFLOPS with softfp hardware floating point[2].

The gcc compiler flags which will produce the most optimal code for the RPi are probably (can someone check!):

-mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=softfp [-marm or -mthumb]

-marm produces arm code, which is the original 32 bit ARM instruction set, -mthumb produces thumb code, which is the 16 bit encoded RISC sub-set. Thumb code is smaller but requires more instructions so may be slower.

----

compiling

http://elinux.org/RPi_Kernel_Compilation#compiling

Next you have to configure the kernel:

cp arch/arm/configs/bcmrpi_cutdown_defconfig .config

make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- oldconfig

Then building the kernel:

make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -k

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.58 MiB (Peak: 1.77 MiB) ]