-->
Showing posts with label Raspberry Pi. Show all posts
Showing posts with label Raspberry Pi. Show all posts

Sunday, March 10, 2019

Raspberry Pi] 5. How do you make the serial console work on the Raspberry Pi 3 Model B+

Hello, guys. I will let you know how to make the serial console work on Raspberry Pi 3 Model B+ in this post.

IP communication via the Ethernet port is also possible. But Pi is an interesting toy, so I think you will be wondering how to make serial communication. I used the following devices for this work.

- M/M Jumper cables (20cm)
- MAX3232 RS232 to TTL Converter
- ATEN UC-232A (USB to RS-232 Adapter)

And you can check GPIO expansion of Raspberry Pi 3 Model B+ from the following website. Select the SPECIFICATIONS tab and click the Raspberry Pi 3 Model B+ schematic diagrams hyperlink.

https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/


Please, use the M/M jumper cables to connect the MAX3232 to the GPIO. Then use the USB to RS-232 Adapter to connect your MAX3232 to your PC.

Are you ready? Now turn on your Raspberry Pi.

press 'Win + r' and run the CompMgmtLauncher.exe command.


Check your USB to RS-232 adapter and run a terminal program like putty.



If you installed Raspbian on your Pi, enable the Serial Port function in the Raspberry Pi Configuration.


When you run a terminal program, you can see the login screen.


If you installed Ubuntu Server 18.04 on your Pi, first run a terminal program like putty.




When you power on your Pi, you can see the login screen.

U-Boot 2018.07-rc3+dfsg1-0ubuntu1~18.04.1 (Jan 11 2019 - 16:43:27 +0000)

DRAM:  948 MiB
RPI 3 Model B+ (0xa020d3)
MMC:   mmc@7e202000: 0, sdhci@7e300000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

