* [Xenomai] Raspberry Pi Xenomai Linux + Minimal Raspian Net Install Guide
@ 2014-03-26 1:25 Adam Vaughan
2014-03-26 9:09 ` Gregory Dymarek
2014-03-26 9:42 ` Gilles Chanteperdrix
0 siblings, 2 replies; 8+ messages in thread
From: Adam Vaughan @ 2014-03-26 1:25 UTC (permalink / raw)
To: xenomai@xenomai.org
I don't know if you want to add this to the Xenomai wiki, but attached
is a complete guide from start to finish for the Raspberry Pi build
process, the relevant patches, and the net installation of a minimal
Raspbian distro.
I suppose the formatting could be worked on, but I believe it covers
every gotcha with the RPi I'm aware of. I think it might be helpful
to beginners.
-------------- next part --------------
Note: If you follow the listing below verbatim, it >> WILL ERASE EVERYTHING << on your SD card.
Adjust:
(1) /dev/sde to match your SD card device on your desktop / laptop
(2) /mnt/gentoo to match your mount point for the SD card
(3) If you're not using keyboard, the hostname to remote in with ssh
(4) --depth=X to get compensate for any new commits
(5) -j 8 to an appropriate number of cores on your box
(6) Remove -quick from the paths if you use a different config
After adjusting you can copy and paste each section below to your terminal.
I've decided not to script this because there are many steps that you should
examine the output of each step to make sure everything is going to plan.
===============================================================
// Automatically install minimal Raspbian OS through net installer...
//
echo "wget -q -O - http://hifi.iki.fi/raspbian-ua-netinst/raspbian-ua-netinst-20140115-gitf8f70f8.img.xz | xzcat - > /dev/sde" | sudo sh
sync
#
# >> BOOT THE RPi SYSTEM WITH THE SD CARD <<
#
# It will automatically a minimal net install over Ethernet.
#
# >> SKIP AHEAD << while the OS is installed automagically...
===============================================================
// Blow away existing tools...
//
rm -Rf ~/tools # Cross compile toolchain directory
rm -Rf ~/Xenomai-RPi # Staging directory for Linux and Xenomai code
===============================================================
// Get RPi cross compile tools...
//
cd ~/
git clone --depth=1 git://github.com/raspberrypi/tools.git
cd ~/tools
git checkout e810a0b
===============================================================
// Get Xenomai 2.6.3 and commit d996a1b RPi Linux 3.8.y as per documentation
//
mkdir ~/Xenomai-RPi
cd ~/Xenomai-RPi
wget -q -O - http://download.gna.org/xenomai/stable/xenomai-2.6.3.tar.bz2 | tar -xjf -
cd ~/Xenomai-RPi
git clone --depth=1 -b rpi-3.8.y git://github.com/raspberrypi/linux.git
cd linux
git checkout d996a1b
===============================================================
// Patch for Xenomai
//
cd ~/Xenomai-RPi/linux
patch -Np1 < ../xenomai-2.6.3/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-pre-2.patch
../xenomai-2.6.3/scripts/./prepare-kernel.sh --arch=arm --linux=./ --adeos=../xenomai-2.6.3/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-3.patch
patch -Np1 < ../xenomai-2.6.3/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patch
===============================================================
// Patches to allow disabled USB FIQ and to correct for USB driver issues
// discussed on the Xenomai mailing list...
//
// NOTE: If you don't apply the last 3 patches a custom FIQ will occasionally
// not fire. I haven't fully validated that it indeed fixes the issue
// with a logic analyzer, but I have yet to see a missed FIQ on my
// ordinary (not mixed signal) scope.
//
cd ~/Xenomai-RPi/linux
#
#
#
echo -e 'diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
index 7d521d9..f3004d4 100644
--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
@@ -742,8 +742,10 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd)
}
/* Clear interrupt */
- //gintsts.b.sofintr = 1;
- //DWC_WRITE_REG32(&hcd->core_if->core_global_regs->gintsts, gintsts.d32);
+ if (!fiq_fix_enable) {
+ gintsts.b.sofintr = 1;
+ DWC_WRITE_REG32(&hcd->core_if->core_global_regs->gintsts, gintsts.d32);
+ }
return 1;
}' | patch -p1 --ignore-whitespace
#
#
#
echo -e 'diff --git a/arch/arm/include/asm/ipipe_hwirq.h b/arch/arm/include/asm/ipipe_hwirq.h
index 6b864aa..bd8cda1 100644
--- a/arch/arm/include/asm/ipipe_hwirq.h
+++ b/arch/arm/include/asm/ipipe_hwirq.h
@@ -200,9 +200,9 @@ static inline void hard_local_irq_restore(unsigned long x)
ipipe_unstall_root(); \\
} while (0)
-#define local_fiq_enable() ipipe_unstall_root()
+#define local_fiq_enable() hard_local_fiq_enable_notrace()
-#define local_fiq_disable() ipipe_stall_root()
+#define local_fiq_disable() hard_local_fiq_disable_notrace()
#define arch_local_irq_restore(flags) \\
do { \\
' | patch -p1 --ignore-whitespace
#
#
#
echo -e 'diff --git a/drivers/usb/host/dwc_common_port/dwc_common_linux.c b/drivers/usb/host/dwc_common_port/dwc_common_linux.c
index 0812d3a..6d01261 100644
--- a/drivers/usb/host/dwc_common_port/dwc_common_linux.c
+++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c
@@ -585,6 +585,7 @@ void DWC_MODIFY_REG32(uint32_t volatile *reg, uint32_t clear_mask, uint32_t set_
local_irq_save(flags);
local_fiq_disable();
writel((readl(reg) & ~clear_mask) | set_mask, reg);
+ local_fiq_enable();
local_irq_restore(flags);
}
diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c
index b5a007d..10eead2 100644
--- a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c
+++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c
@@ -1354,6 +1354,7 @@ static inline uint32_t dwc_otg_read_common_intr(dwc_otg_core_if_t * core_if, gin
gintmsk.d32 |= gintmsk_common.d32;
gintsts_saved.d32 &= ~gintmsk_common.d32;
reenable_gintmsk->d32 = gintmsk.d32;
+ local_fiq_enable();
local_irq_restore(flags);
}
diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
index 7d521d9..86d9cbe 100644
--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
@@ -97,6 +97,7 @@ void notrace _fiq_print(FIQDBG_T dbg_lvl, char *fmt, ...)
memcpy(buffer + wptr, text, 16);
wptr = (wptr + 16) % sizeof(buffer);
}
+ local_fiq_enable();
local_irq_restore(flags);
}
#endif
' | patch -p1 --ignore-whitespace
===============================================================
// Build the Linux kernel with Xenomai
//
cd ~/Xenomai-RPi/linux
make ARCH=arm mrproper
#
# OPTION: make ARCH=arm bcmrpi_defconfig # Builds a lot of stuff...
# OPTION: make ARCH=arm bcmrpi_quick_defconfig # Quick compilations when developing
# OPTION: make ARCH=arm bcmrpi_cutdown_defconfig
# OPTION: wget https://www.dropbox.com/s/dcju74md5sz45at/rpi_xenomai_config && mv rpi_xenomai_config .config && make ARCH=arm oldconfig
#
# MY CURRENT CHOICE:
#
make ARCH=arm bcmrpi_quick_defconfig
#
make ARCH=arm menuconfig
#
# Some config changes to consider are below...
#
# I use the GPIO with low latency FIQ code, so I don't want anything else
# interfering with it, hence some of the suggested GPIO config changes.
#
# The worst case Xenomai response time is ~50 us, but you get all Xenomai OS features
# The worst case FIQ response time is ~1 us, but you're on your own as far as an OS goes
#
# Config change #01: General setup -> Optimize very unlikely/likely branches (YES)
# Config change #02: System Type -> Broadcom BCM2708 Implementations -> BCM2708 gpio support (NO)
# Config change #03: CPU Power Management -> CPU idle PM support (NO)
# Config change #04: CPU Power Management -> CPU Frequency scaling (NO)
# Config change #05: Device Drivers -> Sound Card support (NO)
# Config change #06: Device Drivers -> USB support -> USB announce new devices (NO)
# Config change #07: Device Drivers -> LED Support (NO)
#
make ARCH=arm CROSS_COMPILE=~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -j 8 > /dev/null
===============================================================
// The RPi system should be installed, now update it...
//
// On Raspberry Pi through ssh, or using keyboard.
//
// The default password: raspbian
//
// On desktop PC: ssh root@RPi_IP_ADDRESS_OR_HOSTNAME
//
passwd # Set the root password...
dpkg-reconfigure locales
dpkg-reconfigure tzdata
apt-get update
apt-get install build-essential
apt-get install nano
#
# You might want to change the ssh port to cut down on ssh attacks...
#
halt
#
# After halted, place the SD card back in the desktop for installation of custom Linux Kernel + Xenomai
===============================================================
// Install custom Linux Kernel + Xenomai
//
# After halted, place the SD card back in the desktop for installation of custom Linux Kernel + Xenomai
#
sudo echo 'Run this separately to cache sudo password first...'
#
sudo mount -t ext4 /dev/sde2 /mnt/gentoo && sudo mount -t vfat /dev/sde1 /mnt/gentoo/boot
sudo cp ~/Xenomai-RPi/linux/arch/arm/boot/zImage /mnt/gentoo/boot/kernel.img
cd ~/Xenomai-RPi/linux
sudo make modules_install ARCH=arm INSTALL_MOD_PATH=/mnt/gentoo
sudo make headers_install ARCH=arm INSTALL_HDR_PATH=/mnt/gentoo
sudo cp -R ~/Xenomai-RPi/linux /mnt/gentoo/usr/src/linux-3.8.13-quick+
#
cd ~/Xenomai-RPi/xenomai-2.6.3
PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
make clean
./configure --host=arm-linux-gnueabihf CFLAGS='-march=armv6' LDFLAGS='-march=armv6'
make -j 8
sudo PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin make install DESTDIR=/mnt/gentoo
#
sudo rm /mnt/gentoo/lib/modules/3.8.13-quick+/build
sudo rm /mnt/gentoo/lib/modules/3.8.13-quick+/source
sudo ln -s /usr/src/linux-3.8.13-quick+ /mnt/gentoo/lib/modules/3.8.13-quick+/build
sudo ln -s /usr/src/linux-3.8.13-quick+ /mnt/gentoo/lib/modules/3.8.13-quick+/source
#
echo 'echo -e "dwc_otg.fiq_fix_enable=0 dwc_otg.fiq_split_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait elevator=noop\n" > /mnt/gentoo/boot/cmdline.txt' | sudo sh
echo 'echo -e "gpu_mem=16\ndisable_l2cache=0\ndisable_pvt=1\n" > /mnt/gentoo/boot/config.txt' | sudo sh
#
sudo sync && sudo umount /mnt/gentoo/boot && sudo umount /mnt/gentoo
#
# disable_pvt=1 in config.txt is to avoid this issue:
# http://www.raspberrypi.org/forum/viewtopic.php?f=37&t=7696
#
# "However, every 500ms the CPU is taking some sort of exception..."
#
# "Could be sdram PVT. The GPU monitors the temperature of the sdram,
# and adjusts the refresh, momentarily DISABLING sdram, which the
# ARM may see the effect of." (emphasis added)
#
# Place the SD card back in the Raspberry Pi and boot the system...
===============================================================
// Test Xenomai (you should add load to the system)
//
# Place the SD card back in the Raspberry Pi and boot the system...
ssh root@RPi_IP_ADDRESS_OR_HOSTNAME
echo 0 > /proc/xenomai/latency
/usr/xenomai/bin/./latency -p 100
===============================================================
// Basic benchmark for the system, more elaborate benchmarks are at:
// http://www.roylongbottom.org.uk/Raspberry%20Pi%20Benchmarks.htm
//
# Place the SD card back in the Raspberry Pi and boot the system...
ssh root@RPi_IP_ADDRESS_OR_HOSTNAME
wget http://home.iae.nl/users/mhx/flops.c
gcc -O2 -DUNIX flops.c -o flops
./flops
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Xenomai] Raspberry Pi Xenomai Linux + Minimal Raspian Net Install Guide
2014-03-26 1:25 [Xenomai] Raspberry Pi Xenomai Linux + Minimal Raspian Net Install Guide Adam Vaughan
@ 2014-03-26 9:09 ` Gregory Dymarek
2014-03-26 9:43 ` Gilles Chanteperdrix
2014-03-26 9:42 ` Gilles Chanteperdrix
1 sibling, 1 reply; 8+ messages in thread
From: Gregory Dymarek @ 2014-03-26 9:09 UTC (permalink / raw)
To: xenomai@xenomai.org
Nice one.
Just to add, when compiling the same for 3.10 kernel the USB patches
are not required. The ipipe patch 3.10 also does not apply cleanly but
it is straightforward to adjust it.
On 26 March 2014 01:25, Adam Vaughan <vaughana@umich.edu> wrote:
> I don't know if you want to add this to the Xenomai wiki, but attached
> is a complete guide from start to finish for the Raspberry Pi build
> process, the relevant patches, and the net installation of a minimal
> Raspbian distro.
>
> I suppose the formatting could be worked on, but I believe it covers
> every gotcha with the RPi I'm aware of. I think it might be helpful
> to beginners.
> -------------- next part --------------
> Note: If you follow the listing below verbatim, it >> WILL ERASE EVERYTHING << on your SD card.
>
> Adjust:
>
> (1) /dev/sde to match your SD card device on your desktop / laptop
> (2) /mnt/gentoo to match your mount point for the SD card
> (3) If you're not using keyboard, the hostname to remote in with ssh
> (4) --depth=X to get compensate for any new commits
> (5) -j 8 to an appropriate number of cores on your box
> (6) Remove -quick from the paths if you use a different config
>
> After adjusting you can copy and paste each section below to your terminal.
> I've decided not to script this because there are many steps that you should
> examine the output of each step to make sure everything is going to plan.
>
>
> ===============================================================
> // Automatically install minimal Raspbian OS through net installer...
> //
> echo "wget -q -O - http://hifi.iki.fi/raspbian-ua-netinst/raspbian-ua-netinst-20140115-gitf8f70f8.img.xz | xzcat - > /dev/sde" | sudo sh
> sync
> #
> # >> BOOT THE RPi SYSTEM WITH THE SD CARD <<
> #
> # It will automatically a minimal net install over Ethernet.
> #
> # >> SKIP AHEAD << while the OS is installed automagically...
>
>
> ===============================================================
> // Blow away existing tools...
> //
> rm -Rf ~/tools # Cross compile toolchain directory
> rm -Rf ~/Xenomai-RPi # Staging directory for Linux and Xenomai code
>
>
> ===============================================================
> // Get RPi cross compile tools...
> //
> cd ~/
> git clone --depth=1 git://github.com/raspberrypi/tools.git
> cd ~/tools
> git checkout e810a0b
>
>
> ===============================================================
> // Get Xenomai 2.6.3 and commit d996a1b RPi Linux 3.8.y as per documentation
> //
> mkdir ~/Xenomai-RPi
> cd ~/Xenomai-RPi
> wget -q -O - http://download.gna.org/xenomai/stable/xenomai-2.6.3.tar.bz2 | tar -xjf -
> cd ~/Xenomai-RPi
> git clone --depth=1 -b rpi-3.8.y git://github.com/raspberrypi/linux.git
> cd linux
> git checkout d996a1b
>
>
> ===============================================================
> // Patch for Xenomai
> //
> cd ~/Xenomai-RPi/linux
> patch -Np1 < ../xenomai-2.6.3/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-pre-2.patch
> ../xenomai-2.6.3/scripts/./prepare-kernel.sh --arch=arm --linux=./ --adeos=../xenomai-2.6.3/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-3.patch
> patch -Np1 < ../xenomai-2.6.3/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patch
>
>
> ===============================================================
> // Patches to allow disabled USB FIQ and to correct for USB driver issues
> // discussed on the Xenomai mailing list...
> //
> // NOTE: If you don't apply the last 3 patches a custom FIQ will occasionally
> // not fire. I haven't fully validated that it indeed fixes the issue
> // with a logic analyzer, but I have yet to see a missed FIQ on my
> // ordinary (not mixed signal) scope.
> //
> cd ~/Xenomai-RPi/linux
> #
> #
> #
> echo -e 'diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
> index 7d521d9..f3004d4 100644
> --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
> +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
> @@ -742,8 +742,10 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd)
> }
>
> /* Clear interrupt */
> - //gintsts.b.sofintr = 1;
> - //DWC_WRITE_REG32(&hcd->core_if->core_global_regs->gintsts, gintsts.d32);
> + if (!fiq_fix_enable) {
> + gintsts.b.sofintr = 1;
> + DWC_WRITE_REG32(&hcd->core_if->core_global_regs->gintsts, gintsts.d32);
> + }
>
> return 1;
> }' | patch -p1 --ignore-whitespace
> #
> #
> #
> echo -e 'diff --git a/arch/arm/include/asm/ipipe_hwirq.h b/arch/arm/include/asm/ipipe_hwirq.h
> index 6b864aa..bd8cda1 100644
> --- a/arch/arm/include/asm/ipipe_hwirq.h
> +++ b/arch/arm/include/asm/ipipe_hwirq.h
> @@ -200,9 +200,9 @@ static inline void hard_local_irq_restore(unsigned long x)
> ipipe_unstall_root(); \\
> } while (0)
>
> -#define local_fiq_enable() ipipe_unstall_root()
> +#define local_fiq_enable() hard_local_fiq_enable_notrace()
>
> -#define local_fiq_disable() ipipe_stall_root()
> +#define local_fiq_disable() hard_local_fiq_disable_notrace()
>
> #define arch_local_irq_restore(flags) \\
> do { \\
> ' | patch -p1 --ignore-whitespace
> #
> #
> #
> echo -e 'diff --git a/drivers/usb/host/dwc_common_port/dwc_common_linux.c b/drivers/usb/host/dwc_common_port/dwc_common_linux.c
> index 0812d3a..6d01261 100644
> --- a/drivers/usb/host/dwc_common_port/dwc_common_linux.c
> +++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c
> @@ -585,6 +585,7 @@ void DWC_MODIFY_REG32(uint32_t volatile *reg, uint32_t clear_mask, uint32_t set_
> local_irq_save(flags);
> local_fiq_disable();
> writel((readl(reg) & ~clear_mask) | set_mask, reg);
> + local_fiq_enable();
> local_irq_restore(flags);
> }
>
> diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c
> index b5a007d..10eead2 100644
> --- a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c
> +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c
> @@ -1354,6 +1354,7 @@ static inline uint32_t dwc_otg_read_common_intr(dwc_otg_core_if_t * core_if, gin
> gintmsk.d32 |= gintmsk_common.d32;
> gintsts_saved.d32 &= ~gintmsk_common.d32;
> reenable_gintmsk->d32 = gintmsk.d32;
> + local_fiq_enable();
> local_irq_restore(flags);
> }
>
> diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
> index 7d521d9..86d9cbe 100644
> --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
> +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
> @@ -97,6 +97,7 @@ void notrace _fiq_print(FIQDBG_T dbg_lvl, char *fmt, ...)
> memcpy(buffer + wptr, text, 16);
> wptr = (wptr + 16) % sizeof(buffer);
> }
> + local_fiq_enable();
> local_irq_restore(flags);
> }
> #endif
> ' | patch -p1 --ignore-whitespace
>
>
> ===============================================================
> // Build the Linux kernel with Xenomai
> //
> cd ~/Xenomai-RPi/linux
> make ARCH=arm mrproper
> #
> # OPTION: make ARCH=arm bcmrpi_defconfig # Builds a lot of stuff...
> # OPTION: make ARCH=arm bcmrpi_quick_defconfig # Quick compilations when developing
> # OPTION: make ARCH=arm bcmrpi_cutdown_defconfig
> # OPTION: wget https://www.dropbox.com/s/dcju74md5sz45at/rpi_xenomai_config && mv rpi_xenomai_config .config && make ARCH=arm oldconfig
> #
> # MY CURRENT CHOICE:
> #
> make ARCH=arm bcmrpi_quick_defconfig
> #
> make ARCH=arm menuconfig
> #
> # Some config changes to consider are below...
> #
> # I use the GPIO with low latency FIQ code, so I don't want anything else
> # interfering with it, hence some of the suggested GPIO config changes.
> #
> # The worst case Xenomai response time is ~50 us, but you get all Xenomai OS features
> # The worst case FIQ response time is ~1 us, but you're on your own as far as an OS goes
> #
> # Config change #01: General setup -> Optimize very unlikely/likely branches (YES)
> # Config change #02: System Type -> Broadcom BCM2708 Implementations -> BCM2708 gpio support (NO)
> # Config change #03: CPU Power Management -> CPU idle PM support (NO)
> # Config change #04: CPU Power Management -> CPU Frequency scaling (NO)
> # Config change #05: Device Drivers -> Sound Card support (NO)
> # Config change #06: Device Drivers -> USB support -> USB announce new devices (NO)
> # Config change #07: Device Drivers -> LED Support (NO)
> #
> make ARCH=arm CROSS_COMPILE=~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -j 8 > /dev/null
>
>
> ===============================================================
> // The RPi system should be installed, now update it...
> //
> // On Raspberry Pi through ssh, or using keyboard.
> //
> // The default password: raspbian
> //
> // On desktop PC: ssh root@RPi_IP_ADDRESS_OR_HOSTNAME
> //
> passwd # Set the root password...
> dpkg-reconfigure locales
> dpkg-reconfigure tzdata
> apt-get update
> apt-get install build-essential
> apt-get install nano
> #
> # You might want to change the ssh port to cut down on ssh attacks...
> #
> halt
> #
> # After halted, place the SD card back in the desktop for installation of custom Linux Kernel + Xenomai
>
>
> ===============================================================
> // Install custom Linux Kernel + Xenomai
> //
> # After halted, place the SD card back in the desktop for installation of custom Linux Kernel + Xenomai
> #
> sudo echo 'Run this separately to cache sudo password first...'
> #
> sudo mount -t ext4 /dev/sde2 /mnt/gentoo && sudo mount -t vfat /dev/sde1 /mnt/gentoo/boot
> sudo cp ~/Xenomai-RPi/linux/arch/arm/boot/zImage /mnt/gentoo/boot/kernel.img
> cd ~/Xenomai-RPi/linux
> sudo make modules_install ARCH=arm INSTALL_MOD_PATH=/mnt/gentoo
> sudo make headers_install ARCH=arm INSTALL_HDR_PATH=/mnt/gentoo
> sudo cp -R ~/Xenomai-RPi/linux /mnt/gentoo/usr/src/linux-3.8.13-quick+
> #
> cd ~/Xenomai-RPi/xenomai-2.6.3
> PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
> make clean
> ./configure --host=arm-linux-gnueabihf CFLAGS='-march=armv6' LDFLAGS='-march=armv6'
> make -j 8
> sudo PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin make install DESTDIR=/mnt/gentoo
> #
> sudo rm /mnt/gentoo/lib/modules/3.8.13-quick+/build
> sudo rm /mnt/gentoo/lib/modules/3.8.13-quick+/source
> sudo ln -s /usr/src/linux-3.8.13-quick+ /mnt/gentoo/lib/modules/3.8.13-quick+/build
> sudo ln -s /usr/src/linux-3.8.13-quick+ /mnt/gentoo/lib/modules/3.8.13-quick+/source
> #
> echo 'echo -e "dwc_otg.fiq_fix_enable=0 dwc_otg.fiq_split_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait elevator=noop\n" > /mnt/gentoo/boot/cmdline.txt' | sudo sh
> echo 'echo -e "gpu_mem=16\ndisable_l2cache=0\ndisable_pvt=1\n" > /mnt/gentoo/boot/config.txt' | sudo sh
> #
> sudo sync && sudo umount /mnt/gentoo/boot && sudo umount /mnt/gentoo
> #
> # disable_pvt=1 in config.txt is to avoid this issue:
> # http://www.raspberrypi.org/forum/viewtopic.php?f=37&t=7696
> #
> # "However, every 500ms the CPU is taking some sort of exception..."
> #
> # "Could be sdram PVT. The GPU monitors the temperature of the sdram,
> # and adjusts the refresh, momentarily DISABLING sdram, which the
> # ARM may see the effect of." (emphasis added)
> #
> # Place the SD card back in the Raspberry Pi and boot the system...
>
>
> ===============================================================
> // Test Xenomai (you should add load to the system)
> //
> # Place the SD card back in the Raspberry Pi and boot the system...
> ssh root@RPi_IP_ADDRESS_OR_HOSTNAME
> echo 0 > /proc/xenomai/latency
> /usr/xenomai/bin/./latency -p 100
>
>
> ===============================================================
> // Basic benchmark for the system, more elaborate benchmarks are at:
> // http://www.roylongbottom.org.uk/Raspberry%20Pi%20Benchmarks.htm
> //
> # Place the SD card back in the Raspberry Pi and boot the system...
> ssh root@RPi_IP_ADDRESS_OR_HOSTNAME
> wget http://home.iae.nl/users/mhx/flops.c
> gcc -O2 -DUNIX flops.c -o flops
> ./flops
>
>
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Raspberry Pi Xenomai Linux + Minimal Raspian Net Install Guide
2014-03-26 1:25 [Xenomai] Raspberry Pi Xenomai Linux + Minimal Raspian Net Install Guide Adam Vaughan
2014-03-26 9:09 ` Gregory Dymarek
@ 2014-03-26 9:42 ` Gilles Chanteperdrix
1 sibling, 0 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2014-03-26 9:42 UTC (permalink / raw)
To: Adam Vaughan; +Cc: xenomai@xenomai.org
On 03/26/2014 02:25 AM, Adam Vaughan wrote:
> patch -Np1 < ../xenomai-2.6.3/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patch
>
>
> ===============================================================
> // Patches to allow disabled USB FIQ and to correct for USB driver issues
> // discussed on the Xenomai mailing list...
> //
> // NOTE: If you don't apply the last 3 patches a custom FIQ will occasionally
> // not fire. I haven't fully validated that it indeed fixes the issue
> // with a logic analyzer, but I have yet to see a missed FIQ on my
> // ordinary (not mixed signal) scope.
> //
> cd ~/Xenomai-RPi/linux
The -post patch should be updated to contain these patches. That is what
the -post patch is made for.
--
Gilles.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Raspberry Pi Xenomai Linux + Minimal Raspian Net Install Guide
2014-03-26 9:09 ` Gregory Dymarek
@ 2014-03-26 9:43 ` Gilles Chanteperdrix
2014-03-26 23:45 ` Adam Vaughan
0 siblings, 1 reply; 8+ messages in thread
From: Gilles Chanteperdrix @ 2014-03-26 9:43 UTC (permalink / raw)
To: Gregory Dymarek; +Cc: xenomai@xenomai.org
On 03/26/2014 10:09 AM, Gregory Dymarek wrote:
> Nice one.
>
> Just to add, when compiling the same for 3.10 kernel the USB patches
> are not required. The ipipe patch 3.10 also does not apply cleanly but
> it is straightforward to adjust it.
Then please generate a -pre and -post patch which we can put in xenomai
repository.
--
Gilles.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Raspberry Pi Xenomai Linux + Minimal Raspian Net Install Guide
2014-03-26 9:43 ` Gilles Chanteperdrix
@ 2014-03-26 23:45 ` Adam Vaughan
2014-03-27 11:18 ` Paul
0 siblings, 1 reply; 8+ messages in thread
From: Adam Vaughan @ 2014-03-26 23:45 UTC (permalink / raw)
To: xenomai@xenomai.org
> The -post patch should be updated to contain these patches. That is what
> the -post patch is made for.
Attached is a Xenomai patch for the
ipipe-core-3.8.13-raspberry-post-2.patch file.
As noted earlier, this patch covers USB driver issues discussed on the
Xenomai mailing list and allows you to disable the USB FIQ with
dwc_otg.fiq_fix_enable=0 dwc_otg.fiq_split_enable=0 in the Raspberry
Pi's cmdline.txt . I haven't finished validating that custom FIQ code
(not from the USB driver) runs completely correctly with a logic
analyzer, but so far I haven't observed any issues on my regular
scope. This consideration doesn't apply to almost all users, so I
don't think you need to worry about it.
So its all in one place, I've also attached is an updated guide for
minimal Raspbian and Xenomai with the attached patch. I've double
checked that every step works and builds a functional Xenomai + Linux
kernel that lets you load custom FIQ code to toggle / read GPIO pins.
I have not tested that GPIO interrupts for Xenomai work, but I see no
reason why they wouldn't provided you enable the driver in the kernel
configuration (which I do not enable).
> Just to add, when compiling the same for 3.10 kernel the USB patches
> are not required. The ipipe patch 3.10 also does not apply cleanly but
> it is straightforward to adjust it.
I would like to switch to 3.10 in the future, but right now I'm going
to stick with 3.8 because I feel it's the most thoroughly vetted
version with Xenomai.
-------------- next part --------------
Note: If you follow the listing below verbatim, it >> WILL ERASE EVERYTHING << on your SD card.
Adjust:
(1) /dev/sde to match your SD card device on your desktop / laptop
(2) /mnt/gentoo to match your mount point for the SD card
(3) If you're not using keyboard, the hostname to remote in with ssh
(4) --depth=X to get compensate for any new commits
(5) -j 8 to an appropriate number of cores on your box
(6) Remove -quick from the paths if you use a different config
(7) If needed, adjust the path to the location of fixes_for_usb_driver_and_fiq.patch
After adjusting you can copy and paste each section below to your terminal.
I've decided not to script this because there are many steps that you should
examine the output of each step to make sure everything is going to plan.
===============================================================
// Automatically install minimal Raspbian OS through net installer...
//
echo "wget -q -O - http://hifi.iki.fi/raspbian-ua-netinst/raspbian-ua-netinst-20140115-gitf8f70f8.img.xz | xzcat - > /dev/sde" | sudo sh
sync
#
# >> BOOT THE RPi SYSTEM WITH THE SD CARD <<
#
# It will automatically a minimal net install over Ethernet.
#
# >> SKIP AHEAD << to the next section while the OS is installed automagically...
===============================================================
// Blow away existing tools...
//
rm -Rf ~/tools # Cross compile toolchain directory
rm -Rf ~/Xenomai-RPi # Staging directory for Linux and Xenomai code
===============================================================
// Get RPi cross compile tools...
//
cd ~/
git clone --depth=1 git://github.com/raspberrypi/tools.git
cd ~/tools
git checkout e810a0b
===============================================================
// Get from git Xenomai 2.6 and commit d996a1b RPi Linux 3.8.y as per documentation
//
mkdir ~/Xenomai-RPi
cd ~/Xenomai-RPi
git clone --depth=1 git://git.xenomai.org/xenomai-2.6.git
git clone --depth=1 -b rpi-3.8.y git://github.com/raspberrypi/linux.git
cd linux
git checkout d996a1b
===============================================================
// Patch Xenomai Raspberry Pi post patch...
// >> SKIP THIS STEP << if the patch has already been applied to the Xenomai 2.6 git repository
//
cd ~/Xenomai-RPi/xenomai-2.6
git checkout 4081e1b
patch -p1 < ~/fixes_for_usb_driver_and_fiq.patch
===============================================================
// Patch Linux for Xenomai
//
cd ~/Xenomai-RPi/linux
patch -Np1 < ../xenomai-2.6/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-pre-2.patch
../xenomai-2.6/scripts/./prepare-kernel.sh --arch=arm --linux=./ --adeos=../xenomai-2.6/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-3.patch
patch -Np1 < ../xenomai-2.6/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patch
===============================================================
// Set the base Linux kernel config
//
cd ~/Xenomai-RPi/linux
make ARCH=arm mrproper
#
# OPTION: make ARCH=arm bcmrpi_defconfig # Builds a lot of stuff...
# OPTION: make ARCH=arm bcmrpi_quick_defconfig # Quick compilations when developing
# OPTION: make ARCH=arm bcmrpi_cutdown_defconfig
# OPTION: wget https://www.dropbox.com/s/dcju74md5sz45at/rpi_xenomai_config && mv rpi_xenomai_config .config && make ARCH=arm oldconfig
#
# MY CURRENT CHOICE:
#
make ARCH=arm bcmrpi_quick_defconfig
===============================================================
// Configure the Linux kernel with Xenomai
//
// Some config changes to consider are below...
//
// I use the GPIO with low latency FIQ code, so I don't want anything else
// interfering with it, hence some of the suggested GPIO config changes.
//
// The worst case Xenomai response time is ~50 us, but you get all Xenomai OS features
// The worst case FIQ response time is ~1.5 us, but you're on your own as far as an OS goes
//
// Config change #01: General setup -> Optimize very unlikely/likely branches (YES)
// Config change #02: System Type -> Broadcom BCM2708 Implementations -> BCM2708 gpio support (NO)
// Config change #03: CPU Power Management -> CPU idle PM support (NO)
// Config change #04: CPU Power Management -> CPU Frequency scaling (NO)
// Config change #05: Device Drivers -> Sound Card support (NO)
// Config change #06: Device Drivers -> USB support -> USB announce new devices (NO)
// Config change #07: Device Drivers -> LED Support (NO)
//
make ARCH=arm menuconfig
===============================================================
// Build the Linux kernel with Xenomai
//
make ARCH=arm CROSS_COMPILE=~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -j 8 > /dev/null
===============================================================
// The RPi system should have net installed by now... you need to update / configure the net install.
//
// On Raspberry Pi through ssh, or using keyboard.
//
// The default password: raspbian
//
// On desktop PC: ssh root@RPi_IP_ADDRESS_OR_FQDN (FQDN = fully qualified domain name)
//
passwd # Set the root password...
dpkg-reconfigure locales
dpkg-reconfigure tzdata
apt-get update
apt-get install build-essential
apt-get install nano
#
# You might want to change the ssh port to cut down on ssh attacks...
#
halt
#
# After halted, power off the RPi and place the SD card back in the desktop
# for installation of custom Linux Kernel + Xenomai
===============================================================
// Quickly cache sudo password...
//
sudo echo 'Run this sudo echo separately to quickly cache the sudo password before copying and pasting the next section.'
===============================================================
// Install custom Linux Kernel + Xenomai
//
// After updated, configured, halted and power off, place the SD card back
// in the desktop for installation of custom Linux Kernel + Xenomai
//
sudo mount -t ext4 /dev/sde2 /mnt/gentoo && sudo mount -t vfat /dev/sde1 /mnt/gentoo/boot
sudo cp ~/Xenomai-RPi/linux/arch/arm/boot/zImage /mnt/gentoo/boot/kernel.img
cd ~/Xenomai-RPi/linux
sudo make modules_install ARCH=arm INSTALL_MOD_PATH=/mnt/gentoo
sudo make headers_install ARCH=arm INSTALL_HDR_PATH=/mnt/gentoo
sudo cp -R ~/Xenomai-RPi/linux /mnt/gentoo/usr/src/linux-3.8.13-quick+
#
cd ~/Xenomai-RPi/xenomai-2.6
PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
make clean
./configure --host=arm-linux-gnueabihf CFLAGS='-march=armv6' LDFLAGS='-march=armv6'
make -j 8
sudo PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin make install DESTDIR=/mnt/gentoo
#
sudo rm /mnt/gentoo/lib/modules/3.8.13-quick+/build
sudo rm /mnt/gentoo/lib/modules/3.8.13-quick+/source
sudo ln -s /usr/src/linux-3.8.13-quick+ /mnt/gentoo/lib/modules/3.8.13-quick+/build
sudo ln -s /usr/src/linux-3.8.13-quick+ /mnt/gentoo/lib/modules/3.8.13-quick+/source
#
echo 'echo -e "dwc_otg.fiq_fix_enable=0 dwc_otg.fiq_split_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait elevator=noop\n" > /mnt/gentoo/boot/cmdline.txt' | sudo sh
echo 'echo -e "gpu_mem=16\ndisable_l2cache=0\ndisable_pvt=1\n" > /mnt/gentoo/boot/config.txt' | sudo sh
#
sudo sync && sudo umount /mnt/gentoo/boot && sudo umount /mnt/gentoo
#
# disable_pvt=1 in config.txt is to avoid this issue:
# http://www.raspberrypi.org/forum/viewtopic.php?f=37&t=7696
#
# "However, every 500ms the CPU is taking some sort of exception..."
#
# "Could be sdram PVT. The GPU monitors the temperature of the sdram,
# and adjusts the refresh, momentarily DISABLING sdram, which the
# ARM may see the effect of." (emphasis added)
#
# Place the SD card back in the Raspberry Pi and boot the system...
===============================================================
// Test Xenomai (you should add load to the system)
//
# Place the SD card back in the Raspberry Pi and boot the system...
ssh root@RPi_IP_ADDRESS_OR_FQDN
echo 0 > /proc/xenomai/latency
/usr/xenomai/bin/./latency -p 100
===============================================================
// Basic benchmark for the system, more elaborate benchmarks are at:
// http://www.roylongbottom.org.uk/Raspberry%20Pi%20Benchmarks.htm
//
# Place the SD card back in the Raspberry Pi and boot the system...
ssh root@RPi_IP_ADDRESS_OR_FQDN
wget http://home.iae.nl/users/mhx/flops.c
gcc -O2 -DUNIX flops.c -o flops
./flops
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixes_for_usb_driver_and_fiq.patch
Type: text/x-patch
Size: 2967 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20140326/7f269c2f/attachment.bin>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Raspberry Pi Xenomai Linux + Minimal Raspian Net Install Guide
2014-03-26 23:45 ` Adam Vaughan
@ 2014-03-27 11:18 ` Paul
2014-03-27 18:10 ` Adam Vaughan
0 siblings, 1 reply; 8+ messages in thread
From: Paul @ 2014-03-27 11:18 UTC (permalink / raw)
To: xenomai
Going to highlight a couple of issues:
On Wednesday 26 March 2014, Adam Vaughan wrote:
> So its all in one place, I've also attached is an updated guide for
> minimal Raspbian and Xenomai with the attached patch.
> ===============================================================
> // Automatically install minimal Raspbian OS through net installer...
> //
> echo "wget -q -O -
> http://hifi.iki.fi/raspbian-ua-netinst/raspbian-ua-netinst-20140115-g
>itf8f70f8.img.xz | xzcat - > /dev/sde" | sudo sh sync
A netinstall on to an SD card is extremely slow, and quite honestly, not
really needed unless you are trying squeeze a minimal install on to a
small card - The standard Raspian images fit quite comfortably on to a
2G card (which is the starting point for most).
For those that need/want a minimal embedded install will have the tools
and knowledge to produce their own.
> ===============================================================
> // Blow away existing tools...
Why ?????
> ===============================================================
> // Get RPi cross compile tools...
> git clone --depth=1 git://github.com/raspberrypi/tools.git
One of the key points of GIT (and other VCS packages) is that you only
need to pull in changes - This reduces the amount of data being
transfered and reduces the load on the hosting servers. Some people
have to pay for each Gigabyte and won't thank you for needlessly
running up their bill !
> ===============================================================
> // Set the base Linux kernel config
> # OPTION: wget
> https://www.dropbox.com/s/dcju74md5sz45at/rpi_xenomai_config && mv
> rpi_xenomai_config .config && make ARCH=arm oldconfig #
A less than optimal config with CPU Frequency scaling enabled along with
a whole bunch of debug/tracing options that impact on performance.
> ===============================================================
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Raspberry Pi Xenomai Linux + Minimal Raspian Net Install Guide
2014-03-27 11:18 ` Paul
@ 2014-03-27 18:10 ` Adam Vaughan
2014-03-27 19:09 ` Adam Vaughan
0 siblings, 1 reply; 8+ messages in thread
From: Adam Vaughan @ 2014-03-27 18:10 UTC (permalink / raw)
To: xenomai@xenomai.org
I wrote this guide as if I was starting from scratch. I thought it
would be helpful. I don't intend for it to cover everyone's use case,
but it covers all the steps to get a basic install working.
I'm not aware of any other guide that talks about the recent 3.8.13
patches for Xenomai which Gilles and Gregory figured out. This is my
primary reason for sharing it.
> A netinstall on to an SD card is extremely slow, and quite honestly, not
> really needed unless you are trying squeeze a minimal install on to a
> small card - The standard Raspian images fit quite comfortably on to a
> 2G card (which is the starting point for most).
It's not slow. It takes <10 minutes from start to finish. It takes
time to download an ~800 MB compressed Raspbian image and then load it
onto an SD card too...
As for space, I need space to store data files on a headless Raspberry
Pi. I do not need to waste space on X11 or any penguin games that
might be installed. Sure, there are other small custom options such
as Buildroot, but honestly its easier / faster to start with a
precompiled distribution with reasonably well tuned binaries.
The author of the net installer says it can fit on a 512 MB SD card
[1]. After I add compilation tools, the disk usage is 1.3 GB, which
surprised me, but I haven't looked at it closely. You can definitely
build a smaller install with other tools, but I would like to just
mention that there are other install options for the net installer,
see [1].
>> // Blow away existing tools...
>
> Why ?????
Rather than attempting to figure out what a user may or may not have
installed it's easier to just clear the two directories used.
Feel free to add checking for existing tools. If you want to also
check for a Crosstool toolchain, make sure the most recent Crosstool
is used. In another thread I mentioned SD card issues that were due
to a bad default Crosstool toolchain for the Raspberry Pi. I haven't
looked to find the actual cause, but it seems to be fixed in the most
recent version.
For what it's worth, I don't actually erase my tools each time. I
know the toolchain I currently have works.
>> // Get RPi cross compile tools...
>> git clone --depth=1 git://github.com/raspberrypi/tools.git
>
> One of the key points of GIT (and other VCS packages) is that you only
> need to pull in changes - This reduces the amount of data being
> transfered and reduces the load on the hosting servers. Some people
> have to pay for each Gigabyte and won't thank you for needlessly
> running up their bill !
You're right, I took the easiest way out by not attempting to figure
out whether the user has someone installed or not. This could be
improved, but it does not have any technical impact on the result.
As for bandwidth, --depth=1 is there. There are also companies that
provide free bandwidth and understand there are users that use that
bandwidth. I'm very happy with DreamHost.com
>> https://www.dropbox.com/s/dcju74md5sz45at/rpi_xenomai_config && mv
>> rpi_xenomai_config .config && make ARCH=arm oldconfig #
>
> A less than optimal config with CPU Frequency scaling enabled along with
> a whole bunch of debug/tracing options that impact on performance.
I hadn't looked at it closely. I didn't write it. Thanks for pointing it out.
A recommended configuration for debug and regular usage would improve
this guide.
[1] https://github.com/hifi/raspbian-ua-netinst
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Raspberry Pi Xenomai Linux + Minimal Raspian Net Install Guide
2014-03-27 18:10 ` Adam Vaughan
@ 2014-03-27 19:09 ` Adam Vaughan
0 siblings, 0 replies; 8+ messages in thread
From: Adam Vaughan @ 2014-03-27 19:09 UTC (permalink / raw)
To: xenomai@xenomai.org
Actually, I forgot I also copy over kernel sources. So that, the
kernel headers, and the Raspbian package build-essential should be
removed to cut down on the size, if you're cross-compiling everything.
Removing the kernel sources alone brings the disk usage to 320 MB.
Anyway, I need to focus on some other work. If someone wants to take
the lead and modify this guide to be better, feel free to do so.
On Thu, Mar 27, 2014 at 2:10 PM, Adam Vaughan <vaughana@umich.edu> wrote:
> I wrote this guide as if I was starting from scratch. I thought it
> would be helpful. I don't intend for it to cover everyone's use case,
> but it covers all the steps to get a basic install working.
>
> I'm not aware of any other guide that talks about the recent 3.8.13
> patches for Xenomai which Gilles and Gregory figured out. This is my
> primary reason for sharing it.
>
>
>> A netinstall on to an SD card is extremely slow, and quite honestly, not
>> really needed unless you are trying squeeze a minimal install on to a
>> small card - The standard Raspian images fit quite comfortably on to a
>> 2G card (which is the starting point for most).
>
> It's not slow. It takes <10 minutes from start to finish. It takes
> time to download an ~800 MB compressed Raspbian image and then load it
> onto an SD card too...
>
> As for space, I need space to store data files on a headless Raspberry
> Pi. I do not need to waste space on X11 or any penguin games that
> might be installed. Sure, there are other small custom options such
> as Buildroot, but honestly its easier / faster to start with a
> precompiled distribution with reasonably well tuned binaries.
>
> The author of the net installer says it can fit on a 512 MB SD card
> [1]. After I add compilation tools, the disk usage is 1.3 GB, which
> surprised me, but I haven't looked at it closely. You can definitely
> build a smaller install with other tools, but I would like to just
> mention that there are other install options for the net installer,
> see [1].
>
>
>>> // Blow away existing tools...
>>
>> Why ?????
>
> Rather than attempting to figure out what a user may or may not have
> installed it's easier to just clear the two directories used.
>
> Feel free to add checking for existing tools. If you want to also
> check for a Crosstool toolchain, make sure the most recent Crosstool
> is used. In another thread I mentioned SD card issues that were due
> to a bad default Crosstool toolchain for the Raspberry Pi. I haven't
> looked to find the actual cause, but it seems to be fixed in the most
> recent version.
>
> For what it's worth, I don't actually erase my tools each time. I
> know the toolchain I currently have works.
>
>
>>> // Get RPi cross compile tools...
>>> git clone --depth=1 git://github.com/raspberrypi/tools.git
>>
>> One of the key points of GIT (and other VCS packages) is that you only
>> need to pull in changes - This reduces the amount of data being
>> transfered and reduces the load on the hosting servers. Some people
>> have to pay for each Gigabyte and won't thank you for needlessly
>> running up their bill !
>
> You're right, I took the easiest way out by not attempting to figure
> out whether the user has someone installed or not. This could be
> improved, but it does not have any technical impact on the result.
>
> As for bandwidth, --depth=1 is there. There are also companies that
> provide free bandwidth and understand there are users that use that
> bandwidth. I'm very happy with DreamHost.com
>
>
>>> https://www.dropbox.com/s/dcju74md5sz45at/rpi_xenomai_config && mv
>>> rpi_xenomai_config .config && make ARCH=arm oldconfig #
>>
>> A less than optimal config with CPU Frequency scaling enabled along with
>> a whole bunch of debug/tracing options that impact on performance.
>
> I hadn't looked at it closely. I didn't write it. Thanks for pointing it out.
>
> A recommended configuration for debug and regular usage would improve
> this guide.
>
> [1] https://github.com/hifi/raspbian-ua-netinst
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-03-27 19:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-26 1:25 [Xenomai] Raspberry Pi Xenomai Linux + Minimal Raspian Net Install Guide Adam Vaughan
2014-03-26 9:09 ` Gregory Dymarek
2014-03-26 9:43 ` Gilles Chanteperdrix
2014-03-26 23:45 ` Adam Vaughan
2014-03-27 11:18 ` Paul
2014-03-27 18:10 ` Adam Vaughan
2014-03-27 19:09 ` Adam Vaughan
2014-03-26 9:42 ` Gilles Chanteperdrix
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.