Not totally true: there has to be a file on the boot partition that we write, but it could just be another level of boot-loader.nick.mccloud wrote:On the Pi, the kernel HAS to be on the SD card
Not totally true: there has to be a file on the boot partition that we write, but it could just be another level of boot-loader.nick.mccloud wrote:On the Pi, the kernel HAS to be on the SD card
Which is basically what he says in the rest of the sentence you didn't quote.rurwin wrote:Not totally true: there has to be a file on the boot partition that we write, but it could just be another level of boot-loader.
Thanks, As these look ideal, but i can not find a UK suppler.toxibunny wrote:
google 'sd slot extender'
There two choses for this, write code to read/write SD card (not too hard) or as a temple measure, stick a floppy.img to end of kernel (kernel is very small anyway) and read from it with a basic fat driver.nick.mccloud wrote:On the Pi, the kernel HAS to be on the SD card - once it's got started it can then look for the rest of the files where ever you tell it to, if it has the code and drivers to do so.
If you mean, can Joe Public download a kernel.img and config.txt to test it sure, if anyone wants to test it, i can upload it to my site (read below).pygmy_giant wrote:Cool - can Joe Public get this?
I'd love to test it if possible, I assume your site is http://www.dex-os.com, but I couldn't find it on thereDexOS wrote:If you mean, can Joe Public download a kernel.img and config.txt to test it sure, if anyone wants to test it, i can upload it to my site (read below).pygmy_giant wrote:Cool - can Joe Public get this?
Cool thanks for testing, hope to get a new image out soon with more functions.pygmy_giant wrote:Did as you said and got what you described - it set the display mode, correctly displayed an image on my Sharp 1024 x 768 monitor, printed to the screen (via an HDMI - > DVI adapter) and turned the led on/off. It booted in the blink of an eye and worked first time - my testing is successfully completed.
I did not waste an age 'burning' an 'image' to my SD card - I just copied the files from my windows PC! Legend has it that God handed moses the 10 commandments on the (50x 2gb Kingston elite) SD card that I used. This card was manufactured before the classification system was implimented, so I cannot tell you what 'class' it is - just that it is shaped like an SD card and behaves accordingly.
Good work
Code: Select all
$ irb
>> out =File.new "dex.img","w+"
=> #<File:dex.img>
>> i = 0
=> 0
>> File.new("kernel.img").each_byte do |b|
?> if i < 0x803c|| i > 0x803c + 0x1494
>> out.putc b
>> else
?> out.putc b ^ 0xaa
>> end
>> i = i + 1
>> end
=> #<File:kernel.img>
>> out.close
=> nil
>> ^D
$ touch foo.c
$ arm-none-eabi-gcc -c foo.c -o foo
$ arm-none-eabi-objcopy --add-section dex=dex.img foo
$ arm-none-eabi-objdump -D foo | less
Thanks tufty for testing.tufty wrote:I wouldn't bother with the "encryption" stage next time. If someone can be bothered to fold your binary into something that can be disassembled, anything you can do is broken before you bother to start
It took me 2 minutes, but that's largely because I'm typing on a french keyboard but using an english keymap
Hint :
Oh, yeah, works here too. Nice oneCode: Select all
$ irb >> out =File.new "dex.img","w+" => #<File:dex.img> >> i = 0 => 0 >> File.new("kernel.img").each_byte do |b| ?> if i < 0x803c|| i > 0x803c + 0x1494 >> out.putc b >> else ?> out.putc b ^ 0xaa >> end >> i = i + 1 >> end => #<File:kernel.img> >> out.close => nil >> ^D $ touch foo.c $ arm-none-eabi-gcc -c foo.c -o foo $ arm-none-eabi-objcopy --add-section dex=dex.img foo $ arm-none-eabi-objdump -D foo | less
Simon
Code: Select all
mov rX, lr
...
mov lr, rX
mov pc, lr
Code: Select all
push {rX-rY,lr}
...
pop {rX-rY, pc}
Code: Select all
bx lr
Found 1 or 2 on ebay (but not cheap at £10+)DexOS wrote:Thanks, As these look ideal, but i can not find a UK suppler.toxibunny wrote:
google 'sd slot extender'
Thanks walney, i will get one, i seen them at £35, so the price is OK.walney wrote:Found 1 or 2 on ebay (but not cheap at £10+)DexOS wrote:Thanks, As these look ideal, but i can not find a UK suppler.toxibunny wrote:
google 'sd slot extender'
http://www.ebay.co.uk/itm/SD-card-exten ... 19d25a528a
You can take a look at the work of dwelch67pygmy_giant wrote:Hi Dex - some people like me who are interested in robotics/automation just want to access the GPIO pins and are not bothered about mouse/keyboard/display/usb (although an I2C / SPI driver would be useful). Could this be easily achieved by adapting your demo using a binary compiled from c libraries? I guess what I'm after is just a launch pad to boot straight into some compiled code with I2C / GPIO support.
For projects like a balancing robot or autonomous helicopter/drone less-is more as real-time control is critical.
Do you know how this could be done?
Thanks jbeale, i hope you find it useful.jbeale wrote:I don't have my Pi yet (hopefully soon). Just wanted to say great work so far on the "bare bones" approach, and I'm looking forward to being able to use this code! I'd like to be able to do some realtime stuff without too much extra overhead.
Edit: the github stuff from dwelch67 is very informative; he has some good info in the README files there.
It should not ignore the values pass to FB struct and yes you can switch modes on the fly, has the above demo does.gillespie wrote:So as far as I can tell, the pi seems to ignore whatever values you pass it in the FB struct (e.g. for width/height) and just use the values from config.txt. Is this what's supposed to happen, or am I doing something wrong? I've not tried the linux framebuffer driver, but I assume that can switch modes on the fly, so it must be possible.
Yeah sorry, it was just me being an idiot and using the wrong bit of memory... all is well now, thanksDexOS wrote:It should not ignore the values pass to FB struct and yes you can switch modes on the fly, has the above demo does.gillespie wrote:So as far as I can tell, the pi seems to ignore whatever values you pass it in the FB struct (e.g. for width/height) and just use the values from config.txt. Is this what's supposed to happen, or am I doing something wrong? I've not tried the linux framebuffer driver, but I assume that can switch modes on the fly, so it must be possible.