November 14, 2019, 06:36:12 am

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


Buster, Xenial and Bionic - updated 6.7.2019

Started by slovenia, December 24, 2013, 03:23:11 pm

Previous topic - Next topic

slovenia

Quote from: Sloop on March 12, 2014, 06:34:23 pm
The build script (link, you posted), is that the installation procedure for this image offered here on that topic?


Yes.

Quote
If you don't matter, could you -please- explain to me how one should choose between official "Cubian" which is offered through cubian.org and your image posted on this thread? what will be different, better, similar ? How should a user decide if one or other will fit to its needs?


Since I am the creator of image in this threat my judgement is corrupted. Don't ask me which is better :P I already write what I believe is the general difference. Both works but I can't know how good are other images since I don't work with them. I just briefly test some.

CubieBoard is not officially supported by Debian so there is no official build.

Quote
How should a user decide if one or other will fit to its needs?


Test by themselves, rely on other people opinion, popularity ?
Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4
http://www.armbian.com

Aotearoa

Quote from: Sloop on March 12, 2014, 06:34:23 pmcould you -please- explain to me how one should choose between official "Cubian" which is offered through cubian.org and your image posted on this thread?

Cubian isn't official. Cubian.org is a registered domain name but the registration data is hidden through a proxy registration service.

User slovenia on the other hand doesn't try to hide his identity. Github (where Wheezy server development is hosted) gives his name, photo and website and the registration data for his website matches.
Quote from: Sloop on March 12, 2014, 06:34:23 pmwhat will be different, better, similar ?

I haven't tried Cubian yet, but at one level Debian is Debian.

The reason I chose to try Slovenia's version first is that my first intended use for my Cubietruck is a headless server and Slovenia tries hard to create a bare minimum OS turned to act as a headless server. Being tuned is an obvious plus and minimal is a plus as it means that I have to deal with less of someone else's preferences.

As I understand it, Cubian is aimed at being a more general operating system.

If you're wanting a desktop, one major difference is that Cubian has a "Minimal LXDE with hardware accelerated" while Slovenia's Wheezy disables the hardware accelerator to release more memory. Again this is a trade-off to improve the performance as a desktop vs performance as a headless server.

NB: You can still get a desktop in Slovenia's Wheezy, but without hardware acceleration.

Quote from: Sloop on March 12, 2014, 06:34:23 pmHow should a user decide if one or other will fit to its needs?


If your intended use is desktop intensive you'll probably find Cubian a better choice.

If your intended use is headless server you'll find Slovenia's Wheezy is well worth trying.

Otherwise try them both.


Sloop

Hello again. I tried your image. I flashed my µSD card and were able to boot. As I realize the boot time is very short, so my CT boots very quick, WoW. I did not look into further details (kernel/boot settings, ramfs/tmpfs, CPU governor settings, noop/elevator settings, and so on...) but I am stuck with following problem:

I did "apt-get update && apt-get upgrade && apt-get dist-upgrade". Then I did "chmod +x /root/nand-install.sh" and executed the script with "/root/nand-install.sh". The installation told me to reboot the CT and re-execute that script which I did exactly that way. It took some minutes until it finished, and then I was told by the installation that the CT turns off and I should remove the µSD card. I did it. But when I turn on the CT it doesn't do anything, that means: it does NEITHER boot, NORE show any output on my display. Also no LED lights up except of the red power LED. No reaction.

What is wrong here?

EDIT: another question: is there a reason why you didn't implement the line "sunxi_fb_mem_reserve=16" in /boot/uEnv.ct ? As I realized in uEnv.ct you don't load MALI, so I think you can restrict the framebuffer without any problems to 16MB ? I am referring to that manual. I am asking because "free -h" shows me total RAM amount of 1,9G but I would expect 2,0G of total RAM. I tried also Cubian image, and when I used all these boot parameters I had 2,0G total RAM. So I tried to use this line also in /boot/uEnv.ct but as soon as I enter it correctly, save the file, and reboot, my CT won't boot any more. why?

MrDialUp

Anybody who has complaints about this image should just go somewhere else.  It's pretty obvious Igor has put in a lot of FREE time and effort into producing what my experience tells me has to be one of the top two images for CT that are and have been available.   Look at the new "official" Android image for CT....nobody can get that work properly and Android is more or less the official OS for CT.  Yet Igor's image works fine and if it weren't for it, I would have probably lost interest out of frustration in my CT along time ago. 

Like I said, if you wanna complain then go make your own image.  I can't make one as I don't know how and I am thankful for all the time and attention Igor has put into this project.

ua3prq


rose28357

