Closed rhkean closed 8 years ago
@rhkean Done :+1:
Mines arriving in May, i think lol.
Which Debian Jessie image base will you be using for it?
Some notes/suggestions:
HW_MODEL
of 40. We will reserve 40-50 for Pines (eg: RPi are 0-10 etc)HW_MODEL
. Will need to go through each option and verify if HW_MODEL 40
will use it, then add the required code to support it (eg: change display resolution)@Fourdee , Don't hold your breath on a May delivery. I was supposed to have mine in February... still don't have it. :disappointed:
I'm not certain which base I'll use yet... a lot depends on which (if any) are available, tested, and supported by PINE when I start. At the moment, in the forums, it doesn't look like they're planning on supporting debian... just Ubuntu. But, the comments are suggesting a look at hardkernel images. So, I will probably start with the C2 images....
@rhkean
it doesn't look like they're planning on supporting debian... just Ubuntu
cool! now, if I can just get my board.. :cry:
got my board tonight... woot!
${somuch}envy On the positive @rhkean, I am testing 3+ "additional packages" to the dietpi-sotware utility instead of throwing 60 in! enjoy the board!!
don't be too envious... it's 2 1/2 months late and missing the screws to mount the board in on the case. 😭
wow.... 1.1GB zip file, unzips to 8GB, writes a 2.3GB partition. 😃
@rhkean
got my board tonight... woot!
woop woop :+1:. When you've had time to test it, you will have to let us know what you think of it.
wow.... 1.1GB zip file, unzips to 8GB, writes a 2.3GB partition.
lol. I feel the pain from your SD card :)
well, this is going to take a while.
I might just build it from scratch... not sure, but it definitely won't be up to DietPi standards for a couple versions. sorry
@rhkean
well, this is going to take a while.
We can always release it under alpha/beta if its "semi-working", this will be your call. I did that for the Odroid C2 whilst we wait for X11 GPU drivers and gives me a chance to iron out some of those "arm64 issues".
I might just build it from scratch... not sure, but it definitely won't be up to DietPi standards for a couple versions.
Probably best to start from scratch and compile the kernel. I'd focus on getting the device working stable as a headless system first. GPU/VPU support (eg: Kodi, desktop) and wifi could be something to be added at a later date.
When mine turns up (hopefully this year lol), i'll jump in aswell.
I got an email from backerkit.com with my tracking number...
2 days AFTER my package arrived
lmao. Epic 1st release for Pine :+1:
I just got this to boot into a simple kernel/busybox environment
And connected via UART from my Raspberry Pi
http://forum.pine64.org/showthread.php?tid=99&pid=7625#pid7625
blarg!!!! when did "minimal" come to mean 1.1GB??? http://forum.pine64.org/showthread.php?tid=87
@rhkean
when did "minimal" come to mean 1.1GB???
lol. Clearly the definition of minimal, varies depending on the person claiming it :)
@Fourdee , don't know if it's gonna boot yet, but I was too excited not to share...
@Fourdee how big is your C2 image?
how big is your C2 image?
DietPi_v115_Odroid-C2-(Jessie_arm64).img = 644,9 MB
Burned-to-SD-Card: boot = 42,3 MB + rootfs = 454,8 MB
I've got a bootable rootfs at 465MB on the Pine.
I did a dpkg --get-selections | grep -v deinstall
on the RPi and the Pine 64 after running the debian install, then deleted the extra packages
Just gotta put dietpi on the image now, but need sleep.
@rhkean
Steps to convert a standard Debian Jessie image into DietPi. Make sure the following files exist. Grab these from the testing branch:
Also, backup your current image (eg dd > file), before you start this process, just incase. These are notes I work from, just go through each line/command and let me know if you have any issues. Also, most of these are copy/paste commands, but keep an eye out for manual entries (eg: nano file).
#-------------------------------------------------------------------------
//DietPi on a fresh install
#-------------------------------------------------------------------------
#Jessie , unified apt sources.
rm /etc/apt/sources.list.d/deb-multimedia.list
cat << _EOF_ > /etc/apt/sources.list
deb http://ftp.debian.org/debian jessie main contrib non-free
deb http://ftp.debian.org/debian jessie-updates main contrib non-free
deb http://security.debian.org jessie/updates main contrib non-free
deb http://ftp.debian.org/debian jessie-backports main contrib non-free
_EOF_
#Remove following Jessie
apt-get purge dialog dhcpcd5 libsqlite* libxapian22 lua5.1 netcat-* make makedev ncdu plymouth openresolv shared-mime-in* tcpd strace tasksel* wireless-* xdg-user-dirs triggerhappy python* v4l-utils traceroute xz-utils ucf xauth zlib1g-dev xml-core aptitude* avahi-daemon rsyslog logrotate man-db manpages vim vim-common vim-runtime vim-tiny mc mc-data
apt-get autoremove --purge -y
#install
echo -e "CONF_SWAPSIZE=0" > /etc/dphys-swapfile
apt-get install -y ifmetric fbset wpasupplicant resolvconf bc dbus bzip2 psmisc bash-completion cron whiptail sudo ntp ntfs-3g dosfstools parted hdparm pciutils usbutils zip htop wput wget fake-hwclock dphys-swapfile curl unzip ca-certificates console-setup console-data console-common keyboard-configuration wireless-tools wireless-regdb crda --no-install-recommends
#firmware
apt-get install firmware-realtek firmware-ralink firmware-brcm80211 firmware-atheros -y --no-install-recommends
#DIETPI STUFF
#Create folders
mkdir /DietPi
mkdir -p /mnt/usb_1
mkdir -p /mnt/samba
mkdir -p /mnt/ftp_client
echo -e "Samba client can be installed and setup by DietPi-Config.\nSimply run: dietpi-config 8" > /mnt/samba/readme.txt
echo -e "FTP client mount can be installed and setup by DietPi-Config.\nSimply run: dietpi-config 8" > /mnt/ftp_client/readme.txt
/boot/dietpi/dietpi-logclear 2
#FSTAB
cp /boot/dietpi/conf/fstab /etc/fstab
#setup dietpi service
echo 1 > /boot/dietpi/.install_stage
cp /boot/dietpi/conf/dietpi-service /etc/init.d/dietpi-service
chmod +x /etc/init.d/dietpi-service
update-rc.d dietpi-service defaults 00 80
service dietpi-service start
#Cron jobs
cp /DietPi/dietpi/conf/cron.daily_dietpi /etc/cron.daily/dietpi
chmod +x /etc/cron.daily/dietpi
cp /DietPi/dietpi/conf/cron.hourly_dietpi /etc/cron.hourly/dietpi
chmod +x /etc/cron.hourly/dietpi
#Crontab
cat << _EOF_ > /etc/crontab
#Please use dietpi-cron to change cron start times
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 1 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 1 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 1 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
_EOF_
#ntp
rm /etc/cron.daily/ntp &> /dev/null
rm /etc/init.d/ntp &> /dev/null
#/etc/sysctl.conf
echo -e "vm.swappiness=1" >> /etc/sysctl.conf
#rc.local
cat << _EOF_ > /etc/rc.local
#!/bin/sh -e
/DietPi/dietpi/dietpi-services start
/DietPi/dietpi/dietpi-banner 0
echo " Default Login:\n Username = root\n Password = dietpi\n"
exit 0
_EOF_
#login
echo -e "\n/DietPi/dietpi/login" >> /root/.bashrc
#Network
# - enable allow-hotplug eth0 after copying.
cp /boot/dietpi/conf/network_interfaces /etc/network/interfaces
/DietPi/dietpi/func/obtain_network_details
sed -i "/allow-hotplug eth/c\allow-hotplug eth$(sed -n 1p /DietPi/dietpi/.network)" /etc/network/interfaces
#Add ipv6 flags DietPi uses to disable IPV6 if set.
# - nano /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
#htop cfg
cp /boot/dietpi/conf/htoprc /root/.config/htop/htoprc
#Hosts
cat << _EOF_ > /etc/hosts
127.0.0.1 localhost
127.0.1.1 DietPi
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
_EOF_
cat << _EOF_ > /etc/hostname
DietPi
_EOF_
#hdparm
cat << _EOF_ >> /etc/hdparm.conf
#DietPi external USB drive. Power management settings.
/dev/sda {
#10 mins
spindown_time = 120
#
apm = 254
}
_EOF_
#MANUALLY ADD /etc/bash.bashrc -----------------------------------------
export $(cat /etc/default/locale | grep LANG=)
#DietPi Additions
alias dietpi-process_tool='/DietPi/dietpi/dietpi-process_tool'
alias dietpi-letsencrypt='/DietPi/dietpi/dietpi-letsencrypt'
alias dietpi-autostart='/DietPi/dietpi/dietpi-autostart'
alias dietpi-cron='/DietPi/dietpi/dietpi-cron'
alias dietpi-launcher='/DietPi/dietpi/dietpi-launcher'
alias dietpi-cleaner='/DietPi/dietpi/dietpi-cleaner'
alias dietpi-morsecode='/DietPi/dietpi/dietpi-morsecode'
alias dietpi-sync='/DietPi/dietpi/dietpi-sync'
alias dietpi-backup='/DietPi/dietpi/dietpi-backup'
alias dietpi-bugreport='/DietPi/dietpi/dietpi-bugreport'
alias dietpi-uninstall='/DietPi/dietpi/dietpi-uninstall'
alias dietpi-services='/DietPi/dietpi/dietpi-services'
alias dietpi-config='/DietPi/dietpi/dietpi-config'
alias dietpi-software='/DietPi/dietpi/dietpi-software'
alias dietpi-update='/DietPi/dietpi/dietpi-update'
alias emulationstation='/opt/retropie/supplementary/emulationstation/emulationstation'
alias opentyrian='/usr/local/games/opentyrian/run'
alias cpu='/DietPi/dietpi/dietpi-cpuinfo'
alias dietpi-logclear='/DietPi/dietpi/dietpi-logclear'
treesize()
{
du -k --max-depth=1 | sort -nr | awk '
BEGIN {
split("KB,MB,GB,TB", Units, ",");
}
{
u = 1;
while ($1 >= 1024)
{
$1 = $1 / 1024;
u += 1;
}
$1 = sprintf("%.1f %s", $1, Units[u]);
print $0;
}
'
}
#MANUAL ADD END---------------------------------------------------
#fakehwclock - allow times in the past
sed -i "/FORCE=/c\FORCE=force" /etc/default/fake-hwclock
#wifi dongles
echo -e "options 8192cu rtw_power_mgnt=0" > /etc/modprobe.d/8192cu.conf
echo -e "options 8188eu rtw_power_mgnt=0" > /etc/modprobe.d/8188eu.conf
#Set swapfile size
echo -e "CONF_SWAPSIZE=0" > /etc/dphys-swapfile
#--------SYSTEMD---------
#nano /etc/systemd/logind.conf
#NAutoVTs=1
#nano /etc/default/console-setup
#Reduce gettys ACTIVE_CONSOLES="/dev/tty[1-2]"
systemctl disable getty@tty[2-6].service
systemctl disable serial-getty@ttyS0.service
#NTPd - remove systemd's version
systemctl disable systemd-timesync
#Remove rc.local from /etc/init.d
update-rc.d -f rc.local remove
rm /etc/init.d/rc.local
cat << _EOF_ > /etc/systemd/system/rc-local.service
[Unit]
Description=/etc/rc.local Compatibility
After=dietpi-service.service
[Service]
Type=idle
ExecStart=/etc/rc.local
StandardOutput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
_EOF_
systemctl enable rc-local.service
systemctl daemon-reload
#Shutdown SSH/Dropbear before reboot
cat << _EOF_ > /etc/systemd/system/kill-ssh-user-sessions-before-network.service
[Unit]
Description=Shutdown all ssh sessions before network
DefaultDependencies=no
Before=network.target shutdown.target
[Service]
Type=oneshot
ExecStart=/usr/bin/killall sshd && /usr/bin/killall dropbear
[Install]
WantedBy=poweroff.target halt.target reboot.target
_EOF_
systemctl enable kill-ssh-user-sessions-before-network
systemctl daemon-reload
#set en_GB.UTF8
dpkg-reconfigure tzdata
dpkg-reconfigure keyboard-configuration #Keyboard must be plugged in for this to work!
dpkg-reconfigure locales
@rhkean Whoooooohoo, excellent work, nice one! :+1:
─────────────────────────────────────── DietPi | 16:13 | Sun 01/05/16 ─────────────────────────────────────── V117 | PINE64 ─────────────────────────────────────── IP Address | ─────────────────────────────────────── Created by: Daniel Knight
:flushed: No:
─────────────────────────────────────── DietPi | 16:13 | Sun 01/05/16 ─────────────────────────────────────── V117 | PINE64 ─────────────────────────────────────── IP Address | ─────────────────────────────────────── Created by: rhkean (Rob) and Daniel Knight
👬
:wink:
@k-plan
If Rob continues to contribute, it won't be long before I add his name in the banner :)
@rhkean
You will also need to install and configure netplug on the image, as per: https://github.com/Fourdee/DietPi/issues/273#issuecomment-216048131
Run these commands:
#netplug. Resolves issues with unplugging eth and breaking all connections, when WiFi is also active: https://github.com/Fourdee/DietPi/issues/273#issuecomment-215996025
apt-get install netplug -y
cat << _EOF_ > /etc/netplug/netplugd.conf
eth*
wlan*
_EOF_
but,
HA!!!! it's not autorunning because of the
echo 1 > /boot/dietpi/.install_stage
I probably shouldn't have stayed up until 6:00am this morning.... 😆
so, I'm pretty sure that the reason the banner doesn't show up on the hdmi output is related to the way the TTY's are laid out with @longsleep 's kernel.
Unfortunately, that seems to have gotten really bad after I ran /DietPi/dietpi/finalise on my image. When I booted the finalized image, I didn't see anything on the output but the dmesg's.
I'll hook the Pi + minicom back up and see if there's any more info that comes over the UART.
EDIT: yup, it's sending the output to UART.
Now, I have to figure out how to redirect the output to /dev/console
SUCCESS!!!!!!!!!!!! now, to patch DietPi
@Fourdee this is exhausting.... how did you do this for so many other boards
@rhkean Persistence lol
Sorry Rob, probably wasnt much help.
So the main things when adding another device to DietPi:
dietpi-obtain_hw_model
= Add the device. As Pine is a new manufacture, HW_MODEL=40
would be a good number.dietpi-config
This should work off the bat, but check (find) all references to HW_MODEL
. You'll need to implement stuff like display resolution if supported by the device.dietpi-software
The big one, again its probably best to check for all references to HW_MODEL
and add for Pine as needed. If this is a arm64 image, checking for all HW_MODEL == 12
(odroid C2) references should help.Theres alot to do for a new device, so if need any assistance, just let me know. Although, I'am still waiting for my Pine so I wont be able to test it lol :(.
@Fourdee no worries there.... that was funny.
really, that was just my way of saying, "I'm still here. I didn't abandon the task."
The biggest challenge is that there isn't an official (or supported, for that matter) build to fall back on... Everything is in flux.
This will definitely go up as alpha when I'm done with it... Which I'm hoping to complete this weekend.
@rhkean
This will definitely go up as alpha when I'm done with it... Which I'm hoping to complete this weekend.
No worries and no rush. The Pine is a completely new board manufacture which comes with the downside of starting from scratch and lots of debugging (by the looks of it). You are doing a cracking job, so If you need to release it as Alpha, not an issue, we can always live patch the system in future updates as needed.
@Fourdee @k-plan
Need clarification are the following lines in /etc/network/interfaces supposed to be commented out or uncommented with the the latest netplug additions?
#allow-hotplug eth0
#allow-hotplug wlan0
thank you
@rhkean
Need clarification are the following lines in /etc/network/interfaces supposed to be commented out or uncommented with the the latest netplug additions?
They have the same effect as using auto eth0
. So you must enable at least one to allow the adapter to be active during boot.
@rhkean
When you finalize (prep system to be run for the 1st time at next reboot) the image with /DietPi/dietpi/finalise
, both get disabled. One will get enabled during 1st run setup based on user settings in dietpi.txt
https://github.com/Fourdee/DietPi/blob/master/dietpi/finalise#L97-L99 | https://github.com/Fourdee/DietPi/blob/master/dietpi/conf/network_interfaces
If I havn't explained the finalize script to you, please let me know.
@rhkean
Need clarification are the following lines in /etc/network/interfaces supposed to be commented out or uncommented with the the latest netplug additions?
it is not direct associated with netplug
. (or ifmetric
)
https://github.com/Fourdee/DietPi/issues/305
But because it is no skin off one's nose, it's stay in. https://github.com/Fourdee/DietPi/issues/273#issuecomment-216053065
To explain it short:
We have now the possibility to have two active network interface.
Each of them has a default route with a gateway.
If both interfaces are active, which one will be used?
So we need a metric
and someone who exploit this. ( ifmetric
)
Now the routing table will be build to use only one preferred gateway with one active default route.
But if one of the interfaces goes down or will be plugged out, routing table will not be automatically rebuild, because only the kernel knows, what's happened.
So we needed netplug
to watch the interface connectivity.
If something happened with the interfaces netplug
will trigger a ifdown
and ifup
, which rebuild routing table correct with currently valid routes. (in some cases a route turn)
allow-hotplug
brings only a preconfigured interface up in a running system, without reboot
or service networking restart
by user.
auto
does this only at system boot up.
Sorry, complex topic, can't explain it better in english.
But if you got the PINE64 on work, you can test it. I think you have two build-in interfaces. It's work like a charm. Thanks @Fourdee ! 👍 A " special feature" particular for PINE64 with WIFI 802.11BGN module (powered by rhkean) or RPi 3. 😄 And soon, with 13 WiFi Channels in Europe. :sweat_smile:
I have the following:
What is not completed
Impressive! Looks like I need to get a Pine as well. DietPi -- SBC thirst quencher.
@Fourdee I need a place to upload the image.
@rhkean o0o0o0o0o0o0o00o0 :dancer:
Sent you email with FTP details :+1:
The DietPi image for Pine A64 has been created and implemented by Rhkean.
DietPi for Pine A64: Give your Pine A64 some lightweight justice
For all up to date information and downloads for this release, please go to: forum.pine64.org - DietPi for PineA64
@rhkean As your Pine image is now released :+1: , you can close this ticket at your leisure.
If you have outstanding jobs/fixes that you plan to add to the Pine, probably best to create a new ticket for each specific job, or whatever works for you.
@rhkean On the social media band wagon lol: https://twitter.com/DietPi_/status/732630498183368704
Looks like my pine64 just arrived!
Mine turned up today :dancer:. @rhkean excellent work on this image :+1:. I'am thinking we should change this to Beta? I cant see any stability issues so far.
:fireworks: I don't have any objections to beta.
Add PINE64 support and optimizations to DietPi
(you can assign this to me)