> De: "Gilles Chanteperdrix" <gilles.chanteperd...@xenomai.org> > À: "aubin rebillat" <aubin.rebil...@free.fr> > Cc: xenomai-help@gna.org > Envoyé: Jeudi 10 Mai 2012 17:30:30 > Objet: Re: [Xenomai-help] Xenomai on the TS-7553 ARM SBC > > On 05/10/2012 05:18 PM, aubin.rebil...@free.fr wrote: > >> root=/dev/ram0 means that you are using an initrd, which has been > >> deprecated for many years. > > > > I don't really have another option because the board does not > > support > > U-BOOT (according to the manufacturer) and due to the specific > > bootloader on the board I need an initrd : The bootloader only > > initialises some hardware and loads the kernel image and the initrd > > in memory before jumping on the kernel code. Then it uses the > > "linux > > booting linux" technique to launch debian. I agree with you that it > > is not the way of doing it today and i suspect the board > > manufacturer > > to do so to sell a "fast booting board" because linux is booted in > > less than 4 secs (of course for debian, it takes really more). They > > actually made many things that seemed nice when i read the > > description but when i wanted to develop with it I saw a lot of > > really strange technique / behaviors (See the UART after for > > example). > > There is no difference that I know of from the bootloader side > whether > booting with an initrd or an initramfs. Anyway, the only difference > is > that initramfs wastes more memory, it is not what is causing the > problem. Either using an initrd or an initramfs wastes boot time, > which > is usually a scarse resource on embedded systems. Whatever the > bootloader, I do not see what prevents you from passing different > parameters than "root=/dev/ram0" to the kernel, which would be enough > to > boot from another device. > > But all this is unimportant. >
I'm not that experienced with initrd/initramfs and that was what the manufacturer recommended and i followed it so i can have support from them. But yes, at first, i think it can boot from another device. > > > I will look into the OABI and EABI settings then. I will also set > > up > > an NFS file system to mount debian from and see what is happening. > > > > Thank you Gilles for your reply. I will keep posting about my > > progresses. > > The issue may simply well be that your timer code does not work. > Could > you post the code for your port? That is, the code you added to get > it > work with the I-pipe patch. > Have you checked that linux timer is > still > ticking after Xenomai has been started? No, i did not check that the linux timer is still ticking. But i think it is because parts of the init script are executed and it is a shell script calling several sub-processes. Nevertheless, I will put some printk in the linux timer handler to be sure. > > You can also try to boot with CONFIG_IPIPE but without > CONFIG_XENOMAI. I did, and it's booting just fine. > > Note that in case you do not know it, there is a guide for porting > the > I-pipe patch on new ARM platforms: > > http://www.xenomai.org/index.php/I-pipe:ArmPorting This is the HOWTO I followed to make the port. Here is the code : - Timer : #ifdef CONFIG_IPIPE # ifdef CONFIG_NO_IDLE_HZ # error "Dynamic tick timer not yet supported with IPIPE" # endif /* CONFIG_NO_IDLE_HZ */ union tsc_reg { #ifdef __BIG_ENDIAN struct { unsigned long high; unsigned long low; }; #else struct { unsigned long low; unsigned long high; }; #endif unsigned long long full; }; #ifdef CONFIG_SMP static union tsc_reg tsc[NR_CPUS]; #else /* !CONFIG_SMP */ static union tsc_reg tsc[1]; #endif int __ipipe_mach_timerint = INTC_TIMER1_BIT_INDEX; int __ipipe_mach_timerstolen = 0; unsigned __ipipe_mach_ticks_per_jiffy = LATCH; int str8100_timer_initialised = 0; #endif /* CONFIG_IPIPE */ #ifdef CONFIG_IPIPE void ipipe_mach_update_tsc(void) { union tsc_reg *local_tsc; unsigned long stamp; unsigned long flags; local_irq_save_hw(flags); local_tsc = &tsc[ipipe_processor_id()]; stamp = str8100_read_timer_counter(); if (stamp < local_tsc->low) local_tsc->high++; local_tsc->low = stamp; local_irq_restore_hw(flags); } void __ipipe_mach_acktimer(void) { #ifndef CONFIG_VIC_INTERRUPT write_seqlock(&xtime_lock); str8100_clear_timer_interrupt_status(__ipipe_mach_timerint); write_sequnlock(&xtime_lock); #endif ipipe_mach_update_tsc(); } notrace unsigned long long __ipipe_mach_get_tsc(void) { if (likely(str8100_timer_initialised)) { union tsc_reg *local_tsc, result; unsigned long stamp; local_tsc = &tsc[ipipe_processor_id()]; __asm__ ("ldmia %1, %M0\n" : "=r"(result.full), "+&r"(local_tsc) : "m"(*local_tsc)); barrier(); stamp = str8100_read_timer_counter(); if (stamp < result.low) result.high++; result.low = stamp; return result.full; } return 0; } #ifdef CONFIG_SMP void __ipipe_mach_get_tscinfo(struct __ipipe_tscinfo *info) { info->type = IPIPE_TSC_TYPE_NONE; } #else /* !CONFIG_SMP */ void __ipipe_mach_get_tscinfo(struct __ipipe_tscinfo *info) { info->type = IPIPE_TSC_TYPE_FREERUNNING; info->u.fr.counter = (unsigned *)(SYSPA_TIMER_BASE_ADDR + 0x40); info->u.fr.mask = 0xFFFFFFFF; info->u.fr.tsc = &tsc->full; } #endif /* !CONFIG_SMP */ void __ipipe_mach_set_dec(unsigned long delay) { unsigned long flags; if (delay > 8) { local_irq_save_hw(flags); TIMER1_MATCH_VALUE1_REG = TIMER1_COUNTER_REG + delay; local_irq_restore_hw(flags); } else ipipe_trigger_irq(__ipipe_mach_timerint); } unsigned long __ipipe_mach_get_dec(void) { return (TIMER1_MATCH_VALUE1_REG - TIMER1_COUNTER_REG); } void __ipipe_mach_release_timer(void) { __ipipe_mach_set_dec(__ipipe_mach_ticks_per_jiffy); } #endif /* CONFIG_IPIPE */ - Interrupts : #ifdef CONFIG_IPIPE void __ipipe_mach_demux_irq(unsigned irq, struct pt_regs *regs) { // No cascaded interrupt using the VIC } #endif /* CONFIG_IPIPE */ Best regards, -- Aubin REBILLAT _______________________________________________ Xenomai-help mailing list Xenomai-help@gna.org https://mail.gna.org/listinfo/xenomai-help