Author Topic: Extending Dev_img With Additional Headers And Libs  (Read 4857 times)

andrewmaier

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://www.andrew.maier.name
Extending Dev_img With Additional Headers And Libs
« on: March 10, 2005, 04:58:52 am »
Hi,

I am using the dev_img for compiling and packageing some software for my Z. I am very happy with it, since my attempts to crosscompile have never really been very successfull.

Yet I am now facing the problem, that naturally the dev_img cannot contain rverything I need for compiling certain software packages. E.g. openssl and Berkeley DB are missing.

So how do I extend the dev_img in an intelligent way, that is not to unpack the thing and repack it again with my extensions? Or can I simply mount the image rw and add the stuff I want? CRAMfs does not allow you to do this. Is squashfs different?

For the Berkeley DB I simply made a dev ipk and installed it, but this will get annoying over time, so I am sure there should be solution which is more intelligent.

How do other people solve this?


Andrew,
who is close to having a full chain of an imap-based mail solution, using mutt, ssmtp for mail, rlpr and a2ps for printing

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Extending Dev_img With Additional Headers And Libs
« Reply #1 on: March 10, 2005, 05:09:23 am »
I have a structure on my sd card containing bin/lib/include directories which I populate then usually pass project flags for for extra includes or libs or alternatively modify the -I, -L or -Wl,-rpath-link settings.
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Extending Dev_img With Additional Headers And Libs
« Reply #2 on: March 10, 2005, 09:13:31 am »
Quote
So how do I extend the dev_img in an intelligent way, that is not to unpack the thing and repack it again with my extensions? Or can I simply mount the image rw and add the stuff I want? CRAMfs does not allow you to do this. Is squashfs different?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=69992\"][{POST_SNAPBACK}][/a][/div]


For me unpacking the cramfs and repacking it with the stuff I needed WAS the intelligent way

You can't mount cramfs or squashfs RW and add stuff to them. The only way to add stuff to an image is to recrete them - this doesn't take long to do.

The other option is rather than symlinking /home/zaurus/develop/include (aka dev_img) to /usr/local/include (as dev_img 1.6 does by default). Create /usr/local/include as a directory and symlink everything inside /home/zaurus/develop/include to /usr/local/include (as they do with /usr/local/bin) this way /usr/local/include is writeable and you can add any extra header files you want there.

You can also use /opt/QtPalmtop/include and include that in your -I flags, but it's probably simpler to do the above.

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

ashikase

  • Sr. Member
  • ****
  • Posts: 280
    • View Profile
    • http://
Extending Dev_img With Additional Headers And Libs
« Reply #3 on: March 10, 2005, 07:59:04 pm »
The symlinking to /usr/local/include is really annoying; if /usr/local/include already exists, the link is created as /usr/local/include/include (>_<)

Everytime I install a new rom and resetup the dev image, I have to cleanup after it. Hopefully if another dev image is released, this will be fixed.

One additional thing... I've never really thought about it, but does anyone know why the dev image needs to create directories/links (automake, develop, letc.) in the /home/zaurus directory, and then further links in bin/lib/include? Why not just link directly from bin/lib/include to the mount location?

- ashikase
- anpachi, gifu, japan
« Last Edit: March 10, 2005, 08:00:26 pm by ashikase »
SL-C3100 & SL-C760

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Extending Dev_img With Additional Headers And Libs
« Reply #4 on: March 10, 2005, 09:26:35 pm »
Quote
The symlinking to /usr/local/include is really annoying; if /usr/local/include already exists, the link is created as /usr/local/include/include (>_<)

Everytime I install a new rom and resetup the dev image, I have to cleanup after it. Hopefully if another dev image is released, this will be fixed.

One additional thing... I've never really thought about it, but does anyone know why the dev image needs to create directories/links (automake, develop, letc.) in the /home/zaurus directory, and then further links in bin/lib/include? Why not just link directly from bin/lib/include to the mount location?

- ashikase
- anpachi, gifu, japan
[div align=\"right\"][a href=\"index.php?act=findpost&pid=70097\"][{POST_SNAPBACK}][/a][/div]

Yeah,

I think I'll send Anton a patch of the changes I made to the compiler setup script.

I've been wondering about all the links in /home/zaurus too. I first thought that develop was so that you could easily add source packages into develop/src and didn't need to cd far from $HOME, but $HOME/develop/src is read-only

THe other links had me confused too

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card