Failed (-5)
In:    serial
Out:   vidconsole
Err:   vidconsole
Net:   No ethernet found.
starting USB...
USB0:   scanning bus 0 for devices... 5 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
** Bad device usb 0 **
## Info: input data size = 6 = 0x6
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
412 bytes read in 2 ms (201.2 KiB/s)
## Executing script at 02400000
23914504 bytes read in 1023 ms (22.3 MiB/s)
18783916 bytes read in 802 ms (22.3 MiB/s)
## Flattened Device Tree blob at 03000000
   Booting using the fdt blob at 0x3000000
   reserving fdt memory region: addr=0 size=1000
   Using Device Tree in place at 0000000003000000, end 0000000003009414

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 4.15.0-1031-raspi2 (buildd@bos02-arm64-006) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-16ubuntu3)) #33-Ubuntu SMP PREEMPT Wed Jan 16 09:52:45 UTC 2019 (Ubuntu 4.15.0-1031.33-raspi2 4.15.18)
[    0.000000] Machine model: Raspberry Pi 3 Model B Plus Rev 1.3
[    0.000000] cma: Reserved 8 MiB at 0x000000003ac00000
[    0.000000] random: get_random_bytes called from start_kernel+0xb4/0x41c with crng_init=0
[    0.000000] percpu: Embedded 25 pages/cpu @        (ptrval) s61464 r8192 d32744 u102400
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 238896
[    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Memory: 901268K/970752K available (11774K kernel code, 1338K rwdata, 3652K rodata, 6144K init, 1034K bss, 61292K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffff000000000000 - 0xffff000008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000   (129022 GB)
[    0.000000]       .text : 0x        (ptrval) - 0x        (ptrval)   ( 11776 KB)
[    0.000000]     .rodata : 0x        (ptrval) - 0x        (ptrval)   (  4096 KB)
[    0.000000]       .init : 0x        (ptrval) - 0x        (ptrval)   (  6144 KB)
[    0.000000]       .data : 0x        (ptrval) - 0x        (ptrval)   (  1339 KB)
[    0.000000]        .bss : 0x        (ptrval) - 0x        (ptrval)   (  1035 KB)
[    0.000000]     fixed   : 0xffff7dfffe7fb000 - 0xffff7dfffec00000   (  4116 KB)
[    0.000000]     PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffff7e0000000000 - 0xffff800000000000   (  2048 GB maximum)
[    0.000000]               0xffff7ef834000000 - 0xffff7ef834ed0000   (    14 MB actual)
[    0.000000]     memory  : 0xffffbe0d00000000 - 0xffffbe0d3b400000   (   948 MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 32826 entries in 129 pages
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000007] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000226] Console: colour dummy device 80x25
[    0.000975] console [tty1] enabled
[    0.001015] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=76800)
[    0.001059] pid_max: default: 32768 minimum: 301
[    0.001296] Security Framework initialized
[    0.001321] Yama: becoming mindful.
[    0.001470] AppArmor: AppArmor initialized
[    0.001727] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.001771] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.002848] Disabling memory control group subsystem
[    0.016017] ASID allocator initialised with 32768 entries
[    0.020024] Hierarchical SRCU implementation.
[    0.028074] smp: Bringing up secondary CPUs ...
[    0.048199] Detected VIPT I-cache on CPU1
[    0.048268] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.068272] Detected VIPT I-cache on CPU2
[    0.068323] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.088336] Detected VIPT I-cache on CPU3
[    0.088381] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.088581] smp: Brought up 1 node, 4 CPUs
[    0.088711] SMP: Total of 4 processors activated.
[    0.088737] CPU features: detected feature: 32-bit EL0 Support
[    0.088762] CPU features: detected feature: Kernel page table isolation (KPTI)
[    0.105561] CPU: All CPU(s) started at EL2
[    0.105614] alternatives: patching kernel code
[    0.107221] devtmpfs: initialized
[    0.117083] evm: security.selinux
[    0.117113] evm: security.SMACK64
[    0.117131] evm: security.SMACK64EXEC
[    0.117150] evm: security.SMACK64TRANSMUTE
[    0.117169] evm: security.SMACK64MMAP
[    0.117186] evm: security.apparmor
[    0.117204] evm: security.ima
[    0.117221] evm: security.capability
[    0.117955] Enabled cp15_barrier support
[    0.117990] Enabled setend support
[    0.118479] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.118531] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.119385] pinctrl core: initialized pinctrl subsystem
[    0.120626] NET: Registered protocol family 16
[    0.124734] audit: initializing netlink subsys (disabled)
[    0.125085] audit: type=2000 audit(0.124:1): state=initialized audit_enabled=0 res=1
[    0.125804] cpuidle: using governor ladder
[    0.125988] cpuidle: using governor menu
[    0.126492] vdso: 2 pages (1 code @         (ptrval), 1 data @         (ptrval))
[    0.126536] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.129731] DMA: preallocated 256 KiB pool for atomic allocations
[    0.129936] Serial: AMBA PL011 UART driver
[    0.132342] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.132940] uart-pl011 3f201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
[    0.165803] bcm2835-dma 3f007000.dma: DMA legacy API manager at         (ptrval), dmachans=0x1
[    0.169119] SCSI subsystem initialized
[    0.169688] usbcore: registered new interface driver usbfs
[    0.169766] usbcore: registered new interface driver hub
[    0.169900] usbcore: registered new device driver usb
[    0.170082] usb_phy_generic phy: phy supply vcc not found, using dummy regulator
[    0.170315] pps_core: LinuxPPS API ver. 1 registered
[    0.170340] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.170390] PTP clock support registered
[    0.170636] EDAC MC: Ver: 3.0.0
[    0.172700] raspberrypi-firmware soc:firmware: Attached to firmware from 2018-09-10 17:26
[    0.173694] NetLabel: Initializing
[    0.173717] NetLabel:  domain hash size = 128
[    0.173737] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.173854] NetLabel:  unlabeled traffic allowed by default
[    0.174730] clocksource: Switched to clocksource arch_sys_counter
[    0.273766] VFS: Disk quotas dquot_6.6.0
[    0.273885] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.274124] FS-Cache: Loaded
[    0.274385] CacheFiles: Loaded
[    0.274911] AppArmor: AppArmor Filesystem Enabled
[    0.285808] NET: Registered protocol family 2
[    0.286510] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.286648] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[    0.286899] TCP: Hash tables configured (established 8192 bind 8192)
[    0.287147] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.287212] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.287510] NET: Registered protocol family 1
[    0.287865] Unpacking initramfs...
[    1.885105] Freeing initrd memory: 18340K
[    1.892103] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.895433] Initialise system trusted keyrings
[    1.895508] Key type blacklist registered
[    1.895750] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    1.903661] zbud: loaded
[    1.906603] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.915439] Key type asymmetric registered
[    1.915480] Asymmetric key parser 'x509' registered
[    1.915795] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    1.916000] io scheduler noop registered
[    1.916023] io scheduler deadline registered (default)
[    1.916234] io scheduler cfq registered
[    1.916257] io scheduler kyber registered
[    1.919777] BCM2708FB: allocated DMA memory fac40000
[    1.919841] BCM2708FB: allocated DMA channel 0 @         (ptrval)
[    1.923705] Console: switching to colour frame buffer device 82x26
[    1.927705] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    1.930811] bcm2835-rng 3f104000.rng: hwrng registered
[    1.932471] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    1.936040] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    1.939459] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    2.195267] loop: module loaded
[    2.197604] Loading iSCSI transport class v2.0-870.
[    2.200239] spi-bcm2835 3f204000.spi: could not get clk: -517
[    2.202243] libphy: Fixed MDIO Bus: probed
[    2.203860] usbcore: registered new interface driver smsc95xx
[    2.205412] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    2.420145] Core Release: 2.80a
[    2.421619] Setting default values for core params
[    2.423159] Finished setting default values for core params
[    2.637600] Using Buffer DMA mode
[    2.639163] Periodic Transfer Interrupt Enhancement - disabled
[    2.640755] Multiprocessor Interrupt Enhancement - disabled
[    2.642372] OTG VER PARAM: 0, OTG VER FLAG: 0
[    2.643981] Dedicated Tx FIFOs mode
[    2.645951] WARN::dwc_otg_hcd_init:1046: FIQ DMA bounce buffers: virt = 0x08221000 dma = 0xfac54000 len=9024
[    2.649170] FIQ FSM acceleration enabled for :
[    2.649170] Non-periodic Split Transactions
[    2.649170] Periodic Split Transactions
[    2.649170] High-Speed Isochronous Endpoints
[    2.649170] Interrupt/Control Split Transaction hack enabled
[    2.656464] WARN::hcd_init_fiq:486: MPHI regs_base at 0x0804d000
[    2.657975] dwc_otg 3f980000.usb: DWC OTG Controller
[    2.659435] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    2.660918] dwc_otg 3f980000.usb: irq 15, io mem 0x00000000
[    2.662369] Init: Port Power? op_state=1
[    2.663771] Init: Power Port (0)
[    2.665334] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.666785] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.668212] usb usb1: Product: DWC OTG Controller
[    2.669608] usb usb1: Manufacturer: Linux 4.15.0-1031-raspi2 dwc_otg_hcd
[    2.671050] usb usb1: SerialNumber: 3f980000.usb
[    2.673135] hub 1-0:1.0: USB hub found
[    2.674541] hub 1-0:1.0: 1 port detected
[    2.677090] usbcore: registered new interface driver usb-storage
[    2.678921] mousedev: PS/2 mouse device common for all mice
[    2.680610] i2c /dev entries driver
[    2.683405] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[    2.685139] device-mapper: uevent: version 1.0.3
[    2.686927] device-mapper: ioctl: 4.37.0-ioctl (2017-09-20) initialised: dm-devel@redhat.com
[    2.689960] bcm2835-cpufreq: min=600000 max=1400000
[    2.693908] sdhci: Secure Digital Host Controller Interface driver
[    2.694581] sdhci: Copyright(c) Pierre Ossman
[    2.695456] mmc-bcm2835 3f300000.mmc: could not get clk, deferring probe
[    2.696294] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[    2.697022] Error: Driver 'sdhost-bcm2835' is already registered, aborting...
[    2.697734] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.699653] ledtrig-cpu: registered to indicate activity on CPUs
[    2.700451] hidraw: raw HID events driver (C) Jiri Kosina
[    2.701267] usbcore: registered new interface driver usbhid
[    2.701980] usbhid: USB HID core driver
[    2.703121] vchiq: vchiq_init_state: slot_zero =         (ptrval), is_master = 0
[    2.706479] Initializing XFRM netlink socket
[    2.707597] NET: Registered protocol family 10
[    2.719860] Segment Routing with IPv6
[    2.720679] NET: Registered protocol family 17
[    2.721472] Key type dns_resolver registered
[    2.722820] registered taskstats version 1
[    2.723544] Loading compiled-in X.509 certificates
[    2.731783] Loaded X.509 cert 'Build time autogenerated kernel key: 86b86cff859425394d64d593c308fb1bb4958e37'
[    2.733270] zswap: loaded using pool lzo/zbud
[    2.773501] Key type big_key registered
[    2.774209] Key type trusted registered
[    2.805576] Key type encrypted registered
[    2.806226] AppArmor: AppArmor sha1 policy hashing enabled
[    2.806872] ima: No TPM chip found, activating TPM-bypass! (rc=-19)
[    2.807504] ima: Allocated hash algorithm: sha1
[    2.808165] evm: HMAC attrs: 0x1
[    2.812103] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    2.812810] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 72, base_baud = 0) is a PL011 rev2
[    2.815159] console [ttyS0] disabled
[    2.815794] 3f215040.serial: ttyS0 at MMIO 0x0 (irq = 151, base_baud = 31250000) is a 16550
[    2.887509] Indeed it is in host mode hprt0 = 00021501
[    2.969513] random: fast init done
[    3.078732] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    3.078840] Indeed it is in host mode hprt0 = 00001101
[    3.298325] usb 1-1: New USB device found, idVendor=0424, idProduct=2514
[    3.298330] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.302554] hub 1-1:1.0: USB hub found
[    3.306468] hub 1-1:1.0: 4 ports detected
[    3.618728] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.753596] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514
[    3.753600] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.756936] hub 1-1.1:1.0: USB hub found
[    3.763770] hub 1-1.1:1.0: 3 ports detected
[    4.070730] usb 1-1.1.2: new full-speed USB device number 4 using dwc_otg
[    4.084300] console [ttyS0] enabled
[    4.090506] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[    4.097133] mmc-bcm2835 3f300000.mmc: DMA channel allocated
[    4.143273] sdhost: log_buf @         (ptrval) (fac53000)
[    4.166833] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    4.174544] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    4.185026] usb 1-1.1.2: New USB device found, idVendor=0557, idProduct=2022
[    4.192835] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.201686] usb 1-1.1.2: Product: ATEN USB to Serial Bridge
[    4.208018] usb 1-1.1.2: Manufacturer: Prolific Technology Inc.
[    4.208030] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    4.223131] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    4.238732] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    4.245575] hctosys: unable to open rtc device (rtc0)
[    4.251596] of_cfs_init
[    4.254748] of_cfs_init: OK
[    4.265824] Freeing unused kernel memory: 6144K
[    4.271593] Checked W+X mappings: passed, no W+X pages found
[    4.313590] mmc0: host does not support reading read-only switch, assuming write-enable
[    4.326100] mmc0: new high speed SDHC card at address 0001
[    4.332820] bounce: isa pool size: 16 pages
[    4.332980] mmcblk0: mmc0:0001 EB1QT 29.8 GiB
[    4.344217]  mmcblk0: p1 p2
[    4.345862] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    4.346283] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    4.346301] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    4.380280] mmc1: new high speed SDIO card at address 0001
[    4.458807] usb 1-1.1.1: new high-speed USB device number 5 using dwc_otg
[    4.567213] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800
[    4.575205] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    5.171312] random: crng init done
[    5.175562] random: 7 urandom warning(s) missed due to ratelimiting
[    6.774838] raid6: int64x1  gen()   394 MB/s
[    6.842735] raid6: int64x1  xor()   374 MB/s
[    6.902755] raid6: int64x2  gen()   695 MB/s
[    6.962737] raid6: int64x2  xor()   599 MB/s
[    7.022755] raid6: int64x4  gen()  1182 MB/s
[    7.082717] raid6: int64x4  xor()   841 MB/s
[    7.142740] raid6: int64x8  gen()  1107 MB/s
[    7.202731] raid6: int64x8  xor()   845 MB/s
[    7.262726] raid6: neonx1   gen()   724 MB/s
[    7.322729] raid6: neonx1   xor()   776 MB/s
[    7.382740] raid6: neonx2   gen()  1237 MB/s
[    7.438795] raid6: neonx2   xor()  1261 MB/s
[    7.494734] raid6: neonx4   gen()  1718 MB/s
[    7.550720] raid6: neonx4   xor()  1619 MB/s
[    7.606747] raid6: neonx8   gen()  1838 MB/s
[    7.662728] raid6: neonx8   xor()  1706 MB/s
[    7.673387] raid6: using algorithm neonx8 gen() 1838 MB/s
[    7.685559] raid6: .... xor() 1706 MB/s, rmw enabled
[    7.697090] raid6: using neon recovery algorithm
[    7.711290] xor: measuring software checksum speed
[    7.762721]    8regs     :  2661.000 MB/sec
[    7.810745]    8regs_prefetch:  2372.000 MB/sec
[    7.858715]    32regs    :  3265.000 MB/sec
[    7.906720]    32regs_prefetch:  2756.000 MB/sec
[    7.917133] xor: using function: 32regs (3265.000 MB/sec)
[    7.931307] async_tx: api initialized (async)
[    8.174689] Btrfs loaded, crc32c=crc32c-generic
[    8.421984] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    9.100924] systemd[1]: System time before build time, advancing clock.
[    9.184216] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.228838] systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[    9.281781] systemd[1]: Detected architecture arm64.
[    9.336056] systemd[1]: Set hostname to <ubuntu>.
[   10.043769] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[   10.079596] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[   10.117936] systemd[1]: Created slice System Slice.
[   10.139157] systemd[1]: Listening on Journal Socket (/dev/log).
[   10.161718] systemd[1]: Listening on fsck to fsckd communication Socket.
[   10.185138] systemd[1]: Listening on Journal Audit Socket.
[   10.207609] systemd[1]: Listening on LVM2 poll daemon socket.
[   10.344853] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   10.652307] systemd-journald[662]: Received request to flush runtime journal from PID 1
[   10.750910] systemd-journald[662]: File /var/log/journal/28fb42d8c3774f5d9b986c70313d674c/system.journal corrupted or uncleanly shut down, renaming and replacing.
[   10.753442] iscsi: registered transport (tcp)
[   11.963090] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43455-sdio.bin for chip 0x004345(17221) rev 0x000006
[   12.256487] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available(err=-2), device may have limited channels available
[   14.303744] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Mar  1 2015 07:29:38 version 7.45.18 (r538002) FWID 01-6a2c8ad4

