Tiny Core Linux
dCore Import Debian Packages to Mountable SCE extensions => dCore Armv7 => Allwinner A10 => Topic started by: athouston on July 18, 2013, 11:17:14 PM
-
I have a working MK802 1GB stick using the boot from sd card method. I am investigating how to load it on the internal nand but I am confused about some of the file relationships. I also want to try and implement TCL on other devices so I am trying to get "really techo".
My mmcblk0p1 partition contains the following files:
boot.scr
script.bin
uCore
uEnv.txt
uImage
The files I "dd'd" to the card were:
A10Core.img
sunxi-spl.bin
u-boot.bin
script.bin
What file became what (ie. what translation occurred) and what are the files for.
Thanks in advance..
-
sunxi-spl.bin
u-boot.bin
boot.scr
script.bin
uCore
uEnv.txt
uImage
All of the above are in A10Core.img. The current A10Core.img is for the Marsboard A10.
sunxi-spl.bin
u-boot.bin
These two files are the board specific boot loader files, used to initially boot from sdcard.
They are typically static and are located at specific sector and offset locations.
dd if=sunxi-spl.bin of=/dev/sdX bs=1024 seek=8
dd if=u-boot.bin of=/dev/sdX bs=1024 seek32
boot.scr
script.bin
uCore
uEnv.txt
uImage
The aove are the release files, They are visible in the first partition.
boot.scr is used by u-boot to boot the kernel and initrd.
script.bin is also typically board specific describiing features that the board supports..
uImage is the kernel, uCore is the rootfs as an initrd compressed cpio.
uEnv.txt is for additional boot parameters (extraargs), i.e, to declare the location of tce directory tce=, the timezone specs, tz= ...
-
OK. So we put the A10core image on the target and replace the Marsboard u-boot and sunxi files with the board specific versions.
Q1. Are the u-boot and sunxi files the standard files that come on the target device or do we modify them for TCL.
Q2. What happens to sunxi-spl.bin. I cannot see it on either of the TCL partitions or on any of the MK802 nand partitions.
The only other question is regarding the actual boot process.
When we power on the device the chip firmware must have a command to load a program at a specific location in order to start the boot process. On a device with onboard nand this location is obviously somewhere there. When we boot from the external sd card how do we tell the chip to use this boot location.
-
Re: Q1
The hardware section see http://tinycorelinux.net/5.x/armv7/hardware/ was made by compiling u-boot for Allwinner. It contains a list of supported hardware.
https://github/com/hno/uboot-allwinner
Re: Q2
Not seen as it is written to specific sector see prior dd command.
boot.scr is a set of commands for u-boot. It determines what and how to boot. This allwinner version looks at the first fat partition from external sdcard for script.bin and also the kernel. It is "compiled" and "decompiled" with mkimage command.
script.bin is a configuration file of hardware specifics "compiled" with fex2bin and "decompiled" bin2fex
Typically you can use the script.bin from your specific board.
uEnv.txt can override some boot paramters specified in boot.scr and is where Core specific boot parameters are located.
-
Would you please describe for me, how can I change or define the Marsboard pins setting for gpio or SPI functions?
-
Perhaps perusing Marsboard specific sites would be helpful as Arduino, electronic prototyping, is beyond the scope or intent of Core.
-
OK. I think I now have the boot process down pat, thank you. I have followed forums on a number of other sites as well to cover off my knowledge.
I see your comments regarding mkimage and fex2bin, etc. I found mkimage in the u-boot tools tcz but I cannot find any package that provides bin2fex / fex2bin.
Q1. Is there a tool chain tcz that contains the files I need (that I just haven't found) or do I have to get it from somewhere else?
Q2. Is there a good "user guide" to these programs?
I am determined to work through this so I can "roll my own" system rather than bothering someone else all the time.
Cheers.
-
fexc aka bin2fex fex2bin can be found here.
https://github.com/linux-sunxi/sunxi-tools/
There is no user guide that I am aware of.
I have created my own script to create bootable sdcard images via a selection of the supported board types that I have compiled u-boot.
-
Thanks, I'll play later today.
-
Hi,
I need a Masrsbord [a10Core.img.gz] image with GPIO & SPI enabled.
I used [linux-sunxi-g2d.zip] as <linux-sunxi> directory at <Sunxi-Bsp> (downloaded from github) root and compiled all of them with [make] after setting Ugly GPIO & SPI with [make linux-config] application.
But after making [a10_mid_hwpack.tar.xz] at <output> I can not transfer [a10Core-20130712.img.gz] and [a10_mid_hwpack.tar.xz]
with the following command:
$sudo sh ./scripts/sunxi-media-create.sh /dev/sda ./output/a10_mid_1gb_hwpack.tar.xz ../a10Core-20130712.img.gz
to SD card for the following reasons:
1- The current core does not support [tar v1.22] for *.tar.xz !
2- The [sunxi-media-create.sh] script file does not support *.img.gz for image transferring of current core!
3- After importing [dosfstools] for [mkfs.vfat] , this command makes "/dev/sda: path not found " error when run from script file but its correct when run from command promt!
How can I enable GPIO and SPI for current core image? please help me about these problems.
Thank you.
-
Looks like you are trying to use some Linaro Ubuntu scripts?
If you used the kernel config from git hub then it will not work with Core.
If you have compiled your kernel with a10Core-kernel.config and added your specific requirements then if all you have is a new kernel uImage then copy to your sdcard and test.
If you have made new modules then unpack uCore is a gzipped cpio and add the modules and repack then copy to sdcard and test.
-
Dear robert,
Would you please tell me how to enable GPIO and SPI functions and make an image for Marsboard (a10_mid_1gb) with image [a10Core-20130712.img.gz] ?
I don't know how to config [a10Core-kernel.config] file and compile it with source of TCL (linux-sunxi-g2d.zip) for image (a10Core-20130712.img.gz) to enable GPIO and SPI functions.
Would you please describe how to modify [a10Core-kernel-3.0.42.config] file and compile it with source of TCL in step by step ?
Thak you.
-
Please see: http://forum.tinycorelinux.net/index.php/topic,13827.msg78685.html#msg78685
Use this as your starting .config http://tinycorelinux.net/5.x/armv7/a10Core-kernel.config
then using make menuconfig to set your specific requirements, GPIO & SPI
-
persian,
If you would rather just have the modules you need, then please specify then in the a10Core-kernel.config and I will compile those modules and create an after boot loadable extension.
If successful, then in kind, I would ask you to post here in our forums how you use GPIO and SPI.
-
Dear Roberts,
Thank you for your replies to my questions.
I wish to use Ugly GPIO driver functions and also SPI functions, but I am beginner in linux and I decided to learn how to write programs for device drivers in linux with the help of [The linux programming interface] book and [ Writing device drivers in Linux_ A brief tutorial ] paper.
I want to write driver for my designed hardware devices.
Would you please enable for me GPIO and SPI functions for the [a10Core-20130712.img.gz] TCL image?
My arm training device is Marsboard [a10_mid_1gb].
I wish to learn the steps of modifying kernel and make TC linux image too.
I done your guided steps but I get the following error:
tc@box:/mnt/mmcblk0p2/tce$ ./arm-2010.09-50-arm-none-linux-gnueabi.bin
Checking for required programs: awk grep sed bzip2 gunzip
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
strings: '/lib/libc.so.6': No such file
Launching installer...
/mnt/mmcblk0p2/tce/install.dir.13202/Linux/resource/jre/bin/java: line 1: syntax error: unexpected "("
Thank you
-
Warning...
[Begin rant]
Why the H*** would they use Java as an archiving method?
Never I have needed Java to perform a kernel compile.
This is what I absolutely hate about the direction that Linux is going.
Bloat and unneeded crap just to unpack an archive! Really!
[/End rant]
Sorry, but this seems like a really stupid idea to require Java.
-
+1
When I had first read that, I had just wondered if that would be something arm specific, as I couldn't understand why java would get invoked...
-
I've often resorted to coffee when learning how to setup TCL on ARM devices but that sounds like flying to Brazil to buy a bottle of iced coffee.
??? ??? ???
-
Dear Roberts,
I don't know why they used Java ?!
I just used your links at the following posts :
1- [http://forum.tinycorelinux.net/index.php/topic,13827.msg78685.html#msg78685]
and
2- [http://forum.tinycorelinux.net/index.php/topic,13827.msg78687.html#msg78687].
Please help me about the above steps for kernel compile.
Thank you.
-
Dear friends,
Hi,
I used the [linux-sunxi-g2d.zip] source code (from http://tinycorelinux.net/5.x/armv7/src/) and I enabled Ugly GPIO and SPI driver with [make menuconfig] and saved them at the [.config] file.
My board is Marsboard [a10_mid_1gb], but when I used the make command I get the following error:
tc@box:/mnt/mmcblk0p2/tce/linux-sunxi-g2d$ make
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
AS arch/arm/kernel/head.o
arch/arm/kernel/head.S:93:2: error: #error "unsupport chip"
make[1]: *** [arch/arm/kernel/head.o] Error 1
make: *** [arch/arm/kernel] Error 2
Please help me about this error.
I want to make my image for enabling GPIO and SPI functions with the guidence of wiki:custom_kernel (http://wiki.tinycorelinux.net/wiki:custom_kernel).
Thank you.
-
That wiki is for x86. The marsboard being an A10 requires uImage which is a mkimaged from compiled kernel. You choice to use Allwinner is a more complex arm development environment that say rPi or even i.MX6. Anyway, if you have access to a powered hard drive to use as persistent storage then you can compile both kernel and modules on the marsbard using a10Core. You must also have swap available.
From running a10Core you just need to import
build-essential
libncurses5-dev
Then a make menuconfig should work
make
make modules
then be sure you have, get, or compile, mkimage from sunxi tools
make uImage
make modules_install=INSTALL_MOD_PATH=/mnt/sdX/some-persistent storage
If all you need are a few modules, then you may get by with make modules and make modules_install thereby bypassing sunxi tools mkimage.
Good luck
-
Dear Roberts,
Thank you for your replies to my questions.
I imported (with -b switch) the [build-eesential] and [nlibcurses5-dev] and I am working only with [linux-sunxi-g2d.zip] source codes (from http://tinycorelinux.net/5.x/armv7/src/) and make and compile them on my Marsbord (not on a PC virtual machine).
I don't know how to do the following tasks:
1- How to define or enable Swap ?
2- Which version of Sunxi tools is sweet for A10 chip and how to get and install it on my Marsborad for compilation?
3- The make menuconfig have many options for AllWinner SUN4I Platform (ARCH_SUN4I) and I don't know how to select options and sub-options for this or other (such as CPU freq., Kernel, Memory split, Preemption model, ELF, Net and ...) parameters setting ?
Note: My Marsborad have a uSD 8GB (without Hard disk) and I compile on it with the selection of Ugly GPIO and SPI drivers options in make menuconfig .
Thank you again.
-
Dear Robers,
I found how to define chip with [make menuconfig] from <linux-sunxi-g2d> directory.
But I got the following warnings and error with [make] :
:
:
CC arch/arm/mach-sun4i/dma/dma_15.o
LD arch/arm/mach-sun4i/dma/built-in.o
WARNING: arch/arm/mach-sun4i/dma/built-in.o(.devinit.text+0xc): Section mismatch in reference from the function sw_dmac_probe() to the function .init.text:sw15_dma_init()
The function __devinit sw_dmac_probe() references
a function __init sw15_dma_init().
If sw15_dma_init is only used by sw_dmac_probe then
annotate sw15_dma_init with a matching annotation.
WARNING: arch/arm/mach-sun4i/dma/built-in.o(.devinit.text+0x14): Section mismatch in reference from the function sw_dmac_probe() to the function .init.text:sw_dma_init_map()
The function __devinit sw_dmac_probe() references
a function __init sw_dma_init_map().
If sw_dma_init_map is only used by sw_dmac_probe then
annotate sw_dma_init_map with a matching annotation.
CC arch/arm/mach-sun4i/pm/pm.o
LD arch/arm/mach-sun4i/pm/built-in.o
CC arch/arm/mach-sun4i/core.o
CC arch/arm/mach-sun4i/devices.o
CC arch/arm/mach-sun4i/sys_config.o
LD arch/arm/mach-sun4i/built-in.o
WARNING: arch/arm/mach-sun4i/built-in.o(.devinit.text+0xc): Section mismatch in reference from the function sw_dmac_probe() to the function .init.text:sw15_dma_init()
The function __devinit sw_dmac_probe() references
a function __init sw15_dma_init().
If sw15_dma_init is only used by sw_dmac_probe then
annotate sw15_dma_init with a matching annotation.
WARNING: arch/arm/mach-sun4i/built-in.o(.devinit.text+0x14): Section mismatch in reference from the function sw_dmac_probe() to the function .init.text:sw_dma_init_map()
The function __devinit sw_dmac_probe() references
a function __init sw_dma_init_map().
If sw_dma_init_map is only used by sw_dmac_probe then
annotate sw_dma_init_map with a matching annotation.
CC kernel/sched.o
CC kernel/fork.o
:
:
:
LD drivers/i2c/built-in.o
CC drivers/input/input.o
drivers/input/input.c: In function 'input_pass_event':
drivers/input/input.c:106:7: warning: unused variable 'not_gsensor' [-Wunused-variable]
drivers/input/input.c:105:6: warning: unused variable 'i' [-Wunused-variable]
drivers/input/input.c: At top level:
drivers/input/input.c:88:20: warning: 'gsensor_name_list' defined but not used [-Wunused-variable]
CC drivers/input/input-compat.o
CC drivers/input/input-mt.o
:
:
:
LD drivers/media/built-in.o
CC drivers/misc/sun4i-gpio.o
drivers/misc/sun4i-gpio.c: In function 'sun4i_gpio_init':
drivers/misc/sun4i-gpio.c:248:20: warning: ignoring return value of 'sysfs_create_group', declared with attribute warn_unused_result [-Wunused-result]
LD drivers/misc/built-in.o
LD drivers/net/built-in.o
CC drivers/rtc/rtc-lib.o
LD drivers/rtc/built-in.o
CC drivers/spi/spi.o
CC drivers/spi/spi_sunxi.o
LD drivers/spi/built-in.o
WARNING: drivers/spi/built-in.o(.text+0x2818): Section mismatch in reference from the function spi_sunxi_register_spidev() to the function .init.text:spi_register_board_info()
The function spi_sunxi_register_spidev() references
the function __init spi_register_board_info().
This is often because spi_sunxi_register_spidev lacks a __init
annotation or the annotation of spi_register_board_info is wrong.
CC drivers/tty/tty_io.o
CC drivers/tty/n_tty.o
:
:
:
LD drivers/built-in.o
WARNING: drivers/built-in.o(.text+0x2abc0): Section mismatch in reference from the function spi_sunxi_register_spidev() to the function .init.text:spi_register_board_info()
The function spi_sunxi_register_spidev() references
the function __init spi_register_board_info().
This is often because spi_sunxi_register_spidev lacks a __init
annotation or the annotation of spi_register_board_info is wrong.
CC net/nonet.o
:
:
:
AR lib/lib.a
LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x119020): Section mismatch in reference from the function spi_sunxi_register_spidev() to the function .init.text:spi_register_board_info()
The function spi_sunxi_register_spidev() references
the function __init spi_register_board_info().
This is often because spi_sunxi_register_spidev lacks a __init
annotation or the annotation of spi_register_board_info is wrong.
WARNING: vmlinux.o(.devinit.text+0x74): Section mismatch in reference from the function sw_dmac_probe() to the function .init.text:sw15_dma_init()
The function __devinit sw_dmac_probe() references
a function __init sw15_dma_init().
If sw15_dma_init is only used by sw_dmac_probe then
annotate sw15_dma_init with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x7c): Section mismatch in reference from the function sw_dmac_probe() to the function .init.text:sw_dma_init_map()
The function __devinit sw_dmac_probe() references
a function __init sw_dma_init_map().
If sw_dma_init_map is only used by sw_dmac_probe then
annotate sw_dma_init_map with a matching annotation.
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
drivers/built-in.o: In function `mma7660_probe':
hid-input.c:(.devinit.text+0xdc): undefined reference to `input_allocate_polled_device'
hid-input.c:(.devinit.text+0x1a0): undefined reference to `input_register_polled_device'
make: *** [.tmp_vmlinux1] Error 1
tc@box:/mnt/mmcblk0p2/tce/linux-sunxi-g2d$
I found [mma7660] is an I2C G-sensor but I did not enable any G-sensor with [make menuconfig] and this option is not selected in menuconfig !
please help me about the above warning and error.
Thank you.
-
Sorry, but if you don't know basic Linux, i.e., enabling swap, then I would suggest that you should start there. Get a book on Linux, also there are books on embedded linux development explaining u-boot, as well a much available on the internet. Without basic Linux knowledge this task will be most difficult.
When compiling a kernel there will be some warning messages. Did you start with a10-kernel.config and just add you requirements? You still haven't even indicated the kernel config additions that meet your requirements. What did you add to a10-kernel.config?
Another thing, I am sure that you would not want to load the compiler environment upon evey boot. Using import -b is not recommended. Basic use of dCore is import, which is used only once, loadsce which is used when you want to load and use an application.
-
Dear Roberts,
Thank you, I know the difference of (import -b) and (loadsce).
As I said before I want to enable Ugly GPIO and SPI driver, then I think at file [a10Core-kernel.config] the following line
# CONFIG_SUN4I_GPIO_UGLY is not set
must be change to
CONFIG_SUN4I_GPIO_UGLY=y
but I did not find any line for enabling general SPI functions (for general hardware devices such as RFM12B RF modules or other self-made GSM, ADXL345 sensor or GPS devices ).
I done the above with [make menuconfig] but after make I got the following error.
Why the following error occued ? I did not enable any G-sensore such as mma7660 !
drivers/built-in.o: In function `mma7660_probe':
hid-input.c:(.devinit.text+0xdc): undefined reference to `input_allocate_polled_device'
hid-input.c:(.devinit.text+0x1a0): undefined reference to `input_register_polled_device'
make: *** [.tmp_vmlinux1] Error 1
Thanks again.
-
Where is the location of [a10Core-kernel.config] at <linux-sunxi-g2d> directory for compilation ?
-
Hi persian
hid-input.c:(.devinit.text+0xdc): undefined reference to `input_allocate_polled_device'
hid-input.c:(.devinit.text+0x1a0): undefined reference to `input_register_polled_device'
Try setting INPUT_POLLDEV in menuconfig to Y and see if that helps.
-
Dear Roberts & Rich,
Thank you for your useful posts specially Reply #20 and Reply #26.
Finally I makes modules and installed them with the following command :
tc@box:/mnt/mmcblk0p2/tce/linux-sunxi-g2d$ sudo make modules_install INSTALL_MOD_PATH=/mnt/mmcblk0p2/My_Added_Modules
INSTALL drivers/misc/sun4i-gpio.ko
INSTALL drivers/spi/spi_sunxi.ko
DEPMOD 3.0.42
Warning: you may need to install module-init-tools
See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt
Also I imported and loaded [module-init-tools] but I got the following error when I tried to load sun4i-gpio.ko and spi_sunxi.ko modules with modprobe command:
tc@box:/mnt/mmcblk0p2/My_Added_Modules/lib/modules/3.0.42/kernel/drivers/misc$ modprobe sun4i-gpio
modprobe: module sun4i-gpio not found in modules.dep
or
tc@box:/mnt/mmcblk0p2/My_Added_Modules/lib/modules/3.0.42/kernel/drivers/misc$ modprobe sun4i-gpio.ko
modprobe: module sun4i-gpio not found in modules.dep
The content of [modules.dep] file (at location: /mnt/mmcblk0p2/My_Added_Modules/lib/modules/3.0.42/) is:
----------------------------------------------------
kernel/drivers/misc/sun4i-gpio.ko:
kernel/drivers/spi/spi_sunxi.ko:
What is my fault?
Thank you
-
The modules would need to be standard locations and included in modules.dep in order to use modprobe.
But, no problem, use insmod with full path to module to test.
# insmod /mnt/your_drive/and_path_to/kernel/drivers/misc/sun4i-gpio.ko
# insmod /mnt/your_drive/and_path_to/kernel/drivers/misc/spi_sunxi.ko
Once you know it is working then make an sce extension with just those modules.
You can use 8192cu.sce as an exmple sce extension which it just a module.
unpack it with unsquashfs to see.
pack yours with mksquashfs
-
Dear Roberts,
It gives me an error that:
insmod: can't insert 'sun4i-gpio.ko': invalid module format
I think that this error is because of my kernel version is not the one on which I am running the insmod command, but I don't know what to do to sort out this problem?
I downloaded and used the [linux-sunxi-g2d.zip] source file (from http://tinycorelinux.net/5.x/armv7/src/) for making these modules.
Also I run dmesg and uname -a commands and the results are :
tc@box:/mnt/mmcblk0p2/My_Added_Modules/lib/modules/3.0.42/kernel/drivers/misc$ dmesg
:
:
[ 2239.490000] sun4i_gpio: module_layout: kernel tainted.
[ 2239.500000] Disabling lock debugging due to kernel taint
[ 2239.500000] sun4i_gpio: version magic '3.0.42 ARMv7 ' should be '3.0.42 preempt mod_unload modversions ARMv7 '
[ 3118.120000] spi_sunxi: version magic '3.0.42 ARMv7 ' should be '3.0.42 preempt mod_unload modversions ARMv7 '
tc@box:/mnt/mmcblk0p2/My_Added_Modules/lib/modules/3.0.42/kernel/drivers/misc$ uname -a
Linux box 3.0.42 #3 PREEMPT Fri Feb 8 18:38:58 PST 2013 armv7l GNU/Linux
I attached the driver modules as a compressed tar file to this post for your review.
Please help me about the action I should take to sort out this problem?
Thanks,
[EDIT] Attachment removed due to policy violation. Rich
-
insmod: can't insert 'sun4i-gpio.ko': invalid module format
I know that this error is because of my kernel version is not the one on which I am running the insmod command, but I don't know what to do to sort out this problem?
You have already pinned down the issue by yourself...
kernel modules are specific to a kernel build, so make sure you insmod modules respective to kernel you are running.
-
Dear tinypoodle,
What is your opinion about the following lines ?
Thank you.
:
:
insmod: can't insert 'sun4i-gpio.ko': invalid module format
:
:
I run dmesg and uname -a commands and the results are :
tc@box:/mnt/mmcblk0p2/My_Added_Modules/lib/modules/3.0.42/kernel/drivers/misc$ dmesg
:
:
[ 2239.490000] sun4i_gpio: module_layout: kernel tainted.
[ 2239.500000] Disabling lock debugging due to kernel taint
[ 2239.500000] sun4i_gpio: version magic '3.0.42 ARMv7 ' should be '3.0.42 preempt mod_unload modversions ARMv7 '
[ 3118.120000] spi_sunxi: version magic '3.0.42 ARMv7 ' should be '3.0.42 preempt mod_unload modversions ARMv7 '
tc@box:/mnt/mmcblk0p2/My_Added_Modules/lib/modules/3.0.42/kernel/drivers/misc$ uname -a
Linux box 3.0.42 #3 PREEMPT Fri Feb 8 18:38:58 PST 2013 armv7l GNU/Linux
-
Hi persian
It's rejecting the module because its version does not match the version of your kernel.
sun4i_gpio version=3.0.42 ARMv7
kernel version=3.0.42 #3 PREEMPT
I removed the attachment from your previous post. Forum rules forbid the attachment of binaries.
-
Appears that gpio could be made into a loadable module with existing kernel. I did such.
However, enabling spi requires a new kernel. Therefore your issue.
I assume that you built a new kernel, so next step is to make it Allwinner loadable with mkimage.
You can import u-boot-tools, loadsce u-boot-tools to get mkimage.
Then from your linux source directory
make uImage
Finally copy uImage to sdcard to test boot. Then try insmod your new modules.
-
Dear Roberts,
Thank you, for your effective replies to my questions.
I replaced the [.config] file with [a10Core-kernel-3.0.42.config] and make the uImage successfully and then boot the TC linux from uSD with it.
Also I make a new script.bin for GPIO support (but not for SPI because I don't know how to do it).
Now GPIO attached and work correctly, but when I reboot Marsboard the GPIO disappear!
How can I establish the GPIO for ever ?
I tested the modprobe but It did not have any permanent effect after insmod (and before insmod it make "not found in modules.dep" error).
Also when I run insmod command for spi_sunxi.ko, I get the following error:
root@box:~# insmod /mnt/mmcblk0p2/My_Added_Modules/lib/modules/3.0.42/kernel/drivers/spi/spi_sunxi.ko
Segmentation fault
The dmesg command report the following error:
:
:
[ 1768.180000] [spi]: sw spi init !!
[ 1768.180000] [spi]: Found 0 spi devices in config files
[ 1768.190000] [spi]: boards num modalias max_spd_hz bus_num cs mode
[ 1768.200000] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 1768.210000] pgd = e7298000
[ 1768.210000] [00000000] *pgd=672e8831, *pte=00000000, *ppte=00000000
[ 1768.220000] Internal error: Oops: 80000007 [#1] PREEMPT
[ 1768.220000] Modules linked in: spi_sunxi(+)
[ 1768.220000] CPU: 0 Not tainted (3.0.42 #6)
[ 1768.220000] PC is at 0x0
[ 1768.220000] LR is at spi_sunxi_register_spidev+0x1e4/0x2a4 [spi_sunxi]
[ 1768.220000] pc : [<00000000>] lr : [<bf009c34>] psr: 60000013
[ 1768.220000] sp : e72e3e08 ip : e72e3c88 fp : e72e3e5c
[ 1768.220000] r10: c0097754 r9 : 000008ab r8 : 00000000
[ 1768.220000] r7 : bf00b124 r6 : 00000000 r5 : 00000000 r4 : 00000004
[ 1768.220000] r3 : 00000002 r2 : e72e2000 r1 : 00000000 r0 : 00000000
[ 1768.220000] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 1768.220000] Control: 10c5387d Table: 67298019 DAC: 00000015
:
:
[ 1768.220000] Backtrace:
[ 1768.220000] [<bf009a50>] (spi_sunxi_register_spidev+0x0/0x2a4 [spi_sunxi]) from [<bf00d728>] (spi_sunxi_init+0xb0/0x174 [spi_sunxi])
[ 1768.220000] r7:e48fd500 r6:00000000 r5:e72e3e64 r4:00000004
[ 1768.220000] [<bf00d678>] (spi_sunxi_init+0x0/0x174 [spi_sunxi]) from [<c003539c>] (do_one_initcall+0x40/0x184)
[ 1768.220000] r6:00000000 r5:e72e2000 r4:c07e7c00
[ 1768.220000] [<c003535c>] (do_one_initcall+0x0/0x184) from [<c0098bec>] (sys_init_module+0x3c8/0x1ad0)
[ 1768.220000] [<c0098824>] (sys_init_module+0x0/0x1ad0) from [<c003ba80>] (ret_fast_syscall+0x0/0x30)
[ 1768.220000] Code: bad PC value
[ 1768.730000] ---[ end trace fa9e0a8b1d7a4898 ]---
Please help me about the above error.
Thank you again.
-
I am not knowledgable on GPIO and SPI as these have more to do with the maker crowd and are not needed for desktop.
You don't have any spi devices.
See: ls -l /dev/spi*
As far as your question about rebooting:
One step at a time. First be sure the module works then you can make a simple sce for them that will load upon boot.
-
Dear Roberts,
I configured the script.bin for GPIO and SPI .
GPIO module works fine but I must run insmod every time I reboot the Marsboard.
I don't know how to make a loadable sce for boot time.
Also the insmod of SPI module makes Segmentation fault error.
My SPI settings in script.bin are as follow:
[spi0_para]
spi_used = 1
spi_cs_bitmap = 1
spi_cs0 = port:PI10<3><default><default><default>
spi_sclk = port:PI11<3><default><default><default>
spi_mosi = port:PI12<3><default><default><default>
spi_miso = port:PI13<3><default><default><default>
[spi1_para]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 = port:PA00<4><default><default><default>
spi_sclk = port:PA01<4><default><default><default>
spi_mosi = port:PA02<4><default><default><default>
spi_miso = port:PA03<4><default><default><default>
[spi2_para]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 = port:PB14<2><default><default><default>
spi_sclk = port:PB15<2><default><default><default>
spi_mosi = port:PB16<2><default><default><default>
spi_miso = port:PB17<2><default><default><default>
spi_cs0 = port:PC19<3><default><default><default>
spi_sclk = port:PC20<3><default><default><default>
spi_mosi = port:PC21<3><default><default><default>
spi_miso = port:PC22<3><default><default><default>
[spi3_para]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 = port:PA05<3><default><default><default>
spi_sclk = port:PI06<3><default><default><default>
spi_mosi = port:PI07<3><default><default><default>
spi_miso = port:PI08<3><default><default><default>
spi_cs1 = port:PA09<3><default><default><default>
[spi_devices]
spi_dev_num = 1
[spi_board0]
modalias = "My SPI port-0"
max_speed_hz = 12000000
bus_num = 1
chip_select = 0
mode = 3
full_duplex = 0
manual_cs = 0
Thank you for your helps.
-
There are many changes in this area with newer kernel. Should be worth investigating, e.g.
CONFIG_SPI_SPIDEV
-
Dear friends;
Hi,
Today my import did not work and it exit by no error!
When I traced the /usr/bin/import script file, I found that the first wget command with the following parameters return an error:
The line:
wget -O /tmp/.depfile -cq "$IMPORTMIRROR"/PKGADDDEPS 2"
with the final content:
wget -O /tmp/.depfile -cq http://repo.tinycorelinux.net/5.x/import/PKGADDDEPS 2
Returned message:
wget: server returned error: HTTP/1.1 416 Requested Range Not Satisfiable
What's wrong ?
Also I need a command like lsusb but I don't find it.
Please help me about these problems.
Thank you.
-
Make sure your /tmp directory is writable by user tc.
-
Dear Roberts,
The TC user permission is OK.
I tested it by creating a text file with the following command:
tc@box:/tmp$ nano test.txt
The problem solved, I think it's an Internet problem.
What about lsusb command ?
Thanks
-
Google search of "wheezy lsusb" reveals: http://packages.debian.org/wheezy/usbutils
-
Dear Roberts
Thank you for your reply to my questions.
I attached a A4-Tech model: PK-760E webcam to my Marsboard and the board recognized it as follow with lsbusb command:
Bus 004 Device 003: ID 0ac8:3450 Z-Star Microelectronics Corp.
The command ls /dev | grep video returned blank and I can not run uvccapture, mplayer or webcam application for using webcam.
I googled but I did not find a detail instructions for installing webcam device driver for A4-Tech webcam.
Would you please help me about this problem for Tinycore linux ?
Thank you again.
-
Likely you need a module. If you are using 3.0.42, as currently provided, then the modules can be found here:
http://tinycorelinux.net/5.x/armv7
-
Dear Roberts,
Hi,
The flwm_topside and wbar do not run with new TCL (a10Core-130904.img.gz) on my Marsboard.
I get many errors for udev on startup and X desktop server error on HDMI screen and also the following error on putty terminal.
tc@box:~$ flwm_topside
Can't open display:
tc@box:~$ X
X.Org X Server 1.12.4
Release Date: 2012-08-27
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.0-4-mx5 armv7l Debian
Current Operating System: Linux box 3.0.42 #3 PREEMPT Fri Feb 8 18:38:58 PST 2013 armv7l
Kernel command line: console=tty0 init=/init rootwait panic=10 loglevel=3 disp.screen0_output_mode=EDID:1280x720p60 hdmi.audio=EDID:0 nozswap nortc
Build Date: 17 April 2013 11:31:56AM
xorg-server 2:1.12.4-6 (Julien Cristau <jcristau@debian.org>)
Current version of pixman: 0.26.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Sep 16 18:31:23 2013
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Also lxde and xfce do not run on new TCL version (such as version 20130712)
Please check it and help me about this problem.
Thank you for your help and the new options (such as import/debs and mksdcard) for current version.
-
I test on a Marsboard.
So please check the output of
showbootcodes
It should include desktop=flwm_topside
If not add it.
Also do not include older sces, as many changes have been made to merge and store downloaded debs and prebuilt .tar.gzs
Best to start fresh, while we are still actively developing, at least until we come to a formal release.
I will test again from a fresh sd card.
Note: I find marsboard is very picky about sdcards, on many I get I/O errors.
-
Just completed a "from zero" sdcard install for marsboard. Followed by importing the big four, Xprogs, flwm_topside, wbar, and xorg-fbdev.
Rebooted and worked as expected. Note that they are suprious boot time messages that can be ignored.
Hopefully, for your case, all you need to do is update uEnv.txt with desktop=flwm_topside.
Otherwise have patience with these microsd cards.
-
Dear Roberts
I did them from zero but flwm_topside and wbar did not work on new version (but work well on version 20130712).
The desktop=flwm_topside had added before at uEnv.txt and also at sceboot.lst
Here is my Marsboard information.
Thank you.
tc@box:~$ mount /mnt/mmcblk0p1
tc@box:~$ cat /mnt/mmcblk0p1/uEnv.txt
console=tty0
panic=10
loglevel=3
extraargs=disp.screen0_output_mode=EDID:1280x720p60 hdmi.audio=EDID:0 nozswap nortc
waitusb 5
desktop=flwm_topside
tc@box:~$ showbootcodes
console=tty0 init=/init rootwait panic=10 loglevel=3 disp.screen0_output_mode=EDID:1280x720p60 hdmi.audio=EDID:0 nozswap nortc
tc@box:~$ cat /mnt/mmcblk0p3/tce/sceboot.lst
nano
htop
dropbear
Xprogs
flwm_topside
wbar
xorg-fbdev
x11vnc
tc@box:~$ ls /mnt/mmcblk0p3/tce/sce
Xprogs.sce flwm_topside.sce lxde.sce wbar.sce xorg-fbdev.sce
dropbear.sce htop.sce nano.sce x11vnc.sce
-
extraargs should be one line, e.g.:
tc@box:~$ cat /mnt/mmcblk0p1/uEnv.txt
console=tty0
panic=10
loglevel=3
extraargs=disp.screen0_output_mode=EDID:1280x720p60 hdmi.audio=EDID:0 nozswap nortc desktop=flwm_topside
See the README-X-Desktop.txt file
Then add desktop=flwm_topside to the end of the extraargs line.
If needed waitusb should be waitusb=5 also added to the end of the extraargs line.
BTW. I am posting this from my marsboard with the latest 130904 version with dwb browser.
-
Hi persian
To show commands and results from the screen please use code tags instead of colored fonts. It's the button with the #
symbol below the Font Size drop down.
-
Dear Roberts
Hi,
I did it.
But I can not find Control panel setting for IP configuration at new version.
Thank you
-
Do you mean control panel Network GUI is not showing?
I don't use static IP so I can only say that such GUI is showing here.
I just imported LXDE and it too is working fine and the Network GUI is displayed from Control Panel.
-
In previous version we had a control panel for setting IP, Date & Time, Background logo and ... .
I want to install it in new version.
Thank you.
-
It is part of Xprogs and is working as expected on all arm platforms.
-
I can not find control panel option in TCL (flwm_topside) new version desktop menu items !
Also I can not find control panel for defining static IP in LXDE .
Thankx
-
Hi persian
Do you have Xprogs installed? Does ControlPanel show up in Wbar?
-
Dear Rich,
Hi,
The Xprogs and wbar installed and loaded at Sceboot.lst as I said in my previous post at current page (Reply #47) .
Thank you
-
Sorry. Cannot reproduce.
LXDE menu System Tools first item displayed is Control Panel. Displays correctly.
Using flwm_topside System Tools menu first item is Control Panel works as expected.
From wbar, control panel is displayed and starts as expected.
You might consider removing your sdcard and fscking it on another machine.
-
You might also open an xterm and type
cpanel
See if any I/O errors from sdcard.
I have experienced such.
-
Dear Roberts,
The Cpanel problem solved with the new Xprogs update.
Thank you
-
Dear Roberts,
Hi,
I found another problem in new image (20130904) about the RBF authentication with X11vnc server.
Authentication with X11vnc server does not work and you can not connect successfully to it by RealVNC client.
It's working well with previous image (20130712).
Please check the following setting with X11vnc server (Create a text file ~/.X.d/x11vnc with the following code then run backup command and reboot) :
x11vnc -rfbauth ~/.vnc/passwd -bg -cursor arrow -gui tray -env X11VNC_FONT_REG_SMALL='Helvetica -12' &
Note 1: Create encrypted password with the following commands:
:~$ mkdir ~/.vnc
:~$ sudo x11vnc -storepasswd 'PASSWORD' ~/.vnc/passwd
:~$ backup
Note 2: The X11vnc server only works in unsecured plain-text password mode in current image (20130904) with the following setting (Edit text file ~/.X.d/x11vnc with the following code and then run backup command and reboot):
x11vnc -passwd 'PASSWORD' -bg -cursor arrow -gui tray -env X11VNC_FONT_REG_SMALL='Helvetica -12' &
Please help me to solve this problem.
Thank you
-
Not sure what this conveys.
Obviously using external drives are fully supported.
On marsboard my extensions are on sda1 a usb flash drive.
On mele my extensions are on sda1 which is a SATA SSD drive.
BTW the only changes from the prior image have to do with the import scripts, you can check git.
-
persian, removing your post after I have responded, making my post seem inapprorpiate, gives me less incentive to want to continue to respond to you.
-
Dear Roberts,
I am sorry .
I remove it because it was my fault.
My cool disk switch was in write protected mode.
Pardon me please.