Archive for September, 2018

How to install PPC-based ubuntu inside the x86-64 environment

Firstly my hardware is running Ubuntu 16-04 64-bit on Ryzen 7 AMD64 hardware:

I would like to install a PPC-based Ubuntu as downloaded from here:

wget http://cdimage.ubuntu.com/releases/trusty/release/ubuntu-14.04.5-server-powerpc.iso

Next is to mount the above image as cdrom image:

sudo mount -o loop=/dev/loop0 ubuntu-14.04.5-server-powerpc.iso /mnt/xubuntu/

Now going into /mnt/xubuntu/install we can identify many files: rootfilesystem, and powerpc kernel + initrd files (under powerpc and powerpc64 and e500mc)

We will use the powerpc64/vmlinux and powerpc64/initrd.gz files.

And for the squashfs it is in squashfs format – which is readonly filesystem. Since squashfs format is not recognizable by QEMU I have decided to manually convert it to ext3 filesystm as follows:

sudo mount -o loop=/dev/loop1 filesystem.squashfs /mnt/rootfs/
cd /mnt/rootfs

sudo tar cvfz /tmp/rootfs.tgz . (notice the last char is full stop ".")

dd if=/dev/zero of=/sda3/ppc_rootfs.img bs=600M count=1

cd /sda3

mkfs.ext3 ppc_rootfs.img
sudo mount ppc_rootfs.img /mnt/rootfs/
cd /mnt/rootfs/

sudo tar xvfz /tmp/rootfs.tgz .

sudo umount /mnt/rootfs

cd /mnt/xubuntu/install

And the directory looked like this:

And to startup QEMU:

sudo qemu-system-ppc64 -kernel powerpc64/vmlinux -initrd powerpc64/initrd.gz -boot c -hda /sda3/ppc_rootfs.img

And booting goes ahead:

Selection_015

Enter “Alt-Ctrl-t” and you will get this:

Selection_016

Select the “Execute a shell” and now you have a shell to run any PPC binaries you want (without ever using any “qemu-user” utilities).

Or you may want to install from the ISO file:

dd if=/dev/zero of=/sda3/ppc_hda.img bs=600M count=1
mkfs.ext3 /sda3/ppc_hda.img
sudo qemu-system-ppc64 -kernel powerpc64/vmlinux -initrd powerpc64/initrd.gz -boot c -hda /sda3/ppc_hda.img -cdrom ~/ubuntu-14.04.5-server-powerpc.iso

 

 

Scalable design checklist

  • resources locking design: by CPU, by processes, by threads etc.
  • how data structures is shared by the CPU (per-CPU or no per-CPU locking),
  • total nos of global resources and its locks,
  • nos of CPU,
  • CPU task scheduler design,
  • atomicity of instructions (number of bytes for each instructions),
  • caching / prefetching,
  • speculative prefetching,
  • timeout / round-trip time (for gigabit networking)
  • memory pool design (allocated/deallocated pool etc)
  • memory vs storage usage,
  • one-off vs repeated request design (asynchronous vs synchronous design)
  • traceability/debuggability vs scalability/performance (amount of logging)
  • bottleneck monitoring & identification – how resources competitions are even out and smoothen out (information cached in procfs etc)
  • CPU utilization
  • GPU utilization

References:

https://github.com/brendangregg/msr-cloud-tools

https://www.youtube.com/watch?v=zxCWXNigDpA

https://thetechsolo.wordpress.com/2016/02/29/scalable-io-events-vs-multithreading-based/

https://murphyswork.wordpress.com/2015/08/01/linux-tcp-connections-tuning-for-scalability/

https://mrotaru.wordpress.com/2013/10/10/scaling-to-12-million-concurrent-connections-how-migratorydata-did-it/

https://thetechsolo.wordpress.com/2016/08/28/scaling-to-thousands-of-threads/

https://cs.nju.edu.cn/tianchen/lunwen/2017/sgws-Zhao.pdf

https://lwn.net/Articles/295094/

https://lwn.net/Articles/419811/

https://lwn.net/Articles/633538/

https://lwn.net/Articles/704478/

http://www.ncic.ac.cn/~majie/Papers/References/p294_SC2000.pdf

SimpleLink Wi-Fi CC3200 Project 0: Unboxing and writing the first BLINK + Wifiwebserver

First is to watch the video:

https://www.youtube.com/watch?v=Kn-YPsByyYU

After connecting as per below the picture:

And followed by compiling the BLINK example and uploading to the Launchpad:

https://www.youtube.com/watch?v=hhdKg6_lkVA

https://training.ti.com/simplelink-wi-fi-cc3200-project-0-energia-ide

And next is to run the Wifi Webserver:

Completed.

Vickblöm

Research scattered with thoughts, ideas, and dreams

Penetration Testing Lab

Offensive Techniques & Methodologies

Astr0baby's not so random thoughts _____ rand() % 100;

@astr0baby on Twitter for fresh randomness

The Data Explorer

playing around with open data to learn some cool stuff about data analysis and the world

Conorsblog

Data | ML | NLP | Python | R

quyv

Just a thought

IFT6266 - H2017 Deep Learning

A Graduate Course Offered at Université de Montréal

Deep Learning IFT6266-H2017 UdeM

Philippe Paradis - My solutions to the image inpainting problem

IFT6266 – H2017 DEEP LEARNING

Pulkit's thoughts on the course project

Thomas Dinsmore's Blog

No man but a blockhead ever wrote except for money -- Samuel Johnson

the morning paper

a random walk through Computer Science research, by Adrian Colyer

The Spectator

Shakir's Machine Learning Blog