Ubuntu 18.04.2 LTS ubuntu ttyS0

ubuntu login: ubuntu
Password:
Last login: Sun Mar 10 10:50:58 UTC 2019 on ttyS0
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-1031-raspi2 aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Sun Mar 10 12:21:37 UTC 2019

  System load:  0.0               Processes:           105
  Usage of /:   5.4% of 29.06GB   Users logged in:     0
  Memory usage: 15%               IP address for eth0: 172.20.15.4
  Swap usage:   0%

 * Ubuntu's Kubernetes 1.14 distributions can bypass Docker and use containerd
   directly, see https://bit.ly/ubuntu-containerd or try it now with

     snap install microk8s --channel=1.14/beta --classic

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

48 packages can be updated.
29 updates are security updates.


ubuntu@ubuntu:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            441M     0  441M   0% /dev
tmpfs            92M  4.3M   87M   5% /run
/dev/mmcblk0p2   30G  1.6G   27G   6% /
tmpfs           457M     0  457M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           457M     0  457M   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   54M  199M  22% /boot/firmware
tmpfs            92M     0   92M   0% /run/user/1000

Congratulations. Now you can make the serial console work on your Raspberry Pi. enjoy your Pi. :D

See you next. Thank you.


Saturday, March 9, 2019

Raspberry Pi] 4. Installing Ubuntu Server 18.04 on Raspberry Pi 3 Model B+

Hello, guys. I will let you know how to install Ubuntu Server 18.04 on Raspberry Pi 3 Model B+ in this post. Like Raspbian, if you install Ubuntu Linux on Raspberry Pi, the root filesystem is automatically resized on boot. So you do not need to resize the root filesystem manually. Let's see how to install it.

First please, download the Ubuntu Server image file from the website below.

https://wiki.ubuntu.com/ARM/RaspberryPi

In my case, I downloaded the 'ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz' file. If you download complete, please prepare the micro SD and SD reader. Then combine them and connect them to your computer.


If you use Windows operating system, extract the xz compress using 7-Zip and install it into the micro SD using a program such as Rufus. The use of the Rufus program is very simple. If you don't know how to use it, please refer to the post below.

https://sunguruitchannel01.blogspot.com/2019/02/useful-utilities-1-creating-bootable.html

If you are using Linux operating system, refer to the commands below to install:

[root@centos76 ~]# cd /mnt/hgfs/Raspberry/Ubuntu/
[root@centos76 Ubuntu]# ls
ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz
[root@centos76 Ubuntu]# xz -d ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz

[root@centos76 Ubuntu]# ls -l ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img
-rwxrwxrwx. 1 root root 2422361088 Mar  9 16:14 ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img

[root@centos76 Ubuntu]# lsblk /dev/sdb
NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb    8:16   1 29.8G  0 disk 

[root@centos76 Ubuntu]# dd if=ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img of=/dev/sdb bs=1M
2310+1 records in
2310+1 records out
2422361088 bytes (2.4 GB) copied, 368.764 s, 6.6 MB/s

[root@centos76 Ubuntu]# lsblk /dev/sdb
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb      8:16   1 29.8G  0 disk 
├─sdb1   8:17   1  256M  0 part 
└─sdb2   8:18   1    2G  0 part 

[root@centos76 Ubuntu]# parted /dev/sdb unit mb print free
Model: Mass Storage Device (scsi)
Disk /dev/sdb: 32011MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End      Size     Type     File system  Flags
        0.02MB  1.05MB   1.03MB            Free Space
 1      1.05MB  269MB    268MB    primary  fat32        boot, lba
 2      269MB   2422MB   2153MB   primary  ext4
        2422MB  32011MB  29589MB           Free Space

[root@centos76 Ubuntu]# eject /dev/sdb

Once the installation is complete, detach the SD reader from your computer and connect the micro SD to the raspberry pi.


Now connect the keyboard, mouse, and monitor to the Raspberry Pi and power on it. You will then be able to see the following screen.


When the boot is complete, you will see the login screen. The ID is ubuntu and the password is ubuntu.


Congratulations. Now you can use Ubuntu Server 18.04 on Raspberry Pi. enjoy your Raspberry Pi. :D

See you next. Thank you.

Friday, March 8, 2019

Raspberry Pi] 3. Installing CentOS 7.6 on Raspberry Pi 3 Model B+

Hello, guys. I will let you know how to install CentOS 7.6 in this post. Unlike Raspbian, if you install CentOS 7.6 on Raspberry Pi, the root filesystem is not automatically resized on boot. So you have to set it manually. Other than that, there is no big trouble to install. Let's see how to install it.

First please, download the CentOS 7.6 image file from the website below.

http://isoredirect.centos.org/altarch/7/isos/armhfp

In my case, I downloaded the 'CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1810-sda.raw.xz' file. Because GUI Environment consumes too much memory.

If you download complete, please prepare the micro SD and SD reader. Then combine them and connect them to your computer.


Unfortunately, the .raw extension file is not available in the Rufus program. So I used CentOS 7 virtual machine with a USB controller in VMware Workstation Pro.


After virtual machine booting, please run the following commands for installation.

[root@centos76 ~]# lsblk /dev/sdb
NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb    8:16   1 29.8G  0 disk

[root@centos76 ~]# cd /mnt/hgfs/CentOS\ 7.6/
[root@centos76 CentOS 7.6]# ls
CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1810-sda.raw.xz

[root@centos76 CentOS 7.6]# xz -d CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1810-sda.raw.xz
[root@centos76 CentOS 7.6]# dd if=CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1810-sda.raw of=/dev/sdb bs=1M
2712+0 records in
2712+0 records out
2843738112 bytes (2.8 GB) copied, 427.279 s, 6.7 MB/s

When the installation is complete, run the following commands to resize the partition of the root filesystem.

[root@centos76 CentOS 7.6]# parted /dev/sdb unit mb print free
Model: Mass Storage Device (scsi)
Disk /dev/sdb: 32011MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End      Size     Type     File system     Flags
        0.03MB  1.05MB   1.02MB            Free Space
 1      1.05MB  701MB    700MB    primary  fat32           boot, lba
 2      701MB   1213MB   512MB    primary  linux-swap(v1)
 3      1213MB  2713MB   1499MB   primary  ext4
        2713MB  32011MB  29298MB           Free Space

[root@centos76 CentOS 7.6]# parted /dev/sdb rm 3
Information: You may need to update /etc/fstab.

[root@centos76 CentOS 7.6]# parted /dev/sdb unit mb mkpart primary ext4 1213 32011
Information: You may need to update /etc/fstab.

[root@centos76 CentOS 7.6]# parted /dev/sdb print
Model: Mass Storage Device (scsi)
Disk /dev/sdb: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  701MB   700MB   primary  fat32           boot, lba
 2      701MB   1213MB  512MB   primary  linux-swap(v1)
 3      1213MB  32.0GB  30.8GB  primary  ext4



After resizing the partition, run the following commands to expand the root filesystem.

[root@centos76 CentOS 7.6]# e2fsck -f /dev/sdb3
e2fsck 1.42.9 (28-Dec-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
_/: 24455/91584 files (0.6% non-contiguous), 243184/366080 blocks

[root@centos76 CentOS 7.6]# resize2fs /dev/sdb3
resize2fs 1.42.9 (28-Dec-2013)
Resizing the filesystem on /dev/sdb3 to 7518976 (4k) blocks.
The filesystem on /dev/sdb3 is now 7518976 blocks long.

[root@centos76 CentOS 7.6]# mkdir /rasp
[root@centos76 CentOS 7.6]# mount /dev/sdb3 /rasp
[root@centos76 CentOS 7.6]# df -Ph /rasp
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb3        29G  899M   28G   4% /rasp

Finally, create a swap file and set it.

[root@centos76 CentOS 7.6]# mkdir /rasp/swapfile
[root@centos76 CentOS 7.6]# dd if=/dev/zero of=/rasp/swapfile/swapfile1 bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 147.71 s, 7.3 MB/s
[root@centos76 CentOS 7.6]# mkswap /swapfile/swapfile1
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=15ddb497-31de-4a5a-9b28-b117c6286f25
[root@centos76 CentOS 7.6]# echo '/swapfile/swapfile1 swap swap defaults 0 0' >> /rasp/etc/fstab
[root@centos76 CentOS 7.6]# umount /rasp
[root@centos76 CentOS 7.6]# rmdir /rasp
[root@centos76 CentOS 7.6]# eject /dev/sdb

Please, detach the SD reader from your computer and connect the micro SD to the raspberry pi.


Now connect the keyboard, mouse, and monitor to the Raspberry Pi and power on it. You will then be able to see the following screen.


The ID is root and the password is centos.


Congratulations. Now you can use CentOS 7.6 on Raspberry Pi. enjoy your Raspberry Pi. :D

See you next. Thank you.


Monday, March 4, 2019

Raspberry Pi] 2. Installing Raspbian on Raspberry Pi 3 Model B+

