Am 27.02.2014 20:49, schrieb H. Peter Anvin:> I2C can be provided through an almost infinite number of controllers, > and building an I2C subsystem in Syslinux would be a good step toward > making it a fullblown operating system.Why not use linux as bootloader? Booting a (rather small) linux kernel with I?C support and either shutting down or kexecing another linux kernel (plus ramdisk) might be the solution. All one needs is a busybox (statically linked against uClibc), the kernel with needed disk and network drivers baked in, a statically linked kexec and a single shell script. If Jo?o Henrique wants to take this path, I am willing to help with further details. Regards, Mattias -- Mattias Schlenker - Redaktion + EDV-Beratung + Linux-CD/DVD-Konzepte August-Bebel-Str. 74 - 04275 LEIPZIG - GERMANY Bitte fuer geschaeftliche Telefonate vorzugsweise die VoIP-Telefonnummer +49 341 39290767 verwenden, da ich diese aufs Mobiltelefon routen kann!
Hi, Yes, probably using syslinux as 1st stage bootloader and a small linux (and this [1]) as 2nd stage boot will be a quite good solution. A bit more explanation about my needs: my custom hardware has a i2c controller over PCIe bus. We are using Intel Atom (with EG20T hub). I think that is not so simple to create a solid i2c framework inside syslinux to do it. Even thought I will need i2c to read what kind of hardware I am and then use the correct device tree to Linux do the job. So I think this job is out of scope of syslinux. Based on the above I will get the Mattias idea. Thanks a lot. [1] https://www.kernel.org/pub/linux/kernel/people/geoff/petitboot/petitboot.html On Fri, Feb 28, 2014 at 5:17 AM, Mattias Schlenker <ms at mattiasschlenker.de>wrote:> Am 27.02.2014 20:49, schrieb H. Peter Anvin: > > I2C can be provided through an almost infinite number of controllers, >> and building an I2C subsystem in Syslinux would be a good step toward >> making it a fullblown operating system. >> > > Why not use linux as bootloader? > > Booting a (rather small) linux kernel with I?C support and either shutting > down or kexecing another linux kernel (plus ramdisk) might be the solution. > All one needs is a busybox (statically linked against uClibc), the kernel > with needed disk and network drivers baked in, a statically linked kexec > and a single shell script. If Jo?o Henrique wants to take this path, I am > willing to help with further details. > > Regards, > Mattias > > -- > Mattias Schlenker - Redaktion + EDV-Beratung + Linux-CD/DVD-Konzepte > August-Bebel-Str. 74 - 04275 LEIPZIG - GERMANY > > Bitte fuer geschaeftliche Telefonate vorzugsweise die VoIP-Telefonnummer > +49 341 39290767 verwenden, da ich diese aufs Mobiltelefon routen kann! > > > _______________________________________________ > Syslinux mailing list > Submissions to Syslinux at zytor.com > Unsubscribe or set options at: > http://www.zytor.com/mailman/listinfo/syslinux > Please do not send private replies to mailing list traffic. > >-- Jo?o Henrique Ferreira de Freitas - joaohf_at_gmail.com Campinas-SP-Brasil
Am 28.02.2014 12:11, schrieb Jo?o Henrique Freitas:> Based on the above I will get the Mattias idea. > > Thanks a lot. > > [1] > https://www.kernel.org/pub/linux/kernel/people/geoff/petitboot/petitboot.htmlPetitboot seems to "Grand" for this purpose. kexec is so simple if you put the kernel and initramfs you want to boot into the initramfs used to test your environment. Of course you also can also add some scripts, modules and binaries to the original initramfs to test your environment and decide whether to shutdown or do the final switch_root. A cool feature of syslinux helps that you do not need to assemble a complete new initramfs everytime: Prepare a second cpio with the overrides and load it after the original initramfs: initrd=original.img,mods.img Do you just have to identify that a certain I?C controller is present or do you have to poll for the presence of some slaves or even poll for certain sensor values? I've never done I?C under linux, just playing around with it on Arduino... Don't hesitate to ask me for kexec-on-initramfs. From LessLinux development I got many ready binaries and scripts lying around that could easily be adapted to your task. Regards, Mattias -- Mattias Schlenker - Redaktion + EDV-Beratung + Linux-CD/DVD-Konzepte August-Bebel-Str. 74 - 04275 LEIPZIG - GERMANY Bitte fuer geschaeftliche Telefonate vorzugsweise die VoIP-Telefonnummer +49 341 39290767 verwenden, da ich diese aufs Mobiltelefon routen kann!
On 02/28/2014 03:11 AM, Jo?o Henrique Freitas wrote:> Hi, > > Yes, probably using syslinux as 1st stage bootloader and a small linux (and > this [1]) as 2nd stage boot will be a quite good solution. > > A bit more explanation about my needs: my custom hardware has a i2c > controller over PCIe bus. We are using Intel Atom (with EG20T hub). I think > that is not so simple to create a solid i2c framework inside syslinux to do > it. Even thought I will need i2c to read what kind of hardware I am and > then use the correct device tree to Linux do the job. So I think this job > is out of scope of syslinux. >Is there any of this you can do in firmware, since this is a custom design? Any reason for using device tree as opposed to the more x86-native native ACPI? -hpa