Quote from: Sloop on March 13, 2014, 06:21:55 pm
Then I did "chmod +x /root/nand-install.sh" and executed the script with "/root/nand-install.sh". The installation told me to reboot the CT and re-execute that script which I did exactly that way. It took some minutes until it finished, and then I was told by the installation that the CT turns off and I should remove the µSD card. I did it. But when I turn on the CT it doesn't do anything, that means: it does NEITHER boot, NORE show any output on my display. Also no LED lights up except of the red power LED. No reaction.

What is wrong here?

We need some secret boot files on nand which have to be in a secret nand memory before the first nand partition. Most of these copy to nand scripts don't have these boot0/boot1 files and do not set the magic boot byte in nand.

Read here  http://linux-sunxi.org/Installing_to_NAND#First_MB

The simple solution is to install a valid lubuntu to nand via phoenix/livesuit. Check if it is bootable. That provides the boot files to nand. Then execute the copy to nand script from your sdcard distro.

Sloop

@slovenia:

- I have tried what "rose28357" have answered relating to the non-working "nand-install.sh" script. I have installed PhoenixSuit, flashed Lubuntu Server Image into NAND, and afterwards I was able to boot Lubuntu from my NAND. That means it worked. Afterwards I executed your script under /root/nand-install.sh two times (with one reboot between as required) and it worked like a charm. The content of my µSD-card were copied successfully to NAND and I am able to boot without the µSD-card. Maybe you can implement this feauture into your next image release ?

- do you know why "free -h" shows me total RAM amount of 1,9G but I would expect 2,0G of total RAM? See my last posting I wrote with the exact explanation how I tried to adjust /boot/uEnv.ct and how it results that the Cubietruck is not booting any more. Is this a known issue or am I doing something wrong? Do I have to insert "sunxi_fb_mem_reserve=16" in front of "sunxi_no_mali_mem_reserve" ?? The original /boot/uEnv.ct looks like that:

root=/dev/mmcblk0p1
extraargs=console=tty0,115200 sunxi_no_mali_mem_reserve sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p50 rootwait panic=10 rootfstype=ext4 rootflags=discard
script=/boot/ct-hdmi.bin
kernel=/boot/uImage


Maybe you could give us some hints.

- The default disk scheduler is cfq. It implements Completely Fair Queuing and is a non optimal choice for flash based block devices. I have checked that with command "cat /sys/block/mmcblk0/queue/scheduler" or "cat /sys/block/sda/queue/scheduler". Both show as result, that cfq is used (in brackets). The common choice is using the "noop" or "deadline" scheduler by adding the elevator parameter to the kernel command line (/boot/cmdline.txt). Is it possible to change the elevator in Cubietruck to "noop" ? If so, how? I cannot find a /boot/cmdline.txt or similar, as I know it from my RaspberryPi. Where do I have to change this queue elevator setting?

- When I enter "mount" or "cat /etc/mtab" I see that the mount option "relatime" is used. I don't need that and you can get more performance when using "noatime,nodiratime" as mount option. But I have realized there is no /etc/fstab file. Where is that and how should I intergrate these mount options?

Thanks a lot in advance

slovenia

QuoteI have tried what "rose28357" have answered relating to the non-working "nand-install.sh" script. I have installed PhoenixSuit, flashed Lubuntu Server Image into NAND, and afterwards I was able to boot Lubuntu from my NAND. That means it worked. Afterwards I executed your script under /root/nand-install.sh two times (with one reboot between as required) and it worked like a charm. The content of my µSD-card were copied successfully to NAND and I am able to boot without the µSD-card. Maybe you can implement this feauture into your next image release ?


This (workaround) way is currently the only way. We haven't found a better solution ... yet.

Quotedo you know why "free -h" shows me total RAM amount of 1,9G but I would expect 2,0G of total RAM? See my last posting I wrote with the exact explanation how I tried to adjust /boot/uEnv.ct and how it results that the Cubietruck is not booting any more. Is this a known issue or am I doing something wrong? Maybe you could give us some hints.


It's resolved in latest build (not published yet). Since I changed kernel version (to 3.4.79) and config I am not sure that just changing uEnv.ct helps to solve this.

QuoteIn your image you have implemented a script which will disable the LEDs at each system boot. This script is called /etc/init.d/disable_leds.sh and is integrated in update-rc.d to start automatically in runlevel 2. Just for testing purposes I have disabled this automatic start by executing this command "update-rc.d disable_led.sh remove". This will prevent the Cubietruck to put the LED brightness to zero. All LEDs lit now again. But I would like to know: Why does the blue LED blink every second two times? Where is a description for LED configuration? I'd like to configure the LEDs so I can see, if there is a network link available, if something is read/written to the µSD-card, and stuff like that. Any clues how to do that?


There is some default LED behaviour - search on the forum for info. For example: you can enable disk (sda) activity with:


echo disk-activity > /sys/devices/platform/leds-sunxi/leds/blue:ph21:led1/trigger


Quote- The default disk scheduler is cfq. It implements Completely Fair Queuing and is a non optimal choice for flash based block devices. The common choice is using the noop or deadline scheduler by adding the elevator parameter to the kernel command line (/boot/cmdline.txt). Is it possible to change the elevator in Cubietruck to "noop" ? If so, how? I cannot find a /boot/cmdline.txt or similar, as I know it from my RaspberryPi.

- When I enter "mount" or "cat /etc/mtab" I see that the mount option "relatime" is used. I don't need that and you can get more performance when using "noatime,nodiratime" as mount option. But I have realized there is no /etc/fstab file. Where is that and how should I intergrate these options?

- I would also like to add some performance tweaks, like used on my RaspberryPi in file /etc/sysctl.conf:


Performance tuning should come when the rest is done. :P

Certain things are under testing and some tweaks are already in. Cubietruck is enough different from Raspberry that you can't just grab their numbers. I use ramlog, ramtmp, ram ...  and use "noatime,commit=300" in current test build, even without journaling (just for test).

Quotevm.swappiness=10
vm.min_free_kbytes = 32768
vm.vfs_cache_pressure=50


We run the system without swap. Changing this does not make any difference.

Current I/O activity is very low and there is probably not much to be done.

QuoteIf so, how? I cannot find a /boot/cmdline.txt or similar, as I know it from my RaspberryPi. Where do I have to change this queue elevator setting?


uEnv.txt is the file where you put in kernel parameters. But no necessary that those parameters are being accepted.

It's working! Just add elevator=noop to the and of the extraargs in uEnv.txt

Quotedefault disk scheduler


I have to dig in to see If we can gain some.

I also applied over-clocking up to 1.2G - processor is on 480Mhz most of the time and when needed it boost to 1.2G. I am now running my production system on a decent SD card (3 x NAND speed) and the overall server response with all those tweaks is much better than few builds back! My wordpress blog (+some other webs and services) is running on it / tuned nginx + tuned mysql + WP super cache.

Thanks for sharing this.
Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4
http://www.armbian.com

Sloop

Quote from: slovenia on March 17, 2014, 04:06:32 pm
For example: you can enable disk (sda) activity with:

echo disk-activity > /sys/devices/platform/leds-sunxi/leds/blue:ph21:led1/trigger


Yes, I have found the necessary information. The command you explained will only be active for the current boot session. If you reboot the Cubietruck this change will not be persistent. So I converted /boot/ct-hdmi.bin to /boot/ct-hdmi.fex, adjusted this .fex file on the appropriate line, saved it and converted it back to .bin. So it is included after each system boot.

- When I enter "mount" or "cat /etc/mtab" I see that the mount option "relatime" is used. I don't need that and you can get more performance when using "noatime,nodiratime" as mount option. But I have realized there is no /etc/fstab file. Where is that and how should I intergrate these options?

Quote from: slovenia
I use ramlog, ramtmp, ram ...  and use "noatime,commit=300" in current test build, even without journaling (just for test).

ok. In my opinion no journaling would not be an option, but as you said you are just testing. But I really am interested, on how to implement "nodiratime,noatime" for my mounted µicroSD-card and my mounted /dev/sda". I am missing /etc/fstab. Where is it? How is that handled? Please provide us some more information about that scheme.

Quote from: sloveniaJust add elevator=noop to the and of the extraargs in uEnv.txt

I would like to test that. I would also like to use the updated uEnv.ct settings you posted but I am afraid that my Cubietruck won't boot when something goes wrong. How can I protect myself? Can I do a backup of /boot/uEnv.ct and in case my CT doesn't boot, how can I debug and boot into emergency mode to revert the uEnv.ct ? Just in case something goes wrong.

Thank you.

slovenia

QuoteI am missing /etc/fstab. Where is it?


It should be there but empty file by default. Just create /etc/fstab:


/dev/sda1       /ext        ext4    defaults,noatime,commit=600,errors=remount-ro        0      1
/dev/mmcblk0p1  /           ext4    defaults,noatime,commit=600,errors=remount-ro        0       0


and reboot. Next time will be mounted as written in fstab.

QuoteI am afraid that my Cubietruck won't boot when something goes wrong. How can I protect myself?


You can mount SD card on some linux if something goes wrong or preserve a working linux on NAND.

If you want to test latest build:
http://cubie.nobrainz.de/downloads/CTDebian_1.8_hdmi.zip

It will be changed before release but there is 2000MB and elevator is working.
Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4
http://www.armbian.com

Sloop

Well, you're updated uEnv.ct settings worked fine. I did "cd /boot && cp uEnv.ct uEnv.bak" and deleted all the previous content of my uEnv.ct and inserted the new one from your updated link you posted. I rebootet my cubietrcuk and it seemed to work fine. 'free -h' showed me 2.0Gigs of total RAM.

