Posts

Recent Issue

UBoot with iMX6 - Part 1

Image
UBoot On iMX6 - Part 1 This tutorial series just including u-boot, no kernel and image will be mentioned. Platform iMX6 customized board Sabre SD platform LPDDR2 bases RS232 output Both Windows and Ubuntu PC is needed. Introduction What is u-boot? For me, I'll consider it as a BIOS or boot loader in short. For detial you can see the ref. below: Ref :  https://en.wikipedia.org/wiki/Das_U-Boot In this tutorial I'll focus on how uboot setup the controller and drive DRAM up for used. With minimum devices, only processer, DRAM and output / control with RS232, we can bootup the board and load OS with very simple hardware. If you wondering the setting of other devices like PCIe, USB .etc. you can work on those after  you finished or understand this series. Cuz this are the minimum requirement of a system, after this series you can understand tutorial like THIS rapidly. (Chinese) Create a u-boot image Ok! Let's start it! To b...

Can't find pip3 ? Here is it!

Image
Haven't update new stuff for a long time! Here comes some annoying stuff of Python3! PIP3 installed incorrectly Some times, after installed python3 manually, you some how installed it with sudo apt-get install python3-pip again. And you might get the issue like... Command «pip3» was not found, maybe you wanted to say: The command «pip» from the package «python-pip» (universe) pip3: command not found Don't be afraid! Just do what normal people come up with at the first -- Reinstall it! XD This might work in Ubuntu base linux. sudo apt-get remove python3-pip sudo apt-get install python3-pip If you are in CentOS or something try: sudo dnf reinstall python3-pip In Ubuntu using python3-pip doesn't work, I already did it~ Ok, now you can run upgrade, cuz default pip3 is version 8.0.1 sudo pip3 install --upgrade pip And... you'll found your pip DEAD, if u are as lucky as I did. Q__Q PIP3 not work while PIP3.5 did This is what u might get from pip3...

Install chrome on CentOS

Image
When installing CentOS7, This might be one of application everybody probably wanna installed. Google Chrome! Just few step, you can install it! 1. Add google repo to your yum. $ vim /etc/yum.repos.d/google.repo or $ nano /etc/yum.repos.d/google.repo Add content:  we are CentOS so...use "rpm" instead. [google64] name=Google - x86_64 baseurl=http://dl.google.com/linux/ rpm /stable/x86_64 enabled=1 gpgcheck=1 gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub And install! $ sudo yum install google-chrome-stable Now you can have chrome ! THE END                    provide

PXE server (Preboot Execution Environment)

PXE server (Preboot Execution Environment) Combine DHCP service as well as tftp service. Provide ip address through client MAC address, and send boot image for boot up. Condition NIC (Network interface card) have to support PXE function. DHCP and TFTP services are needed. DHCP Ubuntu Install : sudo apt-get install -y isc-dhcp-server Set NIC : vim /etc/default/isc-dhcp-server INTERFACES=<Interface Name> Set Config: sudo vim /etc/dhcp/dhcpd.conf CentOS7 Install : sudo yum install -y dhcp Set NIC : vim /etc/sysconfig/dhcpd DHCPDARGS=<Interface Name> Set Config : vim /etc/dhcp/dhcpd.conf DHCP config (Ubuntu & CentOS) ignore client-updates; default-lease-time 600; max-lease-time 7200; option routers 192.168.1.254; option broadcast-address 192.168.1.255; allow booting; allow bootp; subnet 192.168.1.0 netmask 255.255.255.0 {          ...

NFS setup on Ubuntu (include fstab)

Image
Hi all, Past of month, I was too busy to write new blog, though I learn a lot of new things from work. During working, my customer asked me to build up the NFS (net file system) for them, so that they can fetch the file between computers by internal network. When It comes to NFS, you might think about SAMBA server, which can be mounted with CIFS. SAMBA is a service compatible with linux and window operating system. Since I just need to make linux OS computer connected, that is no need to build up a SAMBA server on my server PC. So let's start, First of all You have to install the nfs-server and nfs-common on server and client side. you can also check if the service is installed or not by : $ dpkg -l | grep nfs-kernel-server if not,  install the service on server and client : Server : # apt-get install nfs-kernel-server Client: # apt-get install nfs-common Now we can go through the step 2 -- setting up server. Server :     create the setting ...

Python : read / write file

Image
Hi guys, Yeah~ as you see on the top of this article, I start to learn python now! hah So... I gonna record some usage and some tutorial here about python. Okay~ Let's go! Python is good at text and data operating, so... the first thing before you parsing or do some modified to the file, you have to .... open and read / write the file!! open / close the file: file = open("filename", "type") file.close() As to type we can have : r : read w : write r+ : read/write a : append Read method :  To read all content in the file you can use... print file.read() Read line by line print file.readline() Write method : file.write("aaaa") file.write(str(123) + "\n") Open file and make it close automatically : with open("filename", "w") as file: file.write("Yes!!") Yeah~~ this is the first step ! Let's continue!                                       ...

Add a user to a group

Image
Hello, recently I'm too busy to write the blog, sorry about that. Today I gonna tried to add my user to the group. Since I using the Samba server, I set some file can be accessed by specific people. So... let's start. First of all, if you use groups , you will get something like this edwinlai@edwinlai:~$ groups edwinlai adm cdrom sudo dip plugdev lpadmin sambashare  To create a new group : edwinlai@edwinlai:~$ sudo groupadd my_group Now we want to add a user into the group! Also, you can add user to multiple group at once. edwinlai@edwinlai:~$ usermod -a -G group user edwinlai@edwinlai:~$ usermod -a -G group1,group2,group3 user And if you know what is primary group , we can change use's primary group by this command: edwinlai@edwinlai:~$ usermod -g group user Now you can use groups to see the groups include the user edwinlai@edwinlai:~$ groups user Finally, we want to create a new user and add it to the group we want. edwinlai@edwinlai:~$ usera...