When I have free time these days, I do various tests with Raspberry Pi. Installing operating systems, using the serial ports, measuring temperature and so on. It's a very interesting thing.


Anyway, I will let you know how to install Raspbian in this post. It's so easy. First, prepare the micro SD and SD reader. Then combine them and connect them to your computer.


Second, download the Raspbian image file from the website below.

https://www.raspberrypi.org/downloads/raspbian/

In my case, I downloaded the '2018-11-13-raspbian-stretch-full.zip' file.

Once the download is complete, the file must be installed in the micro SD. If you use Windows operating system, extract the zip and install it into the micro SD using a program such as Rufus. The use of the Rufus program is very simple. If you don't know how to use it, please refer to the post below.

https://sunguruitchannel01.blogspot.com/2019/02/useful-utilities-1-creating-bootable.html

If you are using Linux operating system, refer to the commands below to install:

[root@centos76 Raspbian]# ls
2018-11-13-raspbian-stretch-full.zip  
[root@centos76 Raspbian]# unzip 2018-11-13-raspbian-stretch-full.zip
Archive:  2018-11-13-raspbian-stretch-full.zip
  inflating: 2018-11-13-raspbian-stretch-full.img  

[root@centos76 Raspbian]# ls
2018-11-13-raspbian-stretch-full.img  2018-11-13-raspbian-stretch-full.zip  
[root@centos76 Raspbian]# lsblk | grep disk
sda                  8:0    0   20G  0 disk 
sdb                  8:16   1 29.8G  0 disk

[root@centos76 Raspbian]# lsblk /dev/sdb
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb      8:16   1 29.8G  0 disk 
└─sdb1   8:17   1 29.8G  0 part /run/media/root/9016-4EF8
[root@centos76 Raspbian]# umount /run/media/root/9016-4EF8  

[root@centos76 Raspbian]# parted /dev/sdb print
Model: Mass Storage Device (scsi)
Disk /dev/sdb: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  32.0GB  32.0GB  primary  fat32        lba

[root@centos76 Raspbian]# parted /dev/sdb rm 1
Information: You may need to update /etc/fstab.

[root@centos76 Raspbian]# dd if=2018-11-13-raspbian-stretch-full.img of=/dev/sdb bs=1M
5052+0 records in
5052+0 records out
5297405952 bytes (5.3 GB) copied, 792.762 s, 6.7 MB/s

[root@centos76 Raspbian]# eject /dev/sdb
[root@centos76 Raspbian]# lsblk | grep disk
sda                  8:0    0   20G  0 disk

Once the installation is complete, detach the SD reader from your computer and connect the micro SD to the raspberry pi.


Now connect the keyboard, mouse, and monitor to the Raspberry Pi and power on it. You will then be able to see the following screen.


When the boot is complete, you will see the following screen.


Congratulations. And... enjoy your Raspberry Pi. :D

See you next. Thank you.


Saturday, February 23, 2019

Raspberry Pi] 1. My new toy.

A few days ago I bought a new toy. It is Raspberry Pi 3 Model B+. I needed a small computer for testing and I was looking for this one and buying it. What can I do with this? I pondered. But could not find the answer. So first, I just installed the operating system using the Ubuntu 18.04.2 preinstalled server image file. Oh ~ what? I felt the something signal in my head is detected.


There was not an internal temperature sensor. I need something. a temperature sensor and other parts as well.


I feel it is going to be a fun toy. :D