Then I re-edited /boot/uEnv.ct and added the text "elevator=noop" to the end of the extraargs line. The complete /boot/uEnv.ct looked like that:

console=tty0
root=/dev/mmcblk0p1 rootwait
extraargs=console=ttyS0,115200 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p60 panic=10 consoleblank=0 elevator=noop
script=/boot/ct-hdmi.bin
kernel=/boot/uImage


I saved and rebooted and now I have the problem that my cubietruck doesn't boot anymore :( damn it! What should I do know?

slovenia

Quote from: Sloop on March 17, 2014, 05:24:47 pm
Well, you're updated uEnv.ct settings worked fine. I did "cd /boot && cp uEnv.ct uEnv.bak" and deleted all the previous content of my uEnv.ct and inserted the new one from your updated link you posted. I rebootet my cubietrcuk and it seemed to work fine. 'free -h' showed me 2.0Gigs of total RAM.

Then I re-edited /boot/uEnv.ct and added the text "elevator=noop" to the end of the extraargs line. The complete /boot/uEnv.ct looked like that:

console=tty0
root=/dev/mmcblk0p1 rootwait
extraargs=console=ttyS0,115200 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p60 panic=10 consoleblank=0 elevator=noop
script=/boot/ct-hdmi.bin
kernel=/boot/uImage


I saved and rebooted and now I have the problem that my cubietruck doesn't boot anymore :( damn it! What should I do know?


Maybe this feature is working just in latest 3.4.79 kernel.  ??? It's hard to say without any log / console output. Also editing uEnv.txt is tricky - file must be clean.

You need a working linux to correct (edit) txt file on sdcard. If you are doing this on NAND, boot from fresh / working SD system ... mound / edit / save / reboot.

For testing - download image in previous post. All this is working 100% ... but it's no-journal + over-clocked to 1.25, ... not recommended for production.
Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4
http://www.armbian.com

Sloop

Ok, I did boot another Linux and re-edited my uEnv.txt. Well, I cannot imagine that elevator=noop does not work with Kernel 3.4.75

Just tried to switch it manually while I am online with the system:
# cat /sys/block/mmcblk0/queue/scheduler
noop deadline [cfq]

# echo noop > /sys/block/mmcblk0/queue/scheduler

# cat /sys/block/mmcblk0/queue/scheduler
[noop] deadline cfq


You see, that it works. The question is, what is the correct syntax to insert this setting into the bootloader /boot/uEnv.ct ?

EDIT: I have found the right solution (for my needs). Listen, the elevator settings "noop" or "deadline" are quite good for SSD disks, flash disks, or even cached RAID systems. But for a normal hard-disk you should use "cfq" (=the default way). In my case, I use the µicroSD-card for boot+root system, but I also have attached a 2.5" harddisk at the SATA port. So in my case the best setting would be to use "noop" for the µicroSD card (/dev/mmcblk0), but "cfq" for the hard-disk (/dev/sda). That is done by:

- installing the package "sysfsutils" with "apt-get install sysfsutils"
- editing configuration file /etc/sysfs.conf and adding a new line on the bottom of the file looking like that:
block/mmcblk0/queue/scheduler = noop
- save the file /etc/sysfs.conf and reboot

Now if you check ==> the µicroSD card uses "noop" and the hard-disk uses "cfq", just like it should ;)
# cat /sys/block/sda/queue/scheduler
noop deadline [cfq]

# cat /sys/block/mmcblk0/queue/scheduler
[noop] deadline cfq


HTH,
cheers...
Sloop

jedie

First: good package here! Seems to work fine... But:
Quote from: slovenia on December 24, 2013, 03:23:11 pm
Gigabit ethernet transfer rate is around 50% of its theoretical max rate (hardware or firmware issue)

I have installed samba and test the data rate... It's very, very poor :(
The RAM usage, load average and the current system utilisation is very low. So it the samba data rate to low because of the ethernet bottleneck?

Any idea to fix that?

slovenia

Quote from: jedie on March 18, 2014, 06:01:33 am
First: good package here! Seems to work fine... But:
Quote from: slovenia on December 24, 2013, 03:23:11 pm
Gigabit ethernet transfer rate is around 50% of its theoretical max rate (hardware or firmware issue)

I have installed samba and test the data rate... It's very, very poor :(
The RAM usage, load average and the current system utilisation is very low. So it the samba data rate to low because of the ethernet bottleneck?

Any idea to fix that?


Yes. The problem is either in driver or in hardware design. If I had an idea I would already fix this :P

C'mon. It's poor, yes! ... but very, very poor?  :P
Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4
http://www.